Create Location and Locations sections

This commit is contained in:
2021-09-27 23:55:16 +02:00
parent bd89e28e15
commit 1883d5781f
6 changed files with 58 additions and 4 deletions

View File

@@ -13,5 +13,6 @@
<h3 class="location__name"> <h3 class="location__name">
{name} {name}
</h3> </h3>
<span class="text-label">{country.name}</span>
</a> </a>
</div> </div>

View File

@@ -8,7 +8,7 @@
export let photos: any export let photos: any
const globalData: any = getContext('global') const { location, count }: any = getContext('global')
</script> </script>
<Metas <Metas
@@ -34,8 +34,9 @@
</div> </div>
</section> </section>
<p>Discover {count.photos} homes from {count.locations} cities of {count.countries} countries</p>
<Locations <Locations
locations={globalData.location} locations={location}
/> />
</main> </main>

View File

@@ -8,6 +8,7 @@
letter-spacing: -0.04em; letter-spacing: -0.04em;
} }
// Texts // Texts
.text-medium { .text-medium {
font-size: rem(28px); font-size: rem(28px);
@@ -22,3 +23,11 @@
font-weight: 400; font-weight: 400;
line-height: 1.5; line-height: 1.5;
} }
.text-label {
font-size: rem(12px);
line-height: 1.4;
text-transform: uppercase;
letter-spacing: 1px;
}

View File

@@ -0,0 +1,23 @@
.location {
text-align: center;
// Flag
img {
border-radius: 100%;
}
// Link
a {
text-decoration: none;
}
&__name {
display: block;
color: $color-secondary;
margin: 20px 0 -2px;
font-size: rem(48px);
font-family: $font-serif;
font-weight: 300;
line-height: 1.2;
}
span {
color: $color-tertiary;
}
}

View File

@@ -0,0 +1,19 @@
.browse {
&__description {
text-align: center;
}
&__locations {
display: flex;
flex-flow: row wrap;
justify-content: center;
max-width: 1200px;
margin: 128px auto 80px;
justify-items: center;
.location {
margin: 0 40px 80px;
}
}
}

View File

@@ -27,9 +27,10 @@
// Molecules // Molecules
@import "molecules/photo-card"; @import "molecules/photo-card";
@import "molecules/location";
// Organisms // Organisms
// @import "organisms/organism"; @import "organisms/locations";
// Pages // Pages