mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 13:00:13 +02:00
redesign feature carousel
This commit is contained in:
@@ -1,73 +1,287 @@
|
||||
.carousel-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin-bottom: var(--theme-spacing-xl);
|
||||
container-type: inline-size;
|
||||
overflow: hidden;
|
||||
border-radius: var(--theme-radius-lg);
|
||||
}
|
||||
|
||||
.carousel {
|
||||
position: relative;
|
||||
height: 35vh;
|
||||
min-height: 250px;
|
||||
max-height: 300px;
|
||||
padding: var(--theme-spacing-md);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-areas: 'image info';
|
||||
grid-template-rows: 1fr;
|
||||
grid-template-columns: 200px minmax(0, 1fr);
|
||||
grid-auto-columns: 1fr;
|
||||
grid-template-columns: repeat(var(--items-per-row, 1), 1fr);
|
||||
gap: var(--theme-spacing-md);
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: 100%;
|
||||
min-height: 400px;
|
||||
padding: var(--theme-spacing-xl);
|
||||
overflow: hidden;
|
||||
|
||||
--items-per-row: 1;
|
||||
}
|
||||
|
||||
.image-column {
|
||||
z-index: 15;
|
||||
display: flex;
|
||||
grid-area: image;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.info-column {
|
||||
z-index: 15;
|
||||
display: flex;
|
||||
grid-area: info;
|
||||
align-items: flex-end;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
padding-left: 1rem;
|
||||
}
|
||||
|
||||
.background-image {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
width: 150%;
|
||||
height: 150%;
|
||||
user-select: none;
|
||||
object-fit: var(--theme-image-fit);
|
||||
object-position: 0 30%;
|
||||
filter: blur(24px);
|
||||
}
|
||||
|
||||
.background-image-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 10;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(180deg, rgb(25 26 28 / 30%), var(--theme-colors-background));
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
.carousel-item {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 400px;
|
||||
overflow: hidden;
|
||||
border-radius: var(--theme-radius-md);
|
||||
isolation: isolate;
|
||||
}
|
||||
|
||||
.title-wrapper {
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
.carousel-item :global(.overlay) {
|
||||
border-radius: var(--theme-radius-md);
|
||||
}
|
||||
|
||||
.carousel-link {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--theme-spacing-md);
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 400px;
|
||||
padding: var(--theme-spacing-xl);
|
||||
}
|
||||
|
||||
.title-section {
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
min-height: 60px;
|
||||
max-height: 60px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.image-section {
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
min-height: 200px;
|
||||
max-height: 200px;
|
||||
}
|
||||
|
||||
.metadata-section {
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
min-height: 100px;
|
||||
max-height: 100px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.image-link {
|
||||
display: block;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.image-link:hover {
|
||||
transform: scale(1.02);
|
||||
}
|
||||
|
||||
.image-link:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.album-image {
|
||||
width: 100%;
|
||||
max-width: 180px;
|
||||
height: auto;
|
||||
border-radius: var(--theme-radius-lg);
|
||||
box-shadow: 0 8px 24px rgb(0 0 0 / 60%);
|
||||
transition: box-shadow 0.3s ease;
|
||||
}
|
||||
|
||||
.image-link:hover .album-image {
|
||||
box-shadow: 0 12px 32px rgb(0 0 0 / 40%);
|
||||
}
|
||||
|
||||
.artist-link {
|
||||
display: inline-block;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
transition: opacity 0.2s ease;
|
||||
}
|
||||
|
||||
.artist-link:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin-bottom: var(--theme-spacing-xs);
|
||||
color: white;
|
||||
text-shadow: 0 0 10px rgb(0 0 0 / 50%);
|
||||
}
|
||||
|
||||
.artist {
|
||||
color: white;
|
||||
text-shadow: 0 0 10px rgb(0 0 0 / 50%);
|
||||
}
|
||||
|
||||
.nav-arrow-left,
|
||||
.nav-arrow-right {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
z-index: 20;
|
||||
border: 1px solid rgb(255 255 255 / 25%);
|
||||
backdrop-filter: blur(10px);
|
||||
transform: translateY(-50%);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.nav-arrow-left {
|
||||
left: var(--theme-spacing-xs);
|
||||
}
|
||||
|
||||
.nav-arrow-right {
|
||||
right: var(--theme-spacing-xs);
|
||||
}
|
||||
|
||||
.nav-arrow-left:hover,
|
||||
.nav-arrow-right:hover {
|
||||
background: transparent !important;
|
||||
border-color: rgb(255 255 255 / 35%);
|
||||
transform: translateY(-50%) scale(1.1);
|
||||
}
|
||||
|
||||
.nav-arrow-left:active,
|
||||
.nav-arrow-right:active {
|
||||
transform: translateY(-50%) scale(0.95);
|
||||
}
|
||||
|
||||
@container (min-width: 640px) {
|
||||
.carousel {
|
||||
--items-per-row: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@container (min-width: $mantine-breakpoint-sm) {
|
||||
.carousel {
|
||||
--items-per-row: 3;
|
||||
|
||||
gap: var(--theme-spacing-lg);
|
||||
}
|
||||
|
||||
.carousel-item {
|
||||
min-height: 450px;
|
||||
}
|
||||
|
||||
.content {
|
||||
min-height: 450px;
|
||||
}
|
||||
|
||||
.title-section {
|
||||
height: 70px;
|
||||
min-height: 70px;
|
||||
max-height: 70px;
|
||||
}
|
||||
|
||||
.image-section {
|
||||
height: 220px;
|
||||
min-height: 220px;
|
||||
max-height: 220px;
|
||||
}
|
||||
|
||||
.metadata-section {
|
||||
height: 110px;
|
||||
min-height: 110px;
|
||||
max-height: 110px;
|
||||
}
|
||||
|
||||
.album-image {
|
||||
max-width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
@container (min-width: $mantine-breakpoint-md) {
|
||||
.carousel {
|
||||
--items-per-row: 4;
|
||||
}
|
||||
|
||||
.carousel-item {
|
||||
min-height: 500px;
|
||||
}
|
||||
|
||||
.content {
|
||||
min-height: 500px;
|
||||
}
|
||||
|
||||
.title-section {
|
||||
height: 80px;
|
||||
min-height: 80px;
|
||||
max-height: 80px;
|
||||
}
|
||||
|
||||
.image-section {
|
||||
height: 250px;
|
||||
min-height: 250px;
|
||||
max-height: 250px;
|
||||
}
|
||||
|
||||
.metadata-section {
|
||||
height: 120px;
|
||||
min-height: 120px;
|
||||
max-height: 120px;
|
||||
}
|
||||
|
||||
.album-image {
|
||||
max-width: 220px;
|
||||
}
|
||||
}
|
||||
|
||||
@container (min-width: $mantine-breakpoint-xl) {
|
||||
.carousel {
|
||||
--items-per-row: 5;
|
||||
}
|
||||
|
||||
.carousel-item {
|
||||
min-height: 550px;
|
||||
}
|
||||
|
||||
.content {
|
||||
min-height: 550px;
|
||||
}
|
||||
|
||||
.title-section {
|
||||
height: 90px;
|
||||
min-height: 90px;
|
||||
max-height: 90px;
|
||||
}
|
||||
|
||||
.image-section {
|
||||
height: 280px;
|
||||
min-height: 280px;
|
||||
max-height: 280px;
|
||||
}
|
||||
|
||||
.metadata-section {
|
||||
height: 130px;
|
||||
min-height: 130px;
|
||||
max-height: 130px;
|
||||
}
|
||||
|
||||
.album-image {
|
||||
max-width: 240px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user