Merge pull request 'fix theme' (#76) from devel into main
Reviewed-on: #76
This commit is contained in:
commit
a07d1f73db
8 changed files with 29 additions and 28 deletions
|
@ -57,7 +57,7 @@
|
||||||
/* Set width and color for identity icons */
|
/* Set width and color for identity icons */
|
||||||
a[rel] svg {
|
a[rel] svg {
|
||||||
width: 1em;
|
width: 1em;
|
||||||
fill: rgb(var(--color-primary));
|
fill: rgb(var(--color-foreground));
|
||||||
}
|
}
|
||||||
svg {
|
svg {
|
||||||
width: 1.5em;
|
width: 1.5em;
|
||||||
|
|
|
@ -44,6 +44,9 @@ module.exports = {
|
||||||
base: 'rgb(var(--color-foreground) / <alpha-value>)',
|
base: 'rgb(var(--color-foreground) / <alpha-value>)',
|
||||||
base1: 'rgb(var(--color-foreground1) / <alpha-value>)',
|
base1: 'rgb(var(--color-foreground1) / <alpha-value>)',
|
||||||
primary: 'rgb(var(--color-primary) / <alpha-value>)',
|
primary: 'rgb(var(--color-primary) / <alpha-value>)',
|
||||||
|
primary1: 'rgb(var(--color-primary1) / <alpha-value>)',
|
||||||
|
secondary: 'rgb(var(--color-secondary) / <alpha-value>)',
|
||||||
|
secondary1: 'rgb(var(--color-secondary1) / <alpha-value>)',
|
||||||
heading: 'rgb(var(--color-heading) / <alpha-value>)',
|
heading: 'rgb(var(--color-heading) / <alpha-value>)',
|
||||||
code: 'rgb(var(--color-code) / <alpha-value>)'
|
code: 'rgb(var(--color-code) / <alpha-value>)'
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,12 +91,6 @@ defmodule ChiyaWeb.AdminComponents do
|
||||||
</li>
|
</li>
|
||||||
<li class="flex-1"></li>
|
<li class="flex-1"></li>
|
||||||
<%= if @current_user do %>
|
<%= if @current_user do %>
|
||||||
<li>
|
|
||||||
<.link href="#" id="dark-mode-toggle" class="text-sm leading-6">
|
|
||||||
<span class="inline dark:hidden">🌙</span>
|
|
||||||
<span class="hidden dark:inline">☀️</span>
|
|
||||||
</.link>
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<.link
|
<.link
|
||||||
href={~p"/admin"}
|
href={~p"/admin"}
|
||||||
|
@ -115,12 +109,6 @@ defmodule ChiyaWeb.AdminComponents do
|
||||||
</.link>
|
</.link>
|
||||||
</li>
|
</li>
|
||||||
<% else %>
|
<% else %>
|
||||||
<li>
|
|
||||||
<.link href="#" id="dark-mode-toggle" class="text-sm leading-6">
|
|
||||||
<span class="inline dark:hidden">🌙</span>
|
|
||||||
<span class="hidden dark:inline">☀️</span>
|
|
||||||
</.link>
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<.link
|
<.link
|
||||||
href={~p"/user/log_in"}
|
href={~p"/user/log_in"}
|
||||||
|
@ -130,6 +118,12 @@ defmodule ChiyaWeb.AdminComponents do
|
||||||
</.link>
|
</.link>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<li>
|
||||||
|
<.link href="#" id="dark-mode-toggle" class="text-sm leading-6">
|
||||||
|
<span class="inline dark:hidden bg-blue-900 p-1 rounded">🌙</span>
|
||||||
|
<span class="hidden dark:inline bg-blue-500 p-1 rounded">☀️</span>
|
||||||
|
</.link>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<header class="px-4 sm:px-6 lg:px-8">
|
<header class="px-4 sm:px-6 lg:px-8">
|
||||||
<div class="flex items-center justify-end border-b border-theme-dim/50 py-3">
|
<div class="flex items-center justify-end border-b border-theme-base/10 py-3">
|
||||||
<div class="flex items-center gap-4">
|
<div class="flex items-center gap-4">
|
||||||
<%= for channel <- @channels do %>
|
<%= for channel <- @channels do %>
|
||||||
<.link
|
<.link
|
||||||
href={~p"/c/#{channel.slug}"}
|
href={~p"/c/#{channel.slug}"}
|
||||||
class="text-xs font-semibold leading-6 text-theme-base hover:text-theme-base/75"
|
class="font-semibold text-theme-base hover:text-theme-base/75 text-sm"
|
||||||
>
|
>
|
||||||
<%= channel.name %>
|
<%= channel.name %>
|
||||||
</.link>
|
</.link>
|
||||||
|
|
|
@ -33,11 +33,15 @@
|
||||||
<%= @inner_content %>
|
<%= @inner_content %>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer class="px-4 py-1 sm:px-6 lg:px-8 bg-white/30 dark:bg-black/30 text-gray-900 dark:text-gray-100 text-xs leading-6 font-semibold">
|
<footer class="px-4 py-1 sm:px-6 lg:px-8 bg-white/30 dark:bg-black/30 text-gray-900 dark:text-gray-100 text-xs leading-6 font-semibold flex">
|
||||||
|
<div>
|
||||||
<span class="text-theme-primary">⌘</span> <span>Chiya</span>
|
<span class="text-theme-primary">⌘</span> <span>Chiya</span>
|
||||||
<span class="rounded-full bg-theme-primary/10 px-2 text-xs font-medium leading-6 text-theme-primary">
|
<span class="rounded-full bg-theme-primary/10 px-2 text-xs font-medium leading-6 text-theme-primary">
|
||||||
v<%= Application.spec(:chiya, :vsn) %>
|
v<%= Application.spec(:chiya, :vsn) %>
|
||||||
</span>
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="flex-1" />
|
||||||
|
<div><a href="#top">Back to top</a></div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<%= raw(@settings.custom_html) %>
|
<%= raw(@settings.custom_html) %>
|
||||||
|
|
|
@ -76,10 +76,10 @@ defmodule ChiyaWeb.PublicComponents do
|
||||||
</section>
|
</section>
|
||||||
<a
|
<a
|
||||||
href={~p"/#{note.slug}"}
|
href={~p"/#{note.slug}"}
|
||||||
class="text-theme-primary text-lg/10 font-semibold rounded-lg -mx-2 -my-0.5 px-2 py-0.5 hover:bg-theme-primary/10 transition"
|
class="text-theme-secondary text-lg/10 font-semibold rounded-lg -mx-2 -my-0.5 px-2 py-0.5 hover:bg-theme-secondary/10 transition"
|
||||||
>
|
>
|
||||||
<%= note.name %>
|
<%= note.name %>
|
||||||
<span class="text-theme-muted font-normal text-sm">
|
<span class="text-theme-base/75 text-sm">
|
||||||
<%= pretty_date(note.published_at) %>
|
<%= pretty_date(note.published_at) %>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -96,12 +96,12 @@ defmodule ChiyaWeb.PublicComponents do
|
||||||
<%= for note <- assigns.notes do %>
|
<%= for note <- assigns.notes do %>
|
||||||
<a
|
<a
|
||||||
href={~p"/#{note.slug}"}
|
href={~p"/#{note.slug}"}
|
||||||
class="rounded-lg -mx-2 -my-0.5 px-2 py-0.5 hover:bg-theme-primary/10 transition"
|
class="rounded-lg -mx-2 -my-0.5 px-2 py-0.5 hover:bg-theme-secondary/10 transition"
|
||||||
>
|
>
|
||||||
<span class="text-theme-primary text-lg font-semibold leading-8">
|
<span class="text-theme-secondary text-lg font-semibold leading-8">
|
||||||
<%= note.name %>
|
<%= note.name %>
|
||||||
</span>
|
</span>
|
||||||
<span class="text-theme-base text-sm"><%= pretty_date(note.published_at) %></span>
|
<span class="text-theme-base/75 text-sm"><%= pretty_date(note.published_at) %></span>
|
||||||
</a>
|
</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="mx-auto max-w-xl mx-4 lg:mx-0">
|
<div class="mx-auto max-w-xl mx-4 lg:mx-0">
|
||||||
<h1 class="mt-16 text-[2rem] font-semibold font-serif leading-10 tracking-tighter text-theme-heading">
|
<h1 class="mt-16 text-3xl font-extrabold tracking-tight text-theme-primary">
|
||||||
<%= @channel.name %>
|
<%= @channel.name %>
|
||||||
</h1>
|
</h1>
|
||||||
<p class="mt-4 text-base leading-7 text-theme-base">
|
<p class="mt-4 text-base leading-7 text-theme-base">
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="mx-auto max-w-xl mx-4 lg:mx-0">
|
<div class="mx-auto max-w-xl mx-4 lg:mx-0">
|
||||||
<h1 class="mt-16 text-3xl font-semibold font-serif leading-10 tracking-tighter text-theme-heading">
|
<h1 class="mt-16 text-3xl font-extrabold leading-10 tracking-tight text-theme-primary">
|
||||||
<%= @settings.title %>
|
<%= @settings.title %>
|
||||||
</h1>
|
</h1>
|
||||||
<p class="mt-4 text-base leading-7 text-theme-base">
|
<p class="mt-4 text-base leading-7 text-theme-base">
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
<a
|
<a
|
||||||
rel={identity.rel}
|
rel={identity.rel}
|
||||||
href={identity.url}
|
href={identity.url}
|
||||||
class="group -mx-2 -my-0.5 inline-flex items-center gap-3 rounded-lg px-2 py-0.5 hover:bg-theme-primary/10 transition"
|
class="group -mx-2 -my-0.5 inline-flex items-center gap-1 rounded-lg px-2 py-0.5 hover:bg-theme-primary/50 transition"
|
||||||
>
|
>
|
||||||
<%= raw(identity.icon) %>
|
<%= raw(identity.icon) %>
|
||||||
<%= identity.name %>
|
<%= identity.name %>
|
||||||
|
|
Loading…
Reference in a new issue