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