improve tags and microblog, add links to footer

This commit is contained in:
Inhji 2023-07-27 22:33:05 +02:00
parent 3e9a06aa1e
commit d56278e26f
5 changed files with 28 additions and 31 deletions

View file

@ -90,7 +90,8 @@
<h2 class="font-bold tracking-wider">Links</h2>
<ul class="list-disc list-inside">
<li><a href="#"><del>Wiki</del></a></li>
<li><a href={~p"/wiki"}>Wiki</a></li>
<li><a href={~p"/about"}>About</a></li>
</ul>
</div>

View file

@ -42,9 +42,11 @@ defmodule ChiyaWeb.PublicComponents do
@doc """
Renders a middot as divider
"""
attr :class, :string, default: "text-theme-primary"
def dot(assigns),
do: ~H"""
<span class="text-theme-primary font-bold">·</span>
<span class={["font-bold", @class]}>·</span>
"""
@doc """
@ -75,6 +77,7 @@ defmodule ChiyaWeb.PublicComponents do
<a href={~p"/tagged-with/#{tag.slug}"} class={["p-category", @class_tag]}>
<%= tag.name %>
</a>
<.dot class="text-theme-base/50 last:hidden" />
<% end %>
</span>
"""
@ -176,18 +179,14 @@ defmodule ChiyaWeb.PublicComponents do
</div>
<footer class="mt-4">
<a href={~p"/note/#{note.slug}"}>
<time class="text-theme-base/75">
<%= pretty_datetime(note.published_at) %>
</time>
<.dot />
</a>
<%= if not Enum.empty?(note.tags) do %>
<.tags note={note} />
<.dot />
<% end %>
<a href={~p"/note/#{note.slug}"} class="text-theme-base/75">Permalink</a>
<%= if not Enum.empty?(note.images) do %>
<.dot />
<.icon name="hero-photo" />
<.tags note={note} class_tag="text-theme-base/75" />
<% end %>
</footer>
</article>

View file

@ -64,7 +64,6 @@
</time>
<%= if not Enum.empty?(@note.tags) do %>
<.dot />
<span>Tags</span>
<.tags note={@note} />
<% end %>
<%= if @note.kind != :post do %>

View file

@ -24,7 +24,6 @@
</div>
</aside>
</section>
<% else %>
<section class="mx-auto max-w-2xl">
<.header>

View file

@ -42,5 +42,4 @@
<%= if @setting.show_images_on_home, do: "✅", else: "❌" %>
</:item>
</.list>
<% end %>