Merge pull request 'devel' (#289) from devel into main

Reviewed-on: #289
This commit is contained in:
inhji 2023-09-08 23:08:05 +02:00
commit 3377daadda
6 changed files with 30 additions and 40 deletions

View file

@ -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);
}

View file

@ -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"

View file

@ -1,12 +1,9 @@
<%= if @channel do %>
<section class="mx-auto max-w-2xl">
<.header>
Bookmarks
<:subtitle><%= Enum.count(@notes) %> in total</:subtitle>
</.header>
</section>
<header>
<h1><%= Enum.count(@notes) %> Bookmarks</h1>
</header>
<section class="mt-6 grid grid-cols-1 md:grid-cols-3 gap-3 max-w-4xl mx-auto">
<section class="mt-6 grid grid-cols-1 md:grid-cols-3 gap-3">
<section class="col-span-1 md:col-span-2">
<%= if @channel.layout == :default do %>
<.note_list_default notes={@notes}/>
@ -40,14 +37,4 @@
</ul>
</section>
</section>
<% else %>
<section class="mx-auto max-w-2xl">
<.header>
Bookmarks
</.header>
<section class="prose prose-gruvbox mt-6">
Bookmarks not set up.
</section>
</section>
<% end %>

View file

@ -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 %>

View file

@ -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 %>

View file

@ -1,11 +1,9 @@
<%= if @channel do %>
<section class="mx-auto max-w-2xl">
<.header>
<%= @channel.name %>
</.header>
</section>
<header>
<h1><%= @channel.name %></h1>
</header>
<section class="mt-6 flex flex-col gap-3 max-w-2xl mx-auto">
<section class="mt-6 flex flex-col">
<section class="prose prose-gruvbox md:prose-lg lg:prose-xl max-w-none">
<%= Markdown.render(@channel.content) |> raw %>
</section>
@ -15,13 +13,13 @@
<h2 class="text-xl text-theme-base">Recently Updated</h2>
<%= 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 %>
</div>
@ -29,24 +27,24 @@
<h2 class="text-xl text-theme-base">Recently Published</h2>
<%= 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 %>
</div>
</aside>
</section>
<% else %>
<section class="mx-auto max-w-2xl">
<section>
<.header>
Wiki
</.header>
<section class="prose prose-gruvbox mt-6">
<section class="prose">
Wiki is not set up.
</section>
</section>