5 Commits

Author SHA1 Message Date
7fe636a99e restyle emails
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-27 12:59:16 -05:00
a94407a216 fix bug with email
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-27 12:06:26 -05:00
70de3f42a4 attempt to fix libcrypto error
Some checks are pending
continuous-integration/drone/push Build is running
2022-11-27 11:49:17 -05:00
03890d2431 update drone
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-27 01:18:04 -05:00
769a7838a5 add screenshot
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-26 23:24:23 -05:00
9 changed files with 30 additions and 26 deletions

View File

@ -1,6 +1,6 @@
kind: pipeline kind: pipeline
type: docker type: docker
name: memEx name: memex
steps: steps:
- name: restore-cache - name: restore-cache
@ -16,7 +16,7 @@ steps:
- assets/node_modules/ - assets/node_modules/
- name: test - name: test
image: elixir:1.13.4-alpine image: elixir:1.14.1-alpine
environment: environment:
TEST_DATABASE_URL: ecto://postgres:postgres@database/memex_test TEST_DATABASE_URL: ecto://postgres:postgres@database/memex_test
HOST: testing.example.tld HOST: testing.example.tld
@ -29,7 +29,7 @@ steps:
- npm --prefix ./assets ci --progress=false --no-audit --loglevel=error - npm --prefix ./assets ci --progress=false --no-audit --loglevel=error
- npm run --prefix ./assets deploy - npm run --prefix ./assets deploy
- mix do phx.digest, gettext.extract - mix do phx.digest, gettext.extract
- mix test - mix test.all
- name: build and publish stable - name: build and publish stable
image: thegeeklab/drone-docker-buildx image: thegeeklab/drone-docker-buildx
@ -38,7 +38,7 @@ steps:
repo: shibaobun/memex repo: shibaobun/memex
purge: true purge: true
compress: true compress: true
platforms: linux/amd64,linux/arm64,linux/arm/v7 platforms: linux/amd64,linux/arm/v7
username: username:
from_secret: docker_username from_secret: docker_username
password: password:
@ -55,7 +55,7 @@ steps:
repo: shibaobun/memex repo: shibaobun/memex
purge: true purge: true
compress: true compress: true
platforms: linux/amd64,linux/arm64,linux/arm/v7 platforms: linux/amd64,linux/arm/v7
username: username:
from_secret: docker_username from_secret: docker_username
password: password:

View File

@ -1,4 +1,4 @@
FROM elixir:1.13-alpine AS build FROM elixir:1.14.1-alpine AS build
# install build dependencies # install build dependencies
RUN apk add --no-cache build-base npm git python3 RUN apk add --no-cache build-base npm git python3
@ -37,7 +37,7 @@ RUN mix do compile, release
FROM alpine:latest AS app FROM alpine:latest AS app
RUN apk upgrade --no-cache && \ RUN apk upgrade --no-cache && \
apk add --no-cache bash openssl libgcc libstdc++ ncurses-libs apk add --no-cache bash openssl libssl1.1 libcrypto1.1 libgcc libstdc++ ncurses-libs
WORKDIR /app WORKDIR /app

View File

@ -62,7 +62,7 @@ if config_env() == :prod do
System.get_env("SECRET_KEY_BASE") || System.get_env("SECRET_KEY_BASE") ||
raise """ raise """
environment variable SECRET_KEY_BASE is missing. environment variable SECRET_KEY_BASE is missing.
You can generate one by calling: mix phx.gen.secret You can generate one by running: mix phx.gen.secret
""" """
config :memex, MemexWeb.Endpoint, secret_key_base: secret_key_base config :memex, MemexWeb.Endpoint, secret_key_base: secret_key_base
@ -79,7 +79,7 @@ if config_env() == :prod do
password: System.get_env("SMTP_PASSWORD") || raise("No SMTP_PASSWORD set!"), password: System.get_env("SMTP_PASSWORD") || raise("No SMTP_PASSWORD set!"),
ssl: System.get_env("SMTP_SSL") == "true", ssl: System.get_env("SMTP_SSL") == "true",
email_from: System.get_env("EMAIL_FROM") || "no-reply@#{System.get_env("HOST")}", email_from: System.get_env("EMAIL_FROM") || "no-reply@#{System.get_env("HOST")}",
email_name: System.get_env("EMAIL_NAME") || "Memex" email_name: System.get_env("EMAIL_NAME") || "memEx"
# ## Using releases # ## Using releases
# #

BIN
home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

View File

