devel #193

Merged
inhji merged 9 commits from devel into main 2023-07-07 13:55:59 +02:00
8 changed files with 144 additions and 133 deletions

View file

@ -72,9 +72,7 @@
</header> </header>
<main class="mx-3 md:mx-0"> <main class="mx-3 md:mx-0">
<section class="mx-auto max-w-2xl">
<%= @inner_content %> <%= @inner_content %>
</section>
</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">

View file

@ -66,12 +66,13 @@ defmodule ChiyaWeb.PublicComponents do
end end
attr :note, :map, required: true attr :note, :map, required: true
attr :class_tag, :string, default: ""
def tags(assigns) do def tags(assigns) do
~H""" ~H"""
<span class="inline-flex flex-row gap-1"> <span class="inline-flex flex-row gap-1">
<%= for tag <- @note.tags do %> <%= for tag <- @note.tags do %>
<a href={~p"/tagged-with/#{tag.slug}"} class="underline-link font-semibold | p-category"> <a href={~p"/tagged-with/#{tag.slug}"} class={["p-category", @class_tag]}>
<%= tag.name %> <%= tag.name %>
</a> </a>
<% end %> <% end %>

View file

@ -1,3 +1,4 @@
<section class="max-w-2xl mx-auto">
<article class="h-card hcard"> <article class="h-card hcard">
<section class="p-10 bg-theme-background1 flex gap-3 items-start"> <section class="p-10 bg-theme-background1 flex gap-3 items-start">
<div> <div>
@ -22,3 +23,4 @@
</section> </section>
<% end %> <% end %>
</article> </article>
</section>

View file

@ -1,3 +1,4 @@
<section class="max-w-2xl mx-auto">
<.header> <.header>
<:title><%= @channel.name %></:title> <:title><%= @channel.name %></:title>
<:subtitle><%= @channel.content %></:subtitle> <:subtitle><%= @channel.content %></:subtitle>
@ -6,3 +7,4 @@
<div class="w-full mt-6 sm:w-auto flex flex-col gap-1.5"> <div class="w-full mt-6 sm:w-auto flex flex-col gap-1.5">
<.note_list notes={@channel.notes} layout={@channel.layout} /> <.note_list notes={@channel.notes} layout={@channel.layout} />
</div> </div>
</section>

View file

@ -1,3 +1,4 @@
<section class="max-w-2xl mx-auto">
<.header class_title="text-theme-primary p-name" class_subtitle="p-summary"> <.header class_title="text-theme-primary p-name" class_subtitle="p-summary">
<:title><%= @settings.title %></:title> <:title><%= @settings.title %></:title>
<:subtitle><%= @settings.subtitle %></:subtitle> <:subtitle><%= @settings.subtitle %></:subtitle>
@ -31,3 +32,4 @@
<.note_list notes={@channel.notes} layout={@channel.layout} /> <.note_list notes={@channel.notes} layout={@channel.layout} />
</section> </section>
<% end %> <% end %>
</section>

View file

@ -1,3 +1,4 @@
<section class="max-w-2xl mx-auto">
<article class="h-entry hentry"> <article class="h-entry hentry">
<.header class_title="p-name"> <.header class_title="p-name">
<:title><%= @note.name %></:title> <:title><%= @note.name %></:title>
@ -55,3 +56,4 @@
<% end %> <% end %>
</section> </section>
</article> </article>
</section>

View file

@ -1,3 +1,4 @@
<section class="max-w-2xl mx-auto">
<.header> <.header>
<:title>Tagged with &ldquo;<%= @tag.name %>&rdquo;</:title> <:title>Tagged with &ldquo;<%= @tag.name %>&rdquo;</:title>
<:subtitle><%= @tag.content %></:subtitle> <:subtitle><%= @tag.content %></:subtitle>
@ -6,3 +7,4 @@
<div class="w-full mt-6 sm:w-auto flex flex-col gap-1.5"> <div class="w-full mt-6 sm:w-auto flex flex-col gap-1.5">
<.note_list notes={@tag.notes} /> <.note_list notes={@tag.notes} />
</div> </div>
</section>

View file

@ -1,3 +1,4 @@
<section class="w-full px-3">
<.header> <.header>
<:title>Wiki</:title> <:title>Wiki</:title>
</.header> </.header>
@ -7,7 +8,7 @@
</section> </section>
<%= if @channel do %> <%= if @channel do %>
<section class="flex flex-col md:col-row"> <section class="flex flex-col md:flex-row">
<div class="w-full mt-6 sm:w-auto flex flex-1 flex-col gap-1.5"> <div class="w-full mt-6 sm:w-auto flex flex-1 flex-col gap-1.5">
<.note_list notes={@notes_updated} layout={@channel.layout} /> <.note_list notes={@notes_updated} layout={@channel.layout} />
</div> </div>
@ -17,3 +18,4 @@
</div> </div>
</section> </section>
<% end %> <% end %>
</section>