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
            </head> 
        
            7
             
        
            8
            <body> 
        
            9
                <h1><sub>Unofficial</sub> Roundabout Theme Index</h1> 
        
            10
                 
        
            11
                <ul id="ThemeList"></ul> 
        
            12
             
        
            13
                <template id="ThemeListElement"> 
        
            14
                    <li> 
        
            15
                        <table class="table-root"> 
        
            16
                            <tr> 
        
            17
                                <th class="theme-name" colspan="2"> 
        
            18
                                     
        
            19
                                </th> 
        
            20
                            </tr> 
        
            21
                            <tr> 
        
            22
                                <th> 
        
            23
                                    Author 
        
            24
                                </th> 
        
            25
                                <td> 
        
            26
                                    <a 
        
            27
                                        class="author-url" 
        
            28
                                    ></a> 
        
            29
                                </td> 
        
            30
                            </tr> 
        
            31
                            <tr> 
        
            32
                                <td colspan="2"> 
        
            33
                                    <a 
        
            34
                                        class="download" 
        
            35
                                    >Theme CSS</a> 
        
            36
                                </td> 
        
            37
                            </tr> 
        
            38
                        </table> 
        
            39
                    </li> 
        
            40
                </template> 
        
            41
             
        
            42
                <script type="module"> 
        
            43
                    const ThemeList = await fetch("themes.xml") 
        
            44
                        .then(res => res.text()) 
        
            45
                        .then(txt => { 
        
            46
                            const parser = new DOMParser(); 
        
            47
                            const doc = parser.parseFromString(txt, "text/xml"); 
        
            48
                            return doc; 
        
            49
                        }); 
        
            50
             
        
            51
                    const ThemeListElementTemplate = document.querySelector("#ThemeListElement"); 
        
            52
                    const HTMLThemeList = document.querySelector("#ThemeList"); 
        
            53
             
        
            54
                    const themes = ThemeList.querySelectorAll("theme"); 
        
            55
                    for (let index = 0; index < themes.length; index++) { 
        
            56
                        const theme = themes[index]; 
        
            57
             
        
            58
                        const title = theme.querySelector("title").textContent; 
        
            59
                        const author = theme.querySelector("author"); 
        
            60
                        const path = theme.querySelector("uri").textContent; 
        
            61
             
        
            62
                        const ListEl = ThemeListElementTemplate.content.cloneNode(true); 
        
            63
                        ListEl.querySelector(".theme-name").textContent = title; 
        
            64
                        ListEl.querySelector(".download").href = "/themes/" + path; 
        
            65
             
        
            66
                        const Author = ListEl.querySelector(".author-url"); 
        
            67
                        Author.href = author.getAttribute("uri"); 
        
            68
                        Author.textContent = author.textContent; 
        
            69
                         
        
            70
                        HTMLThemeList.appendChild(ListEl); 
        
            71
                    } 
        
            72
                </script> 
        
            73
            </body> 
        
            74
             
        
            75
            </html> 
        
            76