htmlroc/template.html

40 lines
1020 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>{{ .Title }}</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<main>
<header class="credits">
{{ .Credits | toCredits }}
</header>
<section class="rules">
{{ range .Sections }}
<h2 id="{{ .ID }}">{{ .ID }}. {{ .Title }}</h2>
{{ if .Extra }}
{{ if (eq .Title "Glossary")}}
<dl class="glossary">
{{ range (toGlossary .Text) }}
<dt>{{ .Keyword }}</dt>
<dd>{{ .Definition }}</dd>
{{ end }}
</dl>
{{ else }}
{{ .Text | htmlify }}
{{ end }}
{{ else }}
<ul>
{{ range .Rules }}
<li id="{{ .ID }}" class="depth-{{ .Depth }}">({{ .ID }}) {{ .Text | htmlify }}</li>
{{ end }}
</ul>
{{ end }}
{{ end }}
</section>
</main>
</body>
</html>