chore: merge components and stylesheets in same directory name

This commit is contained in:
2024-07-24 10:59:34 +02:00
parent a9d937a2b5
commit cb7d83978d
92 changed files with 533 additions and 531 deletions

View File

@@ -0,0 +1,124 @@
// Cart item
.cart-item {
position: relative;
display: flex;
align-items: center;
margin-bottom: 24px;
background: #fff;
color: $color-gray;
border-radius: 6px;
overflow: hidden;
transition: opacity 0.3s var(--ease-quart);
&:last-child {
margin-bottom: 0;
}
// Left Image
&__left {
width: 100px;
height: 150px;
margin-right: 20px;
@include bp (sm) {
width: 124px;
height: 180px;
margin-right: 32px;
}
img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 6px 0 0 6px;
}
}
// Details
&__right {
display: flex;
flex-direction: column;
flex: 1;
// Poster Title
h3 {
font-family: $font-serif;
color: $color-secondary;
font-size: rem(20px);
@include bp (sm) {
font-size: rem(28px);
}
}
// Text
p {
max-width: 152px;
margin: 8px 0 20px;
font-size: rem(12px);
line-height: 1.4;
@include bp (sm) {
font-size: rem(13px);
}
}
// Select
:global(.select) {
position: relative;
display: flex;
align-items: center;
height: 28px;
margin-right: auto;
padding: 2px 12px 0;
border: 1px solid rgba($color-lightgray, 0.3);
border-radius: 100vh;
cursor: pointer;
transition: border-color 0.4s var(--ease-quart);
:global(span) {
display: block;
font-size: rem(12px);
color: $color-text;
& + :global(span) {
margin-left: 4px;
}
}
:global(select) {
position: absolute;
z-index: 1;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
text-align: center;
}
&:after {
content: "";
display: block;
width: 8px;
height: 5px;
margin-left: 4px;
color: red;
background: url('data:image/svg+xml; utf8, <svg width="8" height="5" viewBox="0 0 8 5" fill="none" xmlns="http://www.w3.org/2000/svg">\
<path d="m1 1 3 3 3-3" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\
</svg>');
}
// Hover
&:hover {
border-color: $color-secondary-light;
}
}
// Remove Icon
:global(.remove) {
position: absolute;
top: 16px;
right: 16px;
padding: 0;
}
}
}

View File

@@ -1,11 +1,11 @@
<style lang="scss">
@import "../../style/molecules/cart-item";
@import "./CartItem";
</style>
<script lang="ts">
import { createEventDispatcher } from 'svelte'
// Components
import ButtonCircle from '$components/atoms/ButtonCircle.svelte'
import ButtonCircle from '$components/atoms/ButtonCircle/ButtonCircle.svelte'
import Select from '$components/molecules/Select.svelte'
export let item: any

View File

@@ -0,0 +1,125 @@
// Email Form
.newsletter-form {
position: relative;
}
.email {
position: relative;
width: 100%;
max-width: 600px;
height: 56px;
margin-bottom: 20px;
padding: 0 24px;
border-radius: 100vh;
box-shadow: inset 0 0 0 2px $color-secondary;
transition: box-shadow 0.6s var(--ease-quart);
@include bp (sm) {
height: 64px;
padding: 0 30px;
}
input {
display: block;
width: 100%;
height: 100%;
font-size: rem(16px);
font-family: $font-sans;
font-weight: 300;
color: $color-tertiary;
background: none;
border: none;
@include bp (sm) {
font-size: rem(18px);
}
&::placeholder {
color: rgba($color-tertiary, 0.6);
opacity: 1;
}
}
:global(button) {
position: absolute !important;
right: 16px;
top: 50%;
transform: translateY(-50%);
margin-left: 32px;
flex-shrink: 0;
}
// States
&.is-focused, &:hover {
box-shadow: inset 0 0 0 4px $color-secondary;
}
}
// Bottom details
.bottom {
display: block;
text-align: center;
font-size: rem(14px);
max-width: 600px;
@include bp (sm) {
display: flex;
justify-content: center;
font-size: rem(16px);
}
.past-issues {
display: inline-flex;
align-items: center;
margin: 0 auto auto 0;
text-decoration: none;
color: $color-text;
&, span {
transition: color 0.2s, border-color 0.2s;
}
span {
display: block;
padding-bottom: 2px;
font-size: rem(14px);
color: $color-text;
margin-left: 8px;
border-bottom: 1px solid $color-text;
@include bp (sm) {
margin-left: 12px;
padding-bottom: 0;
font-size: rem(16px);
}
}
}
p {
color: $color-gray;
line-height: 1.3;
margin-top: 16px;
margin-bottom: 0;
@include bp (sm) {
margin-top: 0;
}
}
}
// Message
.message {
padding: 24px;
text-align: center;
border-radius: 8px;
&.is-error {
position: absolute;
top: 0;
left: 0;
width: 100%;
color: #fff;
background: $color-secondary;
}
&.is-success {
color: $color-text;
background: $color-tertiary;
}
}

