simplify margins in public pages
This commit is contained in:
parent
5a2924f704
commit
68c62fcee8
4 changed files with 89 additions and 95 deletions
|
@ -13,7 +13,7 @@
|
|||
</div>
|
||||
</header>
|
||||
|
||||
<main class="px-4 py-20 sm:px-6 lg:px-8">
|
||||
<main>
|
||||
<div class="mx-auto max-w-2xl">
|
||||
<.flash_group flash={@flash} />
|
||||
<%= @inner_content %>
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
<div class="px-4 py-10 sm:py-28 sm:px-6 lg:px-8 xl:py-32 xl:px-28">
|
||||
<div class="mx-auto max-w-xl lg:mx-0">
|
||||
<h1 class="mt-4 text-[2rem] font-semibold font-serif leading-10 tracking-tighter text-theme-primary">
|
||||
<%= @channel.name %>
|
||||
</h1>
|
||||
<p class="mt-4 text-base leading-7 text-theme-base">
|
||||
<%= @channel.content %>
|
||||
</p>
|
||||
<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-primary">
|
||||
<%= @channel.name %>
|
||||
</h1>
|
||||
<p class="mt-4 text-base leading-7 text-theme-base">
|
||||
<%= @channel.content %>
|
||||
</p>
|
||||
|
||||
<div class="w-full mt-6 sm:w-auto flex flex-col gap-1.5">
|
||||
<%= for note <- @channel.notes do %>
|
||||
<a
|
||||
href={~p"/#{note.slug}"}
|
||||
class="rounded -mx-2 -my-0.5 px-2 py-0.5 hover:bg-theme-primary/10 transition"
|
||||
>
|
||||
<span class="text-theme-heading text-lg font-semibold leading-8"><%= note.name %></span>
|
||||
<span class="text-theme-base text-sm"><%= pretty_date(note.published_at) %></span>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="w-full mt-6 sm:w-auto flex flex-col gap-1.5">
|
||||
<%= for note <- @channel.notes do %>
|
||||
<a
|
||||
href={~p"/#{note.slug}"}
|
||||
class="rounded -mx-2 -my-0.5 px-2 py-0.5 hover:bg-theme-primary/10 transition"
|
||||
>
|
||||
<span class="text-theme-heading text-lg font-semibold leading-8"><%= note.name %></span>
|
||||
<span class="text-theme-base text-sm"><%= pretty_date(note.published_at) %></span>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,42 +1,40 @@
|
|||
<div class="px-4 py-10 sm:py-28 sm:px-6 lg:px-8 xl:py-32 xl:px-28">
|
||||
<div class="mx-auto max-w-xl lg:mx-0">
|
||||
<h1 class="mt-4 text-[2rem] font-semibold font-serif leading-10 tracking-tighter text-theme-primary">
|
||||
<%= @settings.title %>
|
||||
</h1>
|
||||
<p class="mt-4 text-base leading-7 text-theme-base">
|
||||
<%= @settings.subtitle %>
|
||||
</p>
|
||||
<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-primary">
|
||||
<%= @settings.title %>
|
||||
</h1>
|
||||
<p class="mt-4 text-base leading-7 text-theme-base">
|
||||
<%= @settings.subtitle %>
|
||||
</p>
|
||||
|
||||
<div class="w-full mt-6 sm:w-auto">
|
||||
<div class="flex gap-4 text-sm leading-6 text-theme-base">
|
||||
<%= for identity <- @identities do %>
|
||||
<div>
|
||||
<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"
|
||||
>
|
||||
<%= raw(identity.icon) %>
|
||||
<%= identity.name %>
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<%= if @channel do %>
|
||||
<div class="w-full mt-6 sm:w-auto flex flex-col gap-1.5">
|
||||
<%= for note <- @channel.notes do %>
|
||||
<div class="w-full mt-6 sm:w-auto">
|
||||
<div class="flex gap-4 text-sm leading-6 text-theme-base">
|
||||
<%= for identity <- @identities do %>
|
||||
<div>
|
||||
<a
|
||||
href={~p"/#{note.slug}"}
|
||||
class="rounded -mx-2 -my-0.5 px-2 py-0.5 hover:bg-theme-primary/10 transition"
|
||||
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"
|
||||
>
|
||||
<span class="text-theme-heading text-lg font-semibold leading-8">
|
||||
<%= note.name %>
|
||||
</span>
|
||||
<span class="text-theme-base text-sm"><%= pretty_date(note.published_at) %></span>
|
||||
<%= raw(identity.icon) %>
|
||||
<%= identity.name %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<%= if @channel do %>
|
||||
<div class="mt-6 sm:w-auto flex flex-col gap-1.5">
|
||||
<%= for note <- @channel.notes do %>
|
||||
<a
|
||||
href={~p"/#{note.slug}"}
|
||||
class="rounded-lg -mx-2 -my-0.5 px-2 py-0.5 hover:bg-theme-primary/30 transition"
|
||||
>
|
||||
<span class="text-theme-heading text-lg font-semibold leading-8">
|
||||
<%= note.name %>
|
||||
</span>
|
||||
<span class="text-theme-base text-sm"><%= pretty_date(note.published_at) %></span>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -1,43 +1,41 @@
|
|||
<div class="px-4 py-10 sm:py-28 sm:px-6 lg:px-8 xl:py-32 xl:px-28">
|
||||
<div class="mx-auto max-w-xl lg:mx-0">
|
||||
<header>
|
||||
<h1 class="text-3xl font-semibold leading-8 text-theme-heading font-serif underline underline-offset-2 decoration-theme-primary">
|
||||
<%= @note.name %>
|
||||
</h1>
|
||||
<p class="mt-2 text-sm leading-6 text-theme-base font-semibold">
|
||||
<%= pretty_date(@note.published_at) %>
|
||||
</p>
|
||||
</header>
|
||||
<div class="mx-auto max-w-xl mx-4 lg:mx-0">
|
||||
<header>
|
||||
<h1 class="mt-16 text-3xl font-semibold leading-8 text-theme-heading font-serif underline underline-offset-2 decoration-theme-primary">
|
||||
<%= @note.name %>
|
||||
</h1>
|
||||
<p class="mt-2 text-sm leading-6 text-theme-base font-semibold">
|
||||
<%= pretty_date(@note.published_at) %>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<section class="prose mt-8">
|
||||
<%= Markdown.render(@note.content) |> raw %>
|
||||
</section>
|
||||
<section class="prose mt-8">
|
||||
<%= Markdown.render(@note.content) |> raw %>
|
||||
</section>
|
||||
|
||||
<%= if !Enum.empty?(@note.images) do %>
|
||||
<.line />
|
||||
<%= if !Enum.empty?(@note.images) do %>
|
||||
<.line />
|
||||
|
||||
<div class="flex flex-wrap gap-3" id="images">
|
||||
<%= for image <- @note.images do %>
|
||||
<article>
|
||||
<a href={"#image-#{image.id}"}>
|
||||
<div class="flex flex-wrap gap-3" id="images">
|
||||
<%= for image <- @note.images do %>
|
||||
<article>
|
||||
<a href={"#image-#{image.id}"}>
|
||||
<img
|
||||
class="rounded-lg w-28 border"
|
||||
src={ChiyaWeb.Uploaders.NoteImage.url({image.path, image}, :thumb_dithered)}
|
||||
/>
|
||||
</a>
|
||||
<a href="#images" class="lightbox" id={"image-#{image.id}"}>
|
||||
<span>
|
||||
<img
|
||||
class="rounded-lg w-28 border"
|
||||
src={ChiyaWeb.Uploaders.NoteImage.url({image.path, image}, :thumb_dithered)}
|
||||
class="md:max-w-screen-sm lg:max-w-screen-md xl:max-w-screen-lg max-h-screen mx-auto"
|
||||
src={ChiyaWeb.Uploaders.NoteImage.url({image.path, image}, :full_dithered)}
|
||||
loading="lazy"
|
||||
/>
|
||||
</a>
|
||||
<a href="#images" class="lightbox" id={"image-#{image.id}"}>
|
||||
<span>
|
||||
<img
|
||||
class="md:max-w-screen-sm lg:max-w-screen-md xl:max-w-screen-lg max-h-screen mx-auto"
|
||||
src={ChiyaWeb.Uploaders.NoteImage.url({image.path, image}, :full_dithered)}
|
||||
loading="lazy"
|
||||
/>
|
||||
<span class="text-theme-background text-center"><%= image.content %></span>
|
||||
</span>
|
||||
</a>
|
||||
</article>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<span class="text-theme-background text-center"><%= image.content %></span>
|
||||
</span>
|
||||
</a>
|
||||
</article>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
Loading…
Reference in a new issue