Readapt the misuse of BEM, Code organization
- -- is only for a modifier, not a child "child". Use master__child without the parent__ in it to make it more readable. https://www.smashingmagazine.com/2016/06/battling-bem-extended-edition-common-problems-and-how-to-avoid-them/ - Redefine atom design components
This commit is contained in:
@@ -1,118 +0,0 @@
|
||||
/* ==========================================================================
|
||||
FOOTER
|
||||
========================================================================== */
|
||||
.footer {
|
||||
background-color: #2D0458;
|
||||
|
||||
.wrap {
|
||||
display: block;
|
||||
padding-top: 48px;
|
||||
padding-bottom: 32px;
|
||||
|
||||
@include breakpoint (sm) {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 120px;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Left part
|
||||
&__left {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: 40px;
|
||||
|
||||
@include breakpoint (sm) {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Right part
|
||||
&__right {
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
|
||||
@include breakpoint (sm) {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
li {
|
||||
display: block;
|
||||
text-align: center;
|
||||
|
||||
& > ul {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: 32px;
|
||||
|
||||
@include breakpoint (sm) {
|
||||
margin-bottom: 0;
|
||||
margin-right: 24px;
|
||||
}
|
||||
|
||||
li {
|
||||
margin: 0 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
position: relative;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
transition: color 85ms $ease-inout;
|
||||
|
||||
img {
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
// Hover
|
||||
&:hover {
|
||||
color: $color-secondary;
|
||||
}
|
||||
}
|
||||
|
||||
// Instagram
|
||||
.instagram {
|
||||
a {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
img {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
// Collective
|
||||
.cetrucflotte {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
span {
|
||||
color: rgba(#fff, 0.4)
|
||||
}
|
||||
|
||||
img {
|
||||
display: inline-block;
|
||||
margin: 8px 0 0 12px;
|
||||
transition: transform 400ms $ease-quart;
|
||||
will-change: transform;
|
||||
|
||||
@include breakpoint (sm) {
|
||||
margin-left: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
// Hover
|
||||
a:hover img {
|
||||
transform: scale(1.025);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
85
src/style/molecules/_location.scss
Normal file
85
src/style/molecules/_location.scss
Normal file
@@ -0,0 +1,85 @@
|
||||
// Location
|
||||
.location {
|
||||
position: relative;
|
||||
margin-bottom: 48px;
|
||||
|
||||
@include breakpoint (sm) {
|
||||
margin-left: pxVW(72);
|
||||
margin-right: pxVW(72);
|
||||
}
|
||||
@include breakpoint (xl) {
|
||||
margin-left: 72px;
|
||||
margin-right: 72px;
|
||||
}
|
||||
|
||||
a {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
// Flag image
|
||||
img {
|
||||
display: block;
|
||||
width: 32px;
|
||||
height: auto;
|
||||
margin: 0 auto;
|
||||
border-radius: 50vh;
|
||||
}
|
||||
|
||||
// City
|
||||
&__city {
|
||||
font-family: $font-serif;
|
||||
font-size: rem(32px);
|
||||
color: $color-secondary;
|
||||
|
||||
@include breakpoint (sm) {
|
||||
font-size: rem(48px);
|
||||
}
|
||||
}
|
||||
.mask-city {
|
||||
height: 40px;
|
||||
margin: 24px 0 16px;
|
||||
|
||||
@include breakpoint (sm) {
|
||||
height: 64px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
}
|
||||
.mask-country {
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
// Hover
|
||||
&:hover {
|
||||
.location__city {
|
||||
color: $color-tertiary;
|
||||
}
|
||||
|
||||
&:after {
|
||||
opacity: 1;
|
||||
transform: translate(-50%, -50%) scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
// Shape on hover
|
||||
&:after {
|
||||
content: "";
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%) scale(0.94);
|
||||
display: block;
|
||||
width: 216px;
|
||||
height: 216px;
|
||||
background: rgba($color-lightpurple, 0.3);
|
||||
border-radius: 50vh;
|
||||
transition: all 85ms ease-in-out;
|
||||
}
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
// Pagination
|
||||
.pagination {
|
||||
position: relative;
|
||||
padding: 64px 0 72px;
|
||||
background-color: $color-tertiary;
|
||||
text-align: center;
|
||||
|
||||
@include breakpoint (sm) {
|
||||
padding: pxVW(176) 0 pxVW(120);
|
||||
}
|
||||
@include breakpoint (xl) {
|
||||
padding: 176px 0 120px;
|
||||
}
|
||||
|
||||
// Pages
|
||||
&__page {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 0 auto;
|
||||
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 {
|
||||
overflow: hidden;
|
||||
height: 62px;
|
||||
margin-right: 4px;
|
||||
|
||||
@include breakpoint (sm) {
|
||||
height: 136px;
|
||||
}
|
||||
|
||||
.scroll {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
transform: translate(0, 0);
|
||||
text-align: right;
|
||||
line-height: 0.85;
|
||||
transition: transform 325ms $ease-cubic;
|
||||
will-change: transform;
|
||||
}
|
||||
}
|
||||
|
||||
// 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(40px);
|
||||
}
|
||||
}
|
||||
|
||||
// Hover
|
||||
&:hover {
|
||||
color: rgba($color-text, 0.25);
|
||||
}
|
||||
}
|
||||
|
||||
// Caption
|
||||
&__caption {
|
||||
max-width: 420px;
|
||||
margin: 0 auto;
|
||||
font-size: 10px;
|
||||
color: $color-lightgray;
|
||||
letter-spacing: 2px;
|
||||
line-height: 1.6;
|
||||
|
||||
@include breakpoint (sm) {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
// Message
|
||||
&__message {
|
||||
padding: pxVW(40) 0;
|
||||
|
||||
h3 {
|
||||
font-family: $font-serif;
|
||||
font-size: rem(32px);
|
||||
color: $color-secondary;
|
||||
margin-bottom: 16px;
|
||||
|
||||
@include breakpoint (sm) {
|
||||
font-size: rem(40px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -48,45 +48,45 @@
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Image container
|
||||
&--img {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
// Image itself
|
||||
&__picture {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
display: block;
|
||||
width: 100%;
|
||||
border-radius: 0;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 8px 18px rgba(#715E4E, 0.2);
|
||||
user-select: none;
|
||||
|
||||
@include breakpoint (sm) {
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
border-radius: 0;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 8px 18px rgba(#715E4E, 0.2);
|
||||
user-select: none;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
@include breakpoint (sm) {
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
// Overlay
|
||||
&:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background-color: $color-primary;
|
||||
display: block;
|
||||
z-index: 3;
|
||||
transition: opacity 150ms $ease-inout;
|
||||
}
|
||||
// Overlay
|
||||
&:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background-color: $color-primary;
|
||||
display: block;
|
||||
z-index: 3;
|
||||
transition: opacity 150ms $ease-inout;
|
||||
}
|
||||
|
||||
a {
|
||||
@@ -103,49 +103,49 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Date (on the side)
|
||||
&--date {
|
||||
display: block;
|
||||
margin-top: 16px;
|
||||
padding: 0 pxVW(128);
|
||||
font-size: rem(14px);
|
||||
color: $color-lightgray;
|
||||
// Date (on the side)
|
||||
&__date {
|
||||
display: block;
|
||||
margin-top: 16px;
|
||||
padding: 0 pxVW(128);
|
||||
font-size: rem(14px);
|
||||
color: $color-lightgray;
|
||||
|
||||
@include breakpoint (sm) {
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
left: calc(100% + 30px);
|
||||
bottom: 0;
|
||||
transform: rotate(270deg);
|
||||
transform-origin: 0 0;
|
||||
white-space: nowrap;
|
||||
line-height: 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Photo number
|
||||
&--number {
|
||||
@include breakpoint (sm) {
|
||||
position: absolute;
|
||||
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;
|
||||
z-index: 3;
|
||||
left: calc(100% + 30px);
|
||||
bottom: 0;
|
||||
transform: rotate(270deg);
|
||||
transform-origin: 0 0;
|
||||
white-space: nowrap;
|
||||
line-height: 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@include breakpoint (sm) {
|
||||
font-size: pxVW(300);
|
||||
left: 92%;
|
||||
top: 50%;
|
||||
z-index: 1;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
@include breakpoint (xxl) {
|
||||
font-size: rem(300px);
|
||||
}
|
||||
// Photo number
|
||||
&__number {
|
||||
position: absolute;
|
||||
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: pxVW(300);
|
||||
left: 92%;
|
||||
top: 50%;
|
||||
z-index: 1;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
@include breakpoint (xxl) {
|
||||
font-size: rem(300px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user