1
0
mirror of https://github.com/golang/go synced 2024-11-05 18:16:10 -07:00
go/cmd/present/templates/dir.tmpl
Robert Daniel Kortschak f563a1f0f5 go.tools/cmd/present: move dirListTemplate into template file
This change allows the directory front page to be more easily configurable.

Templates are now read only at start-up and stored in a map rather than re-parsed for each page rendering.

LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/109080044
2014-07-08 15:27:33 +10:00

82 lines
1.9 KiB
Cheetah

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Talks - The Go Programming Language</title>
<link type="text/css" rel="stylesheet" href="/static/dir.css">
<script src="/static/dir.js"></script>
</head>
<body>
<div id="topbar"><div class="container">
<form method="GET" action="http://golang.org/search">
<div id="menu">
<a href="http://golang.org/doc/">Documents</a>
<a href="http://golang.org/ref/">References</a>
<a href="http://golang.org/pkg/">Packages</a>
<a href="http://golang.org/project/">The Project</a>
<a href="http://golang.org/help/">Help</a>
<input type="text" id="search" name="q" class="inactive" value="Search">
</div>
<div id="heading"><a href="/">The Go Programming Language</a></div>
</form>
</div></div>
<div id="page">
<h1>Go talks</h1>
{{with .Path}}<h2>{{.}}</h2>{{end}}
{{with .Articles}}
<h4>Articles:</h4>
<dl>
{{range .}}
<dd><a href="/{{.Path}}">{{.Name}}</a>: {{.Title}}</dd>
{{end}}
</dl>
{{end}}
{{with .Slides}}
<h4>Slide decks:</h4>
<dl>
{{range .}}
<dd><a href="/{{.Path}}">{{.Name}}</a>: {{.Title}}</dd>
{{end}}
</dl>
{{end}}
{{with .Other}}
<h4>Files:</h4>
<dl>
{{range .}}
<dd><a href="/{{.Path}}">{{.Name}}</a></dd>
{{end}}
</dl>
{{end}}
{{with .Dirs}}
<h4>Sub-directories:</h4>
<dl>
{{range .}}
<dd><a href="/{{.Path}}">{{.Name}}</a></dd>
{{end}}
</dl>
{{end}}
</div>
<div id="footer">
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="http://golang.org/LICENSE">BSD license</a>.<br>
<a href="http://golang.org/doc/tos.html">Terms of Service</a> |
<a href="http://www.google.com/intl/en/policies/privacy/">Privacy Policy</a>
</div>
</body>
</html>