mix format
This commit is contained in:
parent
931734ca7d
commit
2d162ac0aa
4 changed files with 30 additions and 24 deletions
|
@ -76,13 +76,13 @@ defmodule ChiyaWeb.PublicComponents do
|
||||||
<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 %>
|
||||||
<%= if assigns.linked do %>
|
<%= if assigns.linked do %>
|
||||||
<a class={["p-category", @class_tag]} href={~p"/tagged-with/#{tag.slug}"}>
|
<a class={["p-category", @class_tag]} href={~p"/tagged-with/#{tag.slug}"}>
|
||||||
<%= tag.name %>
|
<%= tag.name %>
|
||||||
</a>
|
</a>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span class={["p-category", @class_tag]}>
|
<span class={["p-category", @class_tag]}>
|
||||||
<%= tag.name %>
|
<%= tag.name %>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<.dot class="text-theme-base/50 last:hidden" />
|
<.dot class="text-theme-base/50 last:hidden" />
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -162,9 +162,9 @@ defmodule ChiyaWeb.PublicComponents do
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= if not Enum.empty?(note.tags) do %>
|
<%= if not Enum.empty?(note.tags) do %>
|
||||||
<span class="inline-block">
|
<span class="inline-block">
|
||||||
<.tags note={note} linked={false} />
|
<.tags note={note} linked={false} />
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</a>
|
</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -11,8 +11,8 @@ defmodule ChiyaWeb.NoteController do
|
||||||
|
|
||||||
conn
|
conn
|
||||||
|> with_channels()
|
|> with_channels()
|
||||||
|> render(:index,
|
|> render(:index,
|
||||||
notes: notes,
|
notes: notes,
|
||||||
page_title: "Notes"
|
page_title: "Notes"
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@ -22,8 +22,8 @@ defmodule ChiyaWeb.NoteController do
|
||||||
|
|
||||||
conn
|
conn
|
||||||
|> with_channels()
|
|> with_channels()
|
||||||
|> render(:index,
|
|> render(:index,
|
||||||
notes: notes,
|
notes: notes,
|
||||||
page_title: "Notes"
|
page_title: "Notes"
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
|
@ -12,16 +12,22 @@
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<ul>
|
<ul>
|
||||||
<%= for {letter, tag_group} <- @tags do %>
|
<%= for {letter, tag_group} <- @tags do %>
|
||||||
<li class="mb-2">
|
<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>
|
<span class="capitalize text-theme-primary border border-theme-background1 rounded font-sm px-2 py-1 inline-block mb-2">
|
||||||
|
<%= letter %>
|
||||||
<%= for tag <- tag_group do %>
|
</span>
|
||||||
<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 %>
|
<%= for tag <- tag_group do %>
|
||||||
|
<a
|
||||||
</li>
|
href={~p"/tagged-with/#{tag.slug}"}
|
||||||
<% end %>
|
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>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -6,4 +6,4 @@ defmodule Chiya.Repo.Migrations.AddBookmarkChannelSetting do
|
||||||
add :bookmark_channel_id, references(:channels, on_delete: :nothing)
|
add :bookmark_channel_id, references(:channels, on_delete: :nothing)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue