shithub: sirjofri_de

Download patch

ref: 9a340c9bd37176952057d5cb49cd52cbfdf8d5fb
parent: f31f682ce5ed0b4d1f44708f6549efd8b0d5a8d5
author: glenda <glenda@9front.local>
date: Fri Jan 10 17:57:57 EST 2020

changes template files

--- a/foot.htf
+++ b/foot.htf
@@ -2,6 +2,7 @@
 <hr>
 <footer>
 <a href="/">start</a> •
+<a href="/changeblog/">changeblog</a> •
 <a href="/imprint/">imprint (german)</a>
 <br>
 © Copyright 2019 sirjofri
--- a/head.htf
+++ b/head.htf
@@ -18,6 +18,7 @@
 <h1>PAGETITLE</h1>
 <nav>
 <a href="/">start</a> •
+<a href="/changeblog/">changeblog</a> •
 <a href="/imprint/">imprint</a>
 </nav>
 </header>
--- a/mkfile
+++ b/mkfile
@@ -1,18 +1,33 @@
-OBJECTS=`{ls *.ht | sed -e 's/\.ht$//g' | grep -v 'index'}
+PATHS=`{ls *.ht */*.ht | sed -e 's/\.ht$//g' | grep -v 'index'}
+OBJECTS=`{echo 'pub/'^$PATHS^'/index.html'}
 
-all:QV: pub/$OBJECTS/index.html pub/index.html
+prepare:QV: changeblog.ht
+	echo 'Prepare complete'
+	mk build
+
+build:QV: $OBJECTS pub/index.html
 	echo 'Build complete'
 
+changeblog.ht:Q:
+	echo '<section>
+	<ul>' > $target
+	obs=`{basename `{ls changeblog/*.ht | sed -e 's/\.ht$//g'}}
+	for(OB in $obs){
+		echo '<li><a href="/changeblog/'$OB'/">$OB</a></li>' >> $target
+	}
+	echo '</ul>
+	</section>' >> $target
+	echo '√ '$target' prepared'
+
 pub/index.html:Q: head.htf index.ht foot.htf
 	if(! test -d pub)
 		mkdir pub
-	cat $prereq | sed -e 's/PAGETITLE/sirjofri/g' > pub/index.html
+	cat $prereq | sed -e 's:PAGETITLE:sirjofri:g' > pub/index.html
 	echo '√ '^$target
 
 pub/%/index.html:Q: head.htf %.ht foot.htf
-	if(! test -d pub)
-		mkdir pub
-	if(! test -d pub/$stem)
-		mkdir pub/$stem
-	cat $prereq | sed -e 's/PAGETITLE/'^$stem^'/g' > pub/$stem/index.html
+	dirpart=`{basename -d $target}
+	if(! test -d $dirpart)
+		mkdir -p $dirpart
+	cat $prereq | sed -e 's:PAGETITLE:'^$stem^':g' > pub/$stem/index.html
 	echo '√ '^$target
--- a/pub/imprint/index.html
+++ b/pub/imprint/index.html
@@ -18,6 +18,7 @@
 <h1>imprint</h1>
 <nav>
 <a href="/">start</a> •
+<a href="/changeblog/">changeblog</a> •
 <a href="/imprint/">imprint</a>
 </nav>
 </header>
@@ -58,6 +59,7 @@
 <hr>
 <footer>
 <a href="/">start</a> •
+<a href="/changeblog/">changeblog</a> •
 <a href="/imprint/">imprint (german)</a>
 <br>
 © Copyright 2019 sirjofri
--- a/pub/index.html
+++ b/pub/index.html
@@ -18,6 +18,7 @@
 <h1>sirjofri</h1>
 <nav>
 <a href="/">start</a> •
+<a href="/changeblog/">changeblog</a> •
 <a href="/imprint/">imprint</a>
 </nav>
 </header>
@@ -64,6 +65,7 @@
 <hr>
 <footer>
 <a href="/">start</a> •
+<a href="/changeblog/">changeblog</a> •
 <a href="/imprint/">imprint (german)</a>
 <br>
 © Copyright 2019 sirjofri