fix theme

This commit is contained in:
Inhji 2023-05-20 23:50:53 +02:00
parent 55d43c10dc
commit e7024a767a
8 changed files with 29 additions and 28 deletions

View file

@ -57,7 +57,7 @@
/* Set width and color for identity icons */
a[rel] svg {
width: 1em;
fill: rgb(var(--color-primary));
fill: rgb(var(--color-foreground));
}
svg {
width: 1.5em;

View file

@ -44,6 +44,9 @@ module.exports = {
base: 'rgb(var(--color-foreground) / <alpha-value>)',
base1: 'rgb(var(--color-foreground1) / <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>)',
code: 'rgb(var(--color-code) / <alpha-value>)'
}

View file

@ -91,12 +91,6 @@ defmodule ChiyaWeb.AdminComponents do
</li>
<li class="flex-1"></li>
<%= 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>
<.link
href={~p"/admin"}
@ -115,12 +109,6 @@ defmodule ChiyaWeb.AdminComponents do
</.link>
</li>
<% 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>
<.link
href={~p"/user/log_in"}
@ -130,6 +118,12 @@ defmodule ChiyaWeb.AdminComponents do
</.link>
</li>
<% 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>
"""
end

View file

@ -1,10 +1,10 @@
<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">
<%= for channel <- @channels do %>
<.link
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 %>
</.link>

View file

@ -33,11 +33,15 @@
<%= @inner_content %>
</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="rounded-full bg-theme-primary/10 px-2 text-xs font-medium leading-6 text-theme-primary">
v<%= Application.spec(:chiya, :vsn) %>
</span>
</div>
<div class="flex-1" />
<div><a href="#top">Back to top</a></div>
</footer>
<%= raw(@settings.custom_html) %>

View file

@ -76,10 +76,10 @@ defmodule ChiyaWeb.PublicComponents do
</section>
<a
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 %>
<span class="text-theme-muted font-normal text-sm">
<span class="text-theme-base/75 text-sm">
<%= pretty_date(note.published_at) %>
</span>
</a>
@ -96,12 +96,12 @@ defmodule ChiyaWeb.PublicComponents do
<%= for note <- assigns.notes do %>
<a
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 %>
</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>
<% end %>
</section>

View file

@ -1,5 +1,5 @@
<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 %>
</h1>
<p class="mt-4 text-base leading-7 text-theme-base">

View file

@ -1,5 +1,5 @@
<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 %>
</h1>
<p class="mt-4 text-base leading-7 text-theme-base">
@ -13,7 +13,7 @@
<a
rel={identity.rel}
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) %>
<%= identity.name %>