From f710452f2f18f2931622f548024c946e8e5d9bd0 Mon Sep 17 00:00:00 2001 From: Inhji Date: Thu, 6 Jul 2023 21:28:56 +0200 Subject: [PATCH] nicer header --- lib/chiya_web/components/public_components.ex | 12 ++++++------ lib/chiya_web/controllers/page_html/home.html.heex | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/chiya_web/components/public_components.ex b/lib/chiya_web/components/public_components.ex index 4e7e614..0ef63c1 100644 --- a/lib/chiya_web/components/public_components.ex +++ b/lib/chiya_web/components/public_components.ex @@ -69,19 +69,19 @@ defmodule ChiyaWeb.PublicComponents do Renders a note-header with title. """ attr :class, :string, default: nil - attr :titleclass, :string, default: nil - attr :subtitleclass, :string, default: nil + attr :class_title, :string, default: nil + attr :class_subtitle, :string, default: nil slot :title, required: true - slot :subtitle + slot :subtitle, required: false def header(assigns) do ~H""" -
-

+
+

<%= render_slot(@title) %>

-

+

<%= render_slot(@subtitle) %>

diff --git a/lib/chiya_web/controllers/page_html/home.html.heex b/lib/chiya_web/controllers/page_html/home.html.heex index 42e7388..5a19c35 100644 --- a/lib/chiya_web/controllers/page_html/home.html.heex +++ b/lib/chiya_web/controllers/page_html/home.html.heex @@ -1,4 +1,4 @@ -<.header titleclass="p-name" subtitleclass="p-summary"> +<.header class_title="text-theme-primary p-name" class_subtitle="p-summary"> <:title><%= @settings.title %> <:subtitle><%= @settings.subtitle %> @@ -27,7 +27,7 @@ <%= if @channel do %> -
+
<.note_list notes={@channel.notes} layout={@channel.layout} />
<% end %>