github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/tools/cmd/present/templates/slides.tmpl (about) 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 src='/static/slides.js'></script> 10 <script> 11 // Initialize Google Analytics tracking code on production site only. 12 if (window["location"] && window["location"]["hostname"] == "talks.golang.org") { 13 var _gaq = _gaq || []; 14 _gaq.push(["_setAccount", "UA-11222381-6"]); 15 _gaq.push(["b._setAccount", "UA-49880327-6"]); 16 window.trackPageview = function() { 17 _gaq.push(["_trackPageview", location.pathname+location.hash]); 18 _gaq.push(["b._trackPageview", location.pathname+location.hash]); 19 }; 20 window.trackPageview(); 21 window.trackEvent = function(category, action, opt_label, opt_value, opt_noninteraction) { 22 _gaq.push(["_trackEvent", category, action, opt_label, opt_value, opt_noninteraction]); 23 _gaq.push(["b._trackEvent", category, action, opt_label, opt_value, opt_noninteraction]); 24 }; 25 } 26 </script> 27 </head> 28 29 <body style='display: none'> 30 31 <section class='slides layout-widescreen'> 32 33 <article> 34 <h1>{{.Title}}</h1> 35 {{with .Subtitle}}<h3>{{.}}</h3>{{end}} 36 {{if not .Time.IsZero}}<h3>{{.Time.Format "2 January 2006"}}</h3>{{end}} 37 {{range .Authors}} 38 <div class="presenter"> 39 {{range .TextElem}}{{elem $.Template .}}{{end}} 40 </div> 41 {{end}} 42 </article> 43 44 {{range $i, $s := .Sections}} 45 <!-- start of slide {{$s.Number}} --> 46 <article> 47 {{if $s.Elem}} 48 <h3>{{$s.Title}}</h3> 49 {{range $s.Elem}}{{elem $.Template .}}{{end}} 50 {{else}} 51 <h2>{{$s.Title}}</h2> 52 {{end}} 53 </article> 54 <!-- end of slide {{$i}} --> 55 {{end}}{{/* of Slide block */}} 56 57 <article> 58 <h3>Thank you</h3> 59 {{range .Authors}} 60 <div class="presenter"> 61 {{range .Elem}}{{elem $.Template .}}{{end}} 62 </div> 63 {{end}} 64 </article> 65 66 </section> 67 68 <div id="help"> 69 Use the left and right arrow keys or click the left and right 70 edges of the page to navigate between slides.<br> 71 (Press 'H' or navigate to hide this message.) 72 </div> 73 74 {{if .PlayEnabled}} 75 <script src='/play.js'></script> 76 {{end}} 77 78 <script> 79 (function() { 80 // Load Google Analytics tracking code on production site only. 81 if (window["location"] && window["location"]["hostname"] == "talks.golang.org") { 82 var ga = document.createElement("script"); ga.type = "text/javascript"; ga.async = true; 83 ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js"; 84 var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ga, s); 85 } 86 })(); 87 </script> 88 </body> 89 </html> 90 {{end}} 91 92 {{define "newline"}} 93 <br> 94 {{end}}