From fa495b68e9916ae6bb8bb3a1fb1c96e392537290 Mon Sep 17 00:00:00 2001 From: Inhji Date: Sat, 9 Sep 2023 14:37:26 +0200 Subject: [PATCH] yeah --- assets/css/app.css | 16 +- .../controllers/page_html/bookmarks.html.heex | 8 +- .../controllers/page_html/channel.html.heex | 12 +- .../controllers/page_html/note.html.heex | 188 ++++++++++-------- .../controllers/page_html/wiki.html.heex | 8 +- 5 files changed, 132 insertions(+), 100 deletions(-) diff --git a/assets/css/app.css b/assets/css/app.css index 9b4d6fb..19f0485 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -73,7 +73,7 @@ /* === PAGE HEADER === */ header.page-header { - @apply border-b border-slate-300; + @apply border-b border-slate-300 mb-6; } header.page-header h1 { @@ -83,6 +83,20 @@ header.page-header p { @apply mb-3; } + + /* === PAGE GRID === */ + + section.page-grid { + @apply grid grid-cols-1 md:grid-cols-3 gap-3; + + > section { + @apply col-span-1 md:col-span-2; + } + + > aside { + @apply print:hidden; + } + } } /* diff --git a/lib/chiya_web/controllers/page_html/bookmarks.html.heex b/lib/chiya_web/controllers/page_html/bookmarks.html.heex index 7fa0764..a6bd6f2 100644 --- a/lib/chiya_web/controllers/page_html/bookmarks.html.heex +++ b/lib/chiya_web/controllers/page_html/bookmarks.html.heex @@ -2,13 +2,13 @@

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

-
-
+
+
<.note_list notes={@notes} layout={@channel.layout} />
-
+
+
diff --git a/lib/chiya_web/controllers/page_html/channel.html.heex b/lib/chiya_web/controllers/page_html/channel.html.heex index f1b51ae..9820a05 100644 --- a/lib/chiya_web/controllers/page_html/channel.html.heex +++ b/lib/chiya_web/controllers/page_html/channel.html.heex @@ -3,6 +3,12 @@

<%= Markdown.render(@channel.content) |> raw %>

-
- <.note_list notes={@channel.notes}/> -
\ No newline at end of file +
+
+ <.note_list notes={@channel.notes} layout={@channel.layout} /> +
+ + +
diff --git a/lib/chiya_web/controllers/page_html/note.html.heex b/lib/chiya_web/controllers/page_html/note.html.heex index ccff72d..a7a6baf 100644 --- a/lib/chiya_web/controllers/page_html/note.html.heex +++ b/lib/chiya_web/controllers/page_html/note.html.heex @@ -1,99 +1,111 @@ -
-
-

- <%= @note.name %> -

-
+
+
+
+
+

+ <%= @note.name %> +

+
-
- -
+ - +
+ <%= Markdown.render(@note.content) |> raw %> +
- <%= if has_outline?(@note) do %> - - <% end %> + <%= if not Enum.empty?(@note.links_to) do %> +
+ Notes linking here: + +
+ <% end %> -
- <%= Markdown.render(@note.content) |> raw %> -
+ <%= if String.length(@note.url || "") > 0 do %> +
+ <.icon name="hero-link" /> <%= @note.url %> +
+ <% end %> - <%= if not Enum.empty?(@note.links_to) do %> -
- Notes linking here: -
    - <%= for link <- @note.links_to do %> -
  • <%= link.name %>
  • +
    +
    +
    + <%= if @note.published_at do %> + Published + <% else %> + Unpublished + <% end %> +
    +
    +
    Last updated
    +
    + +
    +
    Tags
    +
    <.tags note={@note} />
    +
    Kind
    +
    <%= @note.kind %>
    +
    + + + +
    + +
    + <%= if !Enum.empty?(@note.images) do %> +
    + <%= for image <- @note.images do %> + + + + <% end %> +
    <% end %> +
    +
+ +
+ +
+ +
+ diff --git a/lib/chiya_web/controllers/page_html/wiki.html.heex b/lib/chiya_web/controllers/page_html/wiki.html.heex index 00d71e5..ec11e84 100644 --- a/lib/chiya_web/controllers/page_html/wiki.html.heex +++ b/lib/chiya_web/controllers/page_html/wiki.html.heex @@ -3,12 +3,12 @@

<%= Markdown.render(@channel.content) |> raw %>

-
-
+
+
<.note_list notes={@notes} />
-
+
+
\ No newline at end of file