]> git.g-eek.se Git - interimap.git/commitdiff
doc/template.html: Add parent links at the top.
authorGrégoire Détrez <gregoire@fripost.org>
Fri, 5 Jul 2019 13:25:29 +0000 (15:25 +0200)
committerGuilhem Moulin <guilhem@fripost.org>
Fri, 5 Jul 2019 13:25:29 +0000 (15:25 +0200)
Makefile
doc/template.html

index fda0fe03284f06e9e62acf2a98ad0617101cd383..23a62336445bad31aac95ff138ac5e2b87403117 100644 (file)
--- 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
index e17f0e34b8bb99582b46954ff7b564ebfc44f259..ceb2576041c75f284c8ca4b4f6237a01fba3cbd0 100644 (file)
@@ -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$
-<div class="container text-justify">
+<div class="container">
   <div class="content">
 $if(title)$
-    <div class="page-header"><h1>$title$</h1></div>
+  <div class="page-header">
+$if(parent)$
+    <div class=parent><a href="$parent$"><span class="glyphicon glyphicon-circle-arrow-up" aria-hidden="true"></span> Parent</a></div>
+$endif$
+    <h1 style="">$title$</h1>
+  </div>
 $endif$
 
 $body$
-  </div>
 
   <footer>
     <hr/>
@@ -72,5 +82,6 @@ $endif$
     </div>
   </footer>
 </div>
+</div>
 </body>
 </html>