@ -19,8 +19,8 @@ defmodule Memex.Email do
@spec base_email(User.t(), String.t()) :: t() @spec base_email(User.t(), String.t()) :: t()
defp base_email(%User{email: email}, subject) do defp base_email(%User{email: email}, subject) do
from = Application.get_env(:Memex, Memex.Mailer)[:email_from] || "noreply@localhost" from = Application.get_env(:memex, Memex.Mailer)[:email_from] || "noreply@localhost"
name = Application.get_env(:Memex, Memex.Mailer)[:email_name] name = Application.get_env(:memex, Memex.Mailer)[:email_name]
new() |> to(email) |> from({name, from}) |> subject(subject) new() |> to(email) |> from({name, from}) |> subject(subject)
end end

View File

@ -4,15 +4,15 @@
<%= @email.subject %> <%= @email.subject %>
</title> </title>
</head> </head>
<body style="padding: 2em; color: rgb(31, 31, 31); background-color: rgb(220, 220, 228); font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; text-align: center;"> <body style="padding: 2em; color: rgb(161, 161, 170); background-color: rgb(39, 39, 42); font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; text-align: center;">
<%= @inner_content %> <%= @inner_content %>
<hr style="margin: 2em auto; border-width: 1px; border-color: rgb(212, 212, 216); width: 100%; max-width: 42rem;" /> <hr style="margin: 2em auto; border-width: 1px; border-color: rgb(161, 161, 170); width: 100%; max-width: 42rem;" />
<a style="color: rgb(31, 31, 31);" href={Routes.live_url(Endpoint, HomeLive)}> <a style="color: rgb(161, 161, 170);" href={Routes.live_url(Endpoint, HomeLive)}>
<%= dgettext( <%= dgettext(
"emails", "emails",
"This email was sent from Memex, the self-hosted firearm tracker website." "This email was sent from memEx"
) %> ) %>
</a> </a>
</body> </body>

View File

@ -7,5 +7,5 @@
===================== =====================
<%= dgettext("emails", <%= dgettext("emails",
"This email was sent from Memex at %{url}, the self-hosted firearm tracker website.", "This email was sent from memEx at %{url}",
url: Routes.live_url(Endpoint, HomeLive)) %> url: Routes.live_url(Endpoint, HomeLive)) %>

View File

@ -52,16 +52,6 @@ msgstr ""
msgid "Reset your Memex password" msgid "Reset your Memex password"
msgstr "" msgstr ""
#: lib/memex_web/templates/layout/email.txt.eex:9
#, elixir-autogen, elixir-format
msgid "This email was sent from Memex at %{url}, the self-hosted firearm tracker website."
msgstr ""
#: lib/memex_web/templates/layout/email.html.heex:13
#, elixir-autogen, elixir-format
msgid "This email was sent from Memex, the self-hosted firearm tracker website."
msgstr ""
#: lib/memex/accounts/email.ex:44 #: lib/memex/accounts/email.ex:44
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Update your Memex email" msgid "Update your Memex email"
@ -90,3 +80,13 @@ msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "You can reset your password by visiting the URL below:" msgid "You can reset your password by visiting the URL below:"
msgstr "" msgstr ""
#: lib/memex_web/templates/layout/email.html.heex:13
#, elixir-autogen, elixir-format
msgid "This email was sent from memEx"
msgstr ""
#: lib/memex_web/templates/layout/email.txt.eex:9
#, elixir-autogen, elixir-format
msgid "This email was sent from memEx at %{url}"
msgstr ""

View File

@ -1,5 +1,7 @@
# memEx # memEx
![old screenshot](https://gitea.bubbletea.dev/shibao/memEx/raw/branch/stable/home.png)
memEx is an easy way to digitize the structured processes of your life. memEx is an easy way to digitize the structured processes of your life.
- Notes: Document notes about individual items or concepts - Notes: Document notes about individual items or concepts
@ -56,3 +58,5 @@ You can use the following environment variables to configure memEx in
[![Build [![Build
Status](https://drone.bubbletea.dev/api/badges/shibao/memEx/status.svg?ref=refs/heads/dev)](https://drone.bubbletea.dev/shibao/memEx) Status](https://drone.bubbletea.dev/api/badges/shibao/memEx/status.svg?ref=refs/heads/dev)](https://drone.bubbletea.dev/shibao/memEx)
[![translation
status](https://weblate.bubbletea.dev/widgets/memEx/-/svg-badge.svg)](https://weblate.bubbletea.dev/engage/memEx/)