commit
235f4ef568
6 changed files with 59 additions and 34 deletions
|
@ -51,6 +51,9 @@ module.exports = {
|
||||||
primary1: 'rgb(var(--color-primary1) / <alpha-value>)',
|
primary1: 'rgb(var(--color-primary1) / <alpha-value>)',
|
||||||
secondary: 'rgb(var(--color-secondary) / <alpha-value>)',
|
secondary: 'rgb(var(--color-secondary) / <alpha-value>)',
|
||||||
secondary1: 'rgb(var(--color-secondary1) / <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>)'
|
heading: 'rgb(var(--color-heading) / <alpha-value>)'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -477,7 +477,7 @@ defmodule ChiyaWeb.CoreComponents do
|
||||||
|
|
||||||
def header(assigns) do
|
def header(assigns) do
|
||||||
~H"""
|
~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>
|
<div>
|
||||||
<h1 class="text-lg font-semibold leading-8 text-gray-800 dark:text-gray-200">
|
<h1 class="text-lg font-semibold leading-8 text-gray-800 dark:text-gray-200">
|
||||||
<%= render_slot(@inner_block) %>
|
<%= render_slot(@inner_block) %>
|
||||||
|
|
|
@ -61,23 +61,51 @@
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer class="max-w-full mt-8 p-8 text-theme-base/75 bg-theme-background1">
|
<footer class="max-w-full mt-8 p-8 text-theme-base/75 bg-theme-background1">
|
||||||
<section class="max-w-xl mx-auto">
|
<section class="max-w-2xl mx-auto flex gap-3">
|
||||||
<p>
|
<div class="flex-1">
|
||||||
<span>Served by Chiya v<%= Application.spec(:chiya, :vsn) %></span>
|
<h2 class="font-bold tracking-wider">Info</h2>
|
||||||
<.dot />
|
|
||||||
<span>Made by Inhji</span>
|
|
||||||
<.dot />
|
|
||||||
<span>Struggling to make a decent website since 2011</span>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<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 %>
|
<%= for identity <- @public_identities do %>
|
||||||
<span><a href={identity.url}><%= identity.name %></a></span>
|
<li><a href={identity.url}><%= identity.name %></a></li>
|
||||||
<.dot />
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<span><a href={~p"/admin"}>Admin</a></span>
|
</ul>
|
||||||
</p>
|
</div>
|
||||||
</section>
|
</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>
|
</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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -28,9 +28,10 @@ defmodule ChiyaWeb.PublicComponents do
|
||||||
"""
|
"""
|
||||||
|
|
||||||
attr :text, :string, default: "⌘"
|
attr :text, :string, default: "⌘"
|
||||||
|
|
||||||
def divider(assigns) do
|
def divider(assigns) do
|
||||||
~H"""
|
~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 %>
|
<%= assigns.text %>
|
||||||
</div>
|
</div>
|
||||||
"""
|
"""
|
||||||
|
@ -86,8 +87,7 @@ defmodule ChiyaWeb.PublicComponents do
|
||||||
data-gallery={gallery_name(note)}
|
data-gallery={gallery_name(note)}
|
||||||
data-description={ChiyaWeb.Markdown.render(image.content)}
|
data-description={ChiyaWeb.Markdown.render(image.content)}
|
||||||
>
|
>
|
||||||
<img src={ChiyaWeb.Helpers.image_url(image, :thumb)} loading="lazy"
|
<img src={ChiyaWeb.Helpers.image_url(image, :thumb)} loading="lazy" />
|
||||||
/>
|
|
||||||
</a>
|
</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
</section>
|
</section>
|
||||||
|
@ -117,7 +117,9 @@ defmodule ChiyaWeb.PublicComponents do
|
||||||
<figure class="mb-4">
|
<figure class="mb-4">
|
||||||
<img
|
<img
|
||||||
src={ChiyaWeb.Helpers.image_url(image, :full)}
|
src={ChiyaWeb.Helpers.image_url(image, :full)}
|
||||||
class="rounded" title={image.content} />
|
class="rounded"
|
||||||
|
title={image.content}
|
||||||
|
/>
|
||||||
</figure>
|
</figure>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
|
@ -33,15 +33,4 @@
|
||||||
<:col :let={note} label="Name"><%= note.name %></:col>
|
<:col :let={note} label="Name"><%= note.name %></:col>
|
||||||
<:col :let={note} label="Updated at"><%= from_now(note.updated_at) %></: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>
|
<: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>
|
</.table>
|
||||||
|
|
|
@ -22,6 +22,9 @@ defmodule ChiyaWeb.NoteShowLive do
|
||||||
<.link href={~p"/admin/notes/#{@note}/raw"}>
|
<.link href={~p"/admin/notes/#{@note}/raw"}>
|
||||||
<.button>Raw</.button>
|
<.button>Raw</.button>
|
||||||
</.link>
|
</.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 %>
|
<%= if is_nil(@note.published_at) do %>
|
||||||
<.link href={~p"/admin/notes/#{@note}/publish"}>
|
<.link href={~p"/admin/notes/#{@note}/publish"}>
|
||||||
<.button>Publish</.button>
|
<.button>Publish</.button>
|
||||||
|
|
Loading…
Reference in a new issue