From 49b68ef15ced22b62e2c0954e74ab8de335139c8 Mon Sep 17 00:00:00 2001 From: Baraa Al-Masri Date: Wed, 15 May 2024 12:30:04 +0300 Subject: [PATCH 01/97] chore(mobilenav): update vertical padding --- views/components/mobilenav/mobilenav.templ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/components/mobilenav/mobilenav.templ b/views/components/mobilenav/mobilenav.templ index 8b8c702..fdf0482 100644 --- a/views/components/mobilenav/mobilenav.templ +++ b/views/components/mobilenav/mobilenav.templ @@ -9,7 +9,7 @@ templ MobileNav() { - } diff --git a/views/components/playlist/popover.templ b/views/components/playlist/popover.templ index 45db914..ec00c9b 100644 --- a/views/components/playlist/popover.templ +++ b/views/components/playlist/popover.templ @@ -57,7 +57,7 @@ templ playlistsSelector(songId string, playlists []entities.Playlist, songsInPla } > -

+

{ playlist.Title }

diff --git a/views/components/popover/popover.templ b/views/components/popover/popover.templ index 552f5cb..d463df7 100644 --- a/views/components/popover/popover.templ +++ b/views/components/popover/popover.templ @@ -16,7 +16,7 @@ templ Popover(id string, button, child templ.Component) { id={ fmt.Sprintf("popover-%s", id) } class={ "hidden", "absolute", "z-30", "top-[45px]", "right-[0px]", - "bg-secondary-trans-20", "backdrop-blur-lg", "shadow-md", "p-[10px]", "rounded-[5px]", "text-secondary", + "bg-primary-trans-20", "backdrop-blur-lg", "shadow-md", "p-[10px]", "rounded-[5px]", "text-secondary", "min-w-[150px]", } > diff --git a/views/components/themeswitch/themeswitch.templ b/views/components/themeswitch/themeswitch.templ index 137d1bc..19a1f7a 100644 --- a/views/components/themeswitch/themeswitch.templ +++ b/views/components/themeswitch/themeswitch.templ @@ -73,10 +73,10 @@ script changeTheme(themeName string) { secondary20: "#ffffff33", secondary30: "#ffffff4c", secondary69: "#ffffffb0", - ACCENT: "#d3fcbf", - ACCENT20: "#d3fcbf33", - ACCENT30: "#d3fcbf4C", - ACCENT69: "#d3fcbfB0", + accent: "#d3fcbf", + accent20: "#d3fcbf33", + accent30: "#d3fcbf4C", + accent69: "#d3fcbfB0", bg: "/static/images/dankground-dark.svg", }, white: { diff --git a/views/icons/home.templ b/views/icons/home.templ new file mode 100644 index 0000000..ac1a75f --- /dev/null +++ b/views/icons/home.templ @@ -0,0 +1,7 @@ +package icons + +templ Home() { + + + +} diff --git a/views/icons/playlists.templ b/views/icons/playlists.templ new file mode 100644 index 0000000..ebc232f --- /dev/null +++ b/views/icons/playlists.templ @@ -0,0 +1,11 @@ +package icons + +templ Playlist() { + + + + + + + +} diff --git a/views/icons/profile.templ b/views/icons/profile.templ new file mode 100644 index 0000000..9d62fe9 --- /dev/null +++ b/views/icons/profile.templ @@ -0,0 +1,7 @@ +package icons + +templ Profile() { + + + +} From f31a01577e62cdc68bf3e0169df9770d17a0c3ee Mon Sep 17 00:00:00 2001 From: Baraa Al-Masri Date: Fri, 17 May 2024 19:23:39 +0300 Subject: [PATCH 67/97] chore(icons): move about to component --- views/components/header/header.templ | 5 ++--- views/icons/about.templ | 9 +++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 views/icons/about.templ diff --git a/views/components/header/header.templ b/views/components/header/header.templ index f4c18fc..bf0fde1 100644 --- a/views/components/header/header.templ +++ b/views/components/header/header.templ @@ -4,6 +4,7 @@ import ( "dankmuzikk/views/components/search" "dankmuzikk/views/components/themeswitch" "dankmuzikk/views/components/navlink" + "dankmuzikk/views/icons" ) templ homeLinkContainer() { @@ -19,9 +20,7 @@ templ homeLinkContainer() { templ mobileHeader() {
-
- @navlink.NavLink("About", "/static/icons/nav-about-icon.svg", "/about") -
+ @navlink.LinkContainer("/about", icons.About())
@themeswitch.ThemeSwitch()
diff --git a/views/icons/about.templ b/views/icons/about.templ new file mode 100644 index 0000000..dbb3745 --- /dev/null +++ b/views/icons/about.templ @@ -0,0 +1,9 @@ +package icons + +templ About() { + + + + + +} From 3890f03cf153b0fd7d3912a1ea525e065d1b8f3a Mon Sep 17 00:00:00 2001 From: Baraa Al-Masri Date: Fri, 17 May 2024 19:53:13 +0300 Subject: [PATCH 68/97] fat-commit: fix more icons stuff --- static/icons/loop-icon.svg | 16 ++++++++++++++-- static/icons/loop-off-icon.svg | 19 ++++++++++++++++--- static/icons/loop-once-icon.svg | 15 +++++++++++---- static/icons/nav-about-icon.svg | 5 ----- static/icons/nav-home-icon.svg | 3 --- static/icons/nav-playlists-icon.svg | 7 ------- static/icons/nav-profile-icon.svg | 3 --- static/icons/shuffle-icon.svg | 11 +++++++++-- static/icons/shuffle-off-icon.svg | 17 ++++++++++------- static/js/player.js | 2 +- views/components/popover/popover.templ | 5 ++++- .../components/themeswitch/themeswitch.templ | 4 ++-- 12 files changed, 67 insertions(+), 40 deletions(-) delete mode 100644 static/icons/nav-about-icon.svg delete mode 100644 static/icons/nav-home-icon.svg delete mode 100644 static/icons/nav-playlists-icon.svg delete mode 100644 static/icons/nav-profile-icon.svg diff --git a/static/icons/loop-icon.svg b/static/icons/loop-icon.svg index e268197..1f44ef3 100644 --- a/static/icons/loop-icon.svg +++ b/static/icons/loop-icon.svg @@ -1,3 +1,15 @@ - - + + + + + + + + + + + + + + diff --git a/static/icons/loop-off-icon.svg b/static/icons/loop-off-icon.svg index b59fd79..b92a86b 100644 --- a/static/icons/loop-off-icon.svg +++ b/static/icons/loop-off-icon.svg @@ -1,4 +1,17 @@ - - - + + + + + + + + + + + + + + + + diff --git a/static/icons/loop-once-icon.svg b/static/icons/loop-once-icon.svg index 2965406..ccd22c1 100644 --- a/static/icons/loop-once-icon.svg +++ b/static/icons/loop-once-icon.svg @@ -1,5 +1,12 @@ - - - - + + + + + + + + + + + diff --git a/static/icons/nav-about-icon.svg b/static/icons/nav-about-icon.svg deleted file mode 100644 index 3dcf440..0000000 --- a/static/icons/nav-about-icon.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/static/icons/nav-home-icon.svg b/static/icons/nav-home-icon.svg deleted file mode 100644 index f133973..0000000 --- a/static/icons/nav-home-icon.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/static/icons/nav-playlists-icon.svg b/static/icons/nav-playlists-icon.svg deleted file mode 100644 index fbdd76a..0000000 --- a/static/icons/nav-playlists-icon.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/static/icons/nav-profile-icon.svg b/static/icons/nav-profile-icon.svg deleted file mode 100644 index 1ab3cae..0000000 --- a/static/icons/nav-profile-icon.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/static/icons/shuffle-icon.svg b/static/icons/shuffle-icon.svg index 99460e6..550ce33 100644 --- a/static/icons/shuffle-icon.svg +++ b/static/icons/shuffle-icon.svg @@ -1,3 +1,10 @@ - - + + + + + + + + + diff --git a/static/icons/shuffle-off-icon.svg b/static/icons/shuffle-off-icon.svg index 03db1ee..90bbfe7 100644 --- a/static/icons/shuffle-off-icon.svg +++ b/static/icons/shuffle-off-icon.svg @@ -1,8 +1,11 @@ - - - - - - - + + + + + + + + + + diff --git a/static/js/player.js b/static/js/player.js index 70803d1..3648729 100644 --- a/static/js/player.js +++ b/static/js/player.js @@ -353,7 +353,7 @@ shuffleEl.addEventListener("click", toggleShuffle); loopEl.addEventListener("click", (event) => { currentLoopIdx = (currentLoopIdx + 1) % loopModes.length; - event.target.src = "/static/images/" + loopModes[currentLoopIdx].icon; + event.target.src = "/static/icons/" + loopModes[currentLoopIdx].icon; }); songSeekBarEl.addEventListener("change", (event) => { diff --git a/views/components/popover/popover.templ b/views/components/popover/popover.templ index d463df7..285240a 100644 --- a/views/components/popover/popover.templ +++ b/views/components/popover/popover.templ @@ -7,7 +7,10 @@ import ( templ Popover(id string, button, child templ.Component) {
diff --git a/views/pages/playlists.templ b/views/pages/playlists.templ index 806ac1e..bc17a8a 100644 --- a/views/pages/playlists.templ +++ b/views/pages/playlists.templ @@ -54,7 +54,13 @@ templ singlePlaylist(pl entities.Playlist) { "flex", "flex-row", "lg:flex-col", "lg:justify-center", "items-center", "gap-x-5", "lg:gap-x-0", } > - +

{ pl.Title }

{ fmt.Sprint(pl.SongsCount) } Songs

diff --git a/views/pages/profile.templ b/views/pages/profile.templ index 5f39a42..dd81ad5 100644 --- a/views/pages/profile.templ +++ b/views/pages/profile.templ @@ -20,6 +20,8 @@ templ Profile(prfl entities.Profile) { class={ "flex", "flex-col", "justify-center", "items-center", "gap-y-3", } > - Sign up with Google + Sign up with Google From e5e1a75b0ad643dc44d7bc85b0d45790130335b7 Mon Sep 17 00:00:00 2001 From: Baraa Al-Masri Date: Fri, 17 May 2024 21:29:23 +0300 Subject: [PATCH 74/97] chore(seo): add title for popover's button --- views/components/playlist/new_playlis_popover.templ | 2 +- views/components/playlist/popover.templ | 2 +- views/components/popover/popover.templ | 4 +++- views/components/themeswitch/themeswitch.templ | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/views/components/playlist/new_playlis_popover.templ b/views/components/playlist/new_playlis_popover.templ index 70f4a77..0c1aa28 100644 --- a/views/components/playlist/new_playlis_popover.templ +++ b/views/components/playlist/new_playlis_popover.templ @@ -3,7 +3,7 @@ package playlist import "dankmuzikk/views/components/popover" templ NewPlaylistPopover() { - @popover.Popover("new-playlist", newPlaylistPopoverButton(), newPlaylistPopover()) + @popover.Popover("new-playlist", "New playlist", newPlaylistPopoverButton(), newPlaylistPopover()) } templ newPlaylistPopover() { diff --git a/views/components/playlist/popover.templ b/views/components/playlist/popover.templ index ec00c9b..17b4a7b 100644 --- a/views/components/playlist/popover.templ +++ b/views/components/playlist/popover.templ @@ -7,7 +7,7 @@ import ( ) templ PlaylistsPopover(index int, songId string, playlists []entities.Playlist, songsInPlaylists map[string]string) { - @popover.Popover(fmt.Sprint(index), popoverButton(), playlistsSelector(songId, playlists, songsInPlaylists)) + @popover.Popover(fmt.Sprint(index), "Add to playlist", popoverButton(), playlistsSelector(songId, playlists, songsInPlaylists)) } templ playlistsSelector(songId string, playlists []entities.Playlist, songsInPlaylists map[string]string) { diff --git a/views/components/popover/popover.templ b/views/components/popover/popover.templ index 285240a..cba290f 100644 --- a/views/components/popover/popover.templ +++ b/views/components/popover/popover.templ @@ -4,13 +4,15 @@ import ( "fmt" ) -templ Popover(id string, button, child templ.Component) { +templ Popover(id, title string, button, child templ.Component) {