improve overall layout

This commit is contained in:
Inhji 2023-06-03 11:47:55 +02:00
parent 40fe6d05a5
commit 7049286a79
6 changed files with 50 additions and 29 deletions

View file

@ -51,6 +51,9 @@ module.exports = {
primary1: 'rgb(var(--color-primary1) / <alpha-value>)',
secondary: 'rgb(var(--color-secondary) / <alpha-value>)',
secondary1: 'rgb(var(--color-secondary1) / <alpha-value>)',
tertiary: 'rgb(var(--color-blue) / <alpha-value>)',
quaternary: 'rgb(var(--color-purple) / <alpha-value>)',
quinary: 'rgb(var(--color-yellow) / <alpha-value>)',
heading: 'rgb(var(--color-heading) / <alpha-value>)'
}
}

View file

@ -477,7 +477,7 @@ defmodule ChiyaWeb.CoreComponents do
def header(assigns) do
~H"""
<header class={[@actions != [] && "flex items-center justify-between gap-6", @class]}>
<header class={[@actions != [] && "flex justify-between gap-6 flex-col lg:flex-row", @class]}>
<div>
<h1 class="text-lg font-semibold leading-8 text-gray-800 dark:text-gray-200">
<%= render_slot(@inner_block) %>

View file

@ -61,23 +61,49 @@
</main>
<footer class="max-w-full mt-8 p-8 text-theme-base/75 bg-theme-background1">
<section class="max-w-xl mx-auto">
<p>
<span>Served by Chiya v<%= Application.spec(:chiya, :vsn) %></span>
<.dot />
<span>Made by Inhji</span>
<.dot />
<span>Struggling to make a decent website since 2011</span>
</p>
<section class="max-w-2xl mx-auto flex gap-3">
<div class="flex-1">
<h2 class="font-bold tracking-wider">Info</h2>
<p>
<ul class="list-disc list-inside">
<li>Served by Chiya v<%= Application.spec(:chiya, :vsn) %></li>
<li>Made by Inhji</li>
</ul>
</div>
<div class="flex-1">
<h2 class="font-bold tracking-wider">Links</h2>
<ul class="list-disc list-inside">
<li><a href="#"><del>Wiki</del></a></li>
</ul>
</div>
<div class="flex-1">
<h2 class="font-bold tracking-wider">Elsewhere</h2>
<ul class="list-disc list-inside">
<%= for identity <- @public_identities do %>
<span><a href={identity.url}><%= identity.name %></a></span>
<.dot />
<li><a href={identity.url}><%= identity.name %></a></li>
<% end %>
<span><a href={~p"/admin"}>Admin</a></span>
</p>
</ul>
</div>
</section>
<section class="max-w-2xl mx-auto">
<.divider />
<div data-dummy="true" />
</section>
<p class="mt-4 max-w-2xl mx-auto text-center">Struggling to make a decent website since 2011</p>
</footer>
<section class="flex h-1 w-full flex-row">
<div class="bg-theme-primary w-full"></div>
<div class="bg-theme-secondary w-full"></div>
<div class="bg-theme-tertiary w-full"></div>
<div class="bg-theme-quaternary w-full"></div>
<div class="bg-theme-quinary w-full"></div>
</section>
</body>
</html>

View file

@ -31,7 +31,7 @@ defmodule ChiyaWeb.PublicComponents do
def divider(assigns) do
~H"""
<div class="flex items-center my-8 text-theme-base/75 before:flex-1 after:flex-1 before:content-[''] after:content-[''] before:p-[0.5px] after:p-[0.5px] before:bg-theme-background1 after:bg-theme-background1 w-full mx-auto last:hidden">
<div class="flex items-center my-8 text-theme-base/75 before:flex-1 after:flex-1 before:content-[''] after:content-[''] before:p-[0.5px] after:p-[0.5px] before:bg-theme-base/25 after:bg-theme-base/25 w-full mx-auto last:hidden">
<%= assigns.text %>
</div>
"""

View file

@ -33,15 +33,4 @@
<:col :let={note} label="Name"><%= note.name %></:col>
<:col :let={note} label="Updated at"><%= from_now(note.updated_at) %></:col>
<:col :let={note} label="Published at"><%= from_now(note.published_at) %></:col>
<:action :let={note}>
<div class="sr-only">
<.link navigate={~p"/admin/notes/#{note}"}>Show</.link>
</div>
<.link navigate={~p"/admin/notes/#{note}/edit"}>Edit</.link>
</:action>
<:action :let={note}>
<.link href={~p"/admin/notes/#{note}"} method="delete" data-confirm="Are you sure?">
Delete
</.link>
</:action>
</.table>

View file

@ -22,6 +22,9 @@ defmodule ChiyaWeb.NoteShowLive do
<.link href={~p"/admin/notes/#{@note}/raw"}>
<.button>Raw</.button>
</.link>
<.link href={~p"/admin/notes/#{@note}"} method="delete" data-confirm="Are you sure?">
<.button>Delete</.button>
</.link>
<%= if is_nil(@note.published_at) do %>
<.link href={~p"/admin/notes/#{@note}/publish"}>
<.button>Publish</.button>