diff --git a/frontend/css/entity-pages.less b/frontend/css/entity-pages.less index 3e88564ea5..6a76c00901 100644 --- a/frontend/css/entity-pages.less +++ b/frontend/css/entity-pages.less @@ -117,19 +117,21 @@ min-height: 150px; min-width: 0; .artist-page& { - max-height: 520px; + max-height: 500px; overflow-y: hidden; border-bottom-style: inset; position: relative; - &::after { - content: ""; - background-image: @white-gradient; - position: absolute; - bottom: 0; - height: 8em; - width: 100%; + &.expanded { + max-height: initial; + padding-bottom: 4em; } } + + .read-more { + bottom: 0; + padding: 1em 0; + } + .album-page& .listen-card .track-position { flex: 0 3em; align-self: center; @@ -169,6 +171,9 @@ justify-items: center; grid-template-columns: repeat(auto-fill, minmax(190px, max-content)); grid-template-rows: repeat(2, 1fr); + &.single-row { + grid-template-rows: repeat(1, 1fr); + } .cover-art { aspect-ratio: 1; background: lightgrey; diff --git a/frontend/css/main.less b/frontend/css/main.less index 8fc1f5bae3..7a83e382cd 100644 --- a/frontend/css/main.less +++ b/frontend/css/main.less @@ -40,6 +40,7 @@ @import "accordion.less"; @import "donors-page.less"; @import "donations.less"; +@import "scroll-container.less"; @icon-font-path: "/static/fonts/"; diff --git a/frontend/css/new-navbar.less b/frontend/css/new-navbar.less index b8f1ec99f0..6d9e3bad07 100644 --- a/frontend/css/new-navbar.less +++ b/frontend/css/new-navbar.less @@ -336,17 +336,6 @@ body { } } -.dragscroll { - /* We user the dragscroll library to handle dragging to scroll */ - overflow-x: scroll; - /* But we want to hide the scrollbar: */ - -ms-overflow-style: none; /* Internet Explorer and Edge */ - scrollbar-width: none; /* Firefox */ - &::-webkit-scrollbar { - /* Chrome, Safari and Opera */ - display: none; - } -} .tertiary-nav { /* This tertiary nav (pills at the top of the page) should be max full width and scrollable */ display: flex; diff --git a/frontend/css/recommendation-page.less b/frontend/css/recommendation-page.less index 2395caec66..7759ad9e2f 100644 --- a/frontend/css/recommendation-page.less +++ b/frontend/css/recommendation-page.less @@ -4,37 +4,6 @@ } /* stylelint-enable */ -.playlists-masonry-container { - position: relative; - // hide overflow behind button with gradient to indicate there's more - .nav-button { - position: absolute; - top: 0; - bottom: 0; - width: 55px; - border: none; - font-size: 2em; - color: @light-grey; - z-index: 1; - opacity: 1; - transition: opacity 300ms linear; - &.backward { - background: linear-gradient(to right, @white 10%, transparent); - text-align: left; - left: 0; - } - &.forward { - background: linear-gradient(to left, @white 10%, transparent); - right: 0; - text-align: right; - } - } - &.scroll-start .nav-button.backward, - &.scroll-end& .nav-button.forward { - opacity: 0; - pointer-events: none; - } -} .playlists-masonry { width: 100%; display: grid; diff --git a/frontend/css/release-card.less b/frontend/css/release-card.less index d04b32945f..0efd6a39af 100644 --- a/frontend/css/release-card.less +++ b/frontend/css/release-card.less @@ -116,7 +116,7 @@ } .release-coverart.hide-image { - display: none; + display: none !important; height: 0; } diff --git a/frontend/css/scroll-container.less b/frontend/css/scroll-container.less new file mode 100644 index 0000000000..f69031d091 --- /dev/null +++ b/frontend/css/scroll-container.less @@ -0,0 +1,90 @@ +.horizontal-scroll-container { + position: relative; + + .horizontal-scroll-container.dragging .horizontal-scroll * { + // Prevent text selection and interactions when the user is actively dragging to scroll + pointer-events: none; + user-select: none; + } + + .horizontal-scroll { + overflow-x: auto; + .small-scrollbar(); + &.no-scrollbar { + /* Hide the scrollbar: */ + -ms-overflow-style: none; /* Internet Explorer and Edge */ + scrollbar-width: none; /* Firefox */ + &::-webkit-scrollbar { + /* Chrome, Safari and Opera */ + display: none; + } + } + } + // hide overflow behind button with gradient to indicate there's more + .nav-button { + position: absolute; + top: 0; + bottom: 0; + width: 55px; + border: none; + font-size: 2em; + color: @light-grey; + z-index: 2; + opacity: 1; + transition: opacity 300ms linear; + &.backward { + background: linear-gradient(to right, @white 10%, transparent); + text-align: left; + left: -1px; + } + &.forward { + background: linear-gradient(to left, @white 10%, transparent); + right: -1px; + text-align: right; + } + } + &.scroll-start .nav-button.backward, + &.scroll-end& .nav-button.forward { + opacity: 0; + pointer-events: none; + } + // Hide arrow buttons when the container does not overflow (class added with javascript) + &.no-scroll .nav-button { + display: none; + } +} + +.dragscroll { + /* We user the dragscroll library to handle dragging to scroll */ + overflow-x: scroll; + /* But we want to hide the scrollbar: */ + -ms-overflow-style: none; /* Internet Explorer and Edge */ + scrollbar-width: none; /* Firefox */ + &::-webkit-scrollbar { + /* Chrome, Safari and Opera */ + display: none; + } +} +@scrollbar-background-color: #f5f5f5; +@scrollbar-thumb-color: darken(@scrollbar-background-color, 10%); +@scrollbar-thumb-color-dark: darken(@scrollbar-thumb-color, 15%); + +.small-scrollbar { + scrollbar-width: unset; + padding-bottom: 1em; + &::-webkit-scrollbar { + height: 5px; + display: block; + } + &::-webkit-scrollbar-track { + background-color: @scrollbar-background-color; + border-radius: 5px; + } + &::-webkit-scrollbar-thumb { + background-color: @scrollbar-thumb-color; + border-radius: 5px; + } + &:hover::-webkit-scrollbar-thumb { + background-color: @scrollbar-thumb-color-dark; + } +} diff --git a/frontend/js/src/about/add-data/AddData.tsx b/frontend/js/src/about/add-data/AddData.tsx index 262985fbe3..0a3c1372d8 100644 --- a/frontend/js/src/about/add-data/AddData.tsx +++ b/frontend/js/src/about/add-data/AddData.tsx @@ -255,7 +255,7 @@ export default function AddData() { OngakuKiroku - , a ListenBrainz scrobbler for Swinsian and Music.app on macOS devices + , a ListenBrainz submitter for Swinsian and Music.app on macOS devices