From 8eaafe628168c8f693ee7ea46f6990c9fda2f718 Mon Sep 17 00:00:00 2001 From: Laptop Date: Mon, 7 Oct 2024 18:12:28 +0300 Subject: [PATCH] collapse description for playlists and users; less confusing wording on user metadata --- templates/playlist.templ | 9 +++++++-- templates/user.templ | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/templates/playlist.templ b/templates/playlist.templ index 05ff3b9..a10a106 100644 --- a/templates/playlist.templ +++ b/templates/playlist.templ @@ -29,8 +29,13 @@ templ Playlist(p sc.Playlist) { } -

{ p.Description }

- { strconv.FormatInt(p.TrackCount, 10) } tracks + if p.Description != "" { +
+ Toggle description +

{ p.Description }

+
+ } +

{ strconv.FormatInt(p.TrackCount, 10) } tracks



diff --git a/templates/user.templ b/templates/user.templ index 8657fc0..7257d18 100644 --- a/templates/user.templ +++ b/templates/user.templ @@ -28,12 +28,17 @@ templ UserBase(u sc.User) {

Verified

}
-

{ u.Description }

+ if u.Description != "" { +
+ Toggle description +

{ u.Description }

+
+ }

{ strconv.FormatInt(u.Followers, 10) } followers

{ strconv.FormatInt(u.Following, 10) } following

{ strconv.FormatInt(u.Tracks, 10) } tracks

-

{ strconv.FormatInt(u.Playlists, 10) } playlists

+

{ strconv.FormatInt(u.Playlists, 10) } playlists & albums


Created: { u.CreatedAt }

Last modified: { u.LastModified }