rename to memEx
This commit is contained in:
parent
1802e54caf
commit
5ee7071dff
@ -1,6 +1,6 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: memex
|
||||
name: memEx
|
||||
|
||||
steps:
|
||||
- name: restore-cache
|
||||
|
@ -20,7 +20,7 @@ defmodule MemexWeb.Components.Topbar do
|
||||
navigate={Routes.live_path(Endpoint, HomeLive)}
|
||||
class="mx-2 my-1 leading-5 text-xl text-primary-400 hover:underline"
|
||||
>
|
||||
<%= gettext("memex") %>
|
||||
<%= gettext("memEx") %>
|
||||
</.link>
|
||||
|
||||
<%= if @title_content do %>
|
||||
|
12
lib/memex_web/live/faq_live.ex
Normal file
12
lib/memex_web/live/faq_live.ex
Normal file
@ -0,0 +1,12 @@
|
||||
defmodule MemexWeb.FaqLive do
|
||||
@moduledoc """
|
||||
Liveview for the faq page
|
||||
"""
|
||||
|
||||
use MemexWeb, :live_view
|
||||
|
||||
@impl true
|
||||
def mount(_params, _session, socket) do
|
||||
{:ok, socket |> assign(page_title: gettext("faq"))}
|
||||
end
|
||||
end
|
18
lib/memex_web/live/faq_live.html.heex
Normal file
18
lib/memex_web/live/faq_live.html.heex
Normal file
@ -0,0 +1,18 @@
|
||||
<div class="mx-auto flex flex-col justify-center items-stretch space-y-8 max-w-3xl">
|
||||
<h1 class="title text-primary-400 text-2xl text-center">
|
||||
<%= gettext("faq") %>
|
||||
</h1>
|
||||
|
||||
<hr class="hr" />
|
||||
|
||||
<ul class="flex flex-col justify-start items-stretch space-y-4">
|
||||
<li class="flex flex-col justify-start items-stretch space-y-2">
|
||||
<b class="whitespace-nowrap">
|
||||
<%= gettext("what is this?") %>
|
||||
</b>
|
||||
<p>
|
||||
<%= gettext("this is a memex, used to document your notes") %>
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
@ -5,41 +5,11 @@ defmodule MemexWeb.HomeLive do
|
||||
|
||||
use MemexWeb, :live_view
|
||||
alias Memex.Accounts
|
||||
alias MemexWeb.{Endpoint, FaqLive}
|
||||
|
||||
@impl true
|
||||
def mount(_params, _session, socket) do
|
||||
admins = Accounts.list_users_by_role(:admin)
|
||||
{:ok, socket |> assign(page_title: gettext("home"), query: "", results: %{}, admins: admins)}
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_event("suggest", %{"q" => query}, socket) do
|
||||
{:noreply, socket |> assign(results: search(query), query: query)}
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_event("search", %{"q" => query}, socket) do
|
||||
case search(query) do
|
||||
%{^query => vsn} ->
|
||||
{:noreply, socket |> redirect(external: "https://hexdocs.pm/#{query}/#{vsn}")}
|
||||
|
||||
_ ->
|
||||
{:noreply,
|
||||
socket
|
||||
|> put_flash(:error, "No dependencies found matching \"#{query}\"")
|
||||
|> assign(results: %{}, query: query)}
|
||||
end
|
||||
end
|
||||
|
||||
defp search(query) do
|
||||
if not MemexWeb.Endpoint.config(:code_reloader) do
|
||||
raise "action disabled when not in development"
|
||||
end
|
||||
|
||||
for {app, desc, vsn} <- Application.started_applications(),
|
||||
app = to_string(app),
|
||||
String.starts_with?(app, query) and not List.starts_with?(desc, ~c"ERTS"),
|
||||
into: %{},
|
||||
do: {app, vsn}
|
||||
{:ok, socket |> assign(page_title: gettext("home"), admins: admins)}
|
||||
end
|
||||
end
|
||||
|
@ -1,13 +1,12 @@
|
||||
<div class="flex flex-col justify-center items-center text-center space-y-4">
|
||||
<h1 class="title text-primary-400 text-2xl">
|
||||
<%= gettext("memex") %>
|
||||
<div class="mx-auto flex flex-col justify-center items-stretch space-y-4 max-w-3xl">
|
||||
<h1 class="title text-primary-400 text-2xl text-center">
|
||||
<%= gettext("memEx") %>
|
||||
</h1>
|
||||
|
||||
<hr class="hr" />
|
||||
|
||||
<ul class="flex flex-col space-y-4 text-center">
|
||||
<li class="flex flex-col justify-center items-center
|
||||
space-y-2">
|
||||
<li class="flex flex-col justify-center items-center space-y-2">
|
||||
<b class="whitespace-nowrap">
|
||||
<%= gettext("notes:") %>
|
||||
</b>
|
||||
@ -16,8 +15,7 @@
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-col justify-center items-center
|
||||
space-y-2">
|
||||
<li class="flex flex-col justify-center items-center space-y-2">
|
||||
<b class="whitespace-nowrap">
|
||||
<%= gettext("contexts:") %>
|
||||
</b>
|
||||
@ -26,8 +24,7 @@
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-col justify-center items-center
|
||||
space-y-2">
|
||||
<li class="flex flex-col justify-center items-center space-y-2">
|
||||
<b class="whitespace-nowrap">
|
||||
<%= gettext("pipelines:") %>
|
||||
</b>
|
||||
@ -35,6 +32,15 @@
|
||||
<%= gettext("document your processes, attaching contexts to each step") %>
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-col justify-center items-center space-y-2">
|
||||
<.link
|
||||
navigate={Routes.live_path(Endpoint, FaqLive)}
|
||||
class="link title text-primary-400 text-lg"
|
||||
>
|
||||
<%= gettext("read more on how to use %{name}", name: "memEx") %>
|
||||
</.link>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<hr class="hr" />
|
||||
@ -44,8 +50,7 @@
|
||||
<%= gettext("features") %>
|
||||
</h2>
|
||||
|
||||
<li class="flex flex-col justify-center items-center
|
||||
space-y-2">
|
||||
<li class="flex flex-col justify-center items-center space-y-2">
|
||||
<b class="whitespace-nowrap">
|
||||
<%= gettext("multi-user:") %>
|
||||
</b>
|
||||
@ -54,8 +59,7 @@
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-col justify-center items-center
|
||||
space-y-2">
|
||||
<li class="flex flex-col justify-center items-center space-y-2">
|
||||
<b class="whitespace-nowrap">
|
||||
<%= gettext("privacy:") %>
|
||||
</b>
|
||||
@ -64,8 +68,7 @@
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-col justify-center items-center
|
||||
space-y-2">
|
||||
<li class="flex flex-col justify-center items-center space-y-2">
|
||||
<b class="whitespace-nowrap">
|
||||
<%= gettext("convenient:") %>
|
||||
</b>
|
||||
@ -88,16 +91,13 @@
|
||||
</b>
|
||||
<p>
|
||||
<%= if @admins |> Enum.empty?() do %>
|
||||
<.link
|
||||
href={Routes.user_registration_path(MemexWeb.Endpoint, :new)}
|
||||
class="hover:underline"
|
||||
>
|
||||
<%= dgettext("prompts", "register to setup %{name}", name: "memex") %>
|
||||
<.link href={Routes.user_registration_path(Endpoint, :new)} class="link">
|
||||
<%= dgettext("prompts", "register to setup %{name}", name: "memEx") %>
|
||||
</.link>
|
||||
<% else %>
|
||||
<div class="flex flex-wrap justify-center space-x-2">
|
||||
<%= for admin <- @admins do %>
|
||||
<a class="hover:underline" href={"mailto:#{admin.email}"}>
|
||||
<a class="link" href={"mailto:#{admin.email}"}>
|
||||
<%= admin.email %>
|
||||
</a>
|
||||
<% end %>
|
||||
@ -109,7 +109,7 @@
|
||||
<li class="flex flex-row justify-center space-x-2">
|
||||
<b><%= gettext("registration:") %></b>
|
||||
<p>
|
||||
<%= Application.get_env(:memex, MemexWeb.Endpoint)[:registration]
|
||||
<%= Application.get_env(:memex, Endpoint)[:registration]
|
||||
|> case do
|
||||
"public" -> gettext("public signups")
|
||||
_ -> gettext("invite only")
|
||||
@ -121,7 +121,7 @@
|
||||
<b><%= gettext("version:") %></b>
|
||||
<.link
|
||||
href="https://gitea.bubbletea.dev/shibao/memex/src/branch/stable/CHANGELOG.md"
|
||||
class="flex flex-row justify-center items-center space-x-2 hover:underline"
|
||||
class="flex flex-row justify-center items-center space-x-2 link"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
@ -141,7 +141,7 @@
|
||||
<li class="flex flex-col justify-center space-x-2">
|
||||
<.link
|
||||
href="https://gitea.bubbletea.dev/shibao/memex"
|
||||
class="flex flex-row justify-center items-center space-x-2 hover:underline"
|
||||
class="flex flex-row justify-center items-center space-x-2 link"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
@ -152,7 +152,7 @@
|
||||
<li class="flex flex-col justify-center space-x-2">
|
||||
<.link
|
||||
href="https://weblate.bubbletea.dev/engage/memex"
|
||||
class="flex flex-row justify-center items-center space-x-2 hover:underline"
|
||||
class="flex flex-row justify-center items-center space-x-2 link"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
@ -163,7 +163,7 @@
|
||||
<li class="flex flex-col justify-center space-x-2">
|
||||
<.link
|
||||
href="https://gitea.bubbletea.dev/shibao/memex/issues/new"
|
||||
class="flex flex-row justify-center items-center space-x-2 hover:underline"
|
||||
class="flex flex-row justify-center items-center space-x-2 link"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
|
@ -36,6 +36,7 @@ defmodule MemexWeb.Router do
|
||||
pipe_through :browser
|
||||
|
||||
live "/", HomeLive
|
||||
live "/faq", FaqLive
|
||||
end
|
||||
|
||||
## Authentication routes
|
||||
|
@ -5,8 +5,8 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<%= csrf_meta_tag() %>
|
||||
<.live_title suffix={" | #{gettext("memex")}"}>
|
||||
<%= assigns[:page_title] || gettext("memex") %>
|
||||
<.live_title suffix={" | #{gettext("memEx")}"}>
|
||||
<%= assigns[:page_title] || gettext("memEx") %>
|
||||
</.live_title>
|
||||
<link phx-track-static rel="stylesheet" href={Routes.static_path(@conn, "/css/app.css")} />
|
||||
<script
|
||||
|
6
mix.exs
6
mix.exs
@ -15,9 +15,9 @@ defmodule Memex.MixProject do
|
||||
consolidate_protocols: Mix.env() not in [:dev, :test],
|
||||
preferred_cli_env: [test: :test, "test.all": :test],
|
||||
# ExDoc
|
||||
name: "memex",
|
||||
source_url: "https://gitea.bubbletea.dev/shibao/memex",
|
||||
homepage_url: "https://gitea.bubbletea.dev/shibao/memex",
|
||||
name: "memEx",
|
||||
source_url: "https://gitea.bubbletea.dev/shibao/memEx",
|
||||
homepage_url: "https://gitea.bubbletea.dev/shibao/memEx",
|
||||
docs: [
|
||||
# The main page in the docs
|
||||
main: "README.md",
|
||||
|
@ -87,17 +87,17 @@ msgstr ""
|
||||
msgid "Visibility: %{visibility}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/live/home_live.html.heex:73
|
||||
#: lib/memex_web/live/home_live.html.heex:76
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "accessible from any internet-capable device"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/live/home_live.html.heex:87
|
||||
#: lib/memex_web/live/home_live.html.heex:90
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "admins:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/live/home_live.html.heex:53
|
||||
#: lib/memex_web/live/home_live.html.heex:58
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "built with sharing and collaboration in mind"
|
||||
msgstr ""
|
||||
@ -122,12 +122,12 @@ msgstr ""
|
||||
msgid "contexts"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/live/home_live.html.heex:22
|
||||
#: lib/memex_web/live/home_live.html.heex:20
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "contexts:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/live/home_live.html.heex:70
|
||||
#: lib/memex_web/live/home_live.html.heex:73
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "convenient:"
|
||||
msgstr ""
|
||||
@ -143,12 +143,12 @@ msgstr ""
|
||||
msgid "disable"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/live/home_live.html.heex:15
|
||||
#: lib/memex_web/live/home_live.html.heex:14
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "document notes about individual items or concepts"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/live/home_live.html.heex:35
|
||||
#: lib/memex_web/live/home_live.html.heex:32
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "document your processes, attaching contexts to each step"
|
||||
msgstr ""
|
||||
@ -178,7 +178,7 @@ msgstr ""
|
||||
msgid "english"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/live/home_live.html.heex:44
|
||||
#: lib/memex_web/live/home_live.html.heex:50
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "features"
|
||||
msgstr ""
|
||||
@ -193,7 +193,7 @@ msgstr ""
|
||||
msgid "help translate"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/live/home_live.html.heex:82
|
||||
#: lib/memex_web/live/home_live.html.heex:85
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "instance information"
|
||||
msgstr ""
|
||||
@ -220,15 +220,7 @@ msgstr ""
|
||||
msgid "log in"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/components/topbar.ex:23
|
||||
#: lib/memex_web/live/home_live.html.heex:3
|
||||
#: lib/memex_web/templates/layout/root.html.heex:8
|
||||
#: lib/memex_web/templates/layout/root.html.heex:9
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "memex"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/live/home_live.html.heex:50
|
||||
#: lib/memex_web/live/home_live.html.heex:55
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "multi-user:"
|
||||
msgstr ""
|
||||
@ -261,7 +253,7 @@ msgstr ""
|
||||
msgid "notes"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/live/home_live.html.heex:12
|
||||
#: lib/memex_web/live/home_live.html.heex:11
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "notes:"
|
||||
msgstr ""
|
||||
@ -274,22 +266,22 @@ msgstr ""
|
||||
msgid "pipelines"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/live/home_live.html.heex:32
|
||||
#: lib/memex_web/live/home_live.html.heex:29
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "pipelines:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/live/home_live.html.heex:63
|
||||
#: lib/memex_web/live/home_live.html.heex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "privacy controls on a per-note, context or pipeline basis"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/live/home_live.html.heex:60
|
||||
#: lib/memex_web/live/home_live.html.heex:64
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "privacy:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/live/home_live.html.heex:25
|
||||
#: lib/memex_web/live/home_live.html.heex:23
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "provide context around a single topic and hotlink to your notes"
|
||||
msgstr ""
|
||||
@ -473,7 +465,7 @@ msgstr ""
|
||||
msgid "%{slug} could not be found"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/live/home_live.ex:12
|
||||
#: lib/memex_web/live/home_live.ex:13
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "home"
|
||||
msgstr ""
|
||||
@ -482,3 +474,32 @@ msgstr ""
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "use [[note-slug]] to link to a note"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/live/faq_live.ex:10
|
||||
#: lib/memex_web/live/faq_live.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "faq"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/components/topbar.ex:23
|
||||
#: lib/memex_web/live/home_live.html.heex:3
|
||||
#: lib/memex_web/templates/layout/root.html.heex:8
|
||||
#: lib/memex_web/templates/layout/root.html.heex:9
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "memEx"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/live/home_live.html.heex:41
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "read more on how to use %{name}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/live/faq_live.html.heex:14
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "this is a memex, used to document your notes"
|
||||
msgstr ""
|
||||
|
||||
#: lib/memex_web/live/faq_live.html.heex:11
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "what is this?"
|
||||
msgstr ""
|
||||
|
12
readme.md
12
readme.md
@ -1,6 +1,6 @@
|
||||
# Memex
|
||||
# memEx
|
||||
|
||||
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
|
||||
- Contexts: Provide context around a single topic and hotlink to individual
|
||||
@ -16,7 +16,7 @@ memex is an easy way to digitize the structured processes of your life.
|
||||
# Installation
|
||||
|
||||
1. Install [Docker Compose](https://docs.docker.com/compose/install/) or alternatively [Docker Desktop](https://docs.docker.com/desktop/) on your machine.
|
||||
1. Copy the example [docker-compose.yml](https://gitea.bubbletea.dev/shibao/memex/src/branch/stable/docker-compose.yml). into your local machine where you want.
|
||||
1. Copy the example [docker-compose.yml](https://gitea.bubbletea.dev/shibao/memEx/src/branch/stable/docker-compose.yml). into your local machine where you want.
|
||||
Bind mounts are created in the same directory by default.
|
||||
1. Set the configuration variables in `docker-compose.yml`. You'll need to run
|
||||
`docker run -it shibaobun/memex /app/priv/random.sh` to generate a new
|
||||
@ -27,8 +27,8 @@ The first created user will be created as an admin.
|
||||
|
||||
# Configuration
|
||||
|
||||
You can use the following environment variables to configure Memex in
|
||||
[docker-compose.yml](https://gitea.bubbletea.dev/shibao/memex/src/branch/stable/docker-compose.yml).
|
||||
You can use the following environment variables to configure memEx in
|
||||
[docker-compose.yml](https://gitea.bubbletea.dev/shibao/memEx/src/branch/stable/docker-compose.yml).
|
||||
|
||||
- `HOST`: External url to generate links with. Must be set with your hosted
|
||||
domain name! I.e. `memex.mywebsite.tld`
|
||||
@ -55,4 +55,4 @@ You can use the following environment variables to configure Memex in
|
||||
---
|
||||
|
||||
[![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)
|
||||
|
@ -9,6 +9,6 @@ defmodule MemexWeb.HomeControllerTest do
|
||||
|
||||
test "GET /", %{conn: conn} do
|
||||
conn = get(conn, "/")
|
||||
assert html_response(conn, 200) =~ "memex"
|
||||
assert html_response(conn, 200) =~ "memEx"
|
||||
end
|
||||
end
|
||||
|
@ -5,7 +5,7 @@ defmodule MemexWeb.HomeLiveTest do
|
||||
|
||||
test "disconnected and connected render", %{conn: conn} do
|
||||
{:ok, page_live, disconnected_html} = live(conn, "/")
|
||||
assert disconnected_html =~ "memex"
|
||||
assert render(page_live) =~ "memex"
|
||||
assert disconnected_html =~ "memEx"
|
||||
assert render(page_live) =~ "memEx"
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user