Add mobile-first footer

This commit is contained in:
Maciej Matuszewski 2018-01-08 22:05:31 +01:00
parent 26d5335c87
commit 9e88e4336b
5 changed files with 104 additions and 2 deletions

View File

@ -131,6 +131,7 @@ gulp.task('hbs', () => {
'./node_modules/handlebars-layouts'
]
})
.data('./src/hbs/data.json')
.partials('./src/hbs/layouts/*.hbs')
.partials('./src/hbs/partials/**/*.hbs')
)

38
src/hbs/data.json Normal file
View File

@ -0,0 +1,38 @@
{
"footer": {
"links": [
{
"url": "",
"title": "Truebit"
},
{
"url": "",
"title": "Medium"
},
{
"url": "",
"title": "Telegram"
},
{
"url": "",
"title": "Newsletter"
},
{
"url": "",
"title": "Project Proposal"
},
{
"url": "",
"title": "Floor Plans"
},
{
"url": "",
"title": "Collaborator Guidelines"
},
{
"url": "",
"title": "FAQ"
}
]
}
}

View File

@ -1,3 +1,13 @@
<footer>
This is footer
<footer class="footer">
<ul class="footer__list">
{{#each data.footer.links as |link|}}
<li class="footer__list-item">
<a class="footer__link" href="{{ link.url }}">{{ link.title }}</a>
</li>
{{/each}}
</ul>
<div class="footer__attribution">
<span>Designed by:</span>
<strong>EMPIRE</strong>
</div>
</footer>

View File

@ -0,0 +1,52 @@
.footer {
padding: 10px;
font-family: 'Work Sans';
font-size: 12px;
color: $color-gray;
text-transform: uppercase;
&__list {
display: flex;
align-items: center;
flex-wrap: wrap;
justify-content: center;
margin: 0;
padding: 0;
list-style: none;
}
&__link {
display: block;
padding: 10px;
font-weight: 700;
color: inherit;
text-decoration: none;
}
&__attribution {
margin-top: 10px;
padding: 10px;
text-align: center;
}
}
@media #{$screen-sm} {
.footer {
padding: 15px 35px;
}
}
@media #{$screen-lg} {
.footer {
display: flex;
justify-content: space-between;
&__list-item + &__list-item {
margin-left: 20px;
}
&__attribution {
margin: 0;
}
}
}

View File

@ -19,3 +19,4 @@
@import './components/project';
@import './components/structure';
@import './components/team';
@import './components/footer';