View File

@@ -1,5 +1,5 @@
<style lang="scss">
@import "../../style/molecules/newsletter-form";
@import "./EmailForm";
</style>
<script lang="ts">
@@ -8,7 +8,7 @@
import { sendEvent } from '$utils/analytics'
// Components
import IconArrow from '$components/atoms/IconArrow.svelte'
import ButtonCircle from '$components/atoms/ButtonCircle.svelte'
import ButtonCircle from '$components/atoms/ButtonCircle/ButtonCircle.svelte'
export let past = false
@@ -64,7 +64,7 @@
<form method="POST" action="/api/newsletter" on:submit|preventDefault={handleForm}
out:fly|local={{ y: -8, easing: quartOut, duration: 600 }}
>
<div class="newsletter-form__email" class:is-focused={inputInFocus}>
<div class="email" class:is-focused={inputInFocus}>
<input type="email" placeholder="Your email address" name="email" id="newsletter_email" required
on:focus={toggleFocus}
on:blur={toggleFocus}
@@ -79,7 +79,7 @@
</ButtonCircle>
</div>
<div class="newsletter-form__bottom">
<div class="bottom">
{#if past}
<a href="/subscribe" class="past-issues" data-sveltekit-noscroll>
<svg width="20" height="16" viewBox="0 0 20 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg" aria-label="Newsletter icon">
@@ -94,7 +94,7 @@
{/if}
{#if formStatus && formStatus.message}
<div class="newsletter-form__message shadow-small"
<div class="message shadow-small"
class:is-error={!isSuccess}
class:is-success={isSuccess}
in:fly|local={{ y: 8, easing: quartOut, duration: 600, delay: isSuccess ? 600 : 0 }}

View File

@@ -0,0 +1,50 @@
.heading {
overflow: hidden;
margin-bottom: 72px;
text-align: center;
color: $color-tertiary;
@include bp (sm) {
margin-bottom: clamp(72px, 8vw, 128px);
}
// Title
:global(h1) {
margin-top: 56px;
line-height: 1;
color: $color-secondary;
@include bp (sm) {
margin-top: clamp(80px, 9vw, 160px);
}
}
}
// Text
.text {
width: 75%;
max-width: 360px;
margin: 40px auto 0;
font-weight: 200;
@include bp (sm) {
max-width: 600px;
margin-top: 72px;
}
:global(a) {
position: relative;
color: currentColor;
text-decoration: none;
display: inline-block;
background-image: linear-gradient(rgba($color-tertiary, 0.3), rgba($color-tertiary, 0.3));
background-position: 0 100%;
background-size: 100% 1px;
background-repeat: no-repeat;
transition: color 0.4s var(--ease-quart);
&:hover {
color: $color-secondary-light;
}
}
}

View File

@@ -1,9 +1,9 @@
<style lang="scss">
@import "../../style/molecules/heading";
@import "./Heading";
</style>
<script lang="ts">
import SiteTitle from '$components/atoms/SiteTitle.svelte'
import SiteTitle from '$components/atoms/SiteTitle/SiteTitle.svelte'
export let text: string
</script>

View File

@@ -0,0 +1,248 @@
.house {
position: relative;
overflow: hidden;
// Information
&__info {
--delay: 0.2s;
grid-column: 1 / -1;
margin-bottom: 32px;
padding: 0 20px;
overflow: hidden;
@include bp (mob-lg) {
max-width: min(540px, 85vw);
}
@include bp (sm) {
grid-column: 6 / span 14;
margin-bottom: 56px;
padding: 0;
max-width: 800px;
}
h2 {
opacity: 0;
transform: translate3d(0, 25%, 0);
transition: transform 1.2s var(--ease-quart), opacity 1.2s var(--ease-quart);
transition-delay: var(--delay);
}
.info {
display: block;
margin-top: 12px;
color: $color-lightgray;
line-height: 1.5;
opacity: 0;
transition: opacity 1.2s var(--ease-quart);
transition-delay: var(--delay);
@include bp (sm) {
margin-top: 16px;
}
@include bp (md) {
margin-top: 24px;
}
& > * {
display: inline-block;
}
a {
text-decoration: none;
color: currentColor;
&:hover {
color: $color-secondary;
text-decoration: underline;
}
}
:global(svg) {
width: 1em;
height: 1em;
margin-right: 0.4em;
margin-bottom: 3px;
}
.sep {
margin: 0 4px;
}
}
}
// Photo
&__photo {
position: relative;
grid-column: 1 / -1;
opacity: 0;
transition: opacity 2s var(--ease-quart);
& > a {
grid-column: 1 / -1;
width: 100%;
height: 100%;
text-decoration: none;
cursor: zoom-in;
@include bp (sm) {
grid-column: 3 / span 17;
grid-row: 1;
}
}
:global(figure) {
position: relative;
z-index: 5;
display: flex;
justify-content: center;
height: 100%;
aspect-ratio: 3 / 2;
overflow: hidden;
border-radius: 0;
@include bp (sm) {
border-radius: 8px;
}
// Aspect-ratio fallback
@supports not (aspect-ratio: auto) {
overflow: hidden;
padding-top: 66.66%;
height: 0;
}
}
:global(picture) {
height: 100%;
border-radius: 0;
// Aspect-ratio fallback
@supports not (aspect-ratio: auto) {
position: absolute;
width: fit-content;
top: 0;
left: 50%;
height: 100%;
transform: translateX(-50%);
}
}
:global(img) {
display: block;
width: 100%;
height: 100%;
object-fit: contain;
transform: scale3d(1.1, 1.1, 1.1);
transition: transform 2s var(--ease-quart), opacity 1.2s var(--ease-quart);
will-change: transform;
}
// Variant: Not landscape
&.not-landscape {
figure {
background: $color-cream;
}
}
// Scale down image on hover
@media (hover: hover) {
a:hover {
:global(img) {
opacity: 0.7;
transform: scale3d(1.03, 1.03, 1.03);
transition-duration: 1.2s;
}
}
}
}
// Photo number
&__index {
position: absolute;
z-index: 1;
bottom: -64px;
right: 20px;
display: block;
text-align: right;
pointer-events: none;
user-select: none;
@include bp (sm) {
--offset: 1.75vw;
position: relative;
grid-column: 19 / span 6;
grid-row: 1;
white-space: nowrap;
bottom: auto;
right: auto;
align-self: center;
text-align: left;
transform: translate3d(var(--offset), 0, 0);
}
@include bp (fhd) {
--offset: 2.5vw;
}
// Specific cases
&.has-one-start {
@include bp (sm) {
transform: translate3d(calc(15% + var(--offset)), 0, 0);
}
}
}
// Even photos
&:nth-child(even) {
.house {
// Photo
&__photo {
& > a {
@include bp (sm) {
grid-column: 6 / span 17;
grid-row: 1;
}
}
}
// Info
&__info {
@include bp (sm) {
margin-left: auto;
text-align: right;
}
}
&__index {
@include bp (sm) {
grid-column-start: 1;
text-align: right;
transform: translate3d(calc(-1 * var(--offset)), 0, 0);
}
// Specific cases
&.has-one-start {
@include bp (sm) {
transform: translate3d(calc(-8% - var(--offset)), 0, 0);
}
}
&.has-one-end {
@include bp (sm) {
transform: translate3d(calc(-15% - var(--offset)), 0, 0);
}
}
}
}
}
}
// Visible state
:global(.is-visible) {
.house__info {
h2 {
opacity: 1;
transform: translate3d(0,0,0);
}
.info {
opacity: 1;
}
}
.house__photo {
opacity: 1;
:global(img) {
transform: scale3d(1.01, 1.01, 1.01);
}
}
}

View File

@@ -1,5 +1,5 @@
<style lang="scss">
@import "../../style/molecules/house";
@import "./House";
</style>
<script lang="ts">

View File

@@ -0,0 +1,164 @@
.location {
display: block;
position: relative;
@include bp (sm) {
text-align: center;
}
a {
display: flex;
text-decoration: none;
@include bp (sm) {
align-items: center;
flex-direction: column;
justify-content: center;
padding: 24px;
}
// Background circle
&:after {
display: none;
opacity: 0;
content: "";
position: absolute;
pointer-events: none;
top: 50%;
left: 50%;
width: 256px;
height: 256px;
transform: translate3d(-50%, -50%, 0) scale(0.8);
transform-origin: 50% 50%;
background-color: rgba($color-tertiary, 0.1);
border-radius: 100%;
transition: transform 0.75s var(--ease-quart), opacity 0.75s var(--ease-quart);
@include bp (sm) {
display: block;
}
}
// Hover
&:hover {
&:after {
opacity: 1;
transform: translate3d(-50%, -50%, 0);
}
}
}
// Flag
:global(.flag) {
overflow: hidden;
width: 32px;
height: 32px;
flex-shrink: 0;
margin: 2px 24px 0 0;
border-radius: 100%;
transform: translateZ(0);
@include bp (sm) {
margin-top: 0;
margin-left: auto;
margin-right: auto;
}
:global(img) {
display: block;
width: 100%;
height: auto;
transform: translateZ(0);
}
}
// Location name
&__name {
display: block;
max-width: 304px;
margin: 0 0 0.2em;
font-size: rem(32px);
font-family: $font-serif;
font-weight: 300;
line-height: 1.1;
color: $color-secondary;
transition: color 0.75s var(--ease-quart);
@include bp (sm) {
margin: 20px 0 8px;
font-size: rem(40px);
}
@include bp (sd) {
font-size: rem(48px);
}
}
// Country
&__country {
color: $color-tertiary;
}
// Badge
:global(.badge) {
display: inline-flex;
@include bp (sm) {
position: absolute;
left: 50%;
bottom: -8px;
transform: translateX(-50%);
}
}
// Photos
&__photos {
display: none;
opacity: 0;
position: absolute;
z-index: 2;
top: -10%;
left: 50%;
width: 240px;
height: 160px;
background: #222;
border-radius: 6px;
transform: translate3d(calc(-50% + var(--offset-x)), calc(-50% + var(--offset-y)), 0) rotate(var(--rotate));
overflow: hidden;
box-shadow: 0 8px 8px rgba(#000, 0.1), 0 16px 28px rgba(#000, 0.12);
pointer-events: none;
transition: opacity 0.5s var(--ease-quart);
@include bp (sm) {
display: block;
}
}
// Photo
:global(.location__photo) {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
transition: opacity 0.3s;
:global(img) {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
}
:global(.is-visible) {
opacity: 1;
}
// Hover
&:hover {
.location__photos {
opacity: 1;
}
}
}

View File

@@ -1,5 +1,5 @@
<style lang="scss">
@import "../../style/molecules/location";
@import "./Location";
</style>
<script lang="ts">

View File

@@ -0,0 +1,119 @@
.issue {
position: relative;
display: flex;
background: #fff;
border-radius: 6px;
transition: background-color 0.4s, transform 0.7s var(--ease-quart);
will-change: transform;
a {
display: flex;
width: 100%;
padding: 20px;
text-decoration: none;
}
// Image
:global(picture) {
$shadow-color: rgba(#936B47, 0.06);
width: 80px;
margin-right: 16px;
margin-bottom: auto;
overflow: hidden;
border-radius: 3px;
box-shadow:
0 1.5px 1.5px $shadow-color,
0 3px 3px $shadow-color,
0 12px 12px $shadow-color;
:global(img) {
display: block;
width: 100%;
height: auto;
object-fit: cover;
}
}
// Title
dt {
margin-bottom: 8px;
color: $color-secondary;
font-size: rem(20px);
font-family: $font-serif;
font-weight: 400;
transition: color 0.2s;
}
// Description
dd {
font-size: rem(14px);
color: $color-gray;
}
// Date
time {
display: block;
margin-top: 8px;
opacity: 0.6;
font-size: rem(12px);
}
// Under layer
&:after {
content: "";
display: block;
position: absolute;
z-index: -1;
top: 0;
left: 2%;
width: 96%;
height: 100%;
border-radius: 6px;
background: rgba(#fff, 0.4);
transition: transform 0.7s var(--ease-quart);
}
// Hover
&:hover {
background: $color-cream;
transform: rotate(-1.25deg) translateZ(0) !important;
dt {
color: $color-primary;
}
&:after {
transform: rotate(3deg) translateZ(0);
}
}
// Large Variant
&.is-large {
a {
@include bp (sm) {
padding: 28px 64px;
align-items: center;
}
}
dt {
@include bp (sm) {
font-size: rem(24px);
}
}
dd {
@include bp (sm) {
font-size: rem(16px);
}
}
time {
@include bp (sm) {
margin-top: 16px;
font-size: rem(14px);
}
}
:global(picture) {
@include bp (sm) {
width: 200px;
max-height: 140px;
border-radius: 6px;
margin-right: 40px;
}
}
}
}

View File

@@ -1,5 +1,5 @@
<style lang="scss">
@import "../../style/molecules/issue";
@import "./NewsletterIssue";
</style>
<script lang="ts">

View File

@@ -0,0 +1,61 @@
.notification-cart {
display: flex;
background-color: #fff;
color: $color-gray;
border-radius: 6px;
align-items: center;
overflow: hidden;
cursor: pointer;
pointer-events: auto;
}
// Left Image
.left {
margin-right: 20px;
width: 100px;
height: 150px;
@include bp (sm) {
margin-right: 24px;
width: 58px;
height: 88px;
}
img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
}
// Details
.right {
display: flex;
flex-direction: column;
margin-right: 24px;
justify-content: center;
// Poster Title
h3 {
font-family: $font-serif;
color: $color-secondary;
font-size: rem(20px);
@include bp (sm) {
font-size: rem(18px);
}
}
// Text
p {
font-size: rem(12px);
line-height: 1.4;
max-width: 124px;
margin: 4px 0;
@include bp (sm) {
font-size: rem(13px);
max-width: none;
}
}
}

View File

@@ -1,5 +1,5 @@
<style lang="scss">
@import "../../style/molecules/notification-cart";
@import "./NotificationCart";
</style>
<script lang="ts">
@@ -22,11 +22,12 @@
transition:fly={{ y: 20, duration: 700, easing: quartOut }}
on:click={closeNotification}
on:keydown
role="presentation"
>
<div class="notification-cart__left">
<div class="left">
<img src={image} width={58} height={88} alt={title}>
</div>
<div class="notification-cart__right">
<div class="right">
<h3>{title}</h3>
<p>{name}</p>
</div>

View File

@@ -0,0 +1,59 @@
// Pagination
.pagination {
position: relative;
display: block;
margin: auto 0;
cursor: pointer;
&.is-disabled {
cursor: not-allowed;
}
// Progress
&__progress {
position: relative;
display: inline-block;
font-size: rem(88px);
color: rgba($color-text, 0.2);
font-family: $font-serif;
font-weight: 200;
line-height: 1;
letter-spacing: -0.05em;
transition: color 0.5s;
@include bp (sm) {
font-size: clamp(80px, 16vw, #{rem(160px)});
}
span {
display: inline-block;
margin: 0 -12px;
}
}
// Hover
&:not([disabled]):hover {
.pagination__progress {
color: rgba($color-text, 0.4);
}
}
// Label
:global(p) {
display: block;
margin: 16px auto 0;
text-align: center;
font-family: $font-sans;
text-transform: uppercase;
color: $color-text;
letter-spacing: 0.1em;
font-weight: 400;
font-size: rem(14px);
}
// More button
:global(.more) {
color: $color-secondary;
font-weight: 500;
}
}

View File

@@ -1,5 +1,5 @@
<style lang="scss">
@import "../../style/molecules/pagination";
@import "./Pagination";
</style>
<script lang="ts">
@@ -8,8 +8,10 @@
export let total: number
</script>
<div class="pagination" role="button" tabindex="0"
disabled={ended ? ended : undefined}
<div
class="pagination"
class:is-disabled={ended ? ended : undefined}
role="button" tabindex="0"
on:click
on:keydown
>

View File

@@ -0,0 +1,121 @@
.photo-card {
a {
display: block;
overflow: hidden;
cursor: zoom-in;
border-radius: 8px;
box-shadow: 0 16px 12px rgba(#000, 0.15), 0 26px 52px rgba(#000, 0.2);
transition: transform 0.7s var(--ease-quart);
transform: translateZ(0);
will-change: transform;
}
// Image
:global(picture) {
width: 100%;
height: 100%;
background: $color-primary-tertiary20;
:global(img) {
display: block;
width: calc(100% + 2px);
height: calc(100% + 2px);
object-fit: cover;
transition: opacity 0.7s var(--ease-quart);
}
}
// Informations
&__info {
position: absolute;
z-index: 2;
bottom: 16px;
left: 20px;
right: 20px;
display: flex;
flex-wrap: wrap;
align-items: center;
color: $color-cream;
pointer-events: none;
font-size: clamp(#{rem(12px)}, 1.5vw, #{rem(14px)});
@include bp (sm) {
font-size: clamp(#{rem(12px)}, 1.2vw, #{rem(14px)});
}
:global(picture) {
width: 20px;
height: 20px;
margin-right: 12px;
border-radius: 100%;
overflow: hidden;
@include bp (sm) {
width: 24px;
height: 24px;
margin-right: 16px;
}
:global(img) {
display: block;
width: 100%;
height: 100%;
}
}
:global(p) {
max-width: min(80%, 300px);
line-height: 1.4;
}
& > :global(*) {
opacity: 0;
transform: translate3d(0, 8px, 0);
transition: opacity 0.7s var(--ease-quart), transform 0.8s var(--ease-quart);
@include bp (md) {
transform: translate3d(0, 8px, 0);
}
}
}
// Gradient
a:after {
content: "";
display: block;
opacity: 0;
position: absolute;
z-index: 1;
pointer-events: none;
bottom: 0;
left: 0;
width: 100%;
height: 50%;
background: linear-gradient(180deg, rgba(#2D1745, 0) 0%, #2D1745 100%);
transition: opacity 0.8s var(--ease-quart);
}
// Slightly zoom in, show gradient and info on hover
@media (hover: hover) {
a:hover {
transform: scale(1.0375) rotate(2deg) translateZ(0);
:global(.photo-card__info) {
:global(*) {
opacity: 1;
transform: translate3d(0,0,0);
}
:global(picture) {
transition-delay: 100ms;
}
:global(p) {
transition-delay: 180ms;
}
}
&:after {
opacity: 1;
}
}
}
}

View File

@@ -1,5 +1,5 @@
<style lang="scss">
@import "../../style/molecules/photo-card";
@import "./PhotoCard";
</style>
<script lang="ts">

View File

@@ -0,0 +1,183 @@
.postcard {
--gap: clamp(8px, 0.7vw, 20px);
display: grid;
grid-template-columns: min(144px, 45%) auto;
align-items: baseline;
width: 100%;
height: 100%;
max-width: 333px;
max-height: 222px;
padding-top: clamp(12px, 1vw, 20px);
padding-right: calc(var(--gap) * 2);
padding-bottom: clamp(12px, 1.25vw, 32px);
padding-left: var(--gap);
background: $color-cream;
box-shadow: 0 16px 12px rgba(#000, 0.15), 0 26px 52px rgba(#000, 0.2);
&__left {
display: flex;
align-items: flex-end;
height: 100%;
padding-bottom: 4px;
padding-right: var(--gap);
border-right: 1px solid rgba(#000, 0.2);
}
&__right {
position: relative;
display: flex;
align-items: flex-end;
height: 100%;
margin-top: auto;
}
// Country Title
&__country {
position: relative;
margin-top: auto;
font-size: clamp(#{rem(14px)}, 2vw, #{rem(22px)});
color: $color-primary;
font-family: $font-serif;
line-height: 1.1;
@include bp (sm) {
font-size: clamp(#{rem(14px)}, 2.5vw, #{rem(22px)});
}
@include bp (sd) {
font-size: clamp(#{rem(14px)}, 1.35vw, #{rem(22px)});
}
strong {
color: $color-secondary;
font-weight: 300;
}
}
// Stamp
&__stamp {
position: absolute;
top: 0;
right: 0;
:global(img) {
display: block;
width: 100%;
height: auto;
}
.frame {
width: 32px;
}
:global(.flag) {
position: absolute;
top: 10px;
left: -8px;
transform: rotate(-14deg);
width: 24px;
height: 24px;
box-shadow: 0 0 0 3px $color-cream;
border-radius: 100%;
overflow: hidden;
:global(img) {
height: 100%;
object-fit: contain;
}
}
}
// Address
ul {
margin-top: auto;
padding-left: var(--gap);
width: 100%;
li {
display: block;
margin-bottom: clamp(2px, 0.25vw, 4px);
color: $color-text;
font-size: clamp(#{rem(11px)}, 1.2vw, #{rem(16px)});
line-height: 1.4;
border-bottom: 1px solid #D9CABD;
@include bp (sd) {
font-size: clamp(#{rem(12px)}, 0.8vw, #{rem(16px)});
}
}
}
/*
** Variants
*/
// Small size
&--small {
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 0;
max-width: 100%;
max-height: 100%;
grid-template: 1fr 2fr / 1fr;
padding: 12px;
ul {
padding-left: 0;
}
.postcard {
// Country
&__left {
height: auto;
border: none;
margin: auto 0;
padding-right: 40px;
br {
display: none;
}
}
&__country {
font-size: clamp(#{rem(12px)}, 3.25vw, #{rem(24px)});
@include bp (sm) {
font-size: clamp(#{rem(12px)}, 1.75vw, #{rem(20px)});
}
@include bp (sd) {
font-size: clamp(#{rem(12px)}, 1.5vw, #{rem(22px)});
}
}
// Infos
&__right {
position: static;
:global(.flag) {
width: 18px;
height: 18px;
}
}
&__stamp {
top: 8px;
right: 8px;
.frame {
width: 28px;
}
}
&__address {
li {
font-size: clamp(#{rem(10px)}, 2vw, #{rem(16px)});
@include bp (sm) {
font-size: clamp(#{rem(11px)}, 1.1vw, #{rem(16px)});
}
@include bp (sd) {
font-size: clamp(#{rem(11px)}, 0.9vw, #{rem(16px)});
}
}
}
}
}
}

View File

@@ -1,5 +1,5 @@
<style lang="scss">
@import "../../style/organisms/postcard";
@import "./PostCard";
</style>
<script lang="ts">

View File

@@ -0,0 +1,101 @@
.poster {
position: relative;
border-radius: 6px;
overflow: hidden;
max-width: 326px;
@include bp (md) {
background-color: $color-primary-tertiary20;
max-width: 600px;
}
& > a {
display: block;
pointer-events: none;
}
// Poster image
:global(img) {
pointer-events: auto;
position: relative;
z-index: 2;
display: block;
width: 100%;
height: auto;
box-shadow:
0 6px 6px rgba(#000, 0.08),
0 12px 12px rgba(#000, 0.08),
0 24px 24px rgba(#000, 0.08);
border-radius: 4px;
transition: transform 0.8s var(--ease-quart), border-radius 0.8s var(--ease-quart);
}
// Hover effect
&:hover {
:global(img) {
@include bp (md) {
transform: scale(0.8) translate3d(0, -5%, 0);
border-radius: 8px;
}
}
.buttons {
transform: translate3d(0,0,0);
}
}
}
// Buttons
.buttons {
display: flex;
margin-top: 32px;
justify-content: center;
@include bp (md) {
position: absolute;
z-index: 1;
bottom: 4.25%;
left: 0;
width: 100%;
align-items: center;
justify-content: center;
margin-top: 40px;
transform: translate3d(0, 100%, 0);
transition: transform 0.8s var(--ease-quart);
}
& > :global(*) {
padding: 0;
font-size: rem(14px);
font-weight: 400;
color: $color-tertiary;
background: none;
&:first-child {
margin-right: 16px;
&: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);
@include bp (md) {
border: none;
color: #fff;
background: $color-secondary;
}
&:hover {
@include bp (md) {
background-color: darken($color-secondary, 7);
}
}
}
}
}

View File

@@ -1,12 +1,12 @@
<style lang="scss">
@import "../../style/molecules/poster";
@import "./Poster";
</style>
<script lang="ts">
import { addToCart } from '$utils/functions/shop'
import { smoothScroll } from '$utils/stores'
// Components
import Button from '$components/atoms/Button.svelte'
import Button from '$components/atoms/Button/Button.svelte'
import Image from '$components/atoms/Image.svelte'
export let product: any

View File

@@ -0,0 +1,56 @@
// About page Step
.step {
position: relative;
display: block;
overflow: hidden;
padding: 32px;
background: $color-primary-darker;
border-radius: 12px;
transform: translateZ(0);
@include bp (sm) {
--columns: 11;
display: grid;
grid-template-rows: repeat(2, 1fr);
padding: 8% 0;
min-height: clamp(400px, 75vh, 800px);
border-radius: 16px;
}
}
// Image
.media {
position: relative;
z-index: 2;
display: block;
overflow: hidden;
width: 70%;
max-height: 550px;
margin-bottom: 28px;
border-radius: 6px;
@include bp (sm) {
grid-column: 2 / span 6;
grid-row: 1 / -1;
width: 100%;
height: auto;
margin-bottom: 48px;
}
:global(.image img), video {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
}
// Content
.text {
position: relative;
z-index: 2;
line-height: 1.5;
font-weight: 300;
color: $color-secondary-light;
grid-column: 2 / -2;
}

View File

@@ -1,5 +1,5 @@
<style lang="scss">
@import "../../style/molecules/process-step";
@import "./ProcessStep";
</style>
<script lang="ts">

View File

@@ -0,0 +1,45 @@
.shop-locationswitcher {
pointer-events: auto;
// Overlaid
&.is-over {
dt {
color: #fff;
}
}
}
dt {
color: $color-primary;
font-weight: 400;
line-height: 1;
font-size: rem(12px);
}
dd {
color: $color-secondary;
svg {
display: inline-block;
width: 14px;
height: 14px;
margin-right: 4px;
@include bp (sm) {
width: 18px;
height: 18px;
}
}
select {
background: none;
border: none;
font-size: rem(18px);
color: $color-secondary;
font-family: $font-serif;
cursor: pointer;
appearance: none;
@include bp (sm) {
font-size: rem(24px);
}
}
}

View File

@@ -1,5 +1,5 @@
<style lang="scss">
@import "../../style/molecules/shop-locationswitcher";
@import "./ShopLocationSwitcher";
</style>
<script lang="ts">

View File

@@ -0,0 +1,172 @@
.switcher {
--button-size: 44px;
$shadow-color: rgba(0, 0, 0, 0.05);
position: fixed;
z-index: 100;
bottom: var(--offset-sides);
left: var(--offset-sides);
pointer-events: none;
@include bp (md) {
--button-size: 56px;
}
// Links
&__links {
position: absolute;
z-index: 2;
bottom: calc(var(--button-size) + 16px);
left: 0;
max-width: 280px;
white-space: nowrap;
opacity: 0;
padding: 8px;
background: $color-primary-tertiary20;
border-radius: 12px;
transform: translate3d(0, 8px, 0);
box-shadow: 0 6px 6px $shadow-color, 0 12px 12px $shadow-color, 0 24px 24px $shadow-color;
transition: opacity 0.8s var(--ease-quart), transform 0.6s var(--ease-quart);
li {
display: block;
margin: 1px 0;
line-height: 1.5;
}
a {
display: flex;
align-items: center;
padding: 8px 16px 8px 10px;
color: #fff;
font-weight: 900;
font-size: rem(16px);
text-decoration: none;
border-radius: 6px;
transition: background-color 0.4s var(--ease-quart);
&:hover {
background: rgba($color-tertiary, 0.2);
:global(.icon) {
color: $color-tertiary;
}
}
}
:global(.icon) {
display: block;
width: 32px;
height: 32px;
object-fit: contain;
margin-right: 16px;
color: $color-secondary-light;
transition: color 0.4s var(--ease-quart);
}
// Active link
.is-active {
a {
background: rgba($color-secondary, 0.25);
}
}
}
// Button
&__button {
$shadow-color: rgba(0, 0, 0, 0.05);
width: var(--button-size);
height: var(--button-size);
display: flex;
align-items: center;
justify-content: center;
padding: 0;
pointer-events: auto;
background: $color-primary-tertiary20;
border-radius: 100%;
box-shadow: 0 6px 6px $shadow-color, 0 12px 12px $shadow-color, 0 24px 24px $shadow-color;
transition: background-color 0.6s var(--ease-quart);
// Dots container
span {
display: inline-flex;
flex-flow: column;
}
// Dot
i {
display: block;
width: 4px;
height: 4px;
margin: 1.5px 0;
border-radius: 100%;
background: #fff;
transition: transform 0.6s var(--ease-quart);
@include bp (md) {
width: 6px;
height: 6px;
margin: 2px 0;
}
}
// Hover
&:hover {
background-color: #7e5288;
i {
&:nth-child(1) { transform: translate3d(0, -2px, 0); }
&:nth-child(3) { transform: translate3d(0, 2px, 0); }
}
}
}
/*
** States
*/
// Open
&.is-open {
.switcher {
&__links {
opacity: 1;
pointer-events: auto;
transform: translate3d(0, 0, 0);
a {
pointer-events: auto;
}
}
&__button {
i {
&:nth-child(1) {
transform: translate3d(-5px, 5px, 0);
@include bp (md) {
transform: translate3d(-7px, 8px, 0);
}
}
&:nth-child(2) {
transform: translate3d(5px, -2px, 0);
@include bp (md) {
transform: translate3d(7px, -2px, 0);
}
}
&:nth-child(3) {
transform: translate3d(0px, -2px, 0);
@include bp (md) {
transform: translate3d(0px, -3px, 0);
}
}
}
}
}
}
// Sticky (end of page)
&.is-sticky {
// background: red !important;
// position: sticky;
// bottom: 0;
// z-index: 100;
}
}

View File

@@ -1,5 +1,5 @@
<style lang="scss">
@import "../../style/molecules/switcher";
@import "./Switcher";
</style>
<script lang="ts">

View File

@@ -0,0 +1,119 @@
.toast {
display: flex;
align-items: center;
padding: 8px;
padding-right: 28px;
background: $color-cream;
border-radius: 8px;
@include bp (md) {
padding-right: 32px;
}
}
// Media
.media {
position: relative;
overflow: hidden;
flex-shrink: 0;
flex: 0 0 clamp(40px, 14vw, 64px);
aspect-ratio: 1 / 1.25;
height: 100%;
margin-right: 16px;
border-radius: 4px;
@include bp (md) {
flex: 0 0 min(7vw, 104px);
margin-right: 24px;
}
a {
display: block;
width: 100%;
height: 100%;
}
:global(picture) {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
transform: scale(1.075);
transition: opacity 0.8s, transform 1.6s var(--ease-quart);
}
:global(img) {
object-position: center 32%;
}
:global(.is-visible) {
opacity: 1;
transform: scale(1);
}
:global(img) {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
@include bp (sm) {
position: absolute;
top: 0;
left: 0;
height: 100%;
}
}
}
// Content
.content {
color: $color-text;
font-size: rem(14px);
@include bp (md) {
font-size: rem(16px);
}
.text {
margin-bottom: 12px;
@include bp (md) {
margin-bottom: 20px;
}
}
:global(strong) {
font-weight: normal;
color: $color-secondary;
}
}
// Close
.close {
--size: 28px;
position: absolute;
top: 0;
right: 0;
width: var(--size);
height: var(--size);
display: flex;
align-items: center;
justify-content: center;
@include bp (sm) {
--size: 32px;
}
:global(svg) {
transition: transform 0.6s var(--ease-quart);
}
// Hover
&:hover {
:global(svg) {
transform: rotate(90deg) translateZ(0);
}
}
}

View File

@@ -1,5 +1,5 @@
<style lang="scss">
@import "../../style/molecules/toast";
@import "./Toast";
</style>
<script lang="ts">
@@ -9,7 +9,7 @@
import { browser } from '$app/environment'
import { cx } from 'classix'
// Components
import Button from '$components/atoms/Button.svelte'
import Button from '$components/atoms/Button/Button.svelte'
import Image from '$components/atoms/Image.svelte'
export let id: string