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>
<main class="mx-3 md:mx-0">
<section class="mx-auto max-w-2xl">
<%= @inner_content %>
</section>
</main>
<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
attr :note, :map, required: true
attr :class_tag, :string, default: ""
def tags(assigns) do
~H"""
<span class="inline-flex flex-row gap-1">
<%= 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 %>
</a>
<% end %>

View file

@ -1,4 +1,5 @@
<article class="h-card hcard">
<section class="max-w-2xl mx-auto">
<article class="h-card hcard">
<section class="p-10 bg-theme-background1 flex gap-3 items-start">
<div>
<img
@ -21,4 +22,5 @@
<%= Markdown.render(@note.content) |> raw %>
</section>
<% end %>
</article>
</article>
</section>

View file

@ -1,8 +1,10 @@
<.header>
<section class="max-w-2xl mx-auto">
<.header>
<:title><%= @channel.name %></:title>
<:subtitle><%= @channel.content %></:subtitle>
</.header>
</.header>
<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} />
</div>
</div>
</section>

View file

@ -1,9 +1,10 @@
<.header class_title="text-theme-primary p-name" class_subtitle="p-summary">
<section class="max-w-2xl mx-auto">
<.header class_title="text-theme-primary p-name" class_subtitle="p-summary">
<:title><%= @settings.title %></:title>
<:subtitle><%= @settings.subtitle %></:subtitle>
</.header>
</.header>
<section class="text-sm my-8">
<section class="text-sm my-8">
<ul class="flex flex-wrap gap-3">
<li>
<a
@ -24,10 +25,11 @@
</li>
<% end %>
</ul>
</section>
</section>
<%= if @channel do %>
<%= if @channel do %>
<section class="mt-8">
<.note_list notes={@channel.notes} layout={@channel.layout} />
</section>
<% end %>
<% end %>
</section>

View file

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

View file

@ -1,8 +1,10 @@
<.header>
<section class="max-w-2xl mx-auto">
<.header>
<:title>Tagged with &ldquo;<%= @tag.name %>&rdquo;</:title>
<:subtitle><%= @tag.content %></:subtitle>
</.header>
</.header>
<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} />
</div>
</div>
</section>

View file

@ -1,13 +1,14 @@
<.header>
<section class="w-full px-3">
<.header>
<:title>Wiki</:title>
</.header>
</.header>
<section class="prose prose-gruvbox">
<section class="prose prose-gruvbox">
<%= Markdown.render(@channel.content) |> raw %>
</section>
</section>
<%= if @channel do %>
<section class="flex flex-col md:col-row">
<%= if @channel do %>
<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">
<.note_list notes={@notes_updated} layout={@channel.layout} />
</div>
@ -15,5 +16,6 @@
<div class="w-full mt-6 sm:w-auto flex flex-1 flex-col gap-1.5">
<.note_list notes={@notes_published} layout={@channel.layout} />
</div>
</section>
<% end %>
</section>
<% end %>