This commit is contained in:
Inhji 2023-05-22 21:05:33 +02:00
parent ed68734fc3
commit a41acf52da
4 changed files with 19 additions and 15 deletions

View file

@ -16,7 +16,6 @@ defmodule Chiya.Channels.Channel do
field :layout, Ecto.Enum, values: [ field :layout, Ecto.Enum, values: [
:default, :default,
:microblog, :microblog,
:photoblog,
:gallery :gallery
] ]

View file

@ -42,17 +42,21 @@
</main> </main>
<footer class="mx-auto max-w-xl mt-8 text-theme-base/75 border-t pt-8 border-theme-background1"> <footer class="mx-auto max-w-xl mt-8 text-theme-base/75 border-t pt-8 border-theme-background1">
<span>Served by Chiya v<%= Application.spec(:chiya, :vsn) %></span> <p>
<.dot /> <span>Served by Chiya v<%= Application.spec(:chiya, :vsn) %></span>
<span>Made by Inhji</span> <.dot />
<.dot /> <span>Made by Inhji</span>
<span>Struggling to make a decent website since 2011</span> <.dot />
<%= for identity <- @identities do %> <span>Struggling to make a decent website since 2011</span>
<.dot /> <.dot />
<span><a href={~p"/admin"}>Admin</a></span>
</p>
<p>
<%= for identity <- @identities do %>
<span><a href={identity.url}><%= identity.name %></a></span> <span><a href={identity.url}><%= identity.name %></a></span>
<% end %> <% end %>
<.dot /> </p>
<span><a href={~p"/admin"}>Admin</a></span>
</footer> </footer>
</body> </body>
</html> </html>

View file

@ -9,6 +9,7 @@ defmodule ChiyaWeb.PublicComponents do
import ChiyaWeb.Format import ChiyaWeb.Format
import ChiyaWeb.Markdown, only: [render: 1] import ChiyaWeb.Markdown, only: [render: 1]
import Phoenix.HTML, only: [raw: 1] import Phoenix.HTML, only: [raw: 1]
import ChiyaWeb.CoreComponents
@doc """ @doc """
Renders a middot as divider Renders a middot as divider
@ -113,15 +114,15 @@ defmodule ChiyaWeb.PublicComponents do
</time> </time>
<.dot /> <.dot />
<a href={~p"/#{note.slug}"} class="text-theme-base/75">Permalink</a> <a href={~p"/#{note.slug}"} class="text-theme-base/75">Permalink</a>
<%= if not Enum.empty?(note.images) do %>
<.dot />
<.icon name="hero-photo" />
<% end %>
</article> </article>
<% end %> <% end %>
</section> </section>
""" """
:photoblog ->
~H"""
"""
_ -> # default, show headings only _ -> # default, show headings only
~H""" ~H"""
<section class="note-list default | mt-6 sm:w-auto flex flex-col gap-1.5"> <section class="note-list default | mt-6 sm:w-auto flex flex-col gap-1.5">

View file

@ -33,7 +33,7 @@
<%= Markdown.render(@note.content) |> raw %> <%= Markdown.render(@note.content) |> raw %>
</section> </section>
<section class="mt-8 mx-auto max-w-2xl"> <section class="mt-8 mx-auto max-w-xl">
<%= if !Enum.empty?(@note.images) do %> <%= if !Enum.empty?(@note.images) do %>
<.line /> <.line />