refactore: move more components to typescript
This commit is contained in:
14 files changed
+544
-682
No files matched your search
@@ -1,5 +1,7 @@
|
||||
$border-radius: 20px;
|
||||
.item-album {
|
||||
width: 70vw;
|
||||
padding-right: 2.2em;
|
||||
.item-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -9,123 +11,7 @@ $border-radius: 20px;
|
||||
display: grid;
|
||||
gap: 3em;
|
||||
}
|
||||
&-sidebar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1em;
|
||||
position: sticky;
|
||||
max-height: 100vh;
|
||||
top: 0;
|
||||
&-image {
|
||||
width: 100%;
|
||||
object-fit: cover;
|
||||
border-radius: $border-radius-default;
|
||||
}
|
||||
&-artist {
|
||||
display: flex;
|
||||
gap: 1em;
|
||||
align-items: center;
|
||||
padding: 1em 0;
|
||||
color: rgb(255 255 255 / 0.7);
|
||||
transition: $transition-time-default;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
&:hover {
|
||||
color: rgb(255 255 255)
|
||||
}
|
||||
&-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
&-container {
|
||||
width: 3em;
|
||||
aspect-ratio: 1;
|
||||
border-radius: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
.material-symbols-rounded {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: rgb(255 255 255 / 0.1);
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
&-container {
|
||||
// max-height: 20em;/
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
&-track {
|
||||
display: grid;
|
||||
grid-template-columns: 3em 60% 6em 1fr;
|
||||
gap: 1em;
|
||||
padding: 1em;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
border-radius: $border-radius-default;
|
||||
transition: background $transition-time-fast;
|
||||
&.header {
|
||||
border-bottom: 1px solid rgb(255 255 255 / 0.2);
|
||||
color: rgb(255 255 255 / 0.7);
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
.index-container {
|
||||
justify-self: center;
|
||||
position: relative;
|
||||
.material-symbols-rounded {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
font-size: 2em !important;
|
||||
opacity: 0;
|
||||
transition: none !important;
|
||||
color: $clr-accent-default;
|
||||
}
|
||||
}
|
||||
&-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.1em
|
||||
}
|
||||
&:hover {
|
||||
background: rgb(255 255 255 / 0.1) !important;
|
||||
.index-container {
|
||||
// font-size: 0em;
|
||||
.index {
|
||||
opacity: 0;
|
||||
transition: opacity 0;
|
||||
}
|
||||
.material-symbols-rounded {
|
||||
opacity: 1;
|
||||
font-size: 2.2em !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.playing {
|
||||
background: rgb(0 0 0 / 0.4) !important;
|
||||
.item-info-track-info-name, .index {
|
||||
color: $clr-accent-default;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
&-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.4em
|
||||
}
|
||||
}
|
||||
|
||||
&-album-info {
|
||||
gap: 1.2em;
|
||||
}
|
||||
@@ -142,6 +28,69 @@ $border-radius: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-info-sidebar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1em;
|
||||
position: fixed;
|
||||
max-height: 100vh;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 30vw;
|
||||
padding: 4.4em;
|
||||
padding-left: 2.2em;
|
||||
&-image {
|
||||
width: 100%;
|
||||
object-fit: cover;
|
||||
border-radius: $border-radius-default;
|
||||
}
|
||||
&-artist {
|
||||
display: flex;
|
||||
gap: 1em;
|
||||
align-items: center;
|
||||
padding: 1em 0;
|
||||
color: rgb(255 255 255 / 0.7);
|
||||
transition: $transition-time-default;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
&:hover {
|
||||
color: rgb(255 255 255)
|
||||
}
|
||||
&-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
&-container {
|
||||
width: 3em;
|
||||
aspect-ratio: 1;
|
||||
border-radius: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
.material-symbols-rounded {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: rgb(255 255 255 / 0.1);
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
&-container {
|
||||
// max-height: 20em;/
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-detail-album {
|
||||
&-track {
|
||||
display: grid;
|
||||
|
||||
Reference in new issue
Block a user