devel #238
5 changed files with 33 additions and 36 deletions
|
@ -35,10 +35,10 @@
|
|||
</style>
|
||||
</head>
|
||||
<body class="text-theme-base bg-theme-background | h-feed hfeed">
|
||||
<aside class="block">
|
||||
<aside class="block print:hidden">
|
||||
<%= raw(@settings.custom_html) %>
|
||||
</aside>
|
||||
<header class="my-8 block px-3">
|
||||
<header class="my-8 block px-3 print:hidden">
|
||||
<nav class="mx-auto max-w-2xl">
|
||||
<ul class="flex gap-3">
|
||||
<li>
|
||||
|
@ -75,7 +75,7 @@
|
|||
<%= @inner_content %>
|
||||
</main>
|
||||
|
||||
<footer class="max-w-full mt-8 p-8 text-theme-base/75 bg-theme-background1">
|
||||
<footer class="max-w-full mt-8 p-8 text-theme-base/75 bg-theme-background1 print:hidden">
|
||||
<section class="max-w-2xl mx-auto flex gap-3">
|
||||
<div class="flex-1">
|
||||
<h2 class="font-bold tracking-wider">Info</h2>
|
||||
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
"""
|
||||
|
@ -146,9 +149,9 @@ defmodule ChiyaWeb.PublicComponents do
|
|||
</header>
|
||||
|
||||
<%= if assigns.show_content do %>
|
||||
<p class="text-theme-base">
|
||||
<%= String.slice(note.content, 0..150) %>
|
||||
</p>
|
||||
<p class="text-theme-base">
|
||||
<%= String.slice(note.content, 0..150) %>
|
||||
</p>
|
||||
<% end %>
|
||||
</a>
|
||||
<% end %>
|
||||
|
@ -167,7 +170,7 @@ defmodule ChiyaWeb.PublicComponents do
|
|||
|
||||
<header class="mt-4 text-lg">
|
||||
<%= if(note.kind == :bookmark) do %>
|
||||
<strong><%= note.name %></strong>
|
||||
<strong><%= note.name %></strong>
|
||||
<% end %>
|
||||
</header>
|
||||
|
||||
|
@ -176,18 +179,14 @@ defmodule ChiyaWeb.PublicComponents do
|
|||
</div>
|
||||
|
||||
<footer class="mt-4">
|
||||
<time class="text-theme-base/75">
|
||||
<%= pretty_datetime(note.published_at) %>
|
||||
</time>
|
||||
<.dot />
|
||||
<a href={~p"/note/#{note.slug}"}>
|
||||
<time class="text-theme-base/75">
|
||||
<%= pretty_datetime(note.published_at) %>
|
||||
</time>
|
||||
</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>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
</.header>
|
||||
|
||||
<%= if @current_user do %>
|
||||
<section class="max-w-2xl mx-auto mt-8">
|
||||
<section class="max-w-2xl mx-auto mt-8 print:hidden">
|
||||
<ul class="flex gap-3">
|
||||
<li>
|
||||
<a href={~p"/admin/notes/#{@note}/edit"} class="button">
|
||||
|
@ -21,7 +21,7 @@
|
|||
</aside>
|
||||
|
||||
<%= if has_outline?(@note) do %>
|
||||
<aside class="max-w-2xl mx-auto mt-8 prose prose-gruvbox">
|
||||
<aside class="max-w-2xl mx-auto mt-8 prose prose-gruvbox print:hidden">
|
||||
<div class="bg-theme-background1 rounded p-2">
|
||||
<%= raw(render_outline(@note)) %>
|
||||
</div>
|
||||
|
@ -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 %>
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
</div>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
<% else %>
|
||||
<section class="mx-auto max-w-2xl">
|
||||
<.header>
|
||||
|
|
|
@ -23,18 +23,18 @@
|
|||
</.list>
|
||||
|
||||
<.list>
|
||||
<:item title="Default Channel">
|
||||
<%= if @setting.default_channel, do: @setting.default_channel.name %>
|
||||
</:item>
|
||||
<:item title="Home Channel">
|
||||
<%= if @setting.home_channel, do: @setting.home_channel.name %>
|
||||
</:item>
|
||||
<:item title="Micropub Channel">
|
||||
<%= if @setting.micropub_channel, do: @setting.micropub_channel.name %>
|
||||
</:item>
|
||||
<:item title="Wiki Channel">
|
||||
<%= if @setting.micropub_channel, do: @setting.wiki_channel.name %>
|
||||
</:item>
|
||||
<:item title="Default Channel">
|
||||
<%= if @setting.default_channel, do: @setting.default_channel.name %>
|
||||
</:item>
|
||||
<:item title="Home Channel">
|
||||
<%= if @setting.home_channel, do: @setting.home_channel.name %>
|
||||
</:item>
|
||||
<:item title="Micropub Channel">
|
||||
<%= if @setting.micropub_channel, do: @setting.micropub_channel.name %>
|
||||
</:item>
|
||||
<:item title="Wiki Channel">
|
||||
<%= if @setting.micropub_channel, do: @setting.wiki_channel.name %>
|
||||
</:item>
|
||||
</.list>
|
||||
|
||||
<.list>
|
||||
|
@ -42,5 +42,4 @@
|
|||
<%= if @setting.show_images_on_home, do: "✅", else: "❌" %>
|
||||
</:item>
|
||||
</.list>
|
||||
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in a new issue