blob: 62de7257016784b994980ad5630c8117dfb20351 [file] [log] [blame]
{/*
This is the slide template. It defines how presentations are formatted.
The "slide" template is the base HTML document. The "list", "text", "code",
"image", and "link" templates are used by the various formatting helpers.
*/}
{{define "slides"}}
<!DOCTYPE html>
<html>
<head>
<title>{{.Title}}</title>
<meta charset='utf-8'>
<script src='/static/slides.js'></script>
</head>
<body style='display: none'>
<section class='slides layout-widescreen'>
<article>
<h1>{{.Title}}</h1>
{{with .Subtitle}}<h3>{{.}}</h3>{{end}}
{{range .Presenters}}
<div class="presenter">
{{range .TextElem}}{{.HTML $.Template}}{{end}}
</div>
{{end}}
</article>
{{range $i, $s := .Slide}}
<!-- start of slide {{$s.Number}} -->
<article>
{{if $s.Elem}}
<h3>{{$s.Title}}</h3>
{{range $s.Elem}}{{.HTML $.Template}}{{end}}
{{else}}
<h2>{{$s.Title}}</h2>
{{end}}
</article>
<!-- end of slide {{$i}} -->
{{end}}{{/* of Slide block */}}
<article>
<h3>Thank you</h1>
{{range .Presenters}}
<div class="presenter">
{{range .Elem}}{{.HTML $.Template}}{{end}}
</div>
{{end}}
</article>
</body>
<script src='/static/playground.js'></script>
</html>
{{end}}
{{define "list"}}
<ul>
{{range .Bullet}}
<li>{{style .}}</li>
{{end}}
</ul>
{{end}}
{{define "text"}}
{{if .Pre}}
<div class="code" contenteditable="true"><pre>{{range .Lines}}{{.}}{{end}}</pre></div>
{{else}}
<p>
{{range $i, $l := .Lines}}{{if $i}}<br>
{{end}}{{style $l}}{{end}}
</p>
{{end}}
{{end}}
{{define "code"}}
<div class="code{{if .Play}} playground{{end}}" contenteditable="true">{{code .}}</div>
{{end}}
{{define "image"}}<div class="image">{{image .File .Args}}</div>{{end}}
{{define "link"}}<p class="link">{{link .URL .Args}}</p>{{end}}