From: Grégoire Détrez Date: Fri, 5 Jul 2019 13:25:29 +0000 (+0200) Subject: doc/template.html: Add parent links at the top. X-Git-Url: https://git.g-eek.se/?a=commitdiff_plain;h=21d6363c406bd0301b52711a30f98e1f03d0afaa;p=interimap.git doc/template.html: Add parent links at the top. --- diff --git a/Makefile b/Makefile index fda0fe0..23a6233 100644 --- a/Makefile +++ b/Makefile @@ -46,8 +46,10 @@ html: $(HTML_FILES) $(HTML_ROOTDIR)/%.html: ./doc/%.md $(HTML_TEMPLATE) mtime="$$(git --no-pager log -1 --pretty="format:%ct" -- "$<" 2>/dev/null)"; \ [ -n "$$mtime" ] || mtime="$$(date +%s -r "$<")"; \ + [ "$<" = "doc/index.md" ] && parent="" || parent="./index.html"; \ pandoc -sp -f markdown -t html+smart --css=$(CSS) --template=$(HTML_TEMPLATE) \ --variable=date:"$$(LC_TIME=C date +"Last modified on %a, %d %b %Y at %T %z" -d @"$$mtime")" \ + --variable=parent:"$$parent" \ --output="$@" -- "$<" doc: manual html diff --git a/doc/template.html b/doc/template.html index e17f0e3..ceb2576 100644 --- a/doc/template.html +++ b/doc/template.html @@ -19,6 +19,12 @@ $endif$ span.smallcaps{font-variant: small-caps;} span.underline{text-decoration: underline;} div.column{display: inline-block; vertical-align: top; width: 50%;} + @media only screen and (min-width: 600px) { + .parent { + float: right; + margin-left: 1em; + } + } $if(quotes)$ q { quotes: "“" "”" "‘" "’"; } $endif$ @@ -48,14 +54,18 @@ $endfor$ $for(include-before)$ $include-before$ $endfor$ -
+
$if(title)$ - + $endif$ $body$ -
+