diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2016-08-22 17:27:43 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2016-08-22 17:27:43 +0200 |
| commit | 2f30ecf9479dd3d756dfc269a4c7ebd2411bf92b (patch) | |
| tree | f44b827b9fe75ef5b3abb11a08cff1ed1ac64a7a /themes | |
| parent | 9a357875fd1b6ea1b8e7f3ca8f74398c110228f5 (diff) | |
| download | pragblog-2f30ecf9479dd3d756dfc269a4c7ebd2411bf92b.tar.gz pragblog-2f30ecf9479dd3d756dfc269a4c7ebd2411bf92b.zip | |
mobile: use sidenav; fix typo that caused the navbar to break
Diffstat (limited to 'themes')
| -rw-r--r-- | themes/flog/layouts/partials/footer.html | 2 | ||||
| -rw-r--r-- | themes/flog/layouts/partials/header.html | 17 |
2 files changed, 16 insertions, 3 deletions
diff --git a/themes/flog/layouts/partials/footer.html b/themes/flog/layouts/partials/footer.html index c499460..a617ce6 100644 --- a/themes/flog/layouts/partials/footer.html +++ b/themes/flog/layouts/partials/footer.html @@ -11,6 +11,8 @@ }; function ready() { parallax(); + $('.button-collapse').sideNav(); + $('.button-collapse').sideNav('hide'); }; $(document).ready(function() { $(window).scroll(parallax); diff --git a/themes/flog/layouts/partials/header.html b/themes/flog/layouts/partials/header.html index 5b85cdb..a65b772 100644 --- a/themes/flog/layouts/partials/header.html +++ b/themes/flog/layouts/partials/header.html @@ -14,15 +14,26 @@ <header> <nav class="teal lighten-2"> <div class="nav-wrapper"> - <a href="/" class="brand-logo center">{{ .Title }}</a> - <ul class="left"> + <a href="/" class="brand-logo">{{ .Title }}</a> + <a href="#" data-activates="slide-sections" class="button-collapse"> + <i class="material-icons">menu</i> + </a> + <ul class="right hide-on-med-and-down"> {{ $active_section := (or .Section (or (and (not .IsPage) (lower .Title)) "")) }} {{ range $section, $p := .Site.Sections }} <li{{ if eq $active_section $section }} class="active"{{ end }}> <a href="/{{ $section }}/">{{ $section }}</a> </li> {{ end }} - <ul> + </ul> <!-- menu large --> + <ul id="slide-sections" class="side-nav"> + {{ $active_section := (or .Section (or (and (not .IsPage) (lower .Title)) "")) }} + {{ range $section, $p := .Site.Sections }} + <li{{ if eq $active_section $section }} class="active"{{ end }}> + <a href="/{{ $section }}/">{{ $section }}</a> + </li> + {{ end }} + </ul> <!-- menu side --> </div> </nav> </header> |
