gobyexample/templates/example.tmpl
Mark McGranaghan e6f596b462 Remove Google Analytics
I thought I had done this a long time ago |:
2019-05-30 06:49:07 -07:00

37 lines
1.2 KiB
Cheetah

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Go by Example: {{.Name}}</title>
<link rel=stylesheet href="site.css">
</head>
<body>
<div class="example" id="{{.ID}}">
<h2><a href="./">Go by Example</a>: {{.Name}}</h2>
{{range .Segs}}
<table>
{{range .}}
<tr>
<td class="docs">
{{.DocsRendered}}
</td>
<td class="code{{if .CodeEmpty}} empty{{end}}{{if .CodeLeading}} leading{{end}}">
{{if .CodeRun}}<a href="http://play.golang.org/p/{{$.URLHash}}"><img title="Run code" src="play.png" class="run" /></a>{{end}}
{{.CodeRendered}}
</td>
</tr>
{{end}}
</table>
{{end}}
{{if .NextExample}}
<p class="next">
Next example: <a href="{{.NextExample.ID}}">{{.NextExample.Name}}</a>.
</p>
{{end}}
<p class="footer">
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/{{.ID}}">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
</p>
</div>
</body>
</html>