From b33a9f786df4032627f49e4719140a91b23206be Mon Sep 17 00:00:00 2001 From: Inhji Date: Fri, 8 Sep 2023 23:01:39 +0200 Subject: [PATCH] fix slfdsivj --- assets/css/app.css | 2 ++ lib/chiya_web/controllers/page_html.ex | 2 ++ .../controllers/page_html/bookmarks.html.heex | 21 +++------------ .../controllers/page_html/home.html.heex | 10 +------ .../controllers/page_html/note_list.html.heex | 9 +++++++ .../controllers/page_html/wiki.html.heex | 26 +++++++++---------- 6 files changed, 30 insertions(+), 40 deletions(-) create mode 100644 lib/chiya_web/controllers/page_html/note_list.html.heex diff --git a/assets/css/app.css b/assets/css/app.css index e8c59f0..a7fb02f 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -26,6 +26,8 @@ font-feature-settings: "case", "cpsp", "frac", "salt", "ccmp", "cv01", "cv02", "cv03", "cv04", "cv05", "cv06", "cv07", "cv09", "cv10", "cv11"; } + header h1 { @apply text-xl; } + .stack > * + * { margin-block-start: var(--flow-space, 1em); } diff --git a/lib/chiya_web/controllers/page_html.ex b/lib/chiya_web/controllers/page_html.ex index db17859..824983d 100644 --- a/lib/chiya_web/controllers/page_html.ex +++ b/lib/chiya_web/controllers/page_html.ex @@ -11,9 +11,11 @@ defmodule ChiyaWeb.PageHTML do def note_list_default(assigns) attr :notes, :list, required: true + attr :show_content, :boolean, default: true def note_list_microblog(assigns) attr :notes, :list, required: true + attr :show_content, :boolean, default: true def note_list_gallery(assigns) def tag_list([]), do: "No Tags" diff --git a/lib/chiya_web/controllers/page_html/bookmarks.html.heex b/lib/chiya_web/controllers/page_html/bookmarks.html.heex index ef66ba1..e021beb 100644 --- a/lib/chiya_web/controllers/page_html/bookmarks.html.heex +++ b/lib/chiya_web/controllers/page_html/bookmarks.html.heex @@ -1,12 +1,9 @@ <%= if @channel do %> -
- <.header> - Bookmarks - <:subtitle><%= Enum.count(@notes) %> in total - -
+
+

<%= Enum.count(@notes) %> Bookmarks

+
-
+
<%= if @channel.layout == :default do %> <.note_list_default notes={@notes}/> @@ -40,14 +37,4 @@
-<% else %> -
- <.header> - Bookmarks - - -
- Bookmarks not set up. -
-
<% end %> diff --git a/lib/chiya_web/controllers/page_html/home.html.heex b/lib/chiya_web/controllers/page_html/home.html.heex index 139063c..6a1d84c 100644 --- a/lib/chiya_web/controllers/page_html/home.html.heex +++ b/lib/chiya_web/controllers/page_html/home.html.heex @@ -1,11 +1,3 @@ <%= if @channel do %> - <%= if @channel.layout == :default do %> - <.note_list_default notes={@channel.notes}/> - <% end %> - <%= if @channel.layout == :gallery do %> - <.note_list_gallery notes={@channel.notes}/> - <% end %> - <%= if @channel.layout == :microblog do %> - <.note_list_microblog notes={@channel.notes}/> - <% end %> + <.note_list notes={@channel.notes} channel={@channel} /> <% end %> diff --git a/lib/chiya_web/controllers/page_html/note_list.html.heex b/lib/chiya_web/controllers/page_html/note_list.html.heex new file mode 100644 index 0000000..7c9f4f3 --- /dev/null +++ b/lib/chiya_web/controllers/page_html/note_list.html.heex @@ -0,0 +1,9 @@ +<%= if @channel.layout == :default do %> + <.note_list_default notes={@notes_updated}/> +<% end %> +<%= if @channel.layout == :gallery do %> + <.note_list_gallery notes={@notes_updated}/> +<% end %> +<%= if @channel.layout == :microblog do %> + <.note_list_microblog notes={@notes_updated}/> +<% end %> diff --git a/lib/chiya_web/controllers/page_html/wiki.html.heex b/lib/chiya_web/controllers/page_html/wiki.html.heex index b2c7d3d..03020ec 100644 --- a/lib/chiya_web/controllers/page_html/wiki.html.heex +++ b/lib/chiya_web/controllers/page_html/wiki.html.heex @@ -1,11 +1,9 @@ <%= if @channel do %> -
- <.header> - <%= @channel.name %> - -
+
+

<%= @channel.name %>

+
-
+
<%= Markdown.render(@channel.content) |> raw %>
@@ -15,13 +13,13 @@

Recently Updated

<%= if @channel.layout == :default do %> - <.note_list_default note={@notes_updated}/> + <.note_list_default notes={@notes_updated}/> <% end %> <%= if @channel.layout == :gallery do %> - <.note_list_gallery note={@notes_updated}/> + <.note_list_gallery notes={@notes_updated}/> <% end %> <%= if @channel.layout == :microblog do %> - <.note_list_microblog note={@notes_updated}/> + <.note_list_microblog notes={@notes_updated}/> <% end %> @@ -29,24 +27,24 @@

Recently Published

<%= if @channel.layout == :default do %> - <.note_list_default note={@notes_published}/> + <.note_list_default notes={@notes_published}/> <% end %> <%= if @channel.layout == :gallery do %> - <.note_list_gallery note={@notes_published}/> + <.note_list_gallery notes={@notes_published}/> <% end %> <%= if @channel.layout == :microblog do %> - <.note_list_microblog note={@notes_published}/> + <.note_list_microblog notes={@notes_published}/> <% end %>
<% else %> -
+
<.header> Wiki -
+
Wiki is not set up.
-- 2.39.5