mirror of
https://github.com/golang/go
synced 2024-11-18 16:24:42 -07:00
f671283c22
This change makes golang.org responsive, including a top bar menu and appropriate font sizing. The result is a website that looks pleasing and is functional both on mobile and on desktop. Also added a few print styles so the site looks great on paper or PDF. Change-Id: I16ee25ef4afde2002f240aec0804414bfb172a24 Reviewed-on: https://go-review.googlesource.com/9062 Reviewed-by: Chris Broadfoot <cbro@golang.org>
106 lines
3.3 KiB
HTML
106 lines
3.3 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="theme-color" content="#375EAB">
|
|
{{with .Tabtitle}}
|
|
<title>{{html .}} - The Go Programming Language</title>
|
|
{{else}}
|
|
<title>The Go Programming Language</title>
|
|
{{end}}
|
|
<link type="text/css" rel="stylesheet" href="/lib/godoc/style.css">
|
|
{{if .SearchBox}}
|
|
<link rel="search" type="application/opensearchdescription+xml" title="godoc" href="/opensearch.xml" />
|
|
{{end}}
|
|
<link rel="stylesheet" href="/lib/godoc/jquery.treeview.css">
|
|
<script type="text/javascript">window.initFuncs = [];</script>
|
|
</head>
|
|
<body>
|
|
|
|
<div id='lowframe' style="position: fixed; bottom: 0; left: 0; height: 0; width: 100%; border-top: thin solid grey; background-color: white; overflow: auto;">
|
|
...
|
|
</div><!-- #lowframe -->
|
|
|
|
<div id="topbar"{{if .Title}} class="wide"{{end}}><div class="container">
|
|
<div class="top-heading" id="heading-wide"><a href="/">The Go Programming Language</a></div>
|
|
<div class="top-heading" id="heading-narrow"><a href="/">Go</a></div>
|
|
<a href="#" id="menu-button"><span id="menu-button-arrow">▽</span></a>
|
|
<form method="GET" action="/search">
|
|
<div id="menu">
|
|
<a href="/doc/">Documents</a>
|
|
<a href="/pkg/">Packages</a>
|
|
<a href="/project/">The Project</a>
|
|
<a href="/help/">Help</a>
|
|
<a href="/blog/">Blog</a>
|
|
{{if .Playground}}
|
|
<a id="playgroundButton" href="http://play.golang.org/" title="Show Go Playground">Play</a>
|
|
{{end}}
|
|
<input type="text" id="search" name="q" class="inactive" value="Search" placeholder="Search">
|
|
</div>
|
|
</form>
|
|
|
|
</div></div>
|
|
|
|
{{if .Playground}}
|
|
<div id="playground" class="play">
|
|
<div class="input"><textarea class="code">package main
|
|
|
|
import "fmt"
|
|
|
|
func main() {
|
|
fmt.Println("Hello, 世界")
|
|
}</textarea></div>
|
|
<div class="output"></div>
|
|
<div class="buttons">
|
|
<a class="run" title="Run this code [shift-enter]">Run</a>
|
|
<a class="fmt" title="Format this code">Format</a>
|
|
<a class="share" title="Share this code">Share</a>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
|
|
<div id="page"{{if .Title}} class="wide"{{end}}>
|
|
<div class="container">
|
|
|
|
{{with .Title}}
|
|
<h1>{{html .}}</h1>
|
|
{{end}}
|
|
{{with .Subtitle}}
|
|
<h2>{{html .}}</h2>
|
|
{{end}}
|
|
|
|
{{/* The Table of Contents is automatically inserted in this <div>.
|
|
Do not delete this <div>. */}}
|
|
<div id="nav"></div>
|
|
|
|
{{/* Body is HTML-escaped elsewhere */}}
|
|
{{printf "%s" .Body}}
|
|
|
|
<div id="footer">
|
|
Build version {{html .Version}}.<br>
|
|
Except as <a href="https://developers.google.com/site-policies#restrictions">noted</a>,
|
|
the content of this page is licensed under the
|
|
Creative Commons Attribution 3.0 License,
|
|
and code is licensed under a <a href="/LICENSE">BSD license</a>.<br>
|
|
<a href="/doc/tos.html">Terms of Service</a> |
|
|
<a href="http://www.google.com/intl/en/policies/privacy/">Privacy Policy</a>
|
|
</div>
|
|
|
|
</div><!-- .container -->
|
|
</div><!-- #page -->
|
|
|
|
<!-- TODO(adonovan): load these from <head> using "defer" attribute? -->
|
|
<script type="text/javascript" src="/lib/godoc/jquery.js"></script>
|
|
<script type="text/javascript" src="/lib/godoc/jquery.treeview.js"></script>
|
|
<script type="text/javascript" src="/lib/godoc/jquery.treeview.edit.js"></script>
|
|
|
|
{{if .Playground}}
|
|
<script type="text/javascript" src="/lib/godoc/playground.js"></script>
|
|
{{end}}
|
|
<script type="text/javascript" src="/lib/godoc/godocs.js"></script>
|
|
|
|
</body>
|
|
</html>
|
|
|