Merge pull request 'redesign everything again, simplify stuff or whatever its late' (#78) from devel into main
Reviewed-on: #78
This commit is contained in:
commit
25e321b4a1
7 changed files with 64 additions and 64 deletions
|
@ -59,9 +59,6 @@
|
||||||
width: 1em;
|
width: 1em;
|
||||||
fill: rgb(var(--color-foreground));
|
fill: rgb(var(--color-foreground));
|
||||||
}
|
}
|
||||||
svg {
|
|
||||||
width: 1.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.alert {
|
.alert {
|
||||||
@apply p-3 mt-3 rounded;
|
@apply p-3 mt-3 rounded;
|
||||||
|
|
|
@ -119,10 +119,7 @@ defmodule ChiyaWeb.AdminComponents do
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<li>
|
<li>
|
||||||
<.link href="#" id="dark-mode-toggle" class="text-sm leading-6">
|
<.darkmode_toggle />
|
||||||
<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>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -30,6 +30,15 @@ defmodule ChiyaWeb.CoreComponents do
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def darkmode_toggle(assigns) do
|
||||||
|
~H"""
|
||||||
|
<.link href="#" id="dark-mode-toggle" class="text-sm leading-6">
|
||||||
|
<span class="hidden dark:inline bg-blue-900 p-1 rounded">🌙</span>
|
||||||
|
<span class="inline dark:hidden bg-blue-600 p-1 rounded">☀️</span>
|
||||||
|
</.link>
|
||||||
|
"""
|
||||||
|
end
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Renders a modal.
|
Renders a modal.
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,2 @@
|
||||||
<header class="px-4 sm:px-6 lg:px-8">
|
<.flash_group flash={@flash} />
|
||||||
<div class="flex items-center justify-end border-b border-theme-base/10 py-3">
|
<%= @inner_content %>
|
||||||
<div class="flex items-center gap-4">
|
|
||||||
<%= for channel <- @channels do %>
|
|
||||||
<.link
|
|
||||||
href={~p"/c/#{channel.slug}"}
|
|
||||||
class="font-semibold text-theme-base hover:text-theme-base/75 text-sm"
|
|
||||||
>
|
|
||||||
<%= channel.name %>
|
|
||||||
</.link>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<section class="mx-auto max-w-2xl px-4 mb-16">
|
|
||||||
<.flash_group flash={@flash} />
|
|
||||||
<%= @inner_content %>
|
|
||||||
</section>
|
|
||||||
|
|
|
@ -26,24 +26,33 @@
|
||||||
<%= @settings.custom_css %>
|
<%= @settings.custom_css %>
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-theme-background antialiased min-h-screen flex flex-col">
|
<body class="bg-theme-background mx-3 md:mx-0">
|
||||||
<.admin_bar current_user={@current_user} settings={@settings} />
|
<header class="mt-8 max-w-xl mx-auto">
|
||||||
|
<nav>
|
||||||
|
<ul class="flex gap-3">
|
||||||
|
<li>
|
||||||
|
<a href="/" class="text-theme-base px-3 py-2.5 border border-theme-background1 hover:bg-theme-background1 rounded transition font-semibold"><.icon name="hero-home" /> Home</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
<main class="flex-1">
|
<main class="mx-auto max-w-xl">
|
||||||
<%= @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 flex">
|
<footer class="mx-auto max-w-xl mt-8 text-theme-base border-t pt-8 border-theme-background1">
|
||||||
<div>
|
<span>Served by Chiya v<%= Application.spec(:chiya, :vsn) %></span>
|
||||||
<span class="text-theme-primary">⌘</span> <span>Chiya</span>
|
<span>·</span>
|
||||||
<span class="rounded-full bg-theme-primary/10 px-2 text-xs font-medium leading-6 text-theme-primary">
|
<span>Made by Inhji</span>
|
||||||
v<%= Application.spec(:chiya, :vsn) %>
|
<span>·</span>
|
||||||
</span>
|
<span>Struggling to make a decent website since 2011</span>
|
||||||
</div>
|
<%= for identity <- @identities do %>
|
||||||
<div class="flex-1" />
|
<span>·</span>
|
||||||
<div><a href="#top">Back to top</a></div>
|
<span><a href={identity.url}><%= identity.name %></a></span>
|
||||||
|
<% end %>
|
||||||
|
<span>·</span>
|
||||||
|
<span><a href={~p"/admin"}>Admin</a></span>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<%= raw(@settings.custom_html) %>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -20,7 +20,7 @@ defmodule ChiyaWeb.PublicComponents do
|
||||||
end
|
end
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Renders a header with title.
|
Renders a note-header with title.
|
||||||
"""
|
"""
|
||||||
attr :class, :string, default: nil
|
attr :class, :string, default: nil
|
||||||
attr :inline, :boolean, default: false
|
attr :inline, :boolean, default: false
|
||||||
|
|
|
@ -1,28 +1,33 @@
|
||||||
<div class="mx-auto max-w-xl mx-4 lg:mx-0">
|
<section class="p-10 bg-theme-background1 mt-8">
|
||||||
<h1 class="mt-16 text-3xl font-extrabold leading-10 tracking-tight text-theme-primary">
|
<h1 class="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 leading-7 text-theme-base/75 uppercase font-semibold">
|
||||||
<%= @settings.subtitle %>
|
<%= @settings.subtitle %>
|
||||||
</p>
|
</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
<div class="w-full mt-6 sm:w-auto">
|
<section class="mt-8 text-sm">
|
||||||
<div class="flex gap-4 text-sm leading-6 text-theme-base">
|
<ul class="flex flex-wrap gap-3">
|
||||||
<%= for identity <- @public_identities do %>
|
<li>
|
||||||
<div>
|
<a href="#" class="text-theme-base px-3 py-2.5 hover:bg-theme-background1 rounded transition font-semibold">
|
||||||
<a
|
<.icon name="hero-megaphone" />
|
||||||
rel={identity.rel}
|
|
||||||
href={identity.url}
|
|
||||||
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 %>
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</li>
|
||||||
|
<%= for channel <- @channels do %>
|
||||||
|
<li>
|
||||||
|
<a href={~p"/c/#{channel.slug}"} class="text-theme-base px-3 py-2.5 border border-theme-background1 hover:bg-theme-background1 rounded transition font-semibold">
|
||||||
|
<%= channel.name %>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</ul>
|
||||||
</div>
|
</section>
|
||||||
<%= if @channel do %>
|
|
||||||
|
<%= if @channel do %>
|
||||||
|
<section class="mt-8 border-t border-theme-background1">
|
||||||
<.note_list notes={@channel.notes} layout={@channel.layout} />
|
<.note_list notes={@channel.notes} layout={@channel.layout} />
|
||||||
<% end %>
|
</section>
|
||||||
</div>
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue