From 5e16177461f1d0dc587989aa6e63e500e7b07b0a Mon Sep 17 00:00:00 2001 From: Araozu Date: Tue, 8 Oct 2024 19:00:06 -0500 Subject: [PATCH] feat: implement player functionality with hyperscript --- src/modules/album/album.templ | 2 +- src/modules/album/album_templ.go | 2 +- src/utils/utils.templ | 43 +++++++++++++------------------- src/utils/utils_templ.go | 14 +++++------ 4 files changed, 26 insertions(+), 35 deletions(-) diff --git a/src/modules/album/album.templ b/src/modules/album/album.templ index 0cf1932..e73ee06 100644 --- a/src/modules/album/album.templ +++ b/src/modules/album/album.templ @@ -19,7 +19,7 @@ templ albumTempl(albumId string, album *utils.Album, songs []utils.Song) { for _, song := range songs {

@@ -41,38 +42,28 @@ templ MusicPlayer() {
@playIcon(26)
-
- } diff --git a/src/utils/utils_templ.go b/src/utils/utils_templ.go index dfb1790..5698a54 100644 --- a/src/utils/utils_templ.go +++ b/src/utils/utils_templ.go @@ -68,7 +68,7 @@ func MusicPlayer() templ.Component { templ_7745c5c3_Var2 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

-

-

") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

-

-

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -76,7 +76,7 @@ func MusicPlayer() templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -120,7 +120,7 @@ func playIcon(size int) templ.Component { var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(size)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `src/utils/utils.templ`, Line: 83, Col: 28} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `src/utils/utils.templ`, Line: 74, Col: 28} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -133,7 +133,7 @@ func playIcon(size int) templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(size)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `src/utils/utils.templ`, Line: 84, Col: 29} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `src/utils/utils.templ`, Line: 75, Col: 29} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -175,7 +175,7 @@ func skipForwardIcon(size int) templ.Component { var templ_7745c5c3_Var7 string templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(size)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `src/utils/utils.templ`, Line: 95, Col: 67} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `src/utils/utils.templ`, Line: 86, Col: 67} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { @@ -188,7 +188,7 @@ func skipForwardIcon(size int) templ.Component { var templ_7745c5c3_Var8 string templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(size)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `src/utils/utils.templ`, Line: 95, Col: 97} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `src/utils/utils.templ`, Line: 86, Col: 97} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil {