[wip] Rework Shop
- Change strategy for content fetching - Add a route per page instead of using __layout for all - Change the behaviors of the posters section (add a carousel on small screens) - Change Poster buttons styling and make interactions only for desktop
This commit is contained in:
@@ -6,12 +6,22 @@
|
||||
}
|
||||
|
||||
// Title Location
|
||||
h2 {
|
||||
&__title {
|
||||
overflow: hidden;
|
||||
width: auto;
|
||||
grid-column: 1 / span var(--columns);
|
||||
display: flex;
|
||||
}
|
||||
h2 {
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 16px;
|
||||
font-size: clamp(200px, 20vw, 340px);
|
||||
color: $color-secondary;
|
||||
margin-bottom: 40px;
|
||||
|
||||
@include bp (mob-lg) {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
@include bp (sm) {
|
||||
grid-column: 2 / span calc(var(--columns) - 1);
|
||||
margin-bottom: 88px;
|
||||
@@ -36,14 +46,25 @@
|
||||
|
||||
// Product Info
|
||||
&__info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 32px;
|
||||
|
||||
@include bp (mob-lg) {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
@include bp (sm) {
|
||||
margin-bottom: 56px;
|
||||
}
|
||||
|
||||
dl {
|
||||
margin-bottom: 24px;
|
||||
|
||||
@include bp (mob-lg) {
|
||||
flex: 1;
|
||||
margin-bottom: 0;
|
||||
padding-right: 16px;
|
||||
}
|
||||
}
|
||||
// Title
|
||||
dt {
|
||||
color: $color-secondary;
|
||||
@@ -51,16 +72,16 @@
|
||||
font-size: rem(36px);
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
// Text
|
||||
dd {
|
||||
font-size: rem(16px);
|
||||
color: $color-gray;
|
||||
margin-top: 8px;
|
||||
max-width: 140px;
|
||||
font-size: rem(14px);
|
||||
line-height: 1.4;
|
||||
color: $color-gray;
|
||||
|
||||
@include bp (sm) {
|
||||
max-width: none;
|
||||
font-size: rem(16px);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -97,22 +118,27 @@
|
||||
|
||||
&--1 {
|
||||
grid-column: 1 / span 7;
|
||||
|
||||
@include bp (sm) {
|
||||
grid-column: 1 / span 7;
|
||||
}
|
||||
}
|
||||
&--2 {
|
||||
grid-column: 2 / span 5;
|
||||
grid-column: 2 / span 7;
|
||||
margin: 32px 0;
|
||||
|
||||
@include bp (sm) {
|
||||
grid-column: 2 / span 7;
|
||||
margin: 48px 0;
|
||||
}
|
||||
}
|
||||
&--3 {
|
||||
grid-column: 4 / span 5;
|
||||
grid-column: 1 / span 6;
|
||||
z-index: 10;
|
||||
margin-bottom: -64px;
|
||||
|
||||
@include bp (sm) {
|
||||
grid-column: 5 / span 5;
|
||||
grid-column: 5 / span 8;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@@ -122,11 +148,13 @@
|
||||
}
|
||||
&--4 {
|
||||
grid-column: 1 / span 8;
|
||||
margin-bottom: 56px;
|
||||
margin: -56px 20px 20px;
|
||||
|
||||
@include bp (sm) {
|
||||
grid-column: 8 / span 13;
|
||||
grid-column: 5 / span 15;
|
||||
margin-bottom: 120px;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -134,8 +162,8 @@
|
||||
// About
|
||||
&__about {
|
||||
background-color: #fff;
|
||||
padding: 144px 0 72px;
|
||||
margin: -100px 0 -120px;
|
||||
padding: 144px 0 112px;
|
||||
margin: -24px 0 0;
|
||||
font-size: rem(36px);
|
||||
font-weight: 300;
|
||||
color: $color-primary-tertiary20;
|
||||
@@ -152,7 +180,7 @@
|
||||
max-width: 768px;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
font-size: rem(28px);
|
||||
font-size: clamp(#{rem(22px)}, 5vw, #{rem(28px)});
|
||||
font-weight: 200;
|
||||
|
||||
@include bp (sm) {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
pointer-events: auto;
|
||||
|
||||
// Left Image
|
||||
&__left {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
overflow: hidden;
|
||||
max-width: 326px;
|
||||
|
||||
@include bp (sm) {
|
||||
@include bp (md) {
|
||||
background-color: $color-primary-tertiary20;
|
||||
max-width: 600px;
|
||||
}
|
||||
@@ -33,12 +33,10 @@
|
||||
// Buttons
|
||||
.buttons {
|
||||
display: flex;
|
||||
margin-top: 40px;
|
||||
margin-top: 32px;
|
||||
justify-content: center;
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: transform 0.8s var(--ease-quart);
|
||||
|
||||
@include bp (sm) {
|
||||
@include bp (md) {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
bottom: 4.25%;
|
||||
@@ -46,19 +44,43 @@
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 40px;
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: transform 0.8s var(--ease-quart);
|
||||
}
|
||||
|
||||
a {
|
||||
margin: 0 clamp(4px, 0.3vw, 8px);
|
||||
text-align: center;
|
||||
& > * {
|
||||
background: none;
|
||||
font-size: rem(14px);
|
||||
font-weight: 300;
|
||||
color: $color-tertiary;
|
||||
padding: 0;
|
||||
|
||||
&:first-child {
|
||||
margin-right: 12px;
|
||||
|
||||
&:hover {
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
&:last-child {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 30px;
|
||||
padding: 0 12px;
|
||||
color: $color-secondary;
|
||||
border: 1px solid rgba($color-secondary, 0.4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Hover effect
|
||||
&:hover {
|
||||
img {
|
||||
transform: scale(0.8) translate3d(0, -5%, 0);
|
||||
border-radius: 8px;
|
||||
@include bp (md) {
|
||||
transform: scale(0.8) translate3d(0, -5%, 0);
|
||||
border-radius: 8px;
|
||||
}
|
||||
}
|
||||
.buttons {
|
||||
transform: translate3d(0,0,0);
|
||||
|
||||
@@ -1,12 +1,24 @@
|
||||
.cart {
|
||||
position: fixed;
|
||||
z-index: 202;
|
||||
top: 80px;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: calc(100vh - 80px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: auto;
|
||||
padding: 20px 20px 24px;
|
||||
background-color: $color-cream;
|
||||
border-radius: 8px;
|
||||
border-radius: 8px 8px 0 0;
|
||||
|
||||
@include bp (sm) {
|
||||
top: 24px;
|
||||
right: 24px;
|
||||
width: clamp(320px, 45vw, 500px);
|
||||
height: calc(100vh - 48px);
|
||||
max-height: 1000px;
|
||||
border-radius: 8px;
|
||||
padding: 24px 32px 32px;
|
||||
}
|
||||
|
||||
@@ -85,10 +97,11 @@
|
||||
}
|
||||
}
|
||||
span {
|
||||
margin-left: 20px;
|
||||
margin-left: 12px;
|
||||
font-size: rem(12px);
|
||||
|
||||
@include bp (sm) {
|
||||
margin-bottom: 20px;
|
||||
font-size: rem(13px);
|
||||
}
|
||||
}
|
||||
@@ -106,20 +119,25 @@
|
||||
|
||||
// Checkout
|
||||
&--checkout {
|
||||
display: flex;
|
||||
@include bp (md) {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
p {
|
||||
max-width: 180px;
|
||||
margin-right: auto;
|
||||
margin-bottom: 16px;
|
||||
padding-right: 12px;
|
||||
font-size: rem(11px);
|
||||
line-height: 1.5;
|
||||
color: $color-gray;
|
||||
|
||||
@include bp (sm) {
|
||||
max-width: 304px;
|
||||
font-size: rem(12px);
|
||||
line-height: 1.6;
|
||||
}
|
||||
@include bp (md) {
|
||||
max-width: 304px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -199,7 +217,7 @@
|
||||
// Location switcher
|
||||
&-switcher {
|
||||
position: fixed;
|
||||
z-index: 100;
|
||||
z-index: 202;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
will-change: transform, opacity;
|
||||
@@ -213,7 +231,7 @@
|
||||
// Overlay
|
||||
&-overlay {
|
||||
position: fixed;
|
||||
z-index: 99;
|
||||
z-index: 201;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
|
||||
@@ -20,54 +20,53 @@
|
||||
transform: translate3d(0, -88px, 0);
|
||||
transition: transform 1s var(--ease-quart);
|
||||
transition-delay: 100ms;
|
||||
pointer-events: none;
|
||||
|
||||
@include bp (sm) {
|
||||
--inset: 32px;
|
||||
}
|
||||
|
||||
// Notifications
|
||||
&__notifications {
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
top: 72px;
|
||||
right: 0;
|
||||
opacity: 0;
|
||||
transition: opacity 0.7s var(--ease-quart);
|
||||
pointer-events: none;
|
||||
|
||||
& > * {
|
||||
&:not(:last-child) {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Visible state
|
||||
&.is-visible {
|
||||
transform: translate3d(0,0,0);
|
||||
.shop-location__notifications {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Cart
|
||||
.cart {
|
||||
position: fixed;
|
||||
z-index: 101;
|
||||
top: 72px;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: calc(100vh - 72px);
|
||||
|
||||
@include bp (sm) {
|
||||
top: 24px;
|
||||
right: 24px;
|
||||
width: clamp(320px, 45vw, 500px);
|
||||
height: calc(100vh - 48px);
|
||||
max-height: 1000px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Cart
|
||||
.cart {
|
||||
position: fixed;
|
||||
z-index: 101;
|
||||
top: 72px;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: calc(100vh - 72px);
|
||||
|
||||
@include bp (sm) {
|
||||
top: 24px;
|
||||
right: 24px;
|
||||
width: clamp(320px, 45vw, 500px);
|
||||
height: calc(100vh - 48px);
|
||||
max-height: 1000px;
|
||||
}
|
||||
}
|
||||
|
||||
// Notifications
|
||||
.notifications {
|
||||
position: fixed;
|
||||
z-index: 100;
|
||||
top: 104px;
|
||||
right: 20px;
|
||||
transition: opacity 0.7s var(--ease-quart);
|
||||
pointer-events: none;
|
||||
|
||||
@include bp (sm) {
|
||||
right: 32px;
|
||||
}
|
||||
|
||||
& > * {
|
||||
&:not(:last-child) {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -142,7 +142,7 @@
|
||||
width: 100%;
|
||||
|
||||
.container {
|
||||
padding: 0 16px 24px;
|
||||
padding: 0 0 24px;
|
||||
|
||||
@include bp (md) {
|
||||
display: grid;
|
||||
@@ -166,10 +166,18 @@
|
||||
|
||||
// Navigation
|
||||
nav {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
ul {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: auto;
|
||||
|
||||
@include bp (sm) {
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
li {
|
||||
display: block;
|
||||
@@ -199,4 +207,11 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Cart button
|
||||
.button-cart {
|
||||
@include bp (sm, max) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,28 +3,31 @@
|
||||
*/
|
||||
&__posters {
|
||||
background-color: $color-primary-darker;
|
||||
padding: 0 20px 72px;
|
||||
padding: clamp(56px, 10vw, 120px) 20px 72px;
|
||||
border-bottom: solid 1px $color-primary-tertiary20 ;
|
||||
|
||||
@include bp (sm) {
|
||||
@include bp (sd) {
|
||||
padding: 120px 0;
|
||||
}
|
||||
|
||||
// Title
|
||||
h3 {
|
||||
grid-column: 2 / span 6;
|
||||
margin-bottom: 48px;
|
||||
font-family: $font-serif;
|
||||
color: $color-cream;
|
||||
font-size: rem(32px);
|
||||
line-height: 1.1;
|
||||
text-align: center;
|
||||
margin-bottom: 24px;
|
||||
|
||||
@include bp (sm) {
|
||||
grid-column: 3 / span 14;
|
||||
max-width: 360px;
|
||||
margin-bottom: 48px;
|
||||
font-size: rem(48px);
|
||||
text-align: left;
|
||||
max-width: 360px;
|
||||
}
|
||||
@include bp (sd) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
@@ -32,64 +35,135 @@
|
||||
// Posters Set
|
||||
.set {
|
||||
--gap: 24px;
|
||||
grid-column: 1 / span 8;
|
||||
grid-column: span calc(var(--columns));
|
||||
display: block;
|
||||
|
||||
@include bp (sm) {
|
||||
grid-column: 2 / span 22;
|
||||
}
|
||||
cursor: grab;
|
||||
|
||||
@include bp (mob-lg) {
|
||||
--gap: 32px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: var(--gap);
|
||||
grid-column: 2 / span calc(var(--columns) - 2);
|
||||
}
|
||||
@include bp (sm) {
|
||||
grid-column: 3 / span calc(var(--columns) - 4);
|
||||
}
|
||||
@include bp (md) {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
cursor: default;
|
||||
}
|
||||
@include bp (sd) {
|
||||
--gap: 48px;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
|
||||
&.is-dragging {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
&__content {
|
||||
display: flex;
|
||||
margin: 0 -8px;
|
||||
|
||||
@include bp (mob-lg) {
|
||||
margin: 0 -12px;
|
||||
}
|
||||
|
||||
// @include bp (sm) {
|
||||
// grid-column: 2 / span 22;
|
||||
// }
|
||||
// @include bp (mob-lg) {
|
||||
// --gap: 32px;
|
||||
// display: grid;
|
||||
// grid-template-columns: repeat(2, 1fr);
|
||||
// gap: var(--gap);
|
||||
// }
|
||||
@include bp (md) {
|
||||
--gap: 32px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: var(--gap);
|
||||
margin: 0;
|
||||
}
|
||||
@include bp (sd) {
|
||||
--gap: 48px;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
// Poster
|
||||
.poster {
|
||||
margin: 0 auto auto;
|
||||
position: relative;
|
||||
flex: 0 0 100%;
|
||||
margin: 0 12px;
|
||||
|
||||
@include bp (mob-lg) {
|
||||
flex: 0 0 calc(50% - 24px);
|
||||
}
|
||||
@include bp (sm) {
|
||||
flex: 0 0 calc(50% - 24px);
|
||||
}
|
||||
// margin: 0 auto auto;
|
||||
|
||||
// 2 columns
|
||||
&:nth-child(2n + 1) {
|
||||
@include bp (sm, max) {
|
||||
margin-top: calc(var(--gap) * 2);
|
||||
}
|
||||
}
|
||||
// &:nth-child(2n + 1) {
|
||||
// @include bp (sm, max) {
|
||||
// margin-top: calc(var(--gap) * 2);
|
||||
// }
|
||||
// }
|
||||
|
||||
// 3 columns
|
||||
&:nth-child(3n + 1) {
|
||||
@include bp (sd, max) {
|
||||
margin-top: calc(var(--gap) * 2);
|
||||
}
|
||||
}
|
||||
&:nth-child(3n + 2) {
|
||||
@include bp (sd, max) {
|
||||
margin-top: var(--gap);
|
||||
}
|
||||
}
|
||||
// &:nth-child(3n + 1) {
|
||||
// @include bp (sd, max) {
|
||||
// margin-top: calc(var(--gap) * 2);
|
||||
// }
|
||||
// }
|
||||
// &:nth-child(3n + 2) {
|
||||
// @include bp (sd, max) {
|
||||
// margin-top: var(--gap);
|
||||
// }
|
||||
// }
|
||||
|
||||
// 4 columns
|
||||
&:nth-child(4n + 1) {
|
||||
@include bp (sd) {
|
||||
margin-top: 64px * 3;
|
||||
// &:nth-child(4n + 1) {
|
||||
// @include bp (sd) {
|
||||
// margin-top: 64px * 3;
|
||||
// }
|
||||
// }
|
||||
// &:nth-child(4n + 2) {
|
||||
// @include bp (sd) {
|
||||
// margin-top: 64px * 2;
|
||||
// }
|
||||
// }
|
||||
// &:nth-child(4n + 3) {
|
||||
// @include bp (sd) {
|
||||
// margin-top: 64px;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
// Pagination
|
||||
&__dots {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin: 32px 0 48px;
|
||||
|
||||
li {
|
||||
display: block;
|
||||
padding: 4px;
|
||||
cursor: pointer;
|
||||
|
||||
// Hover
|
||||
&:hover {
|
||||
button {
|
||||
box-shadow: inset 0 0 0 8px $color-tertiary;
|
||||
}
|
||||
}
|
||||
}
|
||||
&:nth-child(4n + 2) {
|
||||
@include bp (sd) {
|
||||
margin-top: 64px * 2;
|
||||
}
|
||||
button {
|
||||
display: block;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 100%;
|
||||
background: $color-primary-tertiary20;
|
||||
padding: 0;
|
||||
transition: box-shadow 1.0s var(--ease-quart);
|
||||
}
|
||||
&:nth-child(4n + 3) {
|
||||
@include bp (sd) {
|
||||
margin-top: 64px;
|
||||
.is-active {
|
||||
button {
|
||||
box-shadow: inset 0 0 0 8px $color-tertiary;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -99,10 +173,10 @@
|
||||
.subscribe {
|
||||
grid-column: 1 / span var(--columns);
|
||||
max-width: 380px;
|
||||
margin: 72px auto 0;
|
||||
margin: 56px auto 0;
|
||||
text-align: center;
|
||||
|
||||
@include bp (sm) {
|
||||
@include bp (md) {
|
||||
grid-column: 14 / span 8;
|
||||
margin-top: 0;
|
||||
text-align: left;
|
||||
@@ -129,10 +203,14 @@
|
||||
@include bp (sm) {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
&__email {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
&__bottom {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.newsletter-form__bottom {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user