This commit is contained in:
2020-02-13 22:24:28 +01:00
parent 9b0c154f61
commit ef23d90eb6
60 changed files with 1665 additions and 930 deletions

View File

@@ -9,7 +9,7 @@ export const zoomFadeIn = (node, { targets, duration }) => {
duration,
easing: 'easeInOutCirc',
opacity: [0, 1],
scale: [.9, 1],
scale: [0.9, 1],
delay: anime.stagger(100)
})
}
@@ -23,7 +23,7 @@ export const zoomFadeOut = (node, { targets, duration }) => {
duration,
easing: 'easeInOutCirc',
opacity: [1, 0],
scale: [1, .9],
scale: [1, 0.9],
delay: anime.stagger(100)
})
}

View File

@@ -1,15 +1,24 @@
<script>
export let href
export let type
export let href = '#'
export let type = 'a'
export let className = 'button'
export let text = ''
// Transformed text into spans
const textSpans = text
.replace(/(<.*?>)|(.)/g, letter => letter.replace(/./g, '<span>$&</span>'))
.replace(/ /g, '\u00a0')
// Wrap string's each letters into a span
// const textSpans = text
// .replace(/(<.*?>)|(.)/g, letter => letter.replace(/./g, '<span>$&</span>'))
// .replace(/ /g, '\u00a0')
</script>
<a {href} class={type} aria-label={text} data-text={text}>
{#if type === 'button'}
<button class={className} data-text={text}>
<slot></slot>
{@html textSpans}
<span>{text}</span>
</button>
{:else}
<a {href} class={className} data-text={text}>
<slot></slot>
<span>{text}</span>
</a>
{/if}

View File

@@ -1,27 +0,0 @@
<script>
// // Cursor moving handling
// const cursor = document.querySelector('.cursor')
// // In
// function cursorIn (event) {
// cursor.setAttribute('aria-hidden', false)
// }
// // Out
// function cursorOut (event) {
// const cursor = event.target.parentElement.querySelector('.cursor')
// cursor.setAttribute('aria-hidden', true)
// }
// // Move the cursor
// function cursorMove (event) {
// // const parent = event.currentTarget.parentElement
// // const cursor = parent.querySelector('.cursor')
// // const photoPos = parent.getBoundingClientRect()
// // cursor.style.top = (event.clientY - photoPos.top) - 14 + 'px'
// // cursor.style.left = (event.clientX - photoPos.left) - 10 + 'px'
// const cursor = event.currentTarget.parentElement.querySelector('.cursor')
// cursor.style.top = (event.clientY - 14) + 'px'
// cursor.style.left = (event.clientX - 14) + 'px'
// }
</script>
<i class="cursor cursor-zoom" aria-hidden="true"></i>

View File

@@ -0,0 +1,14 @@
<script>
export let direction = 'left'
export let color = '#fff'
export let className
export let hidden = undefined
</script>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewbox="0 0 20 20" fill={color} class={className} aria-hidden={hidden}>
{#if direction === 'left'}
<path d="M.26 10.85l-.06-.11-.08-.15-.05-.16-.04-.13a1.5 1.5 0 010-.6c0-.05.03-.09.04-.13l.05-.16.08-.15.06-.1c.06-.1.13-.17.2-.25L9.2.45c.61-.6 1.61-.6 2.23 0 .62.6.62 1.57 0 2.17L5.4 8.47h13.02c.87 0 1.58.68 1.58 1.53s-.7 1.53-1.58 1.53H5.4l6.03 5.85c.62.6.62 1.57 0 2.17-.3.3-.71.45-1.12.45-.4 0-.8-.15-1.11-.45L.46 11.08a1.5 1.5 0 01-.2-.23"/>
{:else if direction === 'right'}
<path d="M19.74 10.85l.06-.11.08-.15.05-.16.04-.13c.04-.2.04-.4 0-.6 0-.05-.03-.09-.04-.13l-.05-.16-.08-.15-.06-.1a1.53 1.53 0 00-.2-.25L10.8.45c-.61-.6-1.61-.6-2.23 0a1.5 1.5 0 000 2.17l6.03 5.85H1.58C.71 8.47 0 9.15 0 10s.7 1.53 1.58 1.53H14.6l-6.03 5.85a1.5 1.5 0 000 2.17c.3.3.71.45 1.12.45.4 0 .8-.15 1.11-.45l8.74-8.47.2-.23"/>
{/if}
</svg>

View File

@@ -0,0 +1,10 @@
<script>
export let width = 18
export let color = '#fff'
export let className
export let hidden = undefined
</script>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 17" {width} fill={color} class={className} aria-hidden={hidden}>
<path fill-rule="nonzero" d="M16.63.37c.47.47.5 1.2.09 1.7l-.09.1-6.32 6.33 6.32 6.32a1.28 1.28 0 01-1.7 1.9l-.1-.09-6.33-6.32-6.32 6.32a1.28 1.28 0 01-1.9-1.7l.09-.1L6.69 8.5.37 2.18a1.28 1.28 0 011.7-1.9l.1.09L8.5 6.69 14.82.37c.5-.5 1.31-.5 1.81 0z"/>
</svg>

View File

@@ -1,6 +1,11 @@
<script>
import * as fn from '../functions'
export let width = 56
export let color = '#000'
const randomId1 = fn.randomString(6, 'A')
const randomId2 = fn.randomString(6, 'A')
</script>
<style>
@@ -15,15 +20,15 @@
}
</style>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width={width} style="fill: {color}" viewBox="0 0 56 75">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" {width} fill={color} viewBox="0 0 56 75">
<defs>
<ellipse id="planet_2_" cx="31.5" cy="60.6" rx="24.5" ry="24.4"/>
<ellipse id={randomId1} cx="31.5" cy="60.6" rx="24.5" ry="24.4"/>
</defs>
<clipPath id="planet_3_">
<use overflow="visible" xlink:href="#planet_2_"/>
<clipPath id={randomId2}>
<use overflow="visible" xlink:href="#{randomId1}"/>
</clipPath>
<g transform="translate(0,-32)">
<g clip-path="url(#planet_3_)">
<g clip-path="url(#{randomId2})">
<g class="anim anim-spinGlobe">
<path d="M43 65.3c-2.2-.1-1.8.9-3.6-.7-1 .1-1.6-.3-2.6-.2-.4-.1-.5-.5-1.1-.3-.8 0-1.2 1-2.1.6-.2.3-.4.7-1 .8-.3 0-.8.3-1.2 0-.7-2.4-1.8.7-1.8-2h-.1c-2.4 4.5-4.8-4.2 1.2-1.7h.1v-.1c-1-1-.2-1.7 0-2.9-.7-.6.7-2.7 1.7-2.9.1.3.8-.3 1.1-.8-.2-.3-.2-.2-.9.2-1-.4-.3-1.3-1.6.2-.3-1.6 3.1-1.6 2.2-3-1.1-.1-1.5-.6-2.3-1.4-.8 1.7-4.6-2-2.7 1.9.5 4.3-.2.5-3.5 1.2-2.3-1.2 2.1-4.1.8-4.8-1-.7-.4 2.9-3.4-1-1 .9 2.2 2.7-.3 2.4-.4.9-1 .6-1.8.9-.2.4-.2.5-.8.6-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6.1zM17.9 49.4c-.2-.1-.4-.2-.6.2.2.1.3.1.6-.2zM19.5 48.8v-.1c-.1.1-.4-.1-.5.2.2.1.4.1.5-.1zM21.3 49.8c-.2 0-.4-.2-.5.1.2.2.3.2.5-.1zM68.3 52.7c0 .2-.1.2-.1.3.2.3.7-.1.1-.3z"/>

View File

@@ -1,6 +1,11 @@
<script>
import * as fn from '../functions'
export let width = 56
export let color = '#000'
const randomId1 = fn.randomString(6, 'A')
const randomId2 = fn.randomString(6, 'A')
</script>
<style>
@@ -15,14 +20,14 @@
}
</style>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width={width} style="fill: {color}" viewBox="0 0 56 56">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" {width} fill={color} viewBox="0 0 56 56">
<defs>
<circle id="planet" cx="28.1" cy="28" r="26.6"/>
<circle id={randomId1} cx="28.1" cy="28" r="26.6"/>
</defs>
<clipPath id="continents">
<use overflow="visible" xlink:href="#planet"/>
<clipPath id={randomId2}>
<use overflow="visible" xlink:href="#{randomId1}"/>
</clipPath>
<g clip-path="url(#continents)">
<g clip-path="url(#{randomId2})">
<g class="anim anim-spinGlobeSmall">
<path d="M36.5 36.9c-2.3-1-2.2.3-3.5-2.2-1.1-.3-1.6-1-2.7-1.2-.4-.3-.3-.8-1.1-.8-.8-.3-1.7.6-2.4-.2-.4.2-.8.6-1.4.5-.3-.2-.9 0-1.3-.5.2-2.9-2.2.1-1.1-2.9l-.1-.1c-2.7 3.2-4.2-2.7-1.2-2.6.9 0 2.5-.6 2.7.9 0 .1.1.4.4.3h.1V28c.1 0-.2-1-.2-1.1-.1-.8 1.3-1.1 1.3-2-.4-.7-.2-.7.6-1.2.8-.6 1.1-1.5 2.3-1.3 0 .4 1 0 1.5-.4-.1-.4-.2-.3-1-.1-1-.8.2-1.5-1.8-.5.3-1.8 4-.6 3.5-2.4-1.2-.5-1.4-1.2-1.9-2.4-.4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10c.1 0 .2-.1.4-.2-.2-.2-.3-.4-.7-.1.1.2.2.3.3.3zM17.8 9.9v-.2c-.1.1-.4-.2-.6.1.2.2.4.2.6.1zM18.9 11.8c.1 0 .2-.1.4-.2-.2-.1-.3-.4-.6 0l.2.2zM68.5 33.5c0 .3.7.2.2-.3-.1.1-.2.2-.2.3z"/>

View File

@@ -0,0 +1,11 @@
<script>
export let href = '#'
export let text = ''
</script>
<a href={href} class="link-change">
{text}
<span class="icon">
<slot></slot>
</span>
</a>

View File

@@ -0,0 +1,85 @@
<script>
import { onMount } from 'svelte'
// Variables
let toggleLayout
let layoutSetting
/*
** Run code on browser only
*/
onMount(() => {
// Get layout setting from storage
layoutSetting = (localStorage.getItem('photosLayout')) ? localStorage.getItem('photosLayout') : 'list'
// Variables
const layoutGridClass = 'photos--grid'
const layoutListClass = 'photos--list'
const grid = document.querySelector('.photos')
const toggle = document.querySelector('.toggle')
const pill = toggle.querySelector('.pill')
const activeButton = document.querySelector(`.toggle [data-layout="${layoutSetting}"]`)
// Init of first option
pill.style.width = activeButton.getBoundingClientRect().width + 'px'
pill.style.left = activeButton.getBoundingClientRect().left - toggle.getBoundingClientRect().left + 'px'
// Toggle layout
toggleLayout = event => {
const clicked = event.currentTarget
const type = clicked.dataset.layout
// Change the layout
switch (type) {
case 'grid':
grid.classList.add(layoutGridClass)
grid.classList.remove(layoutListClass)
break;
case 'list':
grid.classList.add(layoutListClass)
grid.classList.remove(layoutGridClass)
break;
default: break;
}
// Animate the active pill
pill.style.width = clicked.getBoundingClientRect().width + 'px'
pill.style.left = clicked.getBoundingClientRect().left - toggle.getBoundingClientRect().left + 'px'
// Add/Remove active classes
document.querySelectorAll('.toggle button').forEach(button => button.classList.remove('active'))
clicked.classList.add('active')
// Remember this setting
localStorage.setItem('photosLayout', type)
}
})
</script>
<div class="toggle">
<button data-layout="list" class:active={layoutSetting === 'list'} on:click={toggleLayout}>
<svg xmlns="http://www.w3.org/2000/svg" width="19" height="17" viewBox="0 0 19 17">
<g class="anim">
<rect width="15" height="3"/>
<rect width="15" height="3" x="4" y="7"/>
<rect width="15" height="3" y="14"/>
</g>
</svg>
<span>List</span>
</button>
<button data-layout="grid" class:active={layoutSetting === 'grid'} on:click={toggleLayout}>
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="20" viewBox="0 0 18 20">
<g class="anim">
<rect width="7" height="7"/>
<rect width="7" height="7" x="11" y="2"/>
<rect width="7" height="7" y="11"/>
<rect width="7" height="7" x="11" y="13"/>
</g>
</svg>
<span>Grid</span>
</button>
<div class="pill" aria-hidden="true" role="presentation"></div>
</div>

View File

@@ -0,0 +1,66 @@
import { apiEndpoints } from './store'
/*
** Debounce function with a delay
** (For scrolling or other resource demanding behaviors)
*/
export const debounce = (callback, wait) => {
// let timeout
// return (...args) => {
// const context = this
// clearTimeout(timeout)
// timeout = setTimeout(() => callback.apply(context, args), wait)
// }
}
/*
** Wrap string's each letters into a span
*/
export const lettersToSpan = string => {
return string
.replace(/(<.*?>)|(.)/g, letter => letter.replace(/./g, '<span>$&</span>'))
.replace(/ /g, '\u00a0')
}
/*
** Check if element is in viewport
*/
export const isInViewport = element => {
const bounding = element.getBoundingClientRect()
return (
bounding.top >= 0 &&
bounding.left >= 0 &&
bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
bounding.right <= (window.innerWidth || document.documentElement.clientWidth)
)
}
/*
** Random String Generator
*/
export const randomString = (length = 6, type = 'A') => {
type = type && type.toLowerCase()
let str = ''
let i = 0
const min = type == 'a' ? 10 : 0
const max = type == 'n' ? 10 : 62
for (; i++ < length;) {
let r = Math.random() * (max - min) + min << 0
str += String.fromCharCode(r += r > 9 ? r < 36 ? 55 : 61 : 48)
}
return str
}
/*
** Get thumbnail from API
*/
export const getThumbnail = (id, width, height, type = 'crop', quality = 75) => {
const ratio = 1.5
height = !height ? Math.round(width / ratio) : height
return `${apiEndpoints.rest}/assets/${id}?w=${width}&h=${height}&f=${type}&q=${quality}`
}

View File

@@ -1,6 +1,6 @@
<script>
// Svelte
import { site, currentLocation } from '../store'
import * as fn from '../functions'
// Dependencies
import dayjs from 'dayjs'
@@ -14,9 +14,6 @@
// Shortcut current location
let location
$: location = $currentLocation.location
// Manipulate data
const thumbnail = photo.image.data.thumbnails.find(thumb => thumb.url.includes('key=large'))
</script>
<div class="photo">
@@ -32,40 +29,17 @@
<a href="/viewer/{location.country.slug}/{location.slug}/{photo.slug}">
<div class="photo__image--img">
<img
src={thumbnail.url}
width={thumbnail.width} height={thumbnail.height}
src="{fn.getThumbnail(photo.image.private_hash, 800)}"
srcset="{fn.getThumbnail(photo.image.private_hash, 1200)} 1200w, {fn.getThumbnail(photo.image.private_hash, 1600)} 1600w"
width="600" height="400"
alt="{photo.name}, {location.region}, {location.country.name}"
>
</div>
<time class="photo__image--date">{dayjs(photo.date).format('MMM Do, YYYY')}</time>
<time class="photo__image--date" datetime={dayjs(photo.date).format('YYYY-MM-DDThh:mm:ss')}>
{dayjs(photo.date).format('MMM Do, YYYY')}
</time>
<span class="photo__image--number">{(index < 10 ? '0': '') + index}</span>
</a>
</div>
</div>
</div>
<!-- <div class="card">
<a href="/viewer/{location.country.slug}/{location.slug}/{photo.slug}">
<div class="card-image">
<figure class="image is-4by3">
<img
src={thumbnail.url}
alt="{`${photo.name}, ${location.name}, ${location.country.name}`}"
width={thumbnail.width} height={thumbnail.height}
>
</figure>
</div>
<div class="card-content">
<p class="is-size-5"><strong></strong>
<strong>{photo.name}</strong>
</p>
<p>{location.name}, {location.country.name}</p>
</div>
<footer class="card-footer has-text-grey-light">
<span class="card-footer-item">{dayjs(photo.date).format('MMM Do, YYYY')}</span>
<span class="card-footer-item">#{(index < 10 ? '0' : '') + index}</span>
</footer>
</a>
</div> -->

View File

@@ -35,7 +35,10 @@
</div>
<div class="button-control button-control--dashed switcher__icon">
<IconGlobe color="#fff" width="24" />
<IconGlobe
color={type.includes('side') ? '#333' : '#fff'}
width={type.includes('side') ? 18 : 24}
/>
<svg>
<circle cx="50%" cy="50%" r="{type.includes('side') ? 24 : radius}px"></circle>
</svg>

View File

