From 684fc13f7e49319e5c8736e31c9312c5c7162e9d Mon Sep 17 00:00:00 2001 From: jon r Date: Tue, 29 Oct 2024 20:20:09 +0100 Subject: [PATCH] Paths in frontend templates to find the source files. Move non-abstract external UI components into this repo. ArtistCard working, with missing css --- front/src/components/album/Card.vue | 51 ++++++++++++++ front/src/components/album/style.scss | 25 +++++++ front/src/components/artist/Card.vue | 48 +++++++++++++ front/src/components/artist/style.module.scss | 28 ++++++++ front/src/components/artist/style.scss | 28 ++++++++ front/src/components/audio/Search.vue | 1 + front/src/components/library/AlbumBase.vue | 1 + front/src/components/library/Albums.vue | 1 + front/src/components/library/Artists.vue | 9 ++- front/src/components/library/Home.vue | 4 +- .../components/manage/library/AlbumsTable.vue | 1 + front/src/components/playlist/Card.vue | 70 +++++++++++++++++++ front/src/components/playlist/style.scss | 66 +++++++++++++++++ front/src/components/podcast/Card.vue | 42 +++++++++++ front/src/components/podcast/style.scss | 23 ++++++ front/src/components/radio/Card.vue | 55 +++++++++++++++ front/src/components/radio/style.scss | 67 ++++++++++++++++++ front/src/views/Search.vue | 1 + front/src/views/content/Home.vue | 1 + front/src/views/content/libraries/Home.vue | 1 + front/src/views/library/LibraryBase.vue | 1 + 21 files changed, 521 insertions(+), 3 deletions(-) create mode 100644 front/src/components/album/Card.vue create mode 100644 front/src/components/album/style.scss create mode 100644 front/src/components/artist/Card.vue create mode 100644 front/src/components/artist/style.module.scss create mode 100644 front/src/components/artist/style.scss create mode 100644 front/src/components/playlist/Card.vue create mode 100644 front/src/components/playlist/style.scss create mode 100644 front/src/components/podcast/Card.vue create mode 100644 front/src/components/podcast/style.scss create mode 100644 front/src/components/radio/Card.vue create mode 100644 front/src/components/radio/style.scss diff --git a/front/src/components/album/Card.vue b/front/src/components/album/Card.vue new file mode 100644 index 000000000..8eacf3fa4 --- /dev/null +++ b/front/src/components/album/Card.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/front/src/components/album/style.scss b/front/src/components/album/style.scss new file mode 100644 index 000000000..4a3704529 --- /dev/null +++ b/front/src/components/album/style.scss @@ -0,0 +1,25 @@ +.funkwhale { + &.card.album-card { + --fw-border-radius: 12px; + --fw-card-width: 208px; + --fw-card-image-width: var(--fw-card-width); + --fw-card-padding: 16px; + + > .card-image { + border-radius: 0 !important; + width: var(--fw-card-image-width); + margin: calc(-1 * var(--fw-card-padding)) calc(-1 * var(--fw-card-padding)) 0; + } + + > .card-title { + font-size: 1rem; + text-align: left !important; + padding-top: 16px !important; + } + + > .card-content { + padding-top: 0 !important; + text-align: left !important; + } + } +} diff --git a/front/src/components/artist/Card.vue b/front/src/components/artist/Card.vue new file mode 100644 index 000000000..28c63239c --- /dev/null +++ b/front/src/components/artist/Card.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/front/src/components/artist/style.module.scss b/front/src/components/artist/style.module.scss new file mode 100644 index 000000000..6219103c6 --- /dev/null +++ b/front/src/components/artist/style.module.scss @@ -0,0 +1,28 @@ +.funkwhale { + &.card.artist-card { + --fw-border-radius: 12px; + --fw-card-width: 208px; + --fw-card-image-width: calc(var(--fw-card-width) - 16px); + --fw-card-padding: 16px; + + > .card-image { + border-radius: 50% !important; + width: var(--fw-card-image-width); + margin: calc(-1 * var(--fw-card-padding) + 8px) calc(-1 * var(--fw-card-padding) + 8px) 0; + } + + .play-button { + top: calc(var(--fw-card-width) - 44px - 8px) !important; + } + + > .card-title { + font-size: 1rem; + text-align: left !important; + } + + > .card-content { + padding-top: 6px !important; + text-align: left !important; + } + } +} diff --git a/front/src/components/artist/style.scss b/front/src/components/artist/style.scss new file mode 100644 index 000000000..6219103c6 --- /dev/null +++ b/front/src/components/artist/style.scss @@ -0,0 +1,28 @@ +.funkwhale { + &.card.artist-card { + --fw-border-radius: 12px; + --fw-card-width: 208px; + --fw-card-image-width: calc(var(--fw-card-width) - 16px); + --fw-card-padding: 16px; + + > .card-image { + border-radius: 50% !important; + width: var(--fw-card-image-width); + margin: calc(-1 * var(--fw-card-padding) + 8px) calc(-1 * var(--fw-card-padding) + 8px) 0; + } + + .play-button { + top: calc(var(--fw-card-width) - 44px - 8px) !important; + } + + > .card-title { + font-size: 1rem; + text-align: left !important; + } + + > .card-content { + padding-top: 6px !important; + text-align: left !important; + } + } +} diff --git a/front/src/components/audio/Search.vue b/front/src/components/audio/Search.vue index 1780d254e..ef1c5f5dc 100644 --- a/front/src/components/audio/Search.vue +++ b/front/src/components/audio/Search.vue @@ -72,6 +72,7 @@ const labels = computed(() => ({