Warning, /graphics/digikam/core/dplugins/generic/tools/htmlgallery/themes/simple/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 : 2007-07-05 0010 * Description : A Simple theme for the digiKam html gallery tool. 0011 * 0012 * SPDX-FileCopyrightText: 2007 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"> 0060 <xsl:attribute name="href">../simple/<xsl:value-of select="$style"/></xsl:attribute> 0061 </link> 0062 <xsl:call-template name="linkTagsImagePage"/> 0063 </head> 0064 <body id="imagePage"> 0065 <h1> 0066 <span id="nav"> 0067 <xsl:choose> 0068 <xsl:when test="position() > 1"> 0069 <a href="{preceding-sibling::image[position()=1]/full/@fileName}.html"> 0070 « <xsl:value-of select="$i18nPrevious"/> 0071 </a> 0072 </xsl:when> 0073 <xsl:otherwise> 0074 « <xsl:value-of select="$i18nPrevious"/> 0075 </xsl:otherwise> 0076 </xsl:choose> 0077 | 0078 <xsl:choose> 0079 <xsl:when test="position() < last()"> 0080 <a href="{following-sibling::image[position()=1]/full/@fileName}.html"> 0081 <xsl:value-of select="$i18nNext"/> » 0082 </a> 0083 </xsl:when> 0084 <xsl:otherwise> 0085 <xsl:value-of select="$i18nNext"/> » 0086 </xsl:otherwise> 0087 </xsl:choose> 0088 </span> 0089 <span id="caption"> 0090 <xsl:choose> 0091 <xsl:when test="count(/collections/collection) > 1"> 0092 <a href="../index.html"><xsl:value-of select="$i18nCollectionList"/></a> 0093 » 0094 <a href="../{../fileName}.html"><xsl:value-of select="../name"/></a> 0095 </xsl:when> 0096 <xsl:otherwise> 0097 <a href="../index.html"><xsl:value-of select="../name"/></a> 0098 </xsl:otherwise> 0099 </xsl:choose> 0100 0101 » <xsl:value-of select="title"/> 0102 (<xsl:value-of select="position()"/>/<xsl:value-of select="last()"/>) 0103 </span> 0104 </h1> 0105 0106 <div id="content"> 0107 <div id="image"> 0108 <img src="{full/@fileName}" width="{full/@width}" height="{full/@height}" /> 0109 <p> 0110 <xsl:value-of select="description"/> 0111 </p> 0112 <xsl:if test="original/@fileName != ''"> 0113 <p> 0114 <a href="{original/@fileName}"><xsl:value-of select="$i18nOriginalImage"/></a> 0115 (<xsl:value-of select="original/@width"/>x<xsl:value-of select="original/@height"/>) 0116 </p> 0117 </xsl:if> 0118 </div> 0119 </div> 0120 </body> 0121 </html> 0122 </xsl:template> 0123 0124 0125 <xsl:template name="collectionPage"> 0126 <html> 0127 <head> 0128 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 0129 <title><xsl:value-of select="name"/></title> 0130 <link rel="stylesheet" type="text/css"> 0131 <xsl:attribute name="href">simple/<xsl:value-of select="$style"/></xsl:attribute> 0132 </link> 0133 <xsl:call-template name="linkTagsCollectionPage"/> 0134 </head> 0135 <body id="collectionPage"> 0136 <h1> 0137 <xsl:if test="count(/collections/collection) > 1"> 0138 <a href="index.html"><xsl:value-of select="$i18nCollectionList"/></a> 0139 » 0140 </xsl:if> 0141 <xsl:value-of select="name"/> 0142 </h1> 0143 <div id="content"> 0144 <ul> 0145 <xsl:variable name="folder" select='fileName'/> 0146 <xsl:for-each select="image"> 0147 <li> 0148 <a href='{$folder}/{full/@fileName}.html'> 0149 <img src="{$folder}/{thumbnail/@fileName}" width="{thumbnail/@width}" height="{thumbnail/@height}" /> 0150 <br/> 0151 <xsl:value-of select="title"/> 0152 </a> 0153 </li> 0154 <exsl:document href='{$folder}/{full/@fileName}.html'> 0155 <xsl:call-template name="imagePage"/> 0156 </exsl:document> 0157 </xsl:for-each> 0158 </ul> 0159 </div> <!-- /content --> 0160 </body> 0161 </html> 0162 </xsl:template> 0163 0164 0165 <xsl:template name="collectionListPage"> 0166 <html> 0167 <head> 0168 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 0169 <title><xsl:value-of select="$i18nCollectionList"/></title> 0170 <link rel="stylesheet" type="text/css"> 0171 <xsl:attribute name="href">simple/<xsl:value-of select="$style"/></xsl:attribute> 0172 </link> 0173 </head> 0174 <body id="collectionListPage"> 0175 <h1><xsl:value-of select="$i18nCollectionList"/></h1> 0176 <div id="content"> 0177 <ul> 0178 <xsl:for-each select="collections/collection"> 0179 <xsl:sort select="name" order="ascending" data-type="text" /> 0180 <li> 0181 <a href="{fileName}.html"> 0182 <!-- Use first image as collection image --> 0183 <img src="{fileName}/{image[1]/thumbnail/@fileName}" 0184 width="{image[1]/thumbnail/@width}" 0185 height="{image[1]/thumbnail/@height}" /> 0186 <br /> 0187 <xsl:value-of select="name"/> 0188 </a> 0189 </li> 0190 <exsl:document href="{fileName}.html"> 0191 <xsl:call-template name="collectionPage"/> 0192 </exsl:document> 0193 </xsl:for-each> 0194 </ul> 0195 </div> <!-- /content --> 0196 </body> 0197 </html> 0198 </xsl:template> 0199 0200 0201 <xsl:template match="/"> 0202 <xsl:choose> 0203 <xsl:when test="count(collections/collection) > 1"> 0204 <xsl:call-template name="collectionListPage"/> 0205 </xsl:when> 0206 <xsl:otherwise> 0207 <xsl:for-each select="collections/collection"> 0208 <xsl:call-template name="collectionPage"/> 0209 </xsl:for-each> 0210 </xsl:otherwise> 0211 </xsl:choose> 0212 </xsl:template> 0213 0214 0215 </xsl:transform>