Merge pull request 'add custom html' (#172) from devel into main

Reviewed-on: #172
This commit is contained in:
inhji 2023-07-05 13:18:39 +02:00
commit 78f3df53c5
3 changed files with 23 additions and 9 deletions

View file

@ -35,6 +35,9 @@
</style>
</head>
<body class="bg-theme-background mx-3 md:mx-0 | h-feed hfeed">
<aside class="max-w-2xl mx-auto block">
<%= raw @settings.custom_html %>
</aside>
<header class="my-8 max-w-2xl mx-auto block">
<nav>
<ul class="flex gap-3">

View file

@ -115,16 +115,20 @@ defmodule ChiyaWeb.PublicComponents do
def note_list_headers(assigns) do
~H"""
<section class="note-list default | mt-6 sm:w-auto flex flex-col gap-1.5">
<section class="note-list default | mt-6 sm:w-auto flex flex-col gap-3">
<%= for note <- assigns.notes do %>
<a
href={~p"/note/#{note.slug}"}
class="rounded-lg -mx-2 -my-0.5 px-2 py-0.5 hover:bg-theme-secondary/10 transition"
>
<span class="text-theme-secondary text-lg font-semibold leading-8">
<%= note.name %>
</span>
<span class="text-theme-base/75 text-sm"><%= pretty_date(note.published_at) %></span>
<a href={~p"/note/#{note.slug}"}
class="rounded-lg -mx-2 -my-0.5 px-2 py-0.5 border-theme-background1 hover:bg-theme-background1 transition">
<header>
<span class="text-theme-secondary text-lg font-semibold leading-8">
<%= note.name %>
</span>
<span class="text-theme-base/75 text-sm">
<%= pretty_date(note.published_at) %>
</span>
</header>
<p class="text-theme-base"><%= String.slice(note.content, 0..100) %></p>
</a>
<% end %>
</section>

View file

@ -0,0 +1,7 @@
<section>
<header class="mx-auto max-w-2xl">
<h1 class="mt-16 lg:text-5xl md:text-4xl text-3xl font-bold text-theme-base">
Wiki
</h1>
</header>
</section>