Files
housesof/src/style/molecules/_location.scss
Félix Péault cd609cd710 Add a badge on locations for new photos
- The last updated date is taken from the latest photo of each location (without any other API call, just some data manipulation)
- Manipulation of data in the preload request instead of the code
2020-05-06 17:12:07 +02:00

99 lines
1.9 KiB
SCSS

// Location
.location {
position: relative;
margin-bottom: 48px;
&, a * {
will-change: transform, opacity;
}
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: 50%;
}
// City
&__city {
font-family: $font-serif;
font-size: rem(32px);
color: $color-secondary;
@include breakpoint (md) {
font-size: rem(48px);
}
}
// Masks
.mask-city {
height: 40px;
margin: 16px 0 12px;
@include breakpoint (md) {
height: 64px;
margin-top: 24px;
}
}
.mask-country {
height: 16px;
}
// Badge
.badge {
margin-top: 16px;
@include breakpoint (sm) {
margin-top: 24px;
}
}
// Hover
&:hover {
.location__city {
color: $color-tertiary;
}
&:after {
opacity: 1;
transform: scale(1) translate(-50%, -50%);
}
}
// Shape on hover
&:after {
content: "";
pointer-events: none;
opacity: 0;
position: absolute;
z-index: 1;
top: 50%;
left: 50%;
transform: scale(0.6) translate(-50%, -50%) translateZ(0);
transform-origin: 0 0;
display: block;
width: 184px;
height: 184px;
background: rgba($color-lightpurple, 0.3);
border-radius: 50%;
transition: transform 0.3s $ease-quart, opacity 0.3s $ease-quart;
will-change: transform;
@include breakpoint (sm) {
width: 216px;
height: 216px;
}
}
}