Warning, /graphics/digikam/core/dplugins/generic/tools/htmlgallery/themes/snow/template.xsl is written in an unsupported language. File is not indexed.
0001 <?xml version="1.0" encoding="UTF-8" ?>
0002
0003 <!--
0004 * ============================================================
0005 *
0006 * This file is a part of digiKam project
0007 * https://www.digikam.org
0008 *
0009 * Date : 2012-07-05
0010 * Description : A Snow theme for the digiKam html gallery tool.
0011 *
0012 * SPDX-FileCopyrightText: 2012 by Aurélien Gâteau <aurelien dot gateau at free.fr>
0013 *
0014 * SPDX-License-Identifier: GPL-2.0-or-later
0015 *
0016 * ============================================================
0017 -->
0018
0019 <!DOCTYPE stylesheet [
0020 <!ENTITY raquo "»">
0021 ]>
0022
0023 <xsl:transform version="1.0"
0024 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
0025 xmlns:exsl="http://exslt.org/common"
0026 extension-element-prefixes="exsl">
0027
0028 <xsl:template name="linkTagsImagePage">
0029 <link rel="first" href="{../image[position()=1]/full/@fileName}.html"></link>
0030 <link rel="last" href="{../image[position()=last()]/full/@fileName}.html"></link>
0031 <xsl:if test="position() > 1">
0032 <link rel="prev" href="{preceding-sibling::image[position()=1]/full/@fileName}.html"></link>
0033 </xsl:if>
0034 <xsl:if test="position() < last()">
0035 <link rel="next" href="{following-sibling::image[position()=1]/full/@fileName}.html"></link>
0036 </xsl:if>
0037 <xsl:choose>
0038 <xsl:when test="count(/collections/collection) > 1">
0039 <link rel="up" href="../{../fileName}.html"></link>
0040 <link rel="top" href="../index.html"></link>
0041 </xsl:when>
0042 <xsl:otherwise>
0043 <link rel="up" href="../index.html"></link>
0044 </xsl:otherwise>
0045 </xsl:choose>
0046 </xsl:template>
0047
0048 <xsl:template name="linkTagsCollectionPage">
0049 <xsl:if test="count(/collections/collection) > 1">
0050 <link rel="up" href="index.html"></link>
0051 </xsl:if>
0052 </xsl:template>
0053
0054 <xsl:template name="imagePage">
0055 <html>
0056 <head>
0057 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
0058 <title><xsl:value-of select="title"/></title>
0059 <link rel="stylesheet" type="text/css" href="../snow/style.css"/>
0060 <xsl:call-template name="linkTagsImagePage"/>
0061 </head>
0062 <body id="imagePage">
0063 <h1>
0064 <div id="previous">
0065 <xsl:choose>
0066 <xsl:when test="position() > 1">
0067 <a href="{preceding-sibling::image[position()=1]/full/@fileName}.html">
0068 <img src="../snow/previous.png" alt="<" title="{$i18nPrevious}" />
0069 </a>
0070 </xsl:when>
0071 <xsl:otherwise>
0072 <img src="../snow/previous_disabled.png" alt="<" title="{$i18nPrevious}" />
0073 </xsl:otherwise>
0074 </xsl:choose>
0075 </div>
0076 <div id="next">
0077 <xsl:choose>
0078 <xsl:when test="position() < last()">
0079 <a href="{following-sibling::image[position()=1]/full/@fileName}.html">
0080 <img src="../snow/next.png" alt=">" title="{$i18nNext}" />
0081 </a>
0082 </xsl:when>
0083 <xsl:otherwise>
0084 <img src="../snow/next_disabled.png" alt=">" title="{$i18nNext}" />
0085 </xsl:otherwise>
0086 </xsl:choose>
0087 </div>
0088 <div id="caption">
0089 <xsl:choose>
0090 <xsl:when test="count(/collections/collection) > 1">
0091 <a href="../index.html"><xsl:value-of select="$i18nCollectionList"/></a>
0092 »
0093 <a href="../{../fileName}.html"><xsl:value-of select="../name"/></a>
0094 </xsl:when>
0095 <xsl:otherwise>
0096 <a href="../index.html"><xsl:value-of select="../name"/></a>
0097 </xsl:otherwise>
0098 </xsl:choose>
0099
0100 » <xsl:value-of select="title"/>
0101 (<xsl:value-of select="position()"/>/<xsl:value-of select="last()"/>)
0102 </div>
0103 </h1>
0104
0105 <div id="content">
0106 <img src="{full/@fileName}" width="{full/@width}" height="{full/@height}" />
0107 <p>
0108 <xsl:value-of select="description"/>
0109 </p>
0110 <xsl:if test="original/@fileName != ''">
0111 <p>
0112 <a href="{original/@fileName}"><xsl:value-of select="$i18nOriginalImage"/></a>
0113 (<xsl:value-of select="original/@width"/>x<xsl:value-of select="original/@height"/>)
0114 </p>
0115 </xsl:if>
0116 </div>
0117 </body>
0118 </html>
0119 </xsl:template>
0120
0121
0122 <xsl:template name="collectionPage">
0123 <html>
0124 <head>
0125 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
0126 <title><xsl:value-of select="name"/></title>
0127 <link rel="stylesheet" type="text/css" href="snow/style.css"/>
0128 <xsl:call-template name="linkTagsCollectionPage"/>
0129 </head>
0130 <body id="collectionPage">
0131 <h1>
0132 <xsl:if test="count(/collections/collection) > 1">
0133 <a href="index.html"><xsl:value-of select="$i18nCollectionList"/></a>
0134 »
0135 </xsl:if>
0136 <xsl:value-of select="name"/>
0137 </h1>
0138 <div id="content">
0139 <ul>
0140 <xsl:variable name="folder" select='fileName'/>
0141 <xsl:for-each select="image">
0142 <li>
0143 <a href='{$folder}/{full/@fileName}.html'>
0144 <img src="{$folder}/{thumbnail/@fileName}" width="{thumbnail/@width}" height="{thumbnail/@height}" />
0145 </a>
0146 <br/>
0147 <a href='{$folder}/{full/@fileName}.html'>
0148 <xsl:value-of select="title"/>
0149 </a>
0150 </li>
0151 <exsl:document href='{$folder}/{full/@fileName}.html'>
0152 <xsl:call-template name="imagePage"/>
0153 </exsl:document>
0154 </xsl:for-each>
0155 </ul>
0156 </div> <!-- /content -->
0157 </body>
0158 </html>
0159 </xsl:template>
0160
0161
0162 <xsl:template name="collectionListPage">
0163 <html>
0164 <head>
0165 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
0166 <title><xsl:value-of select="$i18nCollectionList"/></title>
0167 <link rel="stylesheet" type="text/css" href="snow/style.css"/>
0168 </head>
0169 <body>
0170 <h1><xsl:value-of select="$i18nCollectionList"/></h1>
0171 <div id="content">
0172 <ul>
0173 <xsl:for-each select="collections/collection">
0174 <xsl:sort select="name" order="ascending" data-type="text" />
0175 <li>
0176 <a href="{fileName}.html">
0177 <!-- Use first image as collection image -->
0178 <img src="{fileName}/{image[1]/thumbnail/@fileName}"
0179 width="{image[1]/thumbnail/@width}"
0180 height="{image[1]/thumbnail/@height}" />
0181 <br />
0182 <xsl:value-of select="name"/>
0183 </a>
0184 </li>
0185 <exsl:document href="{fileName}.html">
0186 <xsl:call-template name="collectionPage"/>
0187 </exsl:document>
0188 </xsl:for-each>
0189 </ul>
0190 </div> <!-- /content -->
0191 </body>
0192 </html>
0193 </xsl:template>
0194
0195
0196 <xsl:template match="/">
0197 <xsl:choose>
0198 <xsl:when test="count(collections/collection) > 1">
0199 <xsl:call-template name="collectionListPage"/>
0200 </xsl:when>
0201 <xsl:otherwise>
0202 <xsl:for-each select="collections/collection">
0203 <xsl:call-template name="collectionPage"/>
0204 </xsl:for-each>
0205 </xsl:otherwise>
0206 </xsl:choose>
0207 </xsl:template>
0208
0209
0210 </xsl:transform>