forked from data.coop/website
Tweak tweak tweak tweak
This commit is contained in:
parent
8af9ecc791
commit
da27da80a7
|
@ -191,6 +191,7 @@ aside header a img {
|
||||||
body {
|
body {
|
||||||
flex-direction : column;
|
flex-direction : column;
|
||||||
border : 0;
|
border : 0;
|
||||||
|
line-height : 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
aside {
|
aside {
|
||||||
|
@ -208,11 +209,6 @@ aside header a img {
|
||||||
margin : calc(var(--base-grid) / 2) var(--base-grid);
|
margin : calc(var(--base-grid) / 2) var(--base-grid);
|
||||||
}
|
}
|
||||||
|
|
||||||
aside header a {
|
|
||||||
width : 35%;
|
|
||||||
max-width : 35%;
|
|
||||||
}
|
|
||||||
|
|
||||||
aside nav {
|
aside nav {
|
||||||
display : none;
|
display : none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
<aside>
|
<aside>
|
||||||
<header>
|
<header>
|
||||||
<a href="index.html"><img src="{{ printf "/static/img/logo_%s.svg" .Site.Language.Lang | absURL }}" alt="data coop logo" width="240" height="140"></a>
|
<a href="index.html"><img src="{{ printf "/static/img/logo_%s.svg" .Site.Language.Lang | absURL }}" alt="data coop logo" width="240" height="140"></a>
|
||||||
|
|
||||||
<div class="nav-toggle" id="nav-toggle-header">
|
<div class="nav-toggle" id="nav-toggle-header">
|
||||||
<span id="nav-toggle-a"></span>
|
<span id="nav-toggle-a"></span>
|
||||||
<span id="nav-toggle-b"></span>
|
<span id="nav-toggle-b"></span>
|
||||||
|
@ -19,20 +20,20 @@
|
||||||
</article>
|
</article>
|
||||||
</main>
|
</main>
|
||||||
<script>
|
<script>
|
||||||
var menu = document.getElementById("nav-toggle-header")
|
var menu = document.getElementById("nav-toggle-header");
|
||||||
var nav = document.getElementsByTagName('nav')[0]
|
var nav = document.getElementsByTagName('nav')[0];
|
||||||
|
|
||||||
function toggleMenu() {
|
function toggleMenu() {
|
||||||
if ( menu.classList.contains("display") ) {
|
if ( menu.classList.contains("display") ) {
|
||||||
menu.classList.remove("display")
|
menu.classList.remove("display");
|
||||||
nav.classList.remove("display")
|
nav.classList.remove("display");
|
||||||
} else {
|
} else {
|
||||||
menu.classList.add("display")
|
menu.classList.add("display");
|
||||||
nav.classList.add("display")
|
nav.classList.add("display");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
menu.addEventListener( "click", toggleMenu )
|
menu.addEventListener("click", toggleMenu);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -3,5 +3,4 @@
|
||||||
<h1>{{ .Title | markdownify }}</h1>
|
<h1>{{ .Title | markdownify }}</h1>
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
|
||||||
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<nav>
|
<nav>
|
||||||
<ol>
|
<ol>
|
||||||
|
{{ $currentPage := . }}
|
||||||
{{ range .Site.Menus.nav }}
|
{{ range .Site.Menus.nav }}
|
||||||
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
<li><a href="{{ .URL }}" class="{{ if $currentPage.IsMenuCurrent "nav" . }}active{{ end }}">{{ .Name }}</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
@ -13,4 +14,3 @@
|
||||||
</ol>
|
</ol>
|
||||||
</footer>
|
</footer>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue