Use web root for navigation links

This commit is contained in:
Fabien Freling 2019-06-10 22:21:23 +02:00
parent dfd1ce60f4
commit a7d02ecabb
3 changed files with 10 additions and 1 deletions

View file

@ -10,6 +10,7 @@ tup:
tup build tup build
preview: tup preview: tup
rm -rf preview
cp -r build preview cp -r build preview
rm -f preview/tup.config rm -f preview/tup.config

View file

@ -1,9 +1,9 @@
&root = . &root = .
!pandoc = | &(root)/templates/footer.html |> pandoc --from markdown --to html \ !pandoc = | &(root)/templates/footer.html |> pandoc --from markdown --to html \
--template=&(root)/templates/pandoc.html \ --template=&(root)/templates/pandoc.html \
--variable=webRoot:&(root) \
--css &(root)/css/default.css \ --css &(root)/css/default.css \
--include-in-header=&(root)/templates/header.html \ --include-in-header=&(root)/templates/header.html \
--include-before-body=&(root)/templates/nav.html \
--include-after-body=&(root)/templates/footer.html \ --include-after-body=&(root)/templates/footer.html \
%f --output=%o \ %f --output=%o \
|> %B.html |> %B.html

View file

@ -45,6 +45,14 @@ $endfor$
$for(include-before)$ $for(include-before)$
$include-before$ $include-before$
$endfor$ $endfor$
<div id="banner"></div>
<div id="navigation">
<a href=$webRoot$/index.html>Home</a>
<a href=$webRoot$/projects.html>Projects</a>
<a href=$webRoot$/about.html>About</a>
</div>
$if(title)$ $if(title)$
<header id="title-block-header"> <header id="title-block-header">
<h1 class="title">$title$</h1> <h1 class="title">$title$</h1>