Implement creating new games

This commit is contained in:
Vojtěch Káně
2021-04-27 16:37:48 +02:00
parent ee91f3d7f8
commit 5f9ac3d4a9
7 changed files with 360 additions and 2 deletions

View File

@@ -0,0 +1,31 @@
{{- template "base" . -}}
{{- define "additional-css" -}}
{{ end -}}
{{- define "additional-js" -}}
{{ end -}}
{{- define "header" }}
<h1>{{ .Game.Name }} ({{ .Game.Code }})</h1>
{{ end -}}
{{- define "main" }}
<dl>
<dt>Vytvořena</dt>
<dd>{{ .Game.Created.Format "2006.01.02 15:04:05" }}</dd>
<dt>Autor</dt>
<dd>{{ .Game.Author }}</dd>
</dl>
<ol>
{{ range .Game.Edges.Questions -}}
<li>{{ .Title }} ({{ .DefaultLength }}ms)
<ul>
{{ range .Edges.Choices -}}
<li>{{ .Title }}{{ if .Correct }} (správně){{ end }}</li>
{{ end }}
</ul>
</li>
{{ end }}
</ol>
{{ end -}}