Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/files/main.xslt
blob: 5c02ec152906acd9a135e5c38ed1703c1286506f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?xml version="1.0" encoding="UTF-8" ?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" encoding="UTF-8" />

    <xsl:template match="/">
        <xsl:text disable-output-escaping="yes">&lt;!DOCTYPE html&gt;</xsl:text>

        <html>
            <head>
                <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
		<meta name="color-scheme" content="dark light"></meta>

		<title>Файлы @ веб-сайте самохостера Lotigara</title>
		<link href="/css/responsivity.css" rel="stylesheet"></link>
		<link href="/css/main.css" rel="stylesheet"></link>
            </head>
            <body>
		<center><a href="/">Вернуться на главную | Return to the main page</a></center>
                <ul>
                    <a href="../">../</a>
                    <xsl:for-each select="list//*">
                        <li>

                            <xsl:attribute name="class">
                                <xsl:text>asset-item asset-item--</xsl:text>
                                <xsl:value-of select="name()" />
                            </xsl:attribute>

                            <a>
                                <xsl:attribute name="aria-label">
                                    <xsl:value-of select="name()" />
                                    <xsl:text> </xsl:text>
                                    <xsl:value-of select="." />
                                </xsl:attribute>

                                <xsl:attribute name="data-name">
                                    <xsl:value-of select="." />
                                </xsl:attribute>

                                <xsl:attribute name="href">
                                    <xsl:value-of select="." />
                                    <xsl:if test="name() = 'directory'">
                                        <xsl:text>/</xsl:text>
                                    </xsl:if>
                                </xsl:attribute>

                                <xsl:attribute name="class">
                                    <xsl:text>asset-link asset-link--</xsl:text>
                                    <xsl:value-of select="name()" />
                                </xsl:attribute>

                                <xsl:value-of select="." />
                            </a>
                        </li>
                    </xsl:for-each>
                </ul>
            </body>
        </html>
    </xsl:template>
</xsl:stylesheet>