aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Johnson <nick@nicksphere.ch>2022-08-07 00:00:00 +0000
committerNicholas Johnson <nick@nicksphere.ch>2022-08-07 00:00:00 +0000
commitf1ae34beda32d80198919ba473997215715c1a6c7b1cce6dd3cb0811d0c95833 (patch)
tree70a7e5f63436f7a650f3f1208cdb29164f53462d74672004c77b0f71815e1a22
parent076d4192afd7efa39def78ba0b01956aaa46e804894009d77f06300b8bb4a8d5 (diff)
downloadhugo-theme-journal-f1ae34beda32d80198919ba473997215715c1a6c7b1cce6dd3cb0811d0c95833.tar.gz
hugo-theme-journal-f1ae34beda32d80198919ba473997215715c1a6c7b1cce6dd3cb0811d0c95833.zip
Space out nav links for mobile devices
-rw-r--r--layouts/_default/single.html2
-rw-r--r--layouts/index.html6
-rw-r--r--static/css/style.css10
3 files changed, 14 insertions, 4 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 54aafbb..d4efead 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,6 +1,6 @@
{{ define "main" -}}
<nav>
- <p><a href="/" rel="noreferrer">Return to homepage</a></p>
+ <p class="return"><a href="/" rel="noreferrer">Return to homepage</a></p>
</nav>
<main>
{{ .Content -}}
diff --git a/layouts/index.html b/layouts/index.html
index 02bf301..c98c1f2 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -4,11 +4,11 @@
<p>{{ .Site.Params.indexIntro }}</p>
<h2>Navigation Links</h2>
<nav>
- <p>
+ <ul>
{{- range .Site.Menus.main }}
- <a href="{{ .URL }}" rel="noreferrer">{{ .Name }}</a><br>
+ <li class="navlink"><a href="{{ .URL }}" rel="noreferrer">{{ .Name }}</a></li>
{{- end }}
- </p>
+ </ul>
</nav>
<h2>Journal Entries</h2>
{{ partial "metadata.html" . -}}
diff --git a/static/css/style.css b/static/css/style.css
index 572c6c9..20c8635 100644
--- a/static/css/style.css
+++ b/static/css/style.css
@@ -92,3 +92,13 @@ ul {
p, pre, ul, ol, blockquote {
margin-bottom: 1.4em;
}
+
+nav ul {
+ list-style: none;
+}
+
+@media (pointer: coarse) {
+ .return, .navlink {
+ margin-bottom: 1em;
+ }
+}