more templates

This commit is contained in:
Sebastian Frank 2019-02-12 15:43:11 +01:00
parent 223af0a42f
commit d981a0550e
Signed by: apairon
GPG Key ID: 7270D06DDA7FE8C3
4 changed files with 68 additions and 9 deletions

View File

@ -0,0 +1,24 @@
---
Meta:
Title: Leistungen und Referenzen
Data:
von: 2018-12-24
bis: 2019-01-01
bild: /media/bild.jpg
gallerie:
- media/bild1.jpg
- media/bild2.jpg
formular:
- feld: vorname
typ: text
Template: mitBild.html
---
# Leistungen
Hier stehen die ***Referenzen***

View File

@ -1,9 +0,0 @@
---
Meta:
Title: Leistungen
---
# Leistungen
Lorem ipsum...

View File

@ -0,0 +1,42 @@
<html>
<meta>
<title>{{ Meta.Title }}</title>
<meta name="description" content="{{ Meta.Description }}" />
<meta name="keywords" content="{{ Meta.Keywords }}" />
<style>
a {
color: black;
}
body {
color: #333;
}
</style>
</meta>
<body style="margin: 0; padding: 2;">
<header style="background-color: lightgrey; padding: 20px;">
<div><b>main Level 1</b></div>
<ul>
{{#each NavMap.de.SubMap.main.SubSlice }}
<li><a href="{{ GoTo }}">{{ Navname }}</a></li>
{{/each}}
</ul>
</header>
<div style="padding: 20px;">
{{{ Body }}}
<pre>
Daten: {{ Data.von }} - {{ Data.bis }} / {{ Data.bild }}
</pre>
</div>
<footer style="background-color: lightgrey; padding: 20px;">
<div><b>service Level 1</b></div>
<ul>
{{#each NavMap.de.SubMap.service.SubSlice }}
<li><a href="{{ GoTo }}">{{ Navname }}</a></li>
{{/each}}
</ul>
</footer>
</body>
</html>

View File

@ -186,6 +186,8 @@ func readContentDir(inBase string, outBase string, dir string, conf *PathConfig,
stripedDir = regex.ReplaceAllString(stripedDir, "$1")
}
}
regex := regexp.MustCompile("[^a-zA-Z]")
stripedDir = regex.ReplaceAllString(stripedDir, "_")
outPath := outBase + "/" + stripedDir
outPath = path.Clean(outPath)