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