{{ .Title }} diff --git a/layouts/partials/nav-bar.html b/layouts/partials/nav-bar.html index b95004a..970897c 100644 --- a/layouts/partials/nav-bar.html +++ b/layouts/partials/nav-bar.html @@ -1,12 +1,13 @@ mdd - + + Home {{ range $key, $value := .Site.Taxonomies.categories }} - {{ $key | humanize }} + {{ $key | humanize }} {{ end }} diff --git a/static/css/style.css b/static/css/style.css index a1ff2ca..02e652c 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -9,6 +9,8 @@ body { display: flex; flex-direction: column; align-items: center; + width: 100%; + box-sizing: border-box; } p { margin: 1em 0; @@ -31,11 +33,12 @@ strong { } .nav-text { text-decoration: none; + z-index: 105; } .hamburger-menu { display: block; position: relative; - z-index: 1; + z-index: 105; -webkit-user-select: none; user-select: none; } @@ -47,7 +50,7 @@ strong { top: -9px; cursor: pointer; opacity: 0; /* hide this */ - z-index: 2; /* and place it over the hamburger */ + z-index: 500; /* and place it over the hamburger */ -webkit-touch-callout: none; } .hamburger-menu span { @@ -57,7 +60,7 @@ strong { position: relative; background: #3A3B3C; border-radius: 3px; - z-index: 1; + z-index: 105; transform-origin: center; transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0), background 0.5s cubic-bezier(0.77,0.2,0.05,1.0), @@ -68,34 +71,48 @@ strong { } .hamburger-menu input:checked ~ span { opacity: 1; + background: white; transform: rotate(45deg) translate(3.2px , 3.2px); } .hamburger-menu input:checked ~ span:nth-last-child(2) { transform: rotate(-45deg) translate(3.2px , -3.2px); } .hamburger-menu input ~ ul { - display: none; - text-align: center; - padding: 3em 0 0 0; - transition: all 1s cubic-bezier(0.77,0.2,0.05,1.0); -} -.hamburger-menu > ul > li > a { - text-decoration: none; - font-size: 2em; - line-height: 1.7; - color: white; -} -.hamburger-menu input:checked ~ ul { display: block; position: fixed; + box-sizing: border-box; top: 0; left: 0; width: 100%; height: 100%; - box-sizing: border-box; + z-index: 100; + text-align: center; + visibility: hidden; + overflow-y: hidden; margin: 0; - background-color: rgba(0, 0, 0, 0.8); + padding: 3em 0 0 0; + background-color: rgb(0, 0, 0); + opacity: 0; + transition: visibility 0.3s ease-out, opacity 0.3s ease-out; } +.hamburger-menu input:checked ~ ul { + visibility: visible; + opacity: 0.9; + overflow-y: scroll; +} +.hamburger-menu > ul > li > a { + text-decoration: none; + text-transform: uppercase; + font-size: 2em; + line-height: 1.7; + color: white; + transition: all 0.5s ease-out; + /* opacity: 0; */ +} +/* .hamburger-menu input:checked ~ ul li a { + font-size: 1.8em; + opacity: 1; +} */ .post { margin: 0 0 1em 0; line-height: 1.5; @@ -230,7 +247,7 @@ strong { } .end-nav { width: 100%; - max-width: 47rem; + max-width: 49rem; } .pagination-nav { margin: 2em 0; @@ -256,17 +273,26 @@ strong { transform: scale(1); } .side-gutter { - margin-left: 0.7rem !important; - margin-right: 0.7rem !important; + margin-left: 1rem !important; + margin-right: 1rem !important; } .side-padding { - padding-left: 0.7rem !important; - padding-right: 0.7rem !important; + padding-left: 1rem !important; + padding-right: 1rem !important; + box-sizing: border-box !important; +} +.side-text-padding { + padding-left: 1.2rem !important; + padding-right: 1.2rem !important; box-sizing: border-box !important; } .muted-text { color: #7A7B7C; } +.no-scroll { + overflow: hidden; + position: fixed; +} h1, h2, h3, h4, h5, h6 { margin: 1.5em 0 0.7em 0; } diff --git a/static/js/core.js b/static/js/core.js index efd5859..56f8e9f 100644 --- a/static/js/core.js +++ b/static/js/core.js @@ -1,8 +1,20 @@ + function cardPressed() { this.classList.add('card-hover'); } function cardReleased() { this.classList.remove('card-hover'); +} + +function hamburgerMenuPressed() { + if (document.body.classList.contains('no-scroll')) { + document.body.classList.remove('no-scroll'); + document.body.style.paddingRight = 0 + "px"; + } else { + document.body.style.paddingRight = window.innerWidth - document.documentElement.clientWidth + "px"; + document.body.classList.add('no-scroll'); + } + } \ No newline at end of file