Debian Codegraph @

cmd/present/templates/slides.tmpl

raw
1 {/* This is the slide template. It defines how presentations are formatted. */}
2
3 {{define "root"}}
4 <!DOCTYPE html>
5 <html>
6 <head>
7 <title>{{.Title}}</title>
8 <meta charset='utf-8'>
9 <script>
10 var notesEnabled = {{.NotesEnabled}};
11 </script>
12 <script src='/static/slides.js'></script>
13
14 {{if .NotesEnabled}}
15 <script>
16 var sections = {{.Sections}};
17 var titleNotes = {{.TitleNotes}}
18 </script>
19 <script src='/static/notes.js'></script>
20 {{end}}
21
22 <script>
23 // Initialize Google Analytics tracking code on production site only.
24 if (window["location"] && window["location"]["hostname"] == "talks.golang.org") {
25 var _gaq = _gaq || [];
26 _gaq.push(["_setAccount", "UA-11222381-6"]);
27 _gaq.push(["b._setAccount", "UA-49880327-6"]);
28 window.trackPageview = function() {
29 _gaq.push(["_trackPageview", location.pathname+location.hash]);
30 _gaq.push(["b._trackPageview", location.pathname+location.hash]);
31 };
32 window.trackPageview();
33 window.trackEvent = function(category, action, opt_label, opt_value, opt_noninteraction) {
34 _gaq.push(["_trackEvent", category, action, opt_label, opt_value, opt_noninteraction]);
35 _gaq.push(["b._trackEvent", category, action, opt_label, opt_value, opt_noninteraction]);
36 };
37 }
38 </script>
39 </head>
40
41 <body style='display: none'>
42
43 <section class='slides layout-widescreen'>
44
45 <article>
46 <h1>{{.Title}}</h1>
47 {{with .Subtitle}}<h3>{{.}}</h3>{{end}}
48 {{if not .Time.IsZero}}<h3>{{.Time.Format "2 January 2006"}}</h3>{{end}}
49 {{range .Authors}}
50 <div class="presenter">
51 {{range .TextElem}}{{elem $.Template .}}{{end}}
52 </div>
53 {{end}}
54 </article>
55
56 {{range $i, $s := .Sections}}
57 <!-- start of slide {{$s.Number}} -->
58 <article {{$s.HTMLAttributes}}>
59 {{if $s.Elem}}
60 <h3>{{$s.Title}}</h3>
61 {{range $s.Elem}}{{elem $.Template .}}{{end}}
62 {{else}}
63 <h2>{{$s.Title}}</h2>
64 {{end}}
65 <span class="pagenumber">{{pagenum $s 1}}</span>
66 </article>
67 <!-- end of slide {{$s.Number}} -->
68 {{end}}{{/* of Slide block */}}
69
70 <article>
71 <h3>Thank you</h3>
72 {{range .Authors}}
73 <div class="presenter">
74 {{range .Elem}}{{elem $.Template .}}{{end}}
75 </div>
76 {{end}}
77 </article>
78
79 </section>
80
81 <div id="help">
82 Use the left and right arrow keys or click the left and right
83 edges of the page to navigate between slides.<br>
84 (Press 'H' or navigate to hide this message.)
85 </div>
86
87 {{if .PlayEnabled}}
88 <script src='/play.js'></script>
89 {{end}}
90
91 <script>
92 (function() {
93 // Load Google Analytics tracking code on production site only.
94 if (window["location"] && window["location"]["hostname"] == "talks.golang.org") {
95 var ga = document.createElement("script"); ga.type = "text/javascript"; ga.async = true;
96 ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";
97 var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ga, s);
98 }
99 })();
100 </script>
101 </body>
102 </html>
103 {{end}}
104
105 {{define "newline"}}
106 <br>
107 {{end}}