diff options
author | Parsia Hakimian <parsiya@users.noreply.github.com> | 2017-11-29 18:13:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-29 18:13:28 +0300 |
commit | a991866fe5c9e884b1904091b706fdc81de2bbad (patch) | |
tree | f65559801b53de93312afad2c21b648c7cc982cd | |
parent | 3d19e6e7d06034a0560616d0ca0c6d4927603267 (diff) |
Make menu appear in mobile navigation - JavaScript version (#45)
* Add mobile navigation to CSS and navigation partial (needs JavaScript)
-rw-r--r-- | layouts/partials/navigation.html | 13 | ||||
-rw-r--r-- | static/css/hugo-octopress.css | 4 |
2 files changed, 14 insertions, 3 deletions
diff --git a/layouts/partials/navigation.html b/layouts/partials/navigation.html index 55ce539..c371715 100644 --- a/layouts/partials/navigation.html +++ b/layouts/partials/navigation.html @@ -1,5 +1,16 @@ -<!-- reading menu items from config file --> +<!-- mobile navigation --> +<fieldset class="mobile-nav"> + <!-- this needs JavaScript but works until I manage to make one with CSS without wrecking the site --> + <select onchange="location = this.value;"> + <option value="">Navigate…</option> + {{ range .Site.Menus.main }} + <option value="{{ .URL | absURL }}">» {{ .Name }}</option> + {{ end }} +<!-- <option value="{{ "/index.xml" | absURL }}">» RSS</option> --> + </select> +</fieldset> +<!-- reading menu items from config file --> <ul class="main-navigation"> <!-- links to root open in the same window - other links will be opened in a new window if navigationNewWindow is set to true in the config file --> {{ range .Site.Menus.main }} diff --git a/static/css/hugo-octopress.css b/static/css/hugo-octopress.css index 64df93a..af06a61 100644 --- a/static/css/hugo-octopress.css +++ b/static/css/hugo-octopress.css @@ -178,7 +178,7 @@ body>div>div { background: #f8f8f8 top left; border-right: 1px solid #e0e0e0 } -.heading, +/*.heading, body>header h1, h1, h2, @@ -187,7 +187,7 @@ h4, h5, h6 { font-family: "PT Serif", "Georgia", "Helvetica Neue", Arial, sans-serif -} +}*/ .sans, body>header h2, article header p.meta, |