Create Location and Locations sections
This commit is contained in:
@@ -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>
|
||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
23
src/style/molecules/_location.scss
Normal file
23
src/style/molecules/_location.scss
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
19
src/style/organisms/_locations.scss
Normal file
19
src/style/organisms/_locations.scss
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user