diff options
Diffstat (limited to 'themes/default/layouts/_default/home.xslt.sitemap.xsl')
-rw-r--r-- | themes/default/layouts/_default/home.xslt.sitemap.xsl | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/themes/default/layouts/_default/home.xslt.sitemap.xsl b/themes/default/layouts/_default/home.xslt.sitemap.xsl new file mode 100644 index 0000000..167b773 --- /dev/null +++ b/themes/default/layouts/_default/home.xslt.sitemap.xsl @@ -0,0 +1,97 @@ +{{- printf `<?xml version="1.0" encoding="utf-8"?>` | safeHTML }} +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9" + version="1.1" +> + <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/> + <xsl:template match="/"> + <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" xml-data="sitemap"> + <head> + <title>{{ $.Site.Title }} Site Map</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/> + {{- $default := resources.Get "css/default.css" -}} + {{- if .Site.Params.site.production -}} + {{ $css := slice $default | resources.Concat "css/bundle.css" | resources.Minify | fingerprint }} + <link rel="stylesheet" type="text/css" href="{{ $css.Permalink }}"/> + {{- else }} + <link rel="stylesheet" type="text/css" href="{{ $default.Permalink }}"/> + {{- end }} + </head> + <body> + <column-left> + </column-left> + <column-middle> + <main> + <nav> + <icon-button> + <a onclick="window.history.go(-1); return false;"> + {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/arrow-left.svg")) }} + <small>Back</small> + </a> + </icon-button> + <section> + <h2>{{ $.Site.Title }} Site Map</h2> + <small>Site Map Preview</small> + </section> + {{ if .Site.Menus.main }} + {{ range .Site.Menus.main }} + <icon-navigator hidden=""> + <icon-button> + <a + id="nav-middle-{{ path.Base .Identifier }}" + href="{{ .URL | absURL }}" + > + {{ with .Identifier }} {{ $icon := print (partial + "function-paths.html" "static") "/icons/" . ".svg" }} {{ safeHTML + (readFile $icon) }} {{ end }} + <small>{{ delimit (first 1 (split .Name " ")) " " }}</small> + </a> + </icon-button> + </icon-navigator> + {{ end }} + {{ end }} + </nav> + <navigation-separator><hr hidden=""></hr></navigation-separator> + <section> + <table> + <thead> + <tr> + <th> + <code> + <xsl:value-of select="count(sitemap:urlset/sitemap:url)"/> + Uniform Resource Locators (URLs) + </code> + </th> + </tr> + </thead> + <tbody> + <xsl:for-each select="sitemap:urlset/sitemap:url"> + <tr> + <td> + <a> + <xsl:attribute name="href"> + <xsl:value-of select="sitemap:loc" /> + </xsl:attribute> + <xsl:attribute name="title"> + Last Modified: <xsl:value-of select="sitemap:lastmod" /> + Frequency: <xsl:value-of select="sitemap:changefreq" /> + Priority: <xsl:value-of select="sitemap:priority" /> + </xsl:attribute> + <xsl:value-of select="sitemap:loc" /> + </a> + </td> + </tr> + </xsl:for-each> + </tbody> + </table> + </section> + </main> + </column-middle> + <column-right> + </column-right> + </body> + </html> + </xsl:template> +</xsl:stylesheet> |