[Mobile View Nav Toggle]
This commit is contained in:
parent
756e8b2931
commit
7a644428be
19
css/main.css
19
css/main.css
|
@ -67,6 +67,17 @@ a.imgLink div h2 {
|
|||
|
||||
header {
|
||||
background-color: var(--logo-background-color);
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
header a#navToggle {
|
||||
color: white !important;
|
||||
font-size: 64px;
|
||||
display: none;
|
||||
background-color: var(--nav-background-color);
|
||||
padding: 20px 100px 20px 0;
|
||||
text-decoration: none !important;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
nav {
|
||||
|
@ -181,6 +192,14 @@ a.green-text {
|
|||
}
|
||||
|
||||
@media only screen and (max-width: 885px) {
|
||||
header a#navToggle {
|
||||
display: block;
|
||||
}
|
||||
|
||||
header nav {
|
||||
display: none;
|
||||
}
|
||||
|
||||
nav ul li {
|
||||
display: block;
|
||||
font-size: 200%;
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
var nav = document.getElementsByTagName("nav")[0];
|
||||
|
||||
function ToggleNav() {
|
||||
showNav = nav.style.display != "" && nav.style.display != "none";
|
||||
if (showNav) {
|
||||
nav.style.display = "none";
|
||||
} else {
|
||||
nav.style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener("resize", function(){
|
||||
if (window.innerWidth > 885) {
|
||||
nav.style.display = "block";
|
||||
} else {
|
||||
nav.style.display = "none";
|
||||
}
|
||||
});
|
|
@ -1,4 +1,4 @@
|
|||
![Raum 2 mit gemütlichen Sofas](/images/header.jpg)
|
||||
[![Raum 2 mit gemütlichen Sofas](/images/header.jpg)](https://www.chaostreff-dortmund.de/rundgang/)
|
||||
|
||||
# Hi
|
||||
|
||||
|
|
|
@ -10,11 +10,13 @@
|
|||
{% for item in css %}
|
||||
<link rel="stylesheet" href="/css/{{ item }}.css">
|
||||
{% endfor %}
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="newBanner"><a href="https://www.chaostreff-dortmund.de/rundgang/" target="_blank">Rundgang</a></div>
|
||||
<!-- <div class="newBanner"><a href="https://www.chaostreff-dortmund.de/rundgang/" target="_blank">Rundgang</a></div> -->
|
||||
|
||||
<header>
|
||||
<a href="#" onclick="ToggleNav()" id="navToggle">=</a>
|
||||
<nav>
|
||||
<ul>
|
||||
{% for item in nav %}
|
||||
|
@ -42,9 +44,11 @@
|
|||
<ul>
|
||||
<li> <a href="/?page=impressum">impressum</a> </li>
|
||||
<li> <a href="/?page=datenschutz">datenschutz</a> </li>
|
||||
<li> <a href="https://git.ctdo.de/xoy/ctdo.de/_edit/main/{{ file_to_edit }}" target="_blank">Seite bearbeiten</a> </li>
|
||||
<li> <a href="https://git.ctdo.de/xoy/ctdo.de/_edit/main/{{ file_to_edit }}" target="_blank">seite bearbeiten</a> </li>
|
||||
</ul>
|
||||
</nav>
|
||||
</footer>
|
||||
|
||||
<script src="js/nav.js"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue