By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

 index.html

View raw Download
text/html • 2.87 kiB
HTML document, ASCII text
        
            
1
<!DOCTYPE html>
2
<html lang="en-US">
3
4
<head>
5
<title>Unofficial Roundabout Theme Index</title>
6
<link rel="stylesheet" href="style.css" />
7
</head>
8
9
<body>
10
<hgroup role="group">
11
<h1><sub>Unofficial</sub> Roundabout Theme Index</h1>
12
<p class="subtitle">The unofficial hub for Roundabout Themes</p>
13
</hgroup>
14
15
<details class="resources">
16
<summary>Help and Resources</summary>
17
<ul>
18
<li>Don't know how to install a theme? See <a href="install.html">install.html</a></li>
19
<li>Want your own theme here? See <a href="submit.html">submit.html</a></li>
20
<li>Source code available at <a href="https://roundabout-host.com/steve0greatness/ThemeIndex">roundabout-host.com/steve0greatness/ThemeIndex</a></li>
21
</ul>
22
</details>
23
24
<ul id="ThemeList"></ul>
25
26
<template id="ThemeListElement">
27
<li>
28
<table class="table-root">
29
<tr>
30
<th class="theme-name" colspan="2">
31
32
</th>
33
</tr>
34
<tr>
35
<th>
36
Author
37
</th>
38
<td>
39
<a
40
class="author-url"
41
></a>
42
</td>
43
</tr>
44
<tr>
45
<td colspan="2">
46
<a
47
class="download"
48
>Theme CSS</a>
49
</td>
50
</tr>
51
</table>
52
</li>
53
</template>
54
55
<script type="module">
56
const ThemeList = await fetch("themes.xml")
57
.then(res => res.text())
58
.then(txt => {
59
const parser = new DOMParser();
60
const doc = parser.parseFromString(txt, "text/xml");
61
return doc;
62
});
63
64
const ThemeListElementTemplate = document.querySelector("#ThemeListElement");
65
const HTMLThemeList = document.querySelector("#ThemeList");
66
67
const themes = ThemeList.querySelectorAll("theme");
68
for (let index = 0; index < themes.length; index++) {
69
const theme = themes[index];
70
71
const title = theme.querySelector("title").textContent;
72
const author = theme.querySelector("author");
73
const path = theme.querySelector("uri").textContent;
74
75
const ListEl = ThemeListElementTemplate.content.cloneNode(true);
76
ListEl.querySelector(".theme-name").textContent = title;
77
ListEl.querySelector(".download").href = "themes/" + path;
78
79
const Author = ListEl.querySelector(".author-url");
80
Author.href = author.getAttribute("uri");
81
Author.textContent = author.textContent;
82
83
HTMLThemeList.appendChild(ListEl);
84
}
85
</script>
86
</body>
87
88
</html>
89