-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.go
34 lines (31 loc) · 813 Bytes
/
index.go
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
package main
import (
"html/template"
"io"
)
var indexTpl = template.Must(template.New("index").Parse(`
<!doctype html>
<html lang="en">
<head>
<title>ICS Adapters</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/water.css@2/out/water.min.css">
</head>
<body>
<h1>ICS Adapters</h1>
<p>Please visit the <a href="https://github.com/cbix/ics">GitHub repo</a> for more information, source code and support!</p>
<ul>
{{ range . }}
<li>
<a href="{{ .Url }}" target="_blank">{{ .Name }}</a>
(<a href="{{ .Name }}.ics">ics</a>):
{{ .Description }}
</li>
{{ end }}
</ul>
</body>
</html>
`))
func writeIndex(w io.Writer) error {
return indexTpl.Execute(w, adapters)
}