diff --git a/templates/playlist.templ b/templates/playlist.templ index e9e4afe..a6b8e94 100644 --- a/templates/playlist.templ +++ b/templates/playlist.templ @@ -59,3 +59,23 @@ templ Playlist(p sc.Playlist) {

Last modified: { p.LastModified }

} + +templ SearchPlaylists(p *sc.Paginated[*sc.Playlist]) { + Found { strconv.FormatInt(p.Total, 10) } playlists +
+
+ for _, playlist := range p.Collection { + + if playlist.Artwork != "" { + + } else { + + } +
+

{ playlist.Title }

+ { playlist.Author.Username } +
+
+ } + More playlists +} diff --git a/templates/searchPlaylists.templ b/templates/searchPlaylists.templ deleted file mode 100644 index 22cf288..0000000 --- a/templates/searchPlaylists.templ +++ /dev/null @@ -1,28 +0,0 @@ -package templates - -import ( - "github.com/maid-zone/soundcloak/lib/sc" - "net/url" - "strconv" - "strings" -) - -templ SearchPlaylists(p *sc.Paginated[*sc.Playlist]) { - Found { strconv.FormatInt(p.Total, 10) } playlists -
-
- for _, playlist := range p.Collection { - - if playlist.Artwork != "" { - - } else { - - } -
-

{ playlist.Title }

- { playlist.Author.Username } -
-
- } - More playlists -} diff --git a/templates/searchTracks.templ b/templates/searchTracks.templ deleted file mode 100644 index d75f943..0000000 --- a/templates/searchTracks.templ +++ /dev/null @@ -1,28 +0,0 @@ -package templates - -import ( - "github.com/maid-zone/soundcloak/lib/sc" - "net/url" - "strconv" - "strings" -) - -templ SearchTracks(p *sc.Paginated[*sc.Track]) { - Found { strconv.FormatInt(p.Total, 10) } tracks -
-
- for _, track := range p.Collection { - - if track.Artwork != "" { - - } else { - - } -
-

{ track.Title }

- { track.Author.Username } -
-
- } - More tracks -} diff --git a/templates/searchUsers.templ b/templates/searchUsers.templ deleted file mode 100644 index 22db97d..0000000 --- a/templates/searchUsers.templ +++ /dev/null @@ -1,30 +0,0 @@ -package templates - -import ( - "github.com/maid-zone/soundcloak/lib/sc" - "net/url" - "strconv" - "strings" -) - -templ SearchUsers(p *sc.Paginated[*sc.User]) { - Found { strconv.FormatInt(p.Total, 10) } users -
-
- for _, user := range p.Collection { - - if user.Avatar != "" { - - } else { - - } -
-

{ user.Username }

- if user.FullName != "" { - { user.FullName } - } -
-
- } - More users -} diff --git a/templates/track.templ b/templates/track.templ index be5f530..81c63e7 100644 --- a/templates/track.templ +++ b/templates/track.templ @@ -4,6 +4,7 @@ import ( "github.com/maid-zone/soundcloak/lib/sc" "strconv" "strings" + "net/url" ) templ TrackHeader(t sc.Track) { @@ -102,3 +103,23 @@ templ TrackEmbed(t sc.Track, stream string) { } + +templ SearchTracks(p *sc.Paginated[*sc.Track]) { + Found { strconv.FormatInt(p.Total, 10) } tracks +
+
+ for _, track := range p.Collection { + + if track.Artwork != "" { + + } else { + + } +
+

{ track.Title }

+ { track.Author.Username } +
+
+ } + More tracks +} diff --git a/templates/user.templ b/templates/user.templ index 8f57e81..397b8d1 100644 --- a/templates/user.templ +++ b/templates/user.templ @@ -54,3 +54,25 @@ templ User(u sc.User, p *sc.Paginated[sc.Track]) { no more tracks } } + +templ SearchUsers(p *sc.Paginated[*sc.User]) { + Found { strconv.FormatInt(p.Total, 10) } users +
+
+ for _, user := range p.Collection { + + if user.Avatar != "" { + + } else { + + } +
+

{ user.Username }

+ if user.FullName != "" { + { user.FullName } + } +
+
+ } + More users +} \ No newline at end of file