devel #193
8 changed files with 144 additions and 133 deletions
|
@ -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">
|
||||||
|
|
|
@ -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 %>
|
||||||
|
|
|
@ -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">
|
<section class="p-10 bg-theme-background1 flex gap-3 items-start">
|
||||||
<div>
|
<div>
|
||||||
<img
|
<img
|
||||||
|
@ -21,4 +22,5 @@
|
||||||
<%= Markdown.render(@note.content) |> raw %>
|
<%= Markdown.render(@note.content) |> raw %>
|
||||||
</section>
|
</section>
|
||||||
<% end %>
|
<% end %>
|
||||||
</article>
|
</article>
|
||||||
|
</section>
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<.header>
|
<section class="max-w-2xl mx-auto">
|
||||||
|
<.header>
|
||||||
<:title><%= @channel.name %></:title>
|
<:title><%= @channel.name %></:title>
|
||||||
<:subtitle><%= @channel.content %></:subtitle>
|
<: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} />
|
<.note_list notes={@channel.notes} layout={@channel.layout} />
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
|
@ -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>
|
<:title><%= @settings.title %></:title>
|
||||||
<:subtitle><%= @settings.subtitle %></:subtitle>
|
<: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">
|
<ul class="flex flex-wrap gap-3">
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
|
@ -24,10 +25,11 @@
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<%= if @channel do %>
|
<%= if @channel do %>
|
||||||
<section class="mt-8">
|
<section class="mt-8">
|
||||||
<.note_list notes={@channel.notes} layout={@channel.layout} />
|
<.note_list notes={@channel.notes} layout={@channel.layout} />
|
||||||
</section>
|
</section>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</section>
|
|
@ -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">
|
<.header class_title="p-name">
|
||||||
<:title><%= @note.name %></:title>
|
<:title><%= @note.name %></:title>
|
||||||
</.header>
|
</.header>
|
||||||
|
@ -54,4 +55,5 @@
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</section>
|
</section>
|
||||||
</article>
|
</article>
|
||||||
|
</section>
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<.header>
|
<section class="max-w-2xl mx-auto">
|
||||||
|
<.header>
|
||||||
<:title>Tagged with “<%= @tag.name %>”</:title>
|
<:title>Tagged with “<%= @tag.name %>”</:title>
|
||||||
<:subtitle><%= @tag.content %></:subtitle>
|
<: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} />
|
<.note_list notes={@tag.notes} />
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
|
@ -1,13 +1,14 @@
|
||||||
<.header>
|
<section class="w-full px-3">
|
||||||
|
<.header>
|
||||||
<:title>Wiki</:title>
|
<:title>Wiki</:title>
|
||||||
</.header>
|
</.header>
|
||||||
|
|
||||||
<section class="prose prose-gruvbox">
|
<section class="prose prose-gruvbox">
|
||||||
<%= Markdown.render(@channel.content) |> raw %>
|
<%= Markdown.render(@channel.content) |> raw %>
|
||||||
</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>
|
||||||
|
@ -15,5 +16,6 @@
|
||||||
<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_published} layout={@channel.layout} />
|
<.note_list notes={@notes_published} layout={@channel.layout} />
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
||||||
|
<% end %>
|
||||||
</section>
|
</section>
|
||||||
<% end %>
|
|
||||||
|
|
Loading…
Reference in a new issue