You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
podgrab/client/navbar.html

189 lines
4.1 KiB

4 years ago
{{define "navbar"}}
<style>
/* Larger than tablet */
4 years ago
@media (min-width: 750px) {
4 years ago
.navbar + .docs-section {
border-top-width: 0; }
.navbar,
.navbar-spacer {
display: block;
width: 100%;
height: 6.5rem;
4 years ago
background:var(--background);
4 years ago
z-index: 99;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee; }
.navbar-spacer {
display: none; }
.navbar > .container {
width: 100%; }
.navbar-list {
list-style: none;
margin-bottom: 0; }
.navbar-item {
position: relative;
float: left;
margin-bottom: 0; }
.navbar-link {
text-transform: uppercase;
font-size: 11px;
font-weight: 600;
letter-spacing: .2rem;
margin-right: 35px;
text-decoration: none;
line-height: 6.5rem;
4 years ago
color: var(--text-color);}
4 years ago
.navbar-link.active {
color: #33C3F0; }
.has-docked-nav .navbar {
position: fixed;
top: 0;
left: 0; }
.has-docked-nav .navbar-spacer {
display: block; }
/* Re-overiding the width 100% declaration to match size of % based container */
.has-docked-nav .navbar > .container {
width: 80%; }
/* } */
4 years ago
}
4 years ago
#overlay, .drawer{
4 years ago
display: none;
}
@media (max-width: 750px) {
4 years ago
.drawer {
height: 100%;
width: 160px;
position: fixed;
z-index: 1000;
top: 0;
left: -160px;
overflow-x: hidden;
padding-top: 20px;
overflow-x: hidden; /* Disable horizontal scroll */
display: block;
4 years ago
transition: 0.25s ease; /* 0.5 second transition effect to slide in the sidenav */
4 years ago
}
.drawer li{
list-style: none;
display: block;
}
.drawer li>a {
padding-top: 10px;
padding-left: 10px;
text-decoration: none;
display: block;
text-transform: uppercase;
font-size: 11px;
font-weight: 600;
letter-spacing: .2rem;
line-height: 2.5rem;
4 years ago
4 years ago
}
div#overlay{
4 years ago
background-color: var(--overlay);
4 years ago
opacity: 0.5;
height: 100%;
width: 100%;
position: fixed;
z-index: 990;
top: 0;
left: 0;
display: none;
4 years ago
}
4 years ago
#burger{
position: absolute;
margin-top:10px;
left: 10px;
}
#burger div{
4 years ago
width: 30px;
4 years ago
height: 2px;
4 years ago
background-color: var(--text-color);;
4 years ago
margin: 6px 0;
}
.bar1, .bar2, .bar3 {
4 years ago
width: 15px;
4 years ago
height: 2px;
4 years ago
background-color: var(--text-color);;
4 years ago
margin: 6px 0;
}
#closeDrawer{
display: inline-block;
position: absolute;
4 years ago
top: 5px;
right: 5px;
4 years ago
}
#closeDrawer .bar1{
4 years ago
-webkit-transform: rotate(-45deg) translate(-7px, 6px) ;
transform: rotate(-45deg) translate(-7x, 6px) ;
4 years ago
}
#closeDrawer .bar3{
4 years ago
-webkit-transform: rotate(45deg) translate(1px, 1px) ;
transform: rotate(45deg) translate(1px, 1px) ;
4 years ago
}
}
4 years ago
</style>
4 years ago
<section class="header">
<a id="burger" onclick="toggleMenu()" >
<div></div>
<div></div>
<div></div>
</a>
<h1>{{ .title }}</h1>
</section>
4 years ago
<nav class="navbar">
<div class="container">
<ul class="navbar-list">
<li class="navbar-item"><a class="navbar-link" href="/">Home</a></li>
<li class="navbar-item"><a class="navbar-link" href="/episodes">Episodes</a></li>
<li class="navbar-item"><a class="navbar-link" href="/add">Add Podcast</a></li>
<li class="navbar-item"><a class="navbar-link" href="/player">Player</a></li>
<li class="navbar-item"><a class="navbar-link" href="/settings">Settings</a></li>
4 years ago
</ul>
</div>
</nav>
4 years ago
<div class="drawer" id="sideDrawer">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/episodes">Episodes</a></li>
<li><a href="/add">Add Podcast</a></li>
<li><a href="/player">Player</a></li>
4 years ago
<li><a href="/settings">Settings</a></li>
</ul>
<div id="closeDrawer" onclick="toggleMenu()" >
<div class="bar1"></div>
<div class="bar3"></div>
</div>
</div>
<div id="overlay" onclick="toggleMenu()"></div>
<script>
function toggleMenu(){
var sideDrawer= document.getElementById('sideDrawer')
var overlay= document.getElementById('overlay')
4 years ago
if(overlay.style.display==="block"){
sideDrawer.style.left="-160px"
overlay.style.display="none"
}else{
sideDrawer.style.left="0px"
overlay.style.display="block"
}
}
</script>
4 years ago
{{end}}