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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
{{ define "layout" }}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="Federated Imageboard based on Activtypub">
<meta property="og:locale" content="en_US" />
<meta property="og:type" content="website" />
<link rel="icon" type="image/png" href="/static/favicon.png">
<script>
window.addEventListener('DOMContentLoaded', function(){
var np = document.getElementById("new-post")
if(np){
np.setAttribute("onsubmit", "validatePost(this);return false;")
}
var np = document.getElementById("reply-post")
if(np){
np.setAttribute("onsubmit", "validatePost(this);return false;")
}
var np = document.getElementById("report-post")
if(np){
np.setAttribute("onsubmit", "validatePost(this);return false;")
}
})
function validatePost(form)
{
var data = new FormData(form)
fetch(form.action, {
method: "POST",
body: data
}).then((r) => {
if(r.redirected){
document.location = r.url
} else {
r.text().then((t) => {alert(t)})
}
})
return false
}
</script>
<style>
a, a:link, a:visited, a:hover, a:active {
text-decoration: none
}
a:link, a:visited, a:active {
color: black;
}
a:hover {
color: #de0808;
}
body {
{{ if .Board.Restricted }}
background-color: #eef2fe;
color: black;
{{ else }}
background-color: #ffffee;
color: #820404
{{ end }}
}
.popup-box {
{{ if .Board.Restricted }}
border: 4px solid #d3caf0;
background-color: #eff5ff;
{{ else }}
border: 4px solid #f0e2d9;
background-color: #f9f9e0;
{{ end }}
}
.quote {
color: #789922;
}
.reply {
{{ if .Board.Restricted }}
color:#af0a0f;
{{ else }}
color:#000080;
{{ end }}
}
.post {
{{ if .Board.Restricted }}
background-color: #d5daf0;
{{ else }}
background-color: #f0e0d6;
{{ end }}
}
:target > div > .post {
{{ if .Board.Restricted }}
background-color: #d6bad0;
{{ else }}
background-color: #f0c0b0;
{{ end }}
}
.tripcode {
color: #117743;
}
</style>
{{ template "header" . }}
</head>
<body>
<ul style="display: inline; padding:0;">
{{range .Boards}}
<li style="display: inline;"><a href="{{.Location}}">{{.Name}}</a></li>
{{end}}
</ul>
{{ if .Board.ModCred }}
{{ if eq .Board.ModCred .Board.Domain .Board.Actor.Id }}
<span style="float: right;"><a href="/{{ .Key }}/{{ .Board.Name }}">[Manage Board]</a></span>
{{ end }}
{{ end }}
{{ template "top" . }}
{{ template "content" . }}
{{ template "bottom" . }}
<div align="center" style="width: 500px; margin:0 auto; margin-top: 50px;">
<a href="/">[Home]</a><a href="/static/rules.html">[Rules]</a><a href="/static/faq.html">[FAQ]</a>
<p>All media are copyright to their respective owners.</p>
</div>
</body>
</html>
{{ template "script" . }}
{{ end }}
|