-
Notifications
You must be signed in to change notification settings - Fork 12
/
factoid.tpl
261 lines (242 loc) · 10.4 KB
/
factoid.tpl
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>OBScommits</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script src="//cdn.jsdelivr.net/headroomjs/0.5.0/headroom.min.js"></script>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="//oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
body {
padding-top: 65px;
}
.nobr {
white-space: nowrap;
}
.reverse {
direction: rtl;
unicode-bidi: bidi-override;
}
h2.panel-title {
font-weight: bold;
}
.slide {
-webkit-transition: all .25s ease-in-out;
-moz-transition: all .25s ease-in-out;
-o-transition: all .25s ease-in-out;
transition: all .25s ease-in-out;
}
.slide-reset {
-webkit-transform: translateY(0);
-ms-transform: translateY(0);
transform: translateY(0);
}
.slide-up {
-webkit-transform: translateY(-100%);
-ms-transform: translateY(-100%);
transform: translateY(-100%);
}
.factoids th.factoid-name {
text-align: center;
}
.factoids td.factoid-name, .factoids td.factoid-aliases {
vertical-align: middle;
}
.factoids td.factoid-aliases ul {
margin: 0;
padding: 0;
}
.factoids td.factoid-aliases li {
list-style-type: none;
}
footer {
padding-top: 40px;
padding-bottom: 40px;
margin-top: 40px;
color: #777;
text-align: center;
border-top: 1px solid #E5E5E5;
}
.footer-links {
margin-top: 20px;
padding-left: 0;
color: #999;
}
.footer-links li {
display: inline;
padding: 0 2px;
}
.footer-links li:first-child {
padding-left: 0;
}
</style>
</head>
<body data-spy="scroll" data-target="#menu">
<nav class="navbar navbar-inverse navbar-fixed-top" id="nav" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#menu">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">OBScommits</a>
</div>
<div class="collapse navbar-collapse" id="menu">
<ul class="nav navbar-nav">
<li class="active"><a href="#factoids">Factoids</a></li>
<li><a href="#command-help">Command help</a></li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid">
<div class="row factoids">
<div class="panel panel-default">
<div class="panel-heading">
<h2 id="factoids" class="panel-title">Factoids</h2>
</div>
<table class="table table-striped">
<tr>
<th class="factoid-name">Name</th>
<th class="factoid-aliases">Aliases</th>
<th class="factoid-text">Text</th>
</tr>
{{range .}}
<tr>
<td class="factoid-name" id="factoid-{{.Name}}">{{.Name}}</td>
<td class="factoid-aliases">
{{$aliaslen := .Aliases|len}}
{{if gt $aliaslen 0}}
<ul>
{{range .Aliases}}
<li>{{.}}</li>
{{end}}
</ul>
{{end}}
</td>
<td class="factoid-text">{{.Text | linkify | ircize}}</td>
</tr>
{{end}}
</table>
</div>
</div>
<div class="row">
<div class="panel panel-default">
<div class="panel-heading">
<h2 id="command-help" class="panel-title">Command help</h2>
</div>
<table class="table">
<tr>
<th colspan="3">Administer factoids</th>
</tr>
<tr>
<td class="command-name">.add</td>
<td class="command-arguments"><span class="nobr"><factoid-trigger></span> <span class="nobr"><factoid-text></span></td>
<td class="command-description">The factoid-trigger will trigger the factoid, upon which fact the factoid-text will be printed.<br/>This command adds a new factoid.</td>
</tr>
<tr>
<td class="command-name">.mod</td>
<td class="command-arguments"><span class="nobr"><factoid-trigger></span> <span class="nobr"><factoid-text></span></td>
<td class="command-description">The factoid-trigger will trigger the factoid, upon which fact the factoid-text will be printed.<br/>This command modifies an existing factoid.</td>
</tr>
<tr>
<td class="command-name">.del</td>
<td class="command-arguments"><span class="nobr"><factoid-trigger></span></td>
<td class="command-description">This command deletes an existing factoid with the given trigger and all of its aliases.</td>
</tr>
<tr>
<td class="command-name">.rename</td>
<td class="command-arguments"><span class="nobr"><old-factoid-trigger></span> <span class="nobr"><new-factoid-trigger></span></td>
<td class="command-description">This command renames an existing factoid to the new trigger, the new trigger must not exist beforehand. Also updates the aliases.</td>
</tr>
<tr>
<th colspan="3">Administer factoid aliases</th>
</tr>
<tr>
<td class="command-name">.addalias</td>
<td class="command-arguments"><span class="nobr"><alias-trigger></span> <span class="nobr"><factoid-trigger></span></td>
<td class="command-description">The alias-trigger will trigger the factoid-trigger.<br/>This command adds a new alias.</td>
</tr>
<tr>
<td class="command-name">.modalias</td>
<td class="command-arguments"><span class="nobr"><alias-trigger></span> <span class="nobr"><factoid-trigger></span></td>
<td class="command-description">The alias-trigger will trigger the factoid-trigger.<br/>This command modifies an existing alias.</td>
</tr>
<tr>
<td class="command-name">.delalias</td>
<td class="command-arguments"><span class="nobr"><alias-trigger></span></td>
<td class="command-description">This command deletes an existing alias with the given trigger.</td>
</tr>
<tr>
<th colspan="3">Administer administrators</th>
</tr>
<tr>
<td class="command-name">.addadmin</td>
<td class="command-arguments"><span class="nobr"><host></span></td>
<td class="command-description">Adds an administrator identified by the given host ("Jim.users.quakenet.org")<br/>Works because of QuakeNet's host-masking feature (and for static-ips of course)</td>
</tr>
<tr>
<td class="command-name">.deladmin</td>
<td class="command-arguments"><span class="nobr"><host></span></td>
<td class="command-description">Deletes an administrator with the given host</td>
</tr>
<tr>
<th colspan="3">Raw irc protocol access</th>
</tr>
<tr>
<td class="command-name">.raw</td>
<td class="command-arguments"><span class="nobr"><irc-protocol></span></td>
<td class="command-description">Send everything after the command as-is to the IRC server<br/>Example: ".raw PRIVMSG #obsproject :needs the colons so that space-separated things are not seen as arguments"</td>
</tr>
<tr>
<th colspan="3">Download backup</th>
</tr>
<tr>
<td class="command-name">.downloadstate</td>
<td class="command-arguments"></td>
<td class="command-description">Generates a link that automatically disables itself after accessing it or after 5 minutes. The link downloads a zip file that contains the bot configuration including factoids, aliases, etc.</td>
</tr>
</table>
</div>
</div>
</div>
<footer role="contentinfo">
<div class="container">
<p>Maintained by the OBS Project with the help of <a href="https://github.com/obsproject/obscommits/graphs/contributors">contributors</a>.</p>
<p>Code licensed under the MIT license.</p>
<ul class="footer-links muted">
<li><a href="https://github.com/obsproject/obscommits">GitHub Repo</a></li>
<li>·</li>
<li><a href="https://obsproject.com">Open Broadcaster Software</a></li>
<li>·</li>
<li><a href="http://webchat.quakenet.org/?channels=obsproject">#obsproject @ QuakeNet</a></li>
</ul>
</div>
</footer>
<script>
(function() {
var header = document.querySelector("#nav");
if(window.location.hash) {
header.classList.add("slide-up");
}
new Headroom(header, {
classes: {
initial: "slide",
pinned: "slide-reset",
unpinned: "slide-up"
}
}).init();
}());
</script>
</body>
</html>