by steve0greatness, Friday, 3 January 2025, 11:44:20 (1735904660), pushed by steve0greatness, Tuesday, 28 January 2025, 07:34:17 (1738049657)
Author identity: Steve0Greatness <steve0greatnessiscool@gmail.com>
6b34cd61faac3f47b25f1cad7cecba543a174176
index.html
@@ -1,118 +1,10 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Roundabout Theme Index</title>
<link rel="stylesheet" href="style.css" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="icon" href="favicon.ico" />
<style>*{background:#000;color:#fff}</style>
<meta http-equiv="refresh" content="0;url=index.xml"/>
</head>
<body>
<hgroup role="group">
<h1>Roundabout Theme Index</h1>
<p class="subtitle">The hub for Roundabout Themes</p>
</hgroup>
<details class="resources">
<summary>Help and Resources</summary>
<ul>
<li>Don't know how to install a theme? See <a href="install.html">install.html</a></li>
<li>Want your own theme here? See <a href="submit.html">submit.html</a></li>
<li>Source code available at <a href="https://roundabout-host.com/steve0greatness/ThemeIndex">roundabout-host.com/steve0greatness/ThemeIndex</a></li>
<li>Join our Matrix: <a href="https://matrix.to/#/#roundaboutthemeindex:matrix.org">#roundaboutthemeindex:matrix.org</a></li>
<li>Can't see the themes available? Try viewing them as XML: <a href="themes.xml">themes.xml</a></li>
</ul>
<strong>Theme Creation</strong>
<p>This section is for resources about theme creation.</p>
<ul>
<li>Roundabout default theme: <a href="https://roundabout-host.com/roundabout/roundabout/tree/master/static/efficient-ui/THEME.css">roundabout-host.com/roundabout/roundabout/tree/master/static/efficient-ui/THEME.css</a></li>
<li>Roundabout stylesheet: <a href="https://roundabout-host.com/roundabout/roundabout/tree/master/static/style.css">roundabout-host.com/roundabout/roundabout/tree/master/static/style.css</a></li>
</ul>
</details>
<hr />
<h2 id="theme-list">Theme List</h2>
<ul id="ThemeList"></ul>
<noscript>
<p>Unable to load ThemeList. Please consider enabling JavaScript, or upgrading your browser if it cannot support JavaScript.</p>
<p>If you are unable or unwilling to do these things, you can view the plain-text list at <a href="themes.xml">themes.xml</a></p>
</noscript>
<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="text/javascript">
const ThemeListElementTemplate = document.querySelector("#ThemeListElement");
const HTMLThemeList = document.querySelector("#ThemeList");
ListThemes();
async function ListThemes() {
const ThemeList = await GetXMLDoc("themes.xml");
const themes = ThemeList.querySelectorAll("theme");
for (let index = 0; index < themes.length; index++) {
const theme = themes[index];
const ThemeIndex = CreateThemeListElement(
title = theme.querySelector("title").textContent,
authorname = theme.querySelector("author").textContent,
authorlink = theme.querySelector("author").getAttribute("uri"),
path = theme.querySelector("uri").textContent
);
HTMLThemeList.appendChild(ThemeIndex);
}
}
function CreateThemeListElement(title, authorname, authorlink, path) {
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.textContent = authorname;
Author.href = authorlink;
return ListEl;
}
function GetXMLDoc(path) {
return new Promise(async (resolve, reject) => {
const PlaintextXML = await fetch(path).then(response => response.text());
const XML_DOM = new DOMParser().parseFromString(PlaintextXML, "text/xml");
resolve(XML_DOM);
});
}
</script>
<p>Resolving to <a href="index.xml">index.xml</a>.</p>
</body>
</html>
index.xml
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="theme-list.xsl" type="text/xsl"?>
<themes xmlns="themes.xsd">
<theme>
<title>Dusk</title>
<author
uri="https://roundabout-host.com/roundabout"
instance="roundabout-host.com"
username="roundabout"
>Roundabout developer</author>
<uri>roundabout/dusk.css</uri>
</theme>
</themes>
install.html
@@ -13,7 +13,7 @@
<body>
<nav aria-label="breadcrumbs">
<ol>
<li><a href="index.html">index</a></li>
<li><a href="index.xml">index</a></li>
<li><a href="install.html" aria-current="location">Installing a Theme</a></li>
</ol>
</nav>
submit.html
@@ -13,7 +13,7 @@
<body>
<nav aria-label="breadcrumbs">
<ol>
<li><a href="index.html">index</a></li>
<li><a href="index.xml">index</a></li>
<li><a href="submit.html" aria-current="location">Submit a Theme</a></li>
</ol>
</nav>
@@ -64,15 +64,8 @@
<span class="lang-attribute">uri</span>=<span class="lang-string">"https://{profile link}"</span>
<span class="lang-attribute">instance</span>=<span class="lang-string">"{profile instance}"</span>
<span class="lang-attribute">username</span>=<span class="lang-string">"{author username}"</span>
<span class="lang-attribute">xlink:type</span>=<span class="lang-string">"simple"</span>
<span class="lang-attribute">xlink:href</span>=<span class="lang-string">"https://{profile link}"</span>
<span class="lang-attribute">xlink:show</span>=<span class="lang-string">"replace"</span>
>{Author display name}</<span class="lang-element">author</span>>
<<span class="lang-element">uri</span>
<span class="lang-attribute">xlink:type</span>=<span class="lang-string">"simple"</span>
<span class="lang-attribute">xlink:href</span>=<span class="lang-string">"/themes/{pathto/theme.css}"</span>
<span class="lang-attribute">xlink:show</span>=<span class="lang-string">"replace"</span>
>{pathto/theme.css}</<span class="lang-element">uri</span>>
<<span class="lang-element">uri</span>>{pathto/theme.css}</<span class="lang-element">uri</span>>
</<span class="lang-element">theme</span>></code>
</body>
theme-list.xsl
@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
version="3.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:t="themes.xsd"
>
<xsl:output method="html" version="5.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<title>Roundabout Theme Index</title>
<link rel="stylesheet" href="style.css" />
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="icon" href="favicon.ico" />
</head>
<body>
<hgroup role="group">
<h1>Roundabout Theme Index</h1>
<p class="subtitle">The hub for Roundabout Themes</p>
</hgroup>
<details class="resources">
<summary>Help and Resources</summary>
<ul>
<li>Don't know how to install a theme? See <a href="install.html">install.html</a></li>
<li>Want your own theme here? See <a href="submit.html">submit.html</a></li>
<li>Source code available at <a href="https://roundabout-host.com/steve0greatness/ThemeIndex">roundabout-host.com/steve0greatness/ThemeIndex</a></li>
<li>Join our Matrix: <a href="https://matrix.to/#/#roundaboutthemeindex:matrix.org">#roundaboutthemeindex:matrix.org</a></li>
</ul>
<strong>Theme Creation</strong>
<p>This section is for resources about theme creation.</p>
<ul>
<li>Roundabout default theme: <a href="https://roundabout-host.com/roundabout/roundabout/tree/master/static/efficient-ui/THEME.css">roundabout-host.com/roundabout/roundabout/tree/master/static/efficient-ui/THEME.css</a></li>
<li>Roundabout stylesheet: <a href="https://roundabout-host.com/roundabout/roundabout/tree/master/static/style.css">roundabout-host.com/roundabout/roundabout/tree/master/static/style.css</a></li>
</ul>
</details>
<hr />
<h2 id="theme-list">Theme List</h2>
<ul id="ThemeList">
<xsl:for-each select="/t:themes/t:theme">
<li>
<table>
<tr>
<th
class="theme-name" colspan="2"
>
<xsl:value-of select="t:title"/>
</th>
</tr>
<tr>
<td>
<a>
<xsl:attribute name="href">
<xsl:value-of select="t:author/@uri"/>
</xsl:attribute>
<xsl:value-of select="t:author"/>
</a>
</td>
</tr>
<tr>
<td colspan="2">
<a>
<xsl:attribute name="href">
themes/<xsl:value-of select="t:uri"/>
</xsl:attribute>
Theme CSS
</a>
</td>
</tr>
</table>
</li>
</xsl:for-each>
</ul>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
themes.xml
@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="themesxml.css" type="text/css"?>
<themes xmlns:xlink="http://www.w3.org/1999/xlink">
<theme>
<title>Dusk</title>
<author
uri="https://roundabout-host.com/roundabout"
instance="roundabout-host.com"
username="roundabout"
xlink:type="simple"
xlink:href="https://roundabout-host.com/roundabout"
xlink:show="replace"
>Roundabout developer</author>
<uri
xlink:type="simple"
xlink:href="/themes/roundabout/dusk.css"
xlink:show="replace"
>roundabout/dusk.css</uri>
</theme>
</themes>
themes.xsd
@@ -0,0 +1,28 @@
<?xml version="1.0"?>
<xs:scheme xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://localhost:8000/themes.xsd">
<xs:element name="themes">
<xs:complexType>
<xs:sequence>
<xs:element name="theme" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string" minOccurs="1" maxOccurs="1" />
<xs:element name="author" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="uri" type="xs:anyUri" />
<xs:attribute name="instance" type="xs:string" />
<xs:attribute name="username" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="uri" type="xs:string" minOccurs="1" maxOccurs="1" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:scheme>