1
Fork 0

Convert navigation to primarily sidebar

This commit is contained in:
Jake Howard 2020-05-02 12:53:02 +01:00
parent c07394768e
commit 15c25e5cdb
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 28 additions and 9 deletions

View file

@ -2,6 +2,8 @@
@import "homepage"; @import "homepage";
$sidenav-width: 275px;
body { body {
display: flex; display: flex;
min-height: 100vh; min-height: 100vh;
@ -10,8 +12,27 @@ body {
main { main {
flex: 1 0 auto; flex: 1 0 auto;
@media #{$large-and-up} {
margin-left: $sidenav-width;
}
} }
footer.page-footer { footer.page-footer {
padding-top: 0; padding-top: 0;
} }
.sidenav {
width: $sidenav-width;
@media #{$large-and-up} {
transform: translateX(0) !important;
}
}
nav {
@media #{$large-and-up} {
display: none;
}
}

View file

@ -21,18 +21,13 @@
<nav> <nav>
<div class="nav-wrapper black"> <div class="nav-wrapper black">
<a href="#" class="brand-logo right">Logo</a> <a href="#" class="brand-logo right">Logo</a>
<a href="#" data-target="mobile-nav" class="sidenav-trigger">menu</a> <a href="#" data-target="nav" class="sidenav-trigger">menu</a>
<ul id="nav-mobile" class="left hide-on-med-and-down">
{% include "navigation/index.html" %}
</ul>
</div> </div>
</nav> </nav>
<ul class="sidenav" id="mobile-nav">
{% include "navigation/index.html" %}
</ul>
</header> </header>
{% include "navigation/index.html" %}
<main> <main>
{% block main %} {% block main %}
<div class="container"> <div class="container">

View file

@ -1 +1,4 @@
<ul class="sidenav" id="nav">
{% include "navigation/item.html" with reverse="homepage" text="Home" %}
{% include "navigation/item.html" with reverse="about" text="About" %} {% include "navigation/item.html" with reverse="about" text="About" %}
</ul>