From 143dc9b7477c0098145d5764b240e3cd45cde37d Mon Sep 17 00:00:00 2001 From: Inhji Date: Sat, 8 Apr 2023 09:54:57 +0200 Subject: [PATCH] icons, dates --- .../controllers/channel_html/index.html.heex | 3 ++- .../controllers/identity_html/index.html.heex | 2 +- lib/chiya_web/controllers/note_html/index.html.heex | 3 ++- lib/chiya_web/controllers/setting_html/show.html.heex | 2 +- lib/chiya_web/live/note_show_live.ex | 11 ++++------- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/chiya_web/controllers/channel_html/index.html.heex b/lib/chiya_web/controllers/channel_html/index.html.heex index a044dee..e04944e 100644 --- a/lib/chiya_web/controllers/channel_html/index.html.heex +++ b/lib/chiya_web/controllers/channel_html/index.html.heex @@ -1,5 +1,6 @@ <.header> - Listing Channels + <.icon name="hero-speaker-wave" /> Channels + <:subtitle>Channels are collections for your notes. <:actions> <.link href={~p"/admin/channels/new"}> <.button>New Channel diff --git a/lib/chiya_web/controllers/identity_html/index.html.heex b/lib/chiya_web/controllers/identity_html/index.html.heex index 50072fe..664d253 100644 --- a/lib/chiya_web/controllers/identity_html/index.html.heex +++ b/lib/chiya_web/controllers/identity_html/index.html.heex @@ -1,5 +1,5 @@ <.header> - Listing Identities + <.icon name="hero-user" /> Identities <:actions> <.link href={~p"/admin/identities/new"}> <.button>New Identity diff --git a/lib/chiya_web/controllers/note_html/index.html.heex b/lib/chiya_web/controllers/note_html/index.html.heex index 23551ad..169b784 100644 --- a/lib/chiya_web/controllers/note_html/index.html.heex +++ b/lib/chiya_web/controllers/note_html/index.html.heex @@ -1,5 +1,6 @@ <.header> - Listing Notes + <.icon name="hero-document-text" /> Notes + <:subtitle>Notes are the content, the heart of your site. <:actions> <.link href={~p"/admin/notes/new"}> <.button>New Note diff --git a/lib/chiya_web/controllers/setting_html/show.html.heex b/lib/chiya_web/controllers/setting_html/show.html.heex index e472d9c..0169207 100644 --- a/lib/chiya_web/controllers/setting_html/show.html.heex +++ b/lib/chiya_web/controllers/setting_html/show.html.heex @@ -1,5 +1,5 @@ <.header> - Settings + <.icon name="hero-wrench-screwdriver" /> Settings <:subtitle>These are your site's settings. <:actions> <%= if @setting == nil do %> diff --git a/lib/chiya_web/live/note_show_live.ex b/lib/chiya_web/live/note_show_live.ex index 2e594d3..16979ad 100644 --- a/lib/chiya_web/live/note_show_live.ex +++ b/lib/chiya_web/live/note_show_live.ex @@ -11,8 +11,8 @@ defmodule ChiyaWeb.NoteShowLive do ~H""" <.header> - Note <%= @note.id %> - <:subtitle>This is a note record from your database. + <%= @note.name %> + <:subtitle><%= @note.slug %> <:actions> <.link href={~p"/admin/notes/#{@note}/edit"}> <.button>Edit note @@ -27,13 +27,10 @@ defmodule ChiyaWeb.NoteShowLive do <.list> - <:item title="Name"><%= @note.name %> - <:item title="Content"><%= @note.content %> - <:item title="Slug"><%= @note.slug %> - <:item title="Published at"><%= @note.published_at %> + <:item title="Published at"><%= pretty_date(@note.published_at) %> (<%= from_now(@note.published_at) %>) + <:item title="Channels"><%= @channels %> <:item title="Kind"><%= @note.kind %> <:item title="Url"><%= @note.url %> - <:item title="Channels"><%= @channels %> <.line />