mix format

This commit is contained in:
Inhji 2023-08-02 20:48:45 +02:00
parent 931734ca7d
commit 2d162ac0aa
4 changed files with 30 additions and 24 deletions

View file

@ -76,13 +76,13 @@ defmodule ChiyaWeb.PublicComponents do
<span class="inline-flex flex-row gap-1">
<%= for tag <- @note.tags do %>
<%= if assigns.linked do %>
<a class={["p-category", @class_tag]} href={~p"/tagged-with/#{tag.slug}"}>
<%= tag.name %>
</a>
<a class={["p-category", @class_tag]} href={~p"/tagged-with/#{tag.slug}"}>
<%= tag.name %>
</a>
<% else %>
<span class={["p-category", @class_tag]}>
<%= tag.name %>
</span>
<span class={["p-category", @class_tag]}>
<%= tag.name %>
</span>
<% end %>
<.dot class="text-theme-base/50 last:hidden" />
<% end %>
@ -162,9 +162,9 @@ defmodule ChiyaWeb.PublicComponents do
<% end %>
<%= if not Enum.empty?(note.tags) do %>
<span class="inline-block">
<.tags note={note} linked={false} />
</span>
<span class="inline-block">
<.tags note={note} linked={false} />
</span>
<% end %>
</a>
<% end %>

View file

@ -11,8 +11,8 @@ defmodule ChiyaWeb.NoteController do
conn
|> with_channels()
|> render(:index,
notes: notes,
|> render(:index,
notes: notes,
page_title: "Notes"
)
end
@ -22,8 +22,8 @@ defmodule ChiyaWeb.NoteController do
conn
|> with_channels()
|> render(:index,
notes: notes,
|> render(:index,
notes: notes,
page_title: "Notes"
)
end

View file

@ -12,16 +12,22 @@
<section>
<ul>
<%= for {letter, tag_group} <- @tags do %>
<li class="mb-2">
<span class="capitalize text-theme-primary border border-theme-background1 rounded font-sm px-2 py-1 inline-block mb-2"><%= letter %></span>
<%= for tag <- tag_group do %>
<a href={~p"/tagged-with/#{tag.slug}"} class="border border-theme-background1 rounded font-sm px-2 py-1 inline-block mb-2 hover:bg-theme-background1 transition"><%= tag.name %></a>
<% end %>
</li>
<% end %>
<%= for {letter, tag_group} <- @tags do %>
<li class="mb-2">
<span class="capitalize text-theme-primary border border-theme-background1 rounded font-sm px-2 py-1 inline-block mb-2">
<%= letter %>
</span>
<%= for tag <- tag_group do %>
<a
href={~p"/tagged-with/#{tag.slug}"}
class="border border-theme-background1 rounded font-sm px-2 py-1 inline-block mb-2 hover:bg-theme-background1 transition"
>
<%= tag.name %>
</a>
<% end %>
</li>
<% end %>
</ul>
</section>
</section>

View file

@ -6,4 +6,4 @@ defmodule Chiya.Repo.Migrations.AddBookmarkChannelSetting do
add :bookmark_channel_id, references(:channels, on_delete: :nothing)
end
end
end
end