From f12d854fcf5e46fe526a92a316b2c6ec118fcea3 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sun, 20 Jan 2019 12:35:37 +0100 Subject: Replace fcgi with plain http server --- htdocs/template/doc.tmpl | 77 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 htdocs/template/doc.tmpl (limited to 'htdocs/template/doc.tmpl') diff --git a/htdocs/template/doc.tmpl b/htdocs/template/doc.tmpl new file mode 100644 index 0000000..b50790d --- /dev/null +++ b/htdocs/template/doc.tmpl @@ -0,0 +1,77 @@ +{{/* This doc template is given to the present tool to format articles. */}} + +{{define "root"}} + {{with .Subtitle}}

{{.}}

{{end}} + {{if .Doc | sectioned}} + {{range .Sections}} + {{elem $.Template .}} + {{end}} + {{else}} + {{with index .Sections 0}} + {{range .Elem}} + {{elem $.Template .}} + {{end}} + {{end}} + {{end}} +{{end}} + +{{define "TOC"}} + +{{end}} + +{{define "newline"}} +{{/* newline */}} +{{end}} + +{{define "section"}} +

{{.Title}}

+ {{range .Elem}}{{elem $.Template .}}{{end}} +{{end}} + +{{define "list"}} + +{{end}} + +{{define "text"}} + {{if .Pre}} +
{{range .Lines}}{{.}}{{end}}
+ {{else}} +

+ {{range $i, $l := .Lines}}{{if $i}}{{template "newline"}} + {{end}}{{style $l}}{{end}} +

+ {{end}} +{{end}} + +{{define "code"}} +
{{.Text}}
+{{end}} + +{{define "image"}} + image +{{end}} + +{{define "caption"}} +
{{style .Text}}
+{{end}} + +{{define "iframe"}} +
+ +
+{{end}} + +{{define "link"}} + +{{end}} + +{{define "html"}}{{.HTML}}{{end}} -- cgit v1.2.3