From 1f7cf2599617681ab58da67472746d437a57a1b0 Mon Sep 17 00:00:00 2001 From: Inhji Date: Mon, 22 May 2023 20:15:12 +0200 Subject: [PATCH 1/2] fix channel layout --- lib/chiya_web/controllers/page_html/channel.html.heex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chiya_web/controllers/page_html/channel.html.heex b/lib/chiya_web/controllers/page_html/channel.html.heex index e701aa4..4051319 100644 --- a/lib/chiya_web/controllers/page_html/channel.html.heex +++ b/lib/chiya_web/controllers/page_html/channel.html.heex @@ -1,4 +1,4 @@ -
+

<%= @channel.name %>

From a41acf52da591d859dcf7a3f82f399223ae33d7e Mon Sep 17 00:00:00 2001 From: Inhji Date: Mon, 22 May 2023 21:05:33 +0200 Subject: [PATCH 2/2] blah --- lib/chiya/channels/channel.ex | 1 - .../components/layouts/root_public.html.heex | 22 +++++++++++-------- lib/chiya_web/components/public_components.ex | 9 ++++---- .../controllers/page_html/note.html.heex | 2 +- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/lib/chiya/channels/channel.ex b/lib/chiya/channels/channel.ex index 3605616..c22aced 100644 --- a/lib/chiya/channels/channel.ex +++ b/lib/chiya/channels/channel.ex @@ -16,7 +16,6 @@ defmodule Chiya.Channels.Channel do field :layout, Ecto.Enum, values: [ :default, :microblog, - :photoblog, :gallery ] diff --git a/lib/chiya_web/components/layouts/root_public.html.heex b/lib/chiya_web/components/layouts/root_public.html.heex index 02346be..84041f4 100644 --- a/lib/chiya_web/components/layouts/root_public.html.heex +++ b/lib/chiya_web/components/layouts/root_public.html.heex @@ -42,17 +42,21 @@
- Served by Chiya v<%= Application.spec(:chiya, :vsn) %> - <.dot /> - Made by Inhji - <.dot /> - Struggling to make a decent website since 2011 - <%= for identity <- @identities do %> - <.dot /> +

+ Served by Chiya v<%= Application.spec(:chiya, :vsn) %> + <.dot /> + Made by Inhji + <.dot /> + Struggling to make a decent website since 2011 + <.dot /> + Admin +

+ +

+ <%= for identity <- @identities do %> <%= identity.name %> <% end %> - <.dot /> - Admin +

diff --git a/lib/chiya_web/components/public_components.ex b/lib/chiya_web/components/public_components.ex index aba7b6a..ba5c667 100644 --- a/lib/chiya_web/components/public_components.ex +++ b/lib/chiya_web/components/public_components.ex @@ -9,6 +9,7 @@ defmodule ChiyaWeb.PublicComponents do import ChiyaWeb.Format import ChiyaWeb.Markdown, only: [render: 1] import Phoenix.HTML, only: [raw: 1] + import ChiyaWeb.CoreComponents @doc """ Renders a middot as divider @@ -113,15 +114,15 @@ defmodule ChiyaWeb.PublicComponents do <.dot /> Permalink + <%= if not Enum.empty?(note.images) do %> + <.dot /> + <.icon name="hero-photo" /> + <% end %> <% end %> """ - :photoblog -> - ~H""" - """ - _ -> # default, show headings only ~H"""
diff --git a/lib/chiya_web/controllers/page_html/note.html.heex b/lib/chiya_web/controllers/page_html/note.html.heex index 7b950ff..574a4ce 100644 --- a/lib/chiya_web/controllers/page_html/note.html.heex +++ b/lib/chiya_web/controllers/page_html/note.html.heex @@ -33,7 +33,7 @@ <%= Markdown.render(@note.content) |> raw %>
-
+
<%= if !Enum.empty?(@note.images) do %> <.line />