diff options
author | Ivan Davydov <lotigara@lotigara.ru> | 2025-06-21 18:36:08 +0300 |
---|---|---|
committer | Ivan Davydov <lotigara@lotigara.ru> | 2025-06-21 18:36:08 +0300 |
commit | 6acf2c3049eb321be14d64aa29ca8444b2c77241 (patch) | |
tree | 1431bf870d8c5881e3712396cf2f3a4f8f6af1b6 | |
parent | a3afd97bfee18ee9a62adc57860067878f22937f (diff) |
...and (I hope that this commit is last for today) file index...
-rw-r--r-- | files/main.xslt | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/files/main.xslt b/files/main.xslt new file mode 100644 index 0000000..5c02ec1 --- /dev/null +++ b/files/main.xslt @@ -0,0 +1,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"><!DOCTYPE html></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> |