refactor: move to tanstack router

This commit is contained in:
Prayag Prajapati committed 2024-05-29 18:10:22 +05:30
1 parent a4ea932153
commit 522621ed69
136 files changed
+7063 -6127

No files matched your search

File diff suppressed because it is too large. Load diff
+295
View File
@@ -0,0 +1,295 @@
$cardWidth: 18%;
.item-series.item {
gap: 1em;
.item-hero {
height: 60vh;
gap: 2em;
row-gap: 1.2em;
position: relative;
align-items: flex-end;
margin-bottom: 1em;
display: grid;
grid-template-columns: $cardWidth 1fr;
grid-template-rows: 1fr auto;
&-image {
opacity: 0;
width: 100%;
object-fit: contain;
transition: opacity $transition-time-default;
&-container {
height: fit-content;
max-height: 100%;
overflow: hidden;
border-radius: $border-radius-default;
box-shadow: $shadow-card;
flex-grow: 1;
flex-shrink: 0;
position: relative;
width: 100%;
}
&-blurhash {
position: absolute !important;
width: 100% !important;
height: 100% !important;
z-index: -1;
}
}
&-logo {
max-width: 34rem;
max-height: 10rem;
opacity: 0;
transition: opacity $transition-time-default;
object-position: bottom;
margin-bottom: 2em;
}
&-detail {
width: 100%;
align-items: flex-start;
gap: 0.2em;
justify-content: end;
}
&-buttons {
&-container {
align-items: center;
justify-content: space-between;
width: 100%;
grid-column: 1/3;
display: grid;
grid-template-columns: inherit;
gap: 2em;
}
}
&-backdrop {
width: 100vw;
height: 100vh;
object-fit: cover;
object-position: top;
opacity: 0;
transition: opacity $transition-time-default;
&-container {
filter: brightness(0.8);
position: absolute;
top: -4.4em;
left: -$page-margin;
width: 100vw;
height: calc(54vh + 4.4em);
z-index: -1;
mask-image: linear-gradient(to top, transparent, black);
-webkit-mask-image: linear-gradient(
to top,
transparent,
black
);
}
}
& .play-button {
width: 100% !important;
}
}
.item-detail {
display: grid;
grid-template-columns: 1fr 35%;
justify-items: center;
align-items: start;
gap: 3em;
&-nextUp {
max-width: 23em;
}
&-cast {
max-height: 50vh;
overflow-y: auto;
overflow-x: hidden;
mask-image: linear-gradient(to top, transparent, black 1.2em);
-webkit-mask-image: linear-gradient(to top, transparent, black 1.2em);
&-title {
position: sticky;
top: 0;
background: black;
border:1px solid rgb(255 255 255 / 0.2) ;
padding: 0.35em;
border-radius: 10px;
z-index: 1;
}
&-container {
display: flex;
flex-direction: column;
gap: 1em;
}
&-grid {
display: grid;
gap: 1em;
margin-bottom: 1em;
grid-template-columns: repeat(2, minmax(0, 1fr));
}
&-card {
display: grid;
grid-template-columns: 6em 1fr;
gap: 0.5em;
align-items: center;
color: white !important;
text-decoration: none;
padding: 0.5em;
background: rgb(255 255 255 / 0);
transition: background $transition-time-default;
border-radius: $border-radius-default;
&:hover {
background: rgb(255 255 255 / 0.1);
}
&-image,
&-icon {
width: 6em;
height: 6em;
object-fit: cover;
border-radius: 100%;
box-shadow: $shadow-card-image;
}
&-icon {
display: flex;
align-items: center;
justify-content: center;
font-size: 1em;
background: rgb(255 255 255 / 0.1);
.material-symbols-rounded {
font-size: 3em;
}
}
}
}
&-link {
color: white;
text-decoration-color: rgb(255 255 255 / 0.5);
&:hover {
text-decoration-color: white;
}
}
&-episode{
display:grid;
grid-template-columns: 3.2em 12em 1fr 6em;
flex-direction: row;
width: 100%;
gap:1.8em;
align-items: center;
justify-content: center;
cursor: pointer;
padding: 1em 0;
&-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex-wrap: nowrap;
gap: 0.5em;
margin-top: 0.5em;
width: 100%;
}
&-image{
width: 100%;
height: 100%;
object-fit: cover;
opacity: 0;
transition: opacity $transition-time-default;
position: absolute;
top: 0;
left: 0;
z-index: 0;
&-container{
width: 100%;
aspect-ratio: 1.66666;
position: relative;
overflow: hidden;
border-radius: $border-radius-default;
flex-shrink: 0;
&::after{
content: "";
position: absolute;
top: 0;
right: 0;
border: 0.65em solid #00c853;
border-bottom-color: transparent;
border-left-color: transparent;
opacity: 0;
transition: opacity $transition-time-default;
}
&.watched::after {
opacity: 1;
}
}
&-overlay{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgb(255 255 255 / 0.1);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity $transition-time-default;
z-index: 2;
}
&-icon {
font-size: 3em;
&-container {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
background: rgb(255 255 255 / 0.1);
}
}
}
&-info{
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
gap: 0.4em;
width: 100%;
padding-right: 2em;
}
&-buttons{
display: flex;
gap: 1em;
}
&:hover .item-detail-episode-image-overlay, &:focus-within .item-detail-episode-image-overlay{
opacity: 1;
}
}
}
}
@media (max-width: 1320px) {
.item-series .item-detail {
&-cast {
&-grid {
grid-template-columns: 1fr;
}
}
&-episodes-container {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
}
@media (max-width: 830px) {
.item-series .item-detail {
&-episodes-container {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
}
@media (max-width: 564px) {
.item-series .item-detail {
&-episodes-container {
grid-template-columns: repeat(1, minmax(0, 1fr));
}
}
}