roundabout-test,
created on Saturday, 11 May 2024, 22:36:19 (1715466979),
received on Sunday, 12 May 2024, 14:32:56 (1715524376)
Author identity: Steve0Greatness <steve0greatnessiscool@gmail.com>
42f77b7bf3fbce2d3693d6911e8bc875a6b22acc
index.html
@@ -0,0 +1,75 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Unofficial Roundabout Theme Index</title>
</head>
<body>
<h1><sub>Unofficial</sub> Roundabout Theme Index</h1>
<ul id="ThemeList"></ul>
<template id="ThemeListElement">
<li>
<table class="table-root">
<tr>
<th class="theme-name" colspan="2">
</th>
</tr>
<tr>
<th>
Author
</th>
<td>
<a
class="author-url"
></a>
</td>
</tr>
<tr>
<td colspan="2">
<a
class="download"
>Theme CSS</a>
</td>
</tr>
</table>
</li>
</template>
<script type="module">
const ThemeList = await fetch("themes.xml")
.then(res => res.text())
.then(txt => {
const parser = new DOMParser();
const doc = parser.parseFromString(txt, "text/xml");
return doc;
});
const ThemeListElementTemplate = document.querySelector("#ThemeListElement");
const HTMLThemeList = document.querySelector("#ThemeList");
const themes = ThemeList.querySelectorAll("theme");
for (let index = 0; index < themes.length; index++) {
const theme = themes[index];
const title = theme.querySelector("title").textContent;
const author = theme.querySelector("author");
const path = theme.querySelector("uri").textContent;
const ListEl = ThemeListElementTemplate.content.cloneNode(true);
ListEl.querySelector(".theme-name").textContent = title;
ListEl.querySelector(".download").href = "/themes/" + path;
const Author = ListEl.querySelector(".author-url");
Author.href = author.getAttribute("uri");
Author.textContent = author.textContent;
HTMLThemeList.appendChild(ListEl);
}
</script>
</body>
</html>