-
Notifications
You must be signed in to change notification settings - Fork 1
/
template.go
72 lines (66 loc) · 1.4 KB
/
template.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
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
package nopaste
import "html/template"
var tmpl = template.Must(template.New("tmpl").Parse(`{{define "index"}}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Nopaste</title>
<style type="text/css">
<!--
body {
font-family: Verdana, sans-serif;
font-size: 0.9em;
background-color: #fff;
padding: 20px;
}
h1 {
font-family: "Trebuchet MS", Helvetica, Arial, sans-serif;
font-weight: bold;
font-size: 1.6em;
padding-bottom: 20px;
}
form p {
padding: 5px 0;
}
label {
padding-right: 5px;
}
input, select {
margin-right: 20px;
}
-->
</style>
</head>
<body>
<h1>Nopaste</h1>
<form method="post">
<p>
<label for="channel">channel:</label>
<select id="channel" name="channel">
<option value="">(None)</option>
{{range .Channels}}
<option value="{{.}}">{{.}}</option>
{{end}}
</select>
<label for="nick">nickname:</label><input type="text" name="nick">
</p>
<p>
<label for="summary">summary:</label>
<input type="text" name="summary" size="80">
</p>
<p>
<textarea id="text" name="text" rows="24" cols="100"></textarea>
</p>
<p>
<label for="notice">notice</label>
<input type="checkbox" name="notice" value="1">
</p>
<p>
<input type="submit" value="Paste it">
</p>
</form>
</body>
</html>
{{end}}
`))