mix format
This commit is contained in:
parent
7f24868638
commit
4398518741
6 changed files with 14 additions and 17 deletions
|
@ -31,6 +31,7 @@ defmodule ChiyaWeb.CoreComponents do
|
||||||
end
|
end
|
||||||
|
|
||||||
attr :class, :string, default: nil
|
attr :class, :string, default: nil
|
||||||
|
|
||||||
def darkmode_toggle(assigns) do
|
def darkmode_toggle(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<.link href="#" id="dark-mode-toggle" class={["text-sm leading-6", @class]}>
|
<.link href="#" id="dark-mode-toggle" class={["text-sm leading-6", @class]}>
|
||||||
|
|
|
@ -13,4 +13,4 @@
|
||||||
channels={@channels}
|
channels={@channels}
|
||||||
selected_channels={@selected_channels}
|
selected_channels={@selected_channels}
|
||||||
tags={@tags}
|
tags={@tags}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -14,4 +14,4 @@
|
||||||
channels={@channels}
|
channels={@channels}
|
||||||
tags={@tags}
|
tags={@tags}
|
||||||
selected_channels={@selected_channels}
|
selected_channels={@selected_channels}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -4,12 +4,7 @@
|
||||||
</.error>
|
</.error>
|
||||||
|
|
||||||
<.input field={f[:name]} type="text" />
|
<.input field={f[:name]} type="text" />
|
||||||
<.input field={f[:content]}
|
<.input field={f[:content]} type="textarea" label="Content" rows="15" class="font-mono" />
|
||||||
type="textarea"
|
|
||||||
label="Content"
|
|
||||||
rows="15"
|
|
||||||
class="font-mono"
|
|
||||||
/>
|
|
||||||
<.input field={f[:slug]} type="text" label="Slug" />
|
<.input field={f[:slug]} type="text" label="Slug" />
|
||||||
<.input field={f[:published_at]} type="datetime-local" label="Published at" />
|
<.input field={f[:published_at]} type="datetime-local" label="Published at" />
|
||||||
<.input
|
<.input
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<section class="max-w-2xl mx-auto">
|
<section class="max-w-2xl mx-auto">
|
||||||
<article class="h-card hcard">
|
<article class="h-card hcard">
|
||||||
|
|
||||||
<section class="flex gap-3">
|
<section class="flex gap-3">
|
||||||
<img
|
<img
|
||||||
class="rounded-lg block text-center w-28 h-28 | u-photo"
|
class="rounded-lg block text-center w-28 h-28 | u-photo"
|
||||||
|
@ -10,7 +9,6 @@
|
||||||
<span class="p-name"><%= @user.name %></span>
|
<span class="p-name"><%= @user.name %></span>
|
||||||
<:subtitle><%= @user.bio %></:subtitle>
|
<:subtitle><%= @user.bio %></:subtitle>
|
||||||
</.header>
|
</.header>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<%= if @note do %>
|
<%= if @note do %>
|
||||||
|
|
|
@ -6,19 +6,22 @@
|
||||||
<%= if @current_user do %>
|
<%= if @current_user do %>
|
||||||
<section class="max-w-2xl mx-auto mt-8">
|
<section class="max-w-2xl mx-auto mt-8">
|
||||||
<ul class="flex gap-3">
|
<ul class="flex gap-3">
|
||||||
<li><a href={~p"/admin/notes/#{@note}/edit"} class="button">
|
<li>
|
||||||
<.icon name="hero-pencil-square" /> Edit</a></li>
|
<a href={~p"/admin/notes/#{@note}/edit"} class="button">
|
||||||
|
<.icon name="hero-pencil-square" /> Edit
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li><a href={~p"/admin/notes/#{@note}"} class="button">Show in Admin</a></li>
|
<li><a href={~p"/admin/notes/#{@note}"} class="button">Show in Admin</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= if has_outline?(@note) do %>
|
<%= if has_outline?(@note) do %>
|
||||||
<aside class="max-w-2xl mx-auto mt-8 prose prose-gruvbox">
|
<aside class="max-w-2xl mx-auto mt-8 prose prose-gruvbox">
|
||||||
<div class="bg-theme-background1 rounded p-2">
|
<div class="bg-theme-background1 rounded p-2">
|
||||||
<%= raw(render_outline(@note)) %>
|
<%= raw(render_outline(@note)) %>
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<section class="mt-8 mx-auto prose prose-gruvbox md:prose-lg lg:prose-xl | p-summary e-content">
|
<section class="mt-8 mx-auto prose prose-gruvbox md:prose-lg lg:prose-xl | p-summary e-content">
|
||||||
|
|
Loading…
Reference in a new issue