Merge pull request 'tootired' (#83) from devel into main
Reviewed-on: #83
This commit is contained in:
commit
3f7f9c48e8
6 changed files with 40 additions and 24 deletions
|
@ -7,9 +7,19 @@
|
||||||
@import "./lightbox.css";
|
@import "./lightbox.css";
|
||||||
|
|
||||||
@layer base {
|
@layer base {
|
||||||
:root { font-family: 'Inter', sans-serif; }
|
:root {
|
||||||
|
--font-features: "case", "cpsp", "frac", "salt", "ss02", "ccmp";
|
||||||
|
}
|
||||||
|
|
||||||
|
:root {
|
||||||
|
font-family: 'Inter', sans-serif;
|
||||||
|
font-feature-settings: var(--font-features);
|
||||||
|
}
|
||||||
@supports (font-variation-settings: normal) {
|
@supports (font-variation-settings: normal) {
|
||||||
:root { font-family: 'Inter var', sans-serif; }
|
:root {
|
||||||
|
font-family: 'Inter var', sans-serif;
|
||||||
|
font-feature-settings: var(--font-features);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
|
@ -93,3 +103,9 @@
|
||||||
.footnote:before { content: '{'; }
|
.footnote:before { content: '{'; }
|
||||||
.footnote:after { content: '}'; }
|
.footnote:after { content: '}'; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@layer utilities {
|
||||||
|
a.underline-link {
|
||||||
|
@apply underline decoration-2 decoration-theme-primary hover:decoration-theme-secondary transition;
|
||||||
|
}
|
||||||
|
}
|
|
@ -41,7 +41,7 @@
|
||||||
<%= @inner_content %>
|
<%= @inner_content %>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer class="mx-auto max-w-xl mt-8 text-theme-base/75 border-t pt-8 border-theme-background1">
|
<footer class="mx-auto max-w-xl mt-8 mb-8 text-theme-base/75 border-t pt-8 border-theme-background1">
|
||||||
<p>
|
<p>
|
||||||
<span>Served by Chiya v<%= Application.spec(:chiya, :vsn) %></span>
|
<span>Served by Chiya v<%= Application.spec(:chiya, :vsn) %></span>
|
||||||
<.dot />
|
<.dot />
|
||||||
|
|
|
@ -109,6 +109,7 @@ defmodule ChiyaWeb.PublicComponents do
|
||||||
<div class="prose prose-gruvbox">
|
<div class="prose prose-gruvbox">
|
||||||
<%= raw render(note.content) %>
|
<%= raw render(note.content) %>
|
||||||
</div>
|
</div>
|
||||||
|
<footer class="mt-1">
|
||||||
<time class="text-theme-base/75">
|
<time class="text-theme-base/75">
|
||||||
<%= pretty_datetime(note.published_at) %>
|
<%= pretty_datetime(note.published_at) %>
|
||||||
</time>
|
</time>
|
||||||
|
@ -118,6 +119,7 @@ defmodule ChiyaWeb.PublicComponents do
|
||||||
<.dot />
|
<.dot />
|
||||||
<.icon name="hero-photo" />
|
<.icon name="hero-photo" />
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</footer>
|
||||||
</article>
|
</article>
|
||||||
<% end %>
|
<% end %>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -10,4 +10,4 @@
|
||||||
tags={@tags}
|
tags={@tags}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<.back navigate={~p"/admin/notes"}>Back to notes</.back>
|
<.back navigate={~p"/admin/notes/#{@note.id}"}>Back to note</.back>
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
<div>
|
<div>
|
||||||
<header class="mx-auto max-w-xl">
|
<header class="mx-auto max-w-xl">
|
||||||
<h1 class="mt-16 text-3xl font-extrabold text-theme-base">
|
<h1 class="mt-16 lg:text-5xl md:text-4xl text-3xl font-bold text-theme-base">
|
||||||
<%= @note.name %>
|
<%= @note.name %>
|
||||||
</h1>
|
</h1>
|
||||||
<p class="mt-2 text-sm leading-6 text-theme-base">
|
<p class="mt-2 leading-6 text-theme-base">
|
||||||
<%= if @note.published_at do %>
|
<%= if @note.published_at do %>
|
||||||
<span>Published</span>
|
<span>Published</span>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span>Unpublished</span>
|
<span>Unpublished</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<time class="font-semibold"><%= pretty_date(@note.published_at) %></time>
|
<time class="font-semibold"><%= pretty_date(@note.published_at) %></time>
|
||||||
<span>·</span>
|
<.dot />
|
||||||
<span>Last Updated</span>
|
<span>Last Updated</span>
|
||||||
<time class="font-semibold"><%= pretty_date(@note.updated_at) %></time>
|
<time class="font-semibold"><%= pretty_date(@note.updated_at) %></time>
|
||||||
<%= if not Enum.empty?(@note.tags) do %>
|
<%= if not Enum.empty?(@note.tags) do %>
|
||||||
<span>·</span>
|
<.dot />
|
||||||
<span>Tags</span>
|
<span>Tags</span>
|
||||||
<span class="text-theme-primary font-semibold">
|
<span>
|
||||||
<%= for tag <- @note.tags do %>
|
<%= for tag <- @note.tags do %>
|
||||||
<a href={~p"/t/#{tag.slug}"}><%= tag.name %></a>
|
<a href={~p"/t/#{tag.slug}"} class="underline-link font-semibold"><%= tag.name %></a>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= if @current_user do %>
|
<%= if @current_user do %>
|
||||||
<span>·</span>
|
<.dot />
|
||||||
<a href={~p"/admin/notes/#{@note}/edit"} class="font-semibold underline decoration-2 decoration-theme-primary hover:bg-theme-primary hover:text-theme-background transition">Edit</a>
|
<a href={~p"/admin/notes/#{@note}"} class="underline-link font-semibold">Show in Admin</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
</p>
|
</p>
|
||||||
</header>
|
</header>
|
||||||
|
|
|
@ -12,9 +12,6 @@ defmodule ChiyaWeb.NoteShowLive do
|
||||||
~H"""
|
~H"""
|
||||||
<.header>
|
<.header>
|
||||||
<%= @note.name %>
|
<%= @note.name %>
|
||||||
<:subtitle>
|
|
||||||
<pre class="p-1 bg-gray-100 rounded select-all">[[<%= @note.slug %>]]</pre>
|
|
||||||
</:subtitle>
|
|
||||||
<:actions>
|
<:actions>
|
||||||
<.link href={~p"/admin/notes/#{@note}/edit"}>
|
<.link href={~p"/admin/notes/#{@note}/edit"}>
|
||||||
<.button>Edit</.button>
|
<.button>Edit</.button>
|
||||||
|
@ -47,6 +44,7 @@ defmodule ChiyaWeb.NoteShowLive do
|
||||||
<:item title="Tags"><%= note_tags(@note.tags) %></:item>
|
<:item title="Tags"><%= note_tags(@note.tags) %></:item>
|
||||||
<:item title="Links outgoing"><%= note_links(@note.links_from) %></:item>
|
<:item title="Links outgoing"><%= note_links(@note.links_from) %></:item>
|
||||||
<:item title="Links incoming"><%= note_links(@note.links_to) %></:item>
|
<:item title="Links incoming"><%= note_links(@note.links_to) %></:item>
|
||||||
|
<:item title="Embed"><pre class="p-1 bg-gray-100 text-black rounded select-all">[[<%= @note.slug %>]]</pre></:item>
|
||||||
</.list>
|
</.list>
|
||||||
|
|
||||||
<.line />
|
<.line />
|
||||||
|
|
Loading…
Reference in a new issue