index.html
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> 36Author 37</th> 38<td> 39<a 40class="author-url" 41></a> 42</td> 43</tr> 44<tr> 45<td colspan="2"> 46<a 47class="download" 48>Theme CSS</a> 49</td> 50</tr> 51</table> 52</li> 53</template> 54 55<script type="module"> 56const ThemeList = await fetch("themes.xml") 57.then(res => res.text()) 58.then(txt => { 59const parser = new DOMParser(); 60const doc = parser.parseFromString(txt, "text/xml"); 61return doc; 62}); 63 64const ThemeListElementTemplate = document.querySelector("#ThemeListElement"); 65const HTMLThemeList = document.querySelector("#ThemeList"); 66 67const themes = ThemeList.querySelectorAll("theme"); 68for (let index = 0; index < themes.length; index++) { 69const theme = themes[index]; 70 71const title = theme.querySelector("title").textContent; 72const author = theme.querySelector("author"); 73const path = theme.querySelector("uri").textContent; 74 75const ListEl = ThemeListElementTemplate.content.cloneNode(true); 76ListEl.querySelector(".theme-name").textContent = title; 77ListEl.querySelector(".download").href = "themes/" + path; 78 79const Author = ListEl.querySelector(".author-url"); 80Author.href = author.getAttribute("uri"); 81Author.textContent = author.textContent; 82 83HTMLThemeList.appendChild(ListEl); 84} 85</script> 86</body> 87 88</html> 89