1 {/* This is the article template. It defines how articles are formatted. */}
7 <title>{{.Title}}</title>
8 <link type="text/css" rel="stylesheet" href="/static/article.css">
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]);
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]);
30 <div id="topbar" class="wide">
31 <div class="container">
32 <div id="heading">{{.Title}}
33 {{with .Subtitle}}{{.}}{{end}}
37 {{range .Elem}}{{elem $.Template .}}{{end}}
44 <div id="page" class="wide">
45 <div class="container">
47 <div id="toc" class="no-print">
48 <div id="tochead">Contents</div>
55 {{end}}{{/* of Section block */}}
61 <script src='/play.js'></script>
66 // Load Google Analytics tracking code on production site only.
67 if (window["location"] && window["location"]["hostname"] == "talks.golang.org") {
68 var ga = document.createElement("script"); ga.type = "text/javascript"; ga.async = true;
69 ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";
70 var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ga, s);
79 <ul class="toc-outer">
81 <li><a href="#TOC_{{.FormattedNumber}}">{{.Title}}</a></li>
82 {{with .Sections}}{{template "TOC-Inner" .}}{{end}}
87 {{define "TOC-Inner"}}
88 <ul class="toc-inner">
90 <li><a href="#TOC_{{.FormattedNumber}}">{{.Title}}</a></li>
91 {{with .Sections}}{{template "TOC-Inner" .}}{{end}}
97 {{/* No automatic line break. Paragraphs are free-form. */}}