golang.org/toolchain@v0.0.1-go1.9rc2.windows-amd64/blog/template/root.tmpl (about) 1 {{/* This template is combined with other templates to render blog pages. */}} 2 3 {{define "root"}} 4 <!DOCTYPE html> 5 <html> 6 <head> 7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 8 <meta name="viewport" content="width=device-width"> 9 <meta name="theme-color" content="#375EAB"> 10 <title>{{template "title" .}}</title> 11 <link type="text/css" rel="stylesheet" href="/lib/godoc/style.css"> 12 <link type="text/css" rel="stylesheet" href="/fonts.css"> 13 <link rel="alternate" type="application/atom+xml" title="blog.golang.org - Atom Feed" href="https://blog.golang.org/feed.atom" /> 14 <script type="text/javascript">window.initFuncs = [];</script> 15 <style> 16 #sidebar { 17 float: right; 18 padding-left: 20px; 19 width: 40%; 20 max-width: 250px; 21 background: #F3F3F3; 22 margin: 20px 0 20px 20px; 23 } 24 #sidebar ul { 25 padding: 0; 26 } 27 #sidebar li { 28 list-style-type: none; 29 } 30 #content .author { 31 font-style: italic; 32 } 33 #content .article { 34 margin-bottom: 50px; 35 } 36 #content .date { 37 color: #999; 38 } 39 #content .tags { 40 color: #999; 41 font-size: smaller; 42 } 43 #content .iframe, #content .image { 44 margin: 20px; 45 } 46 #content .title { 47 margin: 20px 0; 48 } 49 #content img { 50 max-width: 100%; 51 } 52 .article[data-slug='/go-fonts'] { 53 font-family: Go, sans-serif; 54 } 55 .article[data-slug='/go-fonts'] pre, 56 .article[data-slug='/go-fonts'] code { 57 font-family: Go Mono, monospace; 58 } 59 </style> 60 </head> 61 <body> 62 63 <div id="topbar"><div class="container"> 64 65 <div class="top-heading" id="heading-wide"><a href="{{.GodocURL}}/">The Go Programming Language</a></div> 66 <div class="top-heading" id="heading-narrow"><a href="{{.GodocURL}}/">Go</a></div> 67 <a href="#" id="menu-button"><span id="menu-button-arrow">▽</span></a> 68 <form method="GET" action="{{.GodocURL}}/search"> 69 <div id="menu"> 70 <a href="{{.GodocURL}}/doc/">Documents</a> 71 <a href="{{.GodocURL}}/pkg/">Packages</a> 72 <a href="{{.GodocURL}}/project/">The Project</a> 73 <a href="{{.GodocURL}}/help/">Help</a> 74 <a href="{{.BasePath}}/">Blog</a> 75 <input type="text" id="search" name="q" class="inactive" value="Search" placeholder="Search"> 76 </div> 77 </form> 78 79 </div></div> 80 81 <div id="page"> 82 <div class="container"> 83 84 <div id="sidebar"> 85 {{with .Doc}} 86 {{with .Newer}} 87 <h4>Next article</h4> 88 <p><a href="{{.Path}}">{{.Title}}</a></p> 89 {{end}} 90 91 {{with .Older}} 92 <h4>Previous article</h4> 93 <p><a href="{{.Path}}">{{.Title}}</a></p> 94 {{end}} 95 {{end}} 96 97 <h4>Links</h4> 98 <ul> 99 <li><a href='//golang.org/'>golang.org</a></li> 100 <li><a href='//golang.org/doc/install.html'>Install Go</a></li> 101 <li><a href='//tour.golang.org/'>A Tour of Go</a></li> 102 <li><a href='//golang.org/doc/'>Go Documentation</a></li> 103 <li><a href='//groups.google.com/group/golang-nuts'>Go Mailing List</a></li> 104 <li><a href='//plus.google.com/101406623878176903605'>Go on Google+</a></li> 105 <li><a href='//plus.google.com/112164155169467723645/posts'>Go+ Community</a></li> 106 <li><a href='//twitter.com/golang'>Go on Twitter</a></li> 107 </ul> 108 109 <p><a href="{{.BasePath}}/index">Blog index</a></p> 110 </div><!-- #sidebar --> 111 112 <div id="content"> 113 <h1><a href="{{.BasePath}}/">The Go Blog</a></h1> 114 {{template "content" .}} 115 </div><!-- #content --> 116 117 <div id="footer"> 118 <p> 119 Except as 120 <a href="https://developers.google.com/site-policies#restrictions">noted</a>, 121 the content of this page is licensed under the Creative Commons 122 Attribution 3.0 License,<br> 123 and code is licensed under a <a href="//golang.org/LICENSE">BSD license</a>.<br> 124 <a href="//golang.org/doc/tos.html">Terms of Service</a> | 125 <a href="//www.google.com/intl/en/policies/privacy/">Privacy Policy</a> | 126 <a href="https://go.googlesource.com/blog/">View the source code</a> 127 </p> 128 </div><!-- #footer --> 129 130 </div><!-- .container --> 131 </div><!-- #page --> 132 133 </body> 134 <script src="/lib/godoc/jquery.js"></script> 135 <script src="/lib/godoc/playground.js"></script> 136 <script src="/lib/godoc/play.js"></script> 137 <script src="/lib/godoc/godocs.js"></script> 138 <script> 139 $(function() { 140 // Insert line numbers for all playground elements. 141 $('.playground > pre.numbers, .code > pre.numbers').each(function() { 142 var $spans = $(this).find('> span'); 143 144 // Compute width of number column (including trailing space). 145 var max = 0; 146 $spans.each(function() { 147 var n = $(this).attr('num')*1; 148 if (n > max) max = n; 149 }); 150 var width = 2; 151 while (max > 10) { 152 max = max / 10; 153 width++; 154 } 155 156 // Insert line numbers with space padding. 157 $spans.each(function() { 158 var n = $(this).attr('num')+' '; 159 while (n.length < width) n = ' '+n; 160 $('<span class="number">').text(n).insertBefore(this); 161 }); 162 }); 163 164 initPlayground(new HTTPTransport()); 165 }); 166 </script> 167 </html> 168 {{end}} 169 170 {{define "doc"}} 171 <div class="article" data-slug="{{.Path}}"> 172 <h3 class="title"><a href="{{.Path}}">{{.Title}}</a></h3> 173 <p class="date">{{.Time.Format "2 January 2006"}}</p> 174 {{.HTML}} 175 {{with .Authors}} 176 <p class="author">By {{authors .}}</p> 177 {{end}} 178 </div> 179 {{end}}