@@ -1,46 +1,123 @@
<script>
import { onMount } from 'svelte'
import * as fn from '../functions'
// Components
import IconArrow from '../atoms/IconArrow'
// Props and variables
export let viewer = false
export let photos = []
let hover
let photoPrev
let photoNext
/*
** Run code on browser only
*/
onMount(() => {
// Hover function
hover = event => {
const to = event.currentTarget.dataset.to
const photoActive = document.querySelector('.gallery .active')
const photoToHover = (to === 'prev') ? photoActive.previousSibling : photoActive.nextSibling
if (event.type === 'mouseenter') {
photoToHover.classList.add('hover')
} else {
photoToHover.classList.remove('hover')
}
}
// Go to previous photo
photoPrev = () => {
console.log('previous photo')
}
// Go to next photo
photoNext = () => {
console.log('next photo')
}
})
</script>
<div class="carousel">
<div class="wrap">
<div class="gallery">
<div class="gallery__images">
<div class="gallery__images--photo prev">
<img src="/img/RyanStreet58.jpg" alt="">
</div>
<div class="gallery__images--photo front">
<img src="/img/TurinStreet33.jpg" alt="">
</div>
<div class="gallery__images--photo next">
<img src="/img/GrayRoad15.jpg" alt="">
{#each photos as photo, index}
<div class="gallery__images--photo"
class:prev={index === 0}
class:active={index === 1}
class:next={index === 2}
>
<img
src="{fn.getThumbnail(photo.image.private_hash, 800)}"
srcset="{fn.getThumbnail(photo.image.private_hash, 1200)} 1200w, {fn.getThumbnail(photo.image.private_hash, 1600)} 1600w"
alt="{photo.name}, {photo.location.name}, {photo.location.country.name}"
/>
</div>
{/each}
</div>
<div class="carousel__controls">
<button class="button-control button-control--white prev">
<img src="/img/icons/arrow-pink.svg" alt="">
<button class="button-control button-control--white dir-left" data-to="prev" aria-label="Previous"
on:click={photoPrev}
on:mouseenter={hover}
on:mouseleave={hover}
>
<IconArrow direction="left" color="#ff6c89" className="icon" />
<IconArrow direction="left" color="#fff" className="icon" hidden="true" />
</button>
<button class="button-control button-control--white next">
<img src="/img/icons/arrow-pink.svg" alt="">
<button class="button-control button-control--white dir-right" data-to="next" aria-label="Next"
on:mouseenter={hover}
on:mouseleave={hover}
on:click={photoNext}
>
<IconArrow direction="right" color="#ff6c89" className="icon" />
<IconArrow direction="right" color="#fff" className="icon" hidden="true" />
</button>
</div>
{#if viewer}
<div class="carousel__number">05</div>
{/if}
</div>
<div class="carousel__information">
<div class="carousel__information--location location">
<p class="street">Rogers Street, West End</p>
<p class="style-caps state">Queensland, Australia</p>
<div class="carousel__information--location style-location">
<!-- <p class="street">{photos[0].name}</p>
<p class="style-caps state">{photos[0].location.region}, {photos[0].location.country.name}</p> -->
</div>
<!-- {viewer &&
<p class="carousel__information--date">
Apr 6th, 2019
</p>
} -->
<!-- <div class="carousel__information--location style-location" aria-hidden="true">
<p class="street">{photos[1].name}</p>
<p class="style-caps state">{photos[1].location.region}, {photos[1].location.country.name}</p>
</div> -->
{#if viewer}
<p class="carousel__information--date">Apr 6th, 2019</p>
{/if}
</div>
<!-- {viewer &&
<div class="carousel__number">
05
</div>
} -->
<!-- {!viewer && pagination} -->
{#if !viewer}
<ol class="carousel__dots">
{#each photos as page, index}
<li class:active={index === 0}>
<button></button>
</li>
{/each}
</ol>
{/if}
</div>
</div>
{#if viewer}
<ol class="carousel__dots">
{#each photos as page}
<li class:active={false}>
<button></button>
</li>
{/each}
</ol>
{/if}
</div>

View File

@@ -1,5 +1,5 @@
<script context="module">
import Shuffle from 'shufflejs'
// import Shuffle from 'shufflejs'
</script>
<script>
@@ -8,15 +8,38 @@
// import { zoomFadeIn, zoomFadeOut } from '../animations'
// Components
import Button from '../atoms/Button'
import Location from '../molecules/Location'
// Define continents to show
// Variables
let filterLocations
let continentsToShow = []
// Define continents to show
$continents.forEach(cont => !!cont.countries && continentsToShow.push(cont))
// Create the filterable list of locations
let filterLocations
// On click on continents
const toggleContinents = (event, continent) => {
// Change the filter
// filterLocations.filter(continent)
// Change active classes
document.querySelectorAll('#continents button').forEach(button => {
if (!continent) {
button.classList.remove('disabled')
} else {
button.classList.add('disabled')
event.currentTarget.querySelector('button').classList.remove('disabled')
}
})
}
/*
** Run code on browser only
*/
onMount(() => {
// Create the filterable list of locations
// filterLocations = new Shuffle(document.getElementById('continents'), {
// itemSelector: '.location',
// // sizer: '#locations_list',
@@ -25,36 +48,22 @@
// })
})
// // On click on continents
const toggleContinents = (event, continent = '') => {
// Change the filter
// filterLocations.filter(continent.id)
// Change active classes
const continents = document.querySelectorAll('#continents a')
if (!continent) {
continents.forEach(cont => cont.classList.remove('disabled'))
} else {
continents.forEach(cont => cont.classList.add('disabled'))
event.currentTarget.classList.remove('disabled')
}
}
</script>
<div class="browse wrap">
<div class="description">
<div class="browse__description style-description">
<p>Browse all the cities and countries</p>
</div>
<ul class="browse__continents" id="continents">
<li>
<button class="button-outline" on:click|preventDefault={e => toggleContinents(e)}>All</button>
{#if continentsToShow.length > 1}
<li on:click={e => toggleContinents(e)}>
<Button type="button" className="button-outline" text="All" />
</li>
{/if}
{#each continentsToShow as continent}
<li>
<button class="button-outline" on:click|preventDefault={e => toggleContinents(e, continent)}>
<span>{continent.name}</span>
</button>
<li on:click={e => toggleContinents(e, continent.id)}>
<Button type="button" className="button-outline" text={continent.name} />
</li>
{/each}
</ul>

View File

@@ -69,8 +69,9 @@
$locations.forEach(loc => loc.country = $countries.find(cont => cont.id === loc.country.id))
</script>
<!-- <style src="../style/style.scss" global></style> -->
<style lang="scss" global>
@import "style/style.scss";
@import "./style/style.scss";
</style>
<slot></slot>

View File

@@ -1,7 +1,11 @@
<script>
import { onMount } from 'svelte'
import { site, currentLocation } from '../store'
import * as fn from '../functions'
import AOS from 'aos'
// Components
import IconArrow from '../atoms/IconArrow'
import Globe from '../molecules/InteractiveGlobe'
import Footer from '../molecules/Footer'
import Locations from '../organisms/Locations'
@@ -10,6 +14,20 @@
$: if ($currentLocation) {
currentLocation.set()
}
/*
** Run code on browser only
*/
onMount(() => {
const titleHouses = document.getElementById('title-houses')
const titleWorld = document.getElementById('title-world')
// Scroll apparitions
if (process.browser) {
AOS.init()
}
})
</script>
<svelte:head>
@@ -19,45 +37,36 @@
<section class="explore">
<div class="wrap">
<div class="explore__top">
<a href="/" class="button-control button-control--pink">
<img src="/img/icons/arrow-white.svg" alt="">
<a href="/" class="button-control button-control--pink dir-left">
<IconArrow direction="left" color="#fff" className="icon" />
<IconArrow direction="left" color="#fff" className="icon" hidden="true" />
</a>
<h1 class="title-location">Houses <em>of the</em> World</h1>
<div class="title-location title-location--inline">
<div aria-label="Houses" data-aos="letters-translate-bottom">
<div class="anim-mask">
{@html fn.lettersToSpan('Houses')}
</div>
</div>
<em>of the</em>
<div aria-label="World" data-aos="letters-translate-bottom">
<div class="anim-mask">
{@html fn.lettersToSpan('World')}
</div>
</div>
</div>
</div>
<div class="description">
<div class="explore__description style-description">
<p>{$site.explore_globe}</p>
</div>
</div>
<Globe />
<Locations />
<Locations />
</section>
<Footer />
<!-- <section class="hero is-medium is-danger has-text-centered">
<div class="hero-body">
<div class="container">
<h1 class="title">Houses Of The World</h1>
</div>
</div>
</section>
<div class="container">
<section class="section">
<h2 class="title is-4">Choose on globe</h2>
<div class="content">
<p>{$site.explore_globe}</p>
<p>[globe]</p>
</div>
<h2 class="title is-4">Choose from list</h2>
<div class="content">
<p>{$site.explore_list}</p>
</div>
<Locations />
</section>
</div> -->

View File

@@ -1,11 +1,27 @@
<script context="module">
import { apiEndpoints } from '../store'
// Preload data
export async function preload (page, session) {
// Load random photos
const limit = 5
const req = await this.fetch(`${apiEndpoints.rest}/items/photos?fields=id,name,image.*,location.*,location.country.name&sort=?&limit=${limit}`)
const photos = await req.json()
if (req.status === 200) {
return { photos: photos.data }
}
this.error(404, 'Not found')
}
</script>
<script>
// Svelte
import { fade, slide } from 'svelte/transition'
import { onMount } from 'svelte'
import { site, currentLocation } from '../store'
import * as fn from '../functions'
// Dependencies
// import anime from 'animejs/lib/anime.es.js'
// import * as basicScroll from 'basicscroll'
import * as basicScroll from 'basicscroll'
import AOS from 'aos'
// Components
import Button from '../atoms/Button'
@@ -20,6 +36,50 @@
$: if ($currentLocation) {
currentLocation.set()
}
// Props and variables
export let photos
let appearing
/*
** Run code on browser only
*/
onMount(() => {
// Scroll apparitions
if (process.browser) {
AOS.init()
}
// Parallax titles
const titleHouses = document.getElementById('title-houses')
const scrollTitleHouses = basicScroll.default.create({
elem: titleHouses,
direct: true,
from: '0',
to: window.innerHeight * 0.6,
props: {
'--translateX': {
from: '-7vw',
to: '-20vw'
}
}
}).start()
const titleWorld = document.getElementById('title-world')
const scrollTitleWorld = basicScroll.default.create({
elem: titleWorld,
direct: true,
from: document.querySelector('.explore__description').getBoundingClientRect().top,
to: document.querySelector('#title-world').getBoundingClientRect().bottom * 1.1,
props: {
'--translateX': {
from: '-1vw',
to: '-14vw'
}
}
}).start()
})
</script>
<svelte:head>
@@ -27,75 +87,47 @@
</svelte:head>
<section class="intro">
<h1 class="title-massive title-parallax">Houses</h1>
<!-- <MassiveTitle
text="Houses"
scrollFrom="0" scrollTo={window.innerHeight * 0.6}
effectFrom="-5vw" effectTo="-20vw"
/> -->
<div class="anim-mask">
<div class="anim title-parallax" id="title-houses" data-aos="letters-translate-top">
<h1 class="title-massive" aria-label="Houses">
{@html fn.lettersToSpan('Houses')}
</h1>
</div>
</div>
<div class="wrap">
<div class="description">
<div class="intro__description style-description">
<p>{$site.description}</p>
<Button href="/choose" type="button" text="Explore locations">
<Button href="#choose" type="a" className="button" text="Explore locations">
<IconGlobeSmall width="22" color="#666" />
</Button>
</div>
</div>
<Carousel />
<Carousel {photos} />
</section>
<section class="explore explore--homepage">
<p class="of">of</p>
<div class="of" aria-label="of" data-aos="letters-translate-bottom">
<div class="anim-mask">
{@html fn.lettersToSpan('of')}
</div>
</div>
<div class="description">
<p>{$site.explore_list}</p>
<div class="explore__description style-description" id="choose">
<p>{$site.explore_globe}</p>
</div>
<InteractiveGlobe />
<!-- <MassiveTitle
text="World"
scrollFrom="0" scrollTo={window.innerHeight * 0.6}
effectFrom="-5vw" effectTo="-20vw"
/> -->
<h1 class="title-massive title-parallax">World</h1>
<div class="anim-mask anim-title">
<h1 class="title-massive title-parallax" id="title-world" aria-label="World" data-aos="letters-translate-bottom">
{@html fn.lettersToSpan('World')}
</h1>
</div>
<Locations />
</section>
<Footer />
<!-- <section class="hero is-medium is-danger has-text-centered">
<div class="hero-body">
<div class="container">
<h1 class="title">Houses Of</h1>
<h2 class="subtitle">{$site.description}</h2>
</div>
</div>
</section>
<div class="section">
<div class="container">
<h2 class="title is-4">Choose on globe</h2>
<IconGlobeSmall width="14" color="red" />
<IconGlobe />
<div class="content">
<p>{$site.explore_globe}</p>
<p>[globe]</p>
</div>
<h2 class="title is-4">Choose from list</h2>
<div class="content">
<p>{$site.explore_list}</p>
</div>
<Locations />
</div>
</div>
<!-- <Footer /> -->

View File

@@ -6,7 +6,7 @@
// Preload data
export async function preload (page, session) {
// Load photos
const req = await this.fetch(`${apiEndpoints.rest}/items/photos?fields=id,name,date,slug,image.data,created_on,modified_on&filter[location.slug][rlike]=%${page.params.location}%&sort=-created_on,name`)
const req = await this.fetch(`${apiEndpoints.rest}/items/photos?fields=id,name,date,slug,image.*,created_on,modified_on&filter[location.slug][rlike]=%${page.params.location}%&limit=-1&sort=-created_on,name`)
const photos = await req.json()
if (req.status === 200) {
return { photos: photos.data }
@@ -16,26 +16,29 @@
</script>
<script>
import { onMount } from 'svelte'
// Dependencies
import dayjs from 'dayjs'
import advancedFormat from 'dayjs/plugin/advancedFormat'
import relativeTime from 'dayjs/plugin/relativeTime'
dayjs.extend(advancedFormat)
dayjs.extend(relativeTime)
// Components
import IconGlobe from '../../../atoms/iconGlobe'
import IconGlobeSmall from '../../../atoms/iconGlobeSmall'
import Cursor from '../../../atoms/Cursor'
import LinkChange from '../../../atoms/LinkChange'
import ToggleLayout from '../../../atoms/ToggleLayout'
import Photo from '../../../molecules/Photo'
import Switcher from '../../../molecules/Switcher'
import Footer from '../../../molecules/Footer'
// Props
// Props and variables
export let photos
// Setup
const { page } = stores()
dayjs.extend(advancedFormat)
dayjs.extend(relativeTime)
let layoutSetting
let pagesTotal = 3
// Update current location
const location = $locations.find(loc => loc.slug === $page.params.location)
@@ -46,8 +49,18 @@
// Define dates
const dateUpdatedFull = photos.length ? dayjs(photos[0].modified_on).format('MMM Do, YYYY') : ''
const dateUpdatedDatetime = photos.length ? dayjs(photos[0].modified_on).format('YYYY-MM-DDThh:mm:ss') : ''
const dateUpdatedRelative = photos.length ? dayjs().to(dayjs(photos[0].modified_on)) : ''
const lastUpdated = photos.length ? (dayjs(photos[0].modified_on).isBefore(dayjs().subtract(1, 'M'))) ? dateUpdatedFull : dateUpdatedRelative : ''
/*
** Run code on browser only
*/
onMount(() => {
// Get layout setting from storage
layoutSetting = localStorage.getItem('photosLayout')
})
</script>
<svelte:head>
@@ -67,7 +80,7 @@
<span>Change</span>
</span>
<svg>
<circle cx="50%" cy="50%" r="43%"></circle>
<circle cx="50%" cy="50%" r="43%" />
</svg>
</a>
</div>
@@ -77,101 +90,56 @@
<div class="wrapper">
<p>{$site.description}</p>
<p>
Houses Of
<a href="/choose" class="link-change">
{location.name}
<span class="icon">
<IconGlobeSmall width="14" color="#999" />
</span>
</a>
Houses on:eventname
<LinkChange href="/choose" text={location.name}>
<IconGlobeSmall width="14" color="#999" />
</LinkChange>
{location.description}
</p>
<p class="updated style-caps">
<strong>Updated</strong>
<time datetime={dateUpdatedFull} title={dateUpdatedFull}>{lastUpdated}</time>
<time datetime={dateUpdatedDatetime} title={dateUpdatedFull}>{lastUpdated}</time>
</p>
<div class="toggle">
<button on:click class="active">
<svg xmlns="http://www.w3.org/2000/svg" width="19" height="17" viewBox="0 0 19 17">
<path fill="#FF6C89" fillRule="evenodd" d="M39,30 L39,33 L24,33 L24,30 L39,30 Z M43,23 L43,26 L28,26 L28,23 L43,23 Z M39,16 L39,19 L24,19 L24,16 L39,16 Z" transform="translate(-24 -16)" />
</svg>
<span>List</span>
</button>
<button on:click>
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="20" viewBox="0 0 18 20">
<path fill="#FF6C89" fillRule="evenodd" d="M63,27 L63,34 L56,34 L56,27 L63,27 Z M52,25 L52,32 L45,32 L45,25 L52,25 Z M63,16 L63,23 L56,23 L56,16 L63,16 Z M52,14 L52,21 L45,21 L45,14 L52,14 Z" transform="translate(-45 -14)"/>
</svg>
<span>Grid</span>
</button>
</div>
<ToggleLayout />
</div>
</div>
</div>
</section>
<section class="photos photos--list">
<aside class="photos__side">
<div class="sticky">
<section class="photos photos--{layoutSetting || 'list'}">
<div class="photos__side--wrap wrap">
<aside class="photos__side">
<Switcher type="switcher--side" />
<p class="updated style-caps">
<strong>Updated</strong>
<time datetime={dateUpdatedFull} title={dateUpdatedFull}>{lastUpdated}</time>
<time datetime={dateUpdatedDatetime} title={dateUpdatedFull}>{lastUpdated}</time>
</p>
</div>
</aside>
</aside>
</div>
<Cursor type="zoom" />
<div class="wrap">
<div class="photos__view wrap">
{#each photos as photo, index}
<Photo {photo} index={index + 1} />
{/each}
</div>
{#if photos.length}
<section class="pagination">
<button>
<div class="pagination__page">
<p><span>page</span> 1/3</p>
<div class="pagination__page">
<div class="pagination__page--info">page</div>
<div class="pagination__page--numbers">
<div class="scroll">
<span>3</span>
<span>2</span>
<span>1</span>
</div>
</div>
<p class="style-caps pagination__caption">See more photos</p>
</button>
/{pagesTotal}
</div>
<p class="style-caps pagination__caption">See more photos</p>
</section>
<Footer />
{/if}
</section>
<!-- <div class="section container">
<div class="nav content">
<Switcher />
</div>
<div class="content">
<h1 class="title is-2">{locationFull}</h1>
{#if location && location.description}
<p>
{$site.description}<br>
Houses Of <a href="/choose">{location.name}</a> {location.description}
</p>
{/if}
{#if photos.length}
<p><strong>Updated</strong> <time datetime={dateUpdatedFull} title={dateUpdatedFull}>{lastUpdated}</time></p>
{/if}
</div>
{#if photos.length}
<div class="columns is-multiline">
{#each photos as photo, index}
<div class="column is-one-third">
<Photo {photo} index={index + 1} />
</div>
{/each}
</div>
{:else}
<div class="message is-danger">
<div class="message-body">
<p>No photos for {locationFull}</p>
</div>
</div>
{/if}
</div> -->
<Footer />

View File

@@ -10,7 +10,7 @@
export async function preload (page, session) {
// Load the photos if not loaded
if (!preloaded) {
const req = await this.fetch(`${apiEndpoints.rest}/items/photos?fields=id,name,slug,image.data,created_on&filter[location.slug][rlike]=%${page.params.location}%`)
const req = await this.fetch(`${apiEndpoints.rest}/items/photos?fields=id,name,slug,image.*,image.data,location.*,location.country.*,created_on&filter[location.slug][rlike]=%${page.params.location}%`)
const photos = await req.json()
return {
photos: photos.data
@@ -24,23 +24,36 @@
</script>
<script>
const { page, session, preloading } = stores()
import { onMount } from 'svelte'
import * as fn from '../../../../functions'
// Dependencies
import dayjs from 'dayjs'
import advancedFormat from 'dayjs/plugin/advancedFormat'
dayjs.extend(advancedFormat)
// Components
import IconGlobe from '../../../../atoms/IconGlobe'
import IconCross from '../../../../atoms/IconCross'
import Carousel from '../../../../organisms/Carousel'
// Props and variables
const { page } = stores()
export let photos
let currentIndex
let indexFormated
let viewerPhotos
let windowWidth
let changeWindowWidth
// Define current location
const location = $locations.find(loc => loc.slug === $page.params.location)
const locationFull = `${location.name}, ${location.country.name}`
$currentLocation == undefined && currentLocation.set({ location, photos })
// Define path
const path = `/viewer/${location.country.slug}/${location.slug}/`
// Set current photo, index and siblings
const setCurrentPhotos = () => {
// Define index and prev/next photos
@@ -62,18 +75,6 @@
}
})
// Define values
const locationFull = `${location.name}, ${location.country.name}`
const path = `/viewer/${location.country.slug}/${location.slug}/`
// Get thumbnail
const getThumb = (photo, size) => {
if (photo) {
const thumbnail = photo.image.data.thumbnails.find(thumb => thumb.url.includes(`key=${size}`))
return thumbnail.url
}
}
// Keyboard navigation
const keyboardNav = event => {
const keyCode = event.keyCode
@@ -85,13 +86,48 @@
// Close
else if ([27,67].includes(keyCode)) document.getElementById('photo_close').click()
}
/*
** Run code on browser only
*/
onMount(() => {
changeWindowWidth = () => {
windowWidth = window.innerWidth
}
changeWindowWidth()
})
</script>
<!-- <pre>{JSON.stringify(viewerPhotos, null, 2)}</pre> -->
<svelte:head>
<title>Houses Of - photoName photoCountryName</title>
</svelte:head>
<svelte:window on:keydown={keyboardNav} />
<svelte:window on:keydown={keyboardNav} on:resize={changeWindowWidth} />
<div class="container">
<section class="viewer">
<div class="viewer__top">
<p class="tip">Tap for fullscreen</p>
<div class="buttons">
<a href="/choose" class="button-control button-control--dashed">
<IconGlobe color="#fff" width="18" />
<svg>
<circle cx="50%" cy="50%" r="{windowWidth >= 768 ? 32 : 24}px"></circle>
</svg>
</a>
<a href="/location/{location.country.slug}/{location.slug}" class="button-control button-control--pink dir-bottom" aria-label="Close">
<IconCross color="#fff" width="18" className="icon" />
<IconCross color="#fff" width="18" className="icon" hidden="true" />
</a>
</div>
</div>
<Carousel viewer={true} {photos} />
</section>
<!-- <div class="container">
<div class="nav content">
<a href="/choose" class="button is-info" id="photo_close">Change location</a>
<a href="/location/{location.country.slug}/{location.slug}" class="button is-dark" id="photo_close">Close</a>
@@ -140,4 +176,4 @@
</div>
</div>
</div>
</div>
</div> -->

View File

@@ -1,6 +1,54 @@
/* ==========================================================================
GLOBAL
PARALLAX EFFECTS
========================================================================== */
// Parallax title: Translate X
.title-parallax {
transform: translate3d(var(--translateX), 0, 0);
will-change: transform;
}
/* ==========================================================================
REVEAL ANIMATIONS
========================================================================== */
.anim-mask {
display: block;
overflow: hidden;
}
// Translate each letter from top/bottom
[data-aos="letters-translate-top"],
[data-aos="letters-translate-bottom"] {
white-space: nowrap;
span {
display: inline-block;
transition: all 1000ms $ease-quart;
@for $i from 1 to 8 {
&:nth-child(#{$i}) {
transition-delay: $i * 40ms;
}
}
}
&.aos-animate {
span {
transform: translate3d(0, 0, 0);
}
}
}
[data-aos="letters-translate-top"] {
span {
transform: translate3d(0, -100%, 0);
}
}
[data-aos="letters-translate-bottom"] {
span {
transform: translate3d(0, 100%, 0);
}
}
@@ -33,19 +81,22 @@
animation-play-state: paused;
}
// Layout: List
@keyframes layoutListOdd {
0% { transform: translateX(0); }
100% { transform: translateX(4px); }
}
@keyframes layoutListEven {
0% { transform: translateX(0); }
100% { transform: translateX(-4px); }
}
/* ==========================================================================
HEADER
========================================================================== */
/* ==========================================================================
MAIN
========================================================================== */
// Layout: Grid
@keyframes layoutGridOdd {
0% { transform: translateY(0); }
100% { transform: translateY(3px); }
}
@keyframes layoutGridEven {
0% { transform: translateY(0); }
100% { transform: translateY(-3px); }
}

View File

@@ -1,6 +1,11 @@
html {
font: #{$base-font-size} $font-sans;
color: $color-text;
scroll-behavior: smooth;
@media screen and (prefers-reduced-motion: reduce) {
scroll-behavior: auto;
}
}
body {
@include font-smooth;
@@ -50,30 +55,42 @@ button {
// Title: Massive
.title-massive {
font-size: 50.25vw;
letter-spacing: -2vw;
font-family: $font-serif-extra;
color: $color-secondary;
font-size: pxVW(800);
line-height: 1;
color: $color-secondary;
letter-spacing: -2vw;
pointer-events: none;
user-select: none;
@include breakpoint (xxl) {
font-size: rem(900px);
}
}
// Title: Locations
.title-location {
font-size: rem(68px);
font-family: $font-serif;
color: $color-secondary;
font-size: rem(68px);
line-height: 1;
color: $color-secondary;
text-align: center;
@include breakpoint (sm) {
font-size: rem(64px);
}
@include breakpoint (lg) {
font-size: rem(72px);
}
@include breakpoint (xl) {
font-size: rem(96px);
}
em {
display: block;
font-size: rem(18px);
text-transform: uppercase;
color: $color-lightpurple;
text-transform: uppercase;
letter-spacing: 1px;
@include breakpoint (sm) {
@@ -101,26 +118,30 @@ button {
}
}
}
// Inline version
&--inline {
display: flex;
align-items: baseline;
justify-content: center;
em {
margin: 0 16px 0 24px;
}
}
}
// Parallax title: Translate X
.title-parallax {
transform: translate3d(var(--translateX), 0, 0);
will-change: transform;
pointer-events: none;
user-select: none;
}
/* Text Styles
========================================================================== */
.location {
.style-location {
text-align: center;
.street {
margin-bottom: 8px;
font-family: $font-serif;
font-size: rem(24px);
margin-bottom: 8px;
@include breakpoint (sm) {
font-size: rem(28px);
@@ -130,20 +151,20 @@ button {
.style-caps {
font-size: rem(14px);
color: $color-tertiary;
text-transform: uppercase;
letter-spacing: 1px;
color: $color-tertiary;
}
.description {
.style-description {
font-family: $font-sans-light;
font-size: rem(18px);
line-height: 1.55;
text-align: center;
@include breakpoint (sm) {
max-width: 572px;
font-size: rem(28px);
line-height: 1.64;
max-width: 572px;
}
}

View File

@@ -1,6 +1,7 @@
// Colors
$color-primary: #3C0576;
$color-secondary: #FF6C89;
$color-secondary-bright: #FF0536;
$color-text: #333;
$color-tertiary: #FFE0C5;
$color-lightpurple: #8B50B2;
@@ -37,6 +38,8 @@ $font-serif-extra: "M-Extralight", #{$replacement-serif};
/* Sizes, margins and spacing
====================================================================== */
$base-width: 1600;
// Blocks
@@ -62,3 +65,4 @@ $screen-sm: 768px;
$screen-md: 992px;
$screen-lg: 1200px;
$screen-xl: 1440px;
$screen-xxl: 1600px;

View File

@@ -0,0 +1,245 @@
// Button: Control
.button-control {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
overflow: hidden;
padding-top: 2px;
pointer-events: auto;
border-radius: 50vh;
border: none;
cursor: pointer;
outline: none;
transition: background-color 350ms $ease-quart;
@include breakpoint (sm) {
width: 56px;
height: 56px;
}
// Icon
.icon {
display: block;
width: 13px;
height: auto;
transition: transform 500ms $ease-quart, opacity 150ms $ease-inout;
overflow: hidden;
@include breakpoint (sm) {
width: 20px;
}
}
.icon[aria-hidden] {
opacity: 0;
position: absolute;
top: 50%;
left: 50%;
}
/*
** Variants
*/
&--white {
background-color: #fff;
&:hover {
background-color: $color-secondary;
}
}
&--pink {
background-color: rgba($color-secondary, 0.4);
&:hover {
background-color: rgba($color-secondary, 0.75);
}
}
&--gray {
background-color: $color-gray;
&:hover {
background-color: $color-text;
}
}
/*
** Directions
*/
// To left
&.dir-left {
.icon[aria-hidden] {
transform: translate3d(100%, -50%, 0);
}
&:hover {
.icon:not([aria-hidden]) {
opacity: 0;
transform: translate3d(-100%, 0, 0);
}
.icon[aria-hidden] {
opacity: 1;
transform: translate3d(-50%, -50%, 0);
}
}
}
// To right
&.dir-right {
.icon[aria-hidden] {
transform: translate3d(-150%, -50%, 0);
}
&:hover {
.icon:not([aria-hidden]) {
opacity: 0;
transform: translate3d(100%, 0, 0);
}
.icon[aria-hidden] {
opacity: 1;
transform: translate3d(-50%, -50%, 0);
}
}
}
// From top
&.dir-top {
.icon[aria-hidden] {
left: auto;
transform: translate3d(0, -150%, 0);
}
&:hover {
.icon:not([aria-hidden]) {
opacity: 0;
transform: translate3d(0, 100%, 0);
}
.icon[aria-hidden] {
opacity: 1;
transform: translate3d(0, -50%, 0);
}
}
}
// From bottom
&.dir-bottom {
.icon[aria-hidden] {
left: auto;
transform: translate3d(0, 150%, 0);
}
&:hover {
.icon:not([aria-hidden]) {
opacity: 0;
transform: translate3d(0, -100%, 0);
}
.icon[aria-hidden] {
opacity: 1;
transform: translate3d(0, -50%, 0);
}
}
}
/*
** Dashed style
*/
&--dashed {
position: relative;
overflow: visible;
background-color: rgba($color-lightpurple, 0.5);
transition: background-color 150ms $ease-inout;
// Icon
svg[fill] {
height: auto;
}
// Dashed circle
svg:not([fill]) {
position: absolute;
top: 50%;
left: 50%;
width: 130%;
height: 130%;
transform: translate(-50%, -50%);
}
circle {
display: block;
stroke-width: 1.75;
stroke-dasharray: 7, 3;
stroke: rgba($color-lightpurple, 0.35);
fill: none;
transform-origin: 50% 50%;
animation: rotateDashes 5s linear infinite;
animation-play-state: paused;
animation-delay: 50ms;
transition: stroke 150ms $ease-inout;
}
// Hover
&:hover {
background-color: rgba($color-lightpurple, 0.65);
* {
animation-play-state: running;
}
}
}
/*
** Big version
*/
&--big {
width: 72px;
height: 72px;
text-decoration: none;
@include breakpoint (sm) {
width: 152px;
height: 152px;
}
.center {
display: flex;
flex-direction: column;
align-items: center;
span {
display: block;
margin-top: 8px;
color: rgba(#fff, 0.3);
text-transform: uppercase;
font-family: $font-sans-sb;
font-size: rem(6px);
letter-spacing: 1px;
line-height: 1;
@include breakpoint (sm) {
margin-top: 10px;
font-size: rem(10px);
}
}
}
img {
display: block;
width: 24px;
@include breakpoint (sm) {
width: 40px;
}
}
// Big Dashed
&.button-control--dashed {
@include breakpoint (sm) {
circle {
stroke-width: 4.5;
stroke-dasharray: 20, 8;
}
}
}
}
}

View File

@@ -0,0 +1,66 @@
// Button: Outline
.button-outline {
position: relative;
display: inline-flex;
align-items: center;
height: 32px;
padding: 1px 16px 0;
font-family: $font-sans-sb;
font-size: rem(14px);
color: #fff;
background: none;
border: 2px solid #fff;
border-radius: 50vh;
overflow: hidden;
text-decoration: none;
cursor: pointer;
outline: none;
transition: all 275ms $ease-cubic;
@include breakpoint (sm) {
height: 40px;
font-size: rem(18px);
}
span {
display: block;
}
// Second text
&:after {
opacity: 0;
content: attr(data-text);
position: absolute;
display: block;
text-align: center;
top: 50%;
left: 0;
right: 0;
transform: translate3d(0, -120%, 0);
}
span, &:after {
transition: opacity 275ms $ease-cubic, transform 275ms $ease-cubic;
}
// Disabled
&.disabled {
color: $color-lightpurple;
border-color: $color-lightpurple;
}
// Hover
&:hover {
color: $color-tertiary;
border-color: $color-tertiary;
span {
opacity: 0;
transform: translate3d(0, 100%, 0);
}
&:after {
opacity: 1;
transform: translate3d(0, -50%, 0);
}
}
}

View File

@@ -4,6 +4,7 @@
display: inline-flex;
align-items: center;
height: 40px;
overflow: hidden;
padding: 0 16px;
background: #fff;
font-family: $font-sans-sb;
@@ -11,11 +12,10 @@
color: $color-gray;
border-radius: 50vh;
text-decoration: none;
overflow: hidden;
border: none;
outline: none;
cursor: pointer;
transition: background-color 250ms, color 350ms;
transition: background-color 250ms $ease-cubic, color 350ms $ease-cubic;
@include breakpoint (sm) {
height: 48px;
@@ -39,37 +39,35 @@
}
}
svg {
transition: all 350ms;
transition: all 350ms $ease-cubic;
.anim {
animation-delay: 100ms;
}
}
// Text
&:before {
span {
display: block;
}
&:after {
opacity: 0;
content: attr(data-text);
position: absolute;
display: block;
top: 50%;
left: calc(50% + 19px);
width: 100%;
transform: translate3d(-50%, -50%, 0);
transition: transform 350ms, opacity 350ms;
transition-timing-function: cubic-bezier(0.75, 0, 0.125, 1);
// transition-delay: 75ms;
transform: translate3d(-50%, -120%, 0);
}
span {
display: inline-block;
transform: translate3d(0, -6px, 0);
transition: transform 350ms, opacity 350ms;
transition-timing-function: cubic-bezier(0.75, 0, 0.125, 1);
opacity: 0;
@for $i from 1 to 20 {
&:nth-child(#{$i}) { transition-delay: $i * 12ms; }
}
span, &:after {
transition: opacity 275ms $ease-cubic, transform 275ms $ease-cubic;
}
// Hover
&:hover {
background-color: $color-primary;
color: #fff;
background-color: $color-secondary;
svg {
fill: #fff !important;
@@ -77,260 +75,13 @@
.anim {
animation-play-state: running;
}
&:before {
span {
opacity: 0;
transform: translate3d(-50%, 75%, 0);
transform: translate3d(0, 100%, 0);
}
span {
&:after {
opacity: 1;
transform: translate3d(0, 0, 0);
}
// &:after {
// opacity: 1;
// width: 300px;
// height: 300px;
// }
}
// &:after {
// content: "";
// position: absolute;
// z-index: 1;
// top: 50%;
// left: 50%;
// transform: translate3d(-50%, -50%, 0);
// width: 200px;
// height: 200px;
// background: $color-primary;
// opacity: 0;
// border-radius: 50vh;
// transition: all 250ms ease-in-out;
// }
}
// Button: Control
.button-control {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
pointer-events: auto;
border-radius: 50vh;
border: none;
cursor: pointer;
outline: none;
@include breakpoint (sm) {
width: 56px;
height: 56px;
}
// Icon
img {
display: block;
width: 13px;
height: auto;
@include breakpoint (sm) {
width: 20px;
}
}
// White variant
&--white {
background-color: #fff;
}
// Pink variant
&--pink {
background-color: rgba($color-secondary, .4);
}
// Gray variant
&--gray {
background-color: $color-gray;
}
// Next direction
&.next {
img {
transform: rotateY(180deg);
margin-left: -1px;
}
}
// Dashed style
&--dashed {
position: relative;
background-color: rgba($color-lightpurple, .5);
transition: background-color 150ms ease-in-out;
// Icon
svg[style] {
height: auto;
}
// Dashed circle
svg:not([style]) {
position: absolute;
top: 50%;
left: 50%;
width: 130%;
height: 130%;
transform: translate(-50%, -50%);
}
circle {
display: block;
stroke-width: 1.75;
stroke-dasharray: 7, 3;
stroke: rgba($color-lightpurple, .35);
fill: none;
transform-origin: 50% 50%;
animation: rotateDashes 5s linear infinite;
animation-play-state: paused;
animation-delay: 100ms;
}
// Hover
&:hover {
background-color: rgba($color-lightpurple, .65);
* {
animation-play-state: running;
}
}
}
// Big
&--big {
width: 72px;
height: 72px;
text-decoration: none;
@include breakpoint (sm) {
width: 152px;
height: 152px;
}
.center {
display: flex;
flex-direction: column;
align-items: center;
span {
display: block;
margin-top: 8px;
color: rgba(#fff, .3);
text-transform: uppercase;
font-family: $font-sans-sb;
font-size: rem(6px);
letter-spacing: 1px;
line-height: 1;
@include breakpoint (sm) {
margin-top: 10px;
font-size: rem(10px);
}
}
}
img {
display: block;
width: 24px;
@include breakpoint (sm) {
width: 40px;
}
}
// Big Dashed
&.button-control--dashed {
@include breakpoint (sm) {
circle {
stroke-width: 4.5;
stroke-dasharray: 20, 8;
}
}
}
}
}
// Button: Outline
.button-outline {
display: inline-flex;
align-items: center;
height: 32px;
padding: 0 16px;
font-family: $font-sans-sb;
font-size: rem(14px);
color: #fff;
background: none;
border: 2px solid #fff;
border-radius: 50vh;
text-decoration: none;
cursor: pointer;
outline: none;
transition: all 150ms ease;
@include breakpoint (sm) {
height: 40px;
font-size: rem(18px);
}
// Disabled
&.disabled {
color: $color-lightpurple;
border-color: $color-lightpurple;
}
// Hover
&:hover {
color: $color-tertiary;
border-color: $color-tertiary;
}
}
// Toggle Button
.toggle {
margin-top: 58px;
background-color: rgba($color-secondary, .25);
display: inline-flex;
border-radius: 50vh;
button {
background: none;
border: none;
color: $color-secondary;
border-radius: 50vw;
padding: 12px 24px;
font-family: $font-sans-sb;
font-size: rem(18px);
line-height: 0;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
outline: none;
span {
margin-left: 16px;
}
// Active button
&.active {
background-color: $color-primary;
color: #fff;
svg * {
fill: #C78FEC;
}
& + button {
padding-left: 16px;
}
transform: translate3d(-50%, -50%, 0);
}
}
}

View File

@@ -1,18 +0,0 @@
// Zoom cursor
.cursor-zoom {
position: absolute;
display: block;
width: 36px;
height: 36px;
background: url(#{$dir-img}/icons/zoom.svg) 0 0 no-repeat;
background-size: cover;
transition: opacity 300ms ease, transform 300ms ease;
filter: drop-shadow(1px 1px 4px rgba(#000, .7));
// By default
&[aria-hidden="true"] {
opacity: 0;
pointer-events: none;
transform: scale3d(0.7, 0.7, 0.7);
}
}

View File

@@ -6,20 +6,21 @@
padding: 0 8px;
color: $color-secondary;
text-decoration: none;
transition: color 200ms ease;
transition: color 200ms $ease-cubic;
// Line
&:after {
content: "";
position: absolute;
z-index: -1;
background-color: rgba($color-secondary, .22);
background-color: rgba($color-secondary, 0.22);
height: 14px;
width: 100%;
bottom: 5px;
left: 0;
border-radius: 50vh;
transition: all 200ms ease;
transition: all 200ms $ease-cubic;
transition-delay: 50ms;
}
// Icon
@@ -46,7 +47,7 @@
color: $color-text;
&:after {
background-color: rgba($color-secondary, .4);
background-color: rgba($color-secondary, 0.4);
}
svg * {
animation-play-state: running;

View File

@@ -29,6 +29,7 @@
margin-right: 0;
}
}
.bottom {
display: block;
color: $color-secondary;
@@ -46,26 +47,17 @@
height: 52px;
margin-top: 4px;
margin-left: -8px;
// Image
// svg {
// height: 28px;
// width: auto;
// }
// Dashed circle
// svg {
// width: 64px;
// height: 64px;
// }
}
// Side version (smaller)
/*
** Side version (smaller)
*/
&--side {
.switcher {
&__text {
font-size: rem(22px);
pointer-events: none;
}
&__icon {
width: 40px;
@@ -75,16 +67,20 @@
circle {
stroke: #F4EDFB;
}
img, svg[fill] {
transform: rotate(90deg);
}
&:hover {
background-color: darken(#F4EDFB, 7);
circle {
stroke: darken(#F4EDFB, 7);
}
}
}
}
.top {
color: $color-primary;
}
img, svg {
transform: rotate(90deg);
}
}
}

View File

@@ -0,0 +1,90 @@
// Toggle Button
.toggle {
position: relative;
margin-top: 58px;
background-color: rgba($color-secondary, 0.25);
display: inline-flex;
border-radius: 50vh;
button, .pill {
position: relative;
z-index: 2;
color: $color-secondary;
border-radius: 50vh;
padding: 12px 24px;
font-family: $font-sans-sb;
font-size: rem(18px);
line-height: 0;
display: flex;
align-items: center;
justify-content: center;
outline: none;
transition: color 150ms $ease-inout;
}
button {
span {
margin-left: 16px;
}
svg {
fill: $color-secondary;
* {
transition: fill 150ms $ease-inout;
transition-delay: 0ms;
}
}
// Active button
&.active {
color: #fff;
svg * {
fill: #C78FEC;
}
}
// Hover
&:hover:not(.active) {
color: $color-secondary-bright;
svg {
fill: $color-secondary-bright;
}
}
// List icon
&[data-layout="list"]:hover {
rect:nth-of-type(even) {
animation: layoutListEven 400ms $ease-cubic infinite alternate forwards;
}
rect:nth-of-type(odd) {
animation: layoutListOdd 400ms $ease-cubic infinite alternate forwards;
}
}
// Grid icon
&[data-layout="grid"]:hover {
rect:nth-of-type(even) {
animation: layoutGridEven 400ms $ease-cubic infinite alternate forwards;
}
rect:nth-of-type(odd) {
animation: layoutGridOdd 400ms $ease-cubic infinite alternate forwards;
}
}
}
// Pill (active)
.pill {
position: absolute;
z-index: 1;
top: 0;
left: 0;
width: auto;
height: 100%;
background-color: $color-primary;
transition: all 500ms $ease-quart;
span {
content: attr(data-text);
display: block;
margin: 0;
}
}
}

View File

@@ -31,7 +31,7 @@
}
// Right part
&__right{
&__right {
font-size: 14px;
@include breakpoint (sm) {
@@ -67,7 +67,7 @@
justify-content: center;
span {
color: rgba(#fff, .4)
color: rgba(#fff, 0.4)
}
img {

View File

@@ -1,42 +1,75 @@
// Pagination
.pagination {
position: relative;
padding: 64px 0 72px;
background-color: $color-tertiary;
text-align: center;
padding: 64px 0 72px;
position: relative;
@include breakpoint (sm) {
padding: 16vw 0 7.5vw;
margin-top: -64px;
padding: pxVW(176) 0 pxVW(120);
}
@include breakpoint (xl) {
padding-top: 200px;
padding: 176px 0 120px;
}
// Pages
&__page {
p {
font-family: $font-serif-extra;
color: rgba($color-text, .15);
position: relative;
line-height: 1;
font-size: rem(72px);
position: relative;
display: inline-block;
margin: 0 auto;
padding-left: 72px;
font-family: $font-serif-extra;
font-size: rem(72px);
color: rgba($color-text, 0.15);
line-height: 1;
cursor: pointer;
transition: color 250ms $ease-cubic;
@include breakpoint (sm) {
font-size: rem(160px);
}
// Numbers
&--numbers {
position: absolute;
top: 0;
left: -32px;
height: 136px;
overflow: hidden;
.scroll {
display: flex;
flex-direction: column;
height: 100%;
text-align: right;
line-height: 0.85;
transform: translate3d(0, -190%, 0);
transition: transform 250ms $ease-cubic;
}
}
// Info
&--info {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -72%);
font-family: $font-serif;
font-size: 18px;
color: $color-secondary-bright;
@include breakpoint (sm) {
font-size: rem(160px);
font-size: rem(40px);
}
}
span {
font-family: $font-serif;
color: #FF0536;
position: absolute;
font-size: 18px;
top: 50%;
left: 50%;
transform: translate(-50%, -65%);
// Hover
&:hover {
color: rgba($color-text, 0.25);
@include breakpoint (sm) {
font-size: rem(40px);
.pagination__page--numbers {
.scroll {
transform: translate3d(0, -135%, 0);
}
}
}

View File

@@ -1,13 +1,14 @@
.photo {
// Location
/*
** Location
*/
&__location {
margin-bottom: 32px;
@include breakpoint (sm) {
margin-bottom: 56px;
}
@include breakpoint (xs) {
padding: 0;
}
@@ -26,7 +27,10 @@
}
}
// Image container
/*
** Image
*/
&__image {
position: relative;
display: flex;
@@ -40,17 +44,18 @@
.align {
position: relative;
max-width: 1180px;
padding: 0;
margin: 0;
padding: 0;
}
// Image container
&--img {
overflow: hidden;
position: relative;
z-index: 2;
overflow: hidden;
border-radius: 0;
box-shadow: 0 8px 18px rgba(#715E4E, .2);
box-shadow: 0 8px 18px rgba(#715E4E, 0.2);
user-select: none;
@include breakpoint (sm) {
border-radius: 8px;
@@ -62,14 +67,6 @@
height: auto;
}
// Cursor
.cursor {
position: absolute;
z-index: 4;
top: 0;
left: 0;
}
// Overlay
&:after {
content: "";
@@ -84,7 +81,7 @@
background-color: $color-primary;
display: block;
z-index: 3;
transition: all 200ms ease-in-out;
transition: all 150ms ease-in-out;
}
}
@@ -94,7 +91,7 @@
// Hover
&:hover {
cursor: none;
cursor: url(#{$dir-img}/icons/zoom.svg) 0 0, pointer;
.photo__image--img:after {
opacity: 0.6;
@@ -105,10 +102,10 @@
// Date (on the side)
&--date {
display: block;
color: $color-lightgray;
font-size: rem(14px);
margin-top: 16px;
padding: 0 8vw;
padding: 0 pxVW(128);
font-size: rem(14px);
color: $color-lightgray;
@include breakpoint (sm) {
position: absolute;
@@ -126,20 +123,23 @@
// Photo number
&--number {
position: absolute;
pointer-events: none;
font-family: $font-serif-extra;
color: rgba($color-tertiary, .5);
font-size: rem(124px);
bottom: -80px;
right: 24px;
font-family: $font-serif-extra;
color: rgba($color-tertiary, 0.5);
font-size: rem(124px);
pointer-events: none;
user-select: none;
@include breakpoint (sm) {
font-size: 18.75vw;
font-size: pxVW(300);
left: 92%;
top: 50%;
z-index: 1;
transform: translate(-50%, -50%);
}
@include breakpoint (xxl) {
font-size: rem(300px);
}
}
}

View File

@@ -11,11 +11,19 @@
max-width: 1424px;
}
}
// Gallery
.gallery {
position: relative;
z-index: 2;
margin: 0 auto;
@include breakpoint (sm) {
max-width: 85%;
}
@include breakpoint (xl) {
max-width: 100%;
}
// Images
&__images {
@@ -26,43 +34,80 @@
// Photo
&--photo {
position: absolute;
background-color: $color-secondary;
background-color: $color-primary;
overflow: hidden;
box-shadow: 0 15px 60px rgba(#000, .3);
box-shadow: 0 16px 56px rgba(#2E025C, 0.7);
transition: transform 600ms $ease-quart;
@include breakpoint (sm) {
border-radius: 8px;
}
img {
display: block;
height: auto;
width: 100%;
opacity: 0.55;
transition: opacity 600ms $ease-quart;
}
// Temp hiding
&:nth-of-type(4), &:nth-of-type(5) {
display: none;
}
}
// Specific
.front {
// Active photo
.active {
z-index: 10;
top: 50%;
left: 50%;
width: 100%;
transform: translate3d(-50%, -50%, 0);
img {
opacity: 1;
}
}
// Variables
$hoverAngle: 1.25deg;
$hoverDistance: 7%;
// Previous photo
.prev {
@include breakpoint (sm) {
top: 50%;
transform: translate(-5%, -50%) rotate(-1deg);
transform: translate3d(-6%, -50%, 0) rotate(-1deg);
width: 85%;
}
// Hover
&.hover {
transform: translate3d(-$hoverDistance, -50%, 0) rotate(-$hoverAngle);
img {
opacity: 0.8;
}
}
}
// Next photo
.next {
@include breakpoint (sm) {
top: 50%;
transform: translate(5%, -50%) rotate(1deg);
width: 85%;
right: 0;
transform: translate3d(6%, -50%, 0) rotate(1deg);
width: 85%;
}
// Hover
&.hover {
transform: translate3d($hoverDistance, -50%, 0) rotate($hoverAngle);
img {
opacity: 0.8;
}
}
}
}
@@ -82,16 +127,16 @@
width: 100%;
z-index: 11;
.prev {
.dir-left {
transform: translateX(-50%);
}
.next {
.dir-right {
transform: translateX(50%);
}
}
a {
box-shadow: 0 2px 21px rgba(#000, .15);
box-shadow: 0 2px 21px rgba(#000, 0.15);
}
}
@@ -105,16 +150,17 @@
.street {
margin-top: 24px;
color: #fff;
@include breakpoint (sm) {
margin-top: 5vw;
margin-top: pxVW(80);
}
@include breakpoint (xl) {
margin-top: 72px;
}
}
.state {
color: rgba($color-tertiary, .5);
margin-top: 4px;
color: rgba($color-tertiary, 0.5);
}
}
}
@@ -131,16 +177,24 @@
li {
display: block;
margin: 0 3px;
padding: 0 4px;
cursor: pointer;
&.active a {
&.active button {
background-color: $color-secondary;
}
&:hover {
button {
background-color: lighten($color-lightpurple, 10);
}
}
}
a {
button {
display: block;
width: 8px;
height: 8px;
padding: 0;
background-color: $color-lightpurple;
border-radius: 50vh;
text-decoration: none;
@@ -149,7 +203,10 @@
}
}
// Zoomer
/*
** Zoomer
*/
.zoomer {
opacity: 0;
pointer-events: none;

View File

@@ -8,7 +8,9 @@
}
// Description
.description {
&__description {
margin-left: auto;
margin-right: auto;
margin-bottom: 32px;
@include breakpoint (sm) {
@@ -41,9 +43,12 @@
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
grid-column-gap: 120px;
grid-row-gap: 7.5vw;
grid-row-gap: pxVW(120);
justify-content: center;
margin-bottom: 14.5vw;
margin-bottom: pxVW(232);
}
@include breakpoint (xl) {
margin-bottom: 232px;
}
}
@@ -101,7 +106,7 @@
display: block;
width: 216px;
height: 216px;
background: rgba($color-lightpurple, .3);
background: rgba($color-lightpurple, 0.3);
border-radius: 50vh;
transition: all 85ms ease-in-out;
}

View File

@@ -1,35 +1,44 @@
.photos {
position: relative;
margin-top: -22px;
padding-bottom: 102px;
background-color: #fff;
@include breakpoint (sm) {
margin-top: -128px;
padding-top: 88px;
}
@include breakpoint (xl) {
padding-top: 72px;
padding-bottom: 0;
}
// Sidebar
&__side {
position: absolute;
z-index: 5;
top: 40px;
left: 24px;
height: 96%;
pointer-events: none;
// Sticky
.sticky {
position: sticky;
top: 16px;
display: none;
@include breakpoint (md) {
display: flex;
position: absolute;
z-index: 5;
left: 24px;
flex-direction: row-reverse;
align-items: flex-end;
transform: rotate(270deg) translate(-46%,-240%);
transform-origin: 50% 50%;
}
// Container
&--wrap {
@include breakpoint (md) {
position: sticky;
z-index: 10;
top: 16px;
height: 100%;
}
@include breakpoint (xl) {
top: 32px;
}
}
p {
font-size: rem(12px);
color: $color-lightgray;
@@ -43,13 +52,12 @@
}
}
// Each photo
.photo {
position: relative;
z-index: 4;
margin-bottom: 102px;
margin-bottom: 104px;
@include breakpoint (sm) {
margin-bottom: 120px;
}
@@ -60,59 +68,92 @@
}
}
// List view
/*
** List view
*/
&--list {
& > .wrap {
.photos__view {
max-width: 100%;
margin: 0;
padding: 0;
}
// Photo
.photo {
// Even photos
&:nth-child(even) {
// Location
.photo__location, h2 {
text-align: right;
}
// Image
.photo__image {
justify-content: flex-end;
&--date {
right: 100%;
left: -30px;
}
&--number {
right: 77%;
left: auto;
@include breakpoint (sm) {
.photo {
// Even photos
&:nth-child(even) {
// Location
.photo__location, h2 {
text-align: right;
}
// Image
.photo__image {
justify-content: flex-end;
&--date {
right: 100%;
left: -30px;
}
&--number {
right: 77%;
left: auto;
text-align: right;
}
}
}
}
}
// Pagination
.pagination {
margin-top: 104px;
@include breakpoint (sm) {
margin-top: -64px;
}
}
}
// Grid view
/*
** Grid view
*/
&--grid {
& > .wrap {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-column-gap: 48px;
grid-row-gap: 72px;
padding-left: 192px;
padding-right: 64px;
.photos__view {
@include breakpoint (md) {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-column-gap: 48px;
grid-row-gap: 72px;
padding-left: 192px;
padding-right: 64px;
}
@include breakpoint (xxl) {
padding-left: 192px;
}
@include breakpoint (1648px) {
padding-right: 0;
}
}
// Photo
.photo {
display: flex;
flex-direction: column-reverse;
margin-bottom: 0;
margin-bottom: 72px;
@include breakpoint (md) {
margin-bottom: 0;
}
// Every second (on column 2)
&:nth-child(2n+2) {
transform: translateY(-64px);
@include breakpoint (md) {
transform: translateY(-64px);
}
}
.wrap, .wrapper {
@@ -123,7 +164,7 @@
// Location
&__location {
text-align: left;
h2 {
font-size: rem(28px);
margin-top: 28px;
@@ -152,5 +193,10 @@
}
}
}
// Pagination
.pagination {
margin-top: 64px;
}
}
}

View File

@@ -1,15 +1,6 @@
.explore {
background-color: $color-primary;
overflow-x: hidden;
// Explore section on the Homepage
&--homepage {
margin-top: 15.5vw;
.browse {
margin-top: 0;
}
}
// Top part
&__top {
@@ -19,7 +10,7 @@
align-items: center;
justify-content: center;
position: relative;
@include breakpoint (sm) {
margin-top: 120px;
margin-bottom: 96px;
@@ -28,7 +19,7 @@
a {
position: absolute;
top: -64px;
@include breakpoint (sm){
top: 50%;
left: 0;
@@ -37,34 +28,16 @@
}
}
// Homepage: Of text
.of {
display: flex;
justify-content: center;
margin-bottom: 14vw;
font-family: $font-serif-extra;
font-size: 15.5vw;
line-height: 1;
color: $color-lightpurple;
text-transform: uppercase;
}
// Description
.description {
&__description {
max-width: 312px;
margin: 0 auto;
margin-bottom: 72px;
color: $color-tertiary;
@include breakpoint (sm) {
max-width: 472px;
margin-bottom: 120px;
}
}
// Massive title
.title-massive {
margin-top: -22vw;
margin-left: -60px;
}
}

View File

@@ -1,18 +1,18 @@
// Introduction
.intro {
background-color: $color-tertiary;
overflow-x: hidden;
// Title
.title-massive {
margin-top: -10vw;
margin-left: -10vw;
.title-parallax {
margin-top: -#{pxVW(160)};
margin-left: -#{pxVW(160)};
}
// Description
.description {
&__description {
margin-bottom: 72px;
@include breakpoint (sm) {
margin: 0 auto 120px;
}
@@ -26,6 +26,7 @@
}
}
// Carousel
.carousel {
position: relative;
@@ -39,8 +40,68 @@
right: 0;
display: block;
width: 100%;
height: 48vw;
height: pxVW(768);
background-color: $color-tertiary;
@include breakpoint (xxl) {
height: 820px;
}
}
// Gallery
.gallery {
&__images--photo {
background-color: $color-secondary;
box-shadow: 0 15px 60px rgba(#000, 0.3);
}
}
}
}
// Explore
.explore--homepage {
margin-top: pxVW(248);
@include breakpoint (lg) {
margin-top: 248px;
}
.style-description {
color: $color-tertiary;
}
// Browse
.browse {
margin-top: 0;
}
// Of text
.of {
display: flex;
justify-content: center;
margin-bottom: pxVW(224);
font-family: $font-serif-extra;
font-size: pxVW(248);
line-height: 1;
color: $color-lightpurple;
text-transform: uppercase;
user-select: none;
pointer-events: none;
@include breakpoint (lg) {
margin-bottom: 200px;
font-size: rem(248px);
}
}
// Massive title
.anim-title {
margin-top: -#{pxVW(352)};
margin-left: -60px;
span:nth-of-type(1) {
letter-spacing: -6vw;
}
}
}

View File

@@ -6,11 +6,16 @@
// Title
&__title {
padding: 14vw 0 15vw;
padding: pxVW(224) 0 pxVW(240);
display: flex;
justify-content: center;
align-items: flex-end;
@include breakpoint (xxl) {
padding-top: 240px;
padding-bottom: 280px;
}
h1 {
position: relative;
z-index: 2;
@@ -22,7 +27,7 @@
}
.bottom {
text-align: right;
margin-left: 8vw;
margin-left: pxVW(128);
}
}
@@ -38,17 +43,27 @@
&__description {
position: relative;
z-index: 2;
padding-top: 12.5vw;
padding-top: pxVW(200);
padding-bottom: 72px;
background-color: $color-tertiary;
border-radius: none;
@include breakpoint (m) {
padding-bottom: 96px;
}
@include breakpoint (sm) {
padding-bottom: pxVW(240);
}
@include breakpoint (md) {
border-radius: 8px 0 0 8px;
padding-bottom: 15vw;
}
@include breakpoint (xxl) {
padding-top: 200px;
padding-bottom: 240px;
}
.wrapper {
margin: 0;
max-width: 1280px;
}
p {
@@ -58,6 +73,9 @@
color: $color-text;
@include breakpoint (sm) {
font-size: rem(22px);
}
@include breakpoint (lg) {
font-size: 1rem;
}
}
@@ -69,23 +87,22 @@
strong {
font-family: $font-sans-sb;
color: rgba($color-text, .4);
color: rgba($color-text, 0.4);
}
@include breakpoint (sm) {
display: none;;
display: none;
}
}
// Toggle
.toggle {
display: none;
@include breakpoint (sm) {
display: inline-flex;
@include breakpoint (xs) {
display: none;
}
}
// Right side background completion
&:after {
content: "";
display: block;
@@ -97,9 +114,12 @@
background-color: $color-tertiary;
}
// Wrap
&--wrap {
@include breakpoint (xs) {
padding: 0;
padding: 0;
@include breakpoint (md) {
padding-left: 128px;
}
}
}

View File

@@ -5,9 +5,18 @@
min-height: 560px;
padding-top: 24px;
@include breakpoint (sm) {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
}
// Top part
&__top {
position: absolute;
z-index: 10;
top: 0;
left: 0;
right: 0;
@@ -22,7 +31,7 @@
@include breakpoint (sm) {
position: static;
justify-content: center;
margin: 24px 0 48px;
margin: 24px 0 0;
}
// Tip message
@@ -30,7 +39,7 @@
font-family: $font-sans-sb;
font-size: rem(10px);
text-transform: uppercase;
color: rgba($color-tertiary, .4);
color: rgba($color-tertiary, 0.4);
letter-spacing: 1px;
@include breakpoint (sm) {
@@ -55,13 +64,17 @@
left: 0;
right: 0;
transform: translate3d(0, -37%, 0);
margin: 0;
@include breakpoint (sm) {
position: static;
transform: none;
margin-bottom: 88px;
margin-top: auto;
margin-bottom: auto;
width: 85%;
min-height: 500px;
}
// Gallery
.gallery {
left: 0;
@@ -72,7 +85,7 @@
&__information {
margin-top: 24px;
padding: 0 24px;
@include breakpoint (sm) {
display: flex;
justify-content: space-between;
@@ -90,7 +103,7 @@
// Date
&--date {
color: rgba($color-tertiary, .5);
color: rgba($color-tertiary, 0.5);
font-size: rem(12px);
margin-top: 16px;
@@ -103,27 +116,31 @@
// Photo number
&__number {
display: none;
position: absolute;
z-index: 1;
top: 50%;
transform: translate3d(0, 0%, 0);
left: 0;
top: -33.5vw;
width: 100%;
font-family: $font-serif-extra;
color: rgba($color-tertiary, .4);
font-size: 42vw;
font-size: pxVW(672);
color: rgba($color-tertiary, 0.4);
text-align: center;
pointer-events: none;
user-select: none;
@include breakpoint (sm) {
display: block;
top: auto;
right: 250px;
bottom: -19vw;
right: 112px;
bottom: -240px;
width: auto;
font-size: rem(300px);
font-size: rem(250px);
text-align: right;
}
@include breakpoint (md) {
bottom: -288px;
font-size: rem(300px);
}
}
// Dots

View File

@@ -15,9 +15,11 @@
// Atoms
@import "atoms/button";
@import "atoms/button-outline";
@import "atoms/button-control";
@import "atoms/toggle";
@import "atoms/link";
@import "atoms/switcher";
@import "atoms/cursor";
// Molecules
@import "molecules/photo";

View File

@@ -7,6 +7,22 @@
}
/* PX to VW
========================================================================== */
@function pxVW ($value, $base: $base-width) {
@if $value == 0 { @return 0; }
@return ($value / $base) * 100 + vw;
}
/* VW to PX
========================================================================== */
@function vwPX ($value, $base: $base-width) {
@if $value == 0 { @return 0; }
@return ($value * $base) / 100 + px;
}
/* Headings
========================================================================== */
@function headings ($from: 1, $to: 6) {

View File

@@ -22,7 +22,7 @@
========================================================================== */
// Wrap (global)
.wrap {
max-width: 1424px;
max-width: 1648px;
margin: 0 auto;
padding: 0 24px;
@@ -32,18 +32,21 @@
@include breakpoint (md) {
padding: 0 128px;
}
@include breakpoint (1600px) {
padding: 0 48px;
@include breakpoint (xxl) {
// padding: 0 48px;
}
}
// Wrapper (inside and more spaced)
.wrapper {
margin: 0 auto;
max-width: calc(892px + 28vw);
padding: 0 8vw;
margin: 0 auto;
padding: 0 pxVW(128);
@include breakpoint (sm) {
padding: 0 14vw;
padding: 0 pxVW(224);
}
@include breakpoint (xxl) {
padding: 0 224px;
}
}

View File

@@ -69,6 +69,9 @@
@else if ($size == xl) {
@media (min-width: $screen-xl) { @content; }
}
@else if ($size == xxl) {
@media (min-width: $screen-xxl) { @content; }
}
@else {
@media (min-width: $size) { @content; }
}

View File

@@ -5,9 +5,9 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="shortcut icon" type="image/png" href="/img/favicon.png">
<link rel="stylesheet" href="/bundle.css">
%sapper.base%
%sapper.styles%
%sapper.head%
</head>