-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.html
98 lines (81 loc) · 1.51 KB
/
template.html
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="robots" content="noindex">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{.Category | sanitize}}</title>
<style type="text/css">
body {
margin: 0 auto;
max-width: 1024px;
padding: .5rem;
font-weight: lighter;
}
a {
color: blue;
text-decoration: none;
}
a:hover {
color: darkblue;
text-decoration: underline;
}
ul {
padding: 0;
}
ul li {
display: inline;
list-style: none;
}
article {
margin-bottom: .75rem;
}
article>h2 {
margin-bottom: 0;
}
footer,
article>small {
color: #666;
}
article>p {
line-height: 1.5;
word-break: break-word;
}
h1,
ul li,
article>*,
footer {
margin: 0;
margin-bottom: .5rem;
padding: .25rem;
}
</style>
</head>
<body>
<h1>{{.Category | sanitize }}</h1>
<ul>
{{range .Categories}}
<li><a href="{{.}}.html">{{.}}</a></li>
{{end}}
</ul>
{{range .Items}}
<article>
<h2>
<a href="{{.Link}}" target="_blank">{{.Title | sanitize | trim}}</a>
</h2>
<small>
by <a href="{{.Feed.Link | hash}}.html">{{.Feed.Title | sanitize | trim}}</a>
in <a href="{{.Category}}.html">{{.Category}}</a>
on {{.Time.Format "02. Jan 2006"}}
</small>
<p>
{{.Description | sanitize | trim | truncate}}
{{.Content | sanitize | trim | truncate}}
</p>
</article>
{{end}}
<footer>
Updated {{time.Format "02. Jan 2006 at 15:04"}}. Version {{.Version}}.
</footer>
</body>
</html>