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
This commit is contained in:
2020-05-06 17:12:07 +02:00
parent 3230cfa0d0
commit cd609cd710
8 changed files with 132 additions and 44 deletions

View File

@@ -2,6 +2,7 @@
$color-primary: #3C0576;
$color-primary-darker: #2D0458;
$color-secondary: #FF6C89;
$color-secondary-light: #FFB3C2;
$color-secondary-bright: #FF0536;
$color-text: #333;
$color-tertiary: #FFE0C5;

View File

@@ -0,0 +1,27 @@
/*
** Badge
*/
.badge {
display: inline-flex;
align-items: center;
justify-content: center;
color: $color-primary-darker;
font-family: $font-sans-sb;
text-transform: uppercase;
letter-spacing: 1px;
background-color: $color-secondary-light;
box-shadow: 0 0 0 4px rgba($color-tertiary, 0.15);
border-radius: 50vh;
// Small size
&--small {
height: 14px;
padding: 0 4px;
font-size: rem(7px);
line-height: 14px;
span {
margin-top: 0.25em;
}
}
}

View File

@@ -35,18 +35,29 @@
font-size: rem(48px);
}
}
.mask-city {
height: 40px;
margin: 24px 0 16px;
@include breakpoint (md) {
height: 64px;
margin-bottom: 24px;
}
// Masks
.mask-city {
height: 40px;
margin: 16px 0 12px;
@include breakpoint (md) {
height: 64px;
margin-top: 24px;
}
.mask-country {
height: 16px;
}
.mask-country {
height: 16px;
}
// Badge
.badge {
margin-top: 16px;
@include breakpoint (sm) {
margin-top: 24px;
}
}
// Hover
&:hover {

View File

@@ -22,6 +22,7 @@
@import "atoms/link";
@import "atoms/switcher";
@import "atoms/counter";
@import "atoms/badge";
// Molecules
@import "molecules/location";