forked from golang/example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.tmpl
More file actions
41 lines (39 loc) · 703 Bytes
/
index.tmpl
File metadata and controls
41 lines (39 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{{.Title}}</title>
<style>
body {
font-family: sans-serif;
}
h1 {
background: #ddd;
}
#sidebar {
float: right;
}
</style>
</head>
<body>
<h1>{{.Title}}</h1>
<div id="sidebar">
{{block "sidebar" .}}
<h2>Links</h2>
{{/* The dashes in the following template directives
ensure the generated HTML of this list contains no
extraneous spaces or line breaks. */}}
<ul>
{{- range .Links}}
<li><a href="{{.URL}}">{{.Title}}</a></li>
{{- end}}
</ul>
{{end}}
</div>
{{block "content" .}}
<div id="content">
{{.Body}}
</div>
{{end}}
</body>
</html>