blob: f7e2b81961f2063140483c28a4c5b01e621e45e0 (
plain)
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
|
include ../mixins/sub
include ../mixins/header
include ../mixins/head
doctype html
html
+head()
+subMgmt()
script.
function newSubItem(sub) {
const p = document.createElement("p");
const a = document.createElement("a");
a.href = `/r/${sub}`;
a.innerText = `r/${sub}`;
p.appendChild(a);
return p;
}
function buildSubList() {
var subList = document.getElementById('subList');
getSubs().forEach((sub)=>{
subList.appendChild(newSubItem(sub));
});
}
document.addEventListener('DOMContentLoaded', buildSubList);
body
main#content
+header()
div.hero
h1 subscriptions
div#subList
|