Warning, /graphics/digikam/core/dplugins/generic/tools/htmlgallery/themes/bluecurved/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 : 2013-12-11 0010 * Description : A blue curved theme for the digiKam html gallery tool. 0011 * 0012 * SPDX-FileCopyrightText: 2013 by Vincent Deroo Blanquart <vincent dot deroo at free dot 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 0029 <xsl:template name="linkTagsImagePage"> 0030 <!-- Used in the head area of the html page --> 0031 <link rel="first" href="{../image[position()=1]/full/@fileName}.html"></link> 0032 <link rel="last" href="{../image[position()=last()]/full/@fileName}.html"></link> 0033 <xsl:if test="position() > 1"> 0034 <link rel="prev" href="{preceding-sibling::image[position()=1]/full/@fileName}.html"></link> 0035 </xsl:if> 0036 <xsl:if test="position() < last()"> 0037 <link rel="next" href="{following-sibling::image[position()=1]/full/@fileName}.html"></link> 0038 </xsl:if> 0039 <xsl:choose> 0040 <xsl:when test="count(/collections/collection) > 1"> 0041 <link rel="up" href="../{../fileName}.html"></link> 0042 <link rel="top" href="../index.html"></link> 0043 </xsl:when> 0044 <xsl:otherwise> 0045 <link rel="up" href="../index.html"></link> 0046 </xsl:otherwise> 0047 </xsl:choose> 0048 </xsl:template> 0049 0050 <xsl:template name="linkTagsCollectionPage"> 0051 <!-- Used in the head area of the html page --> 0052 <xsl:if test="count(/collections/collection) > 1"> 0053 <link rel="up" href="index.html"></link> 0054 </xsl:if> 0055 </xsl:template> 0056 0057 0058 0059 <!-- *********************************************************** 0060 CSS Styles 0061 ************************************************************ --> 0062 <xsl:template name="styleIndex"> 0063 <!-- CSS style of the page --> 0064 <link rel="stylesheet" type="text/css" href="./bluecurved/style.css" /> 0065 </xsl:template> 0066 0067 0068 <xsl:template name="stylePicture"> 0069 <!-- CSS style of the page --> 0070 <link rel="stylesheet" type="text/css" href="../bluecurved/style.css" /> 0071 </xsl:template> 0072 0073 0074 0075 0076 0077 0078 0079 <!-- *********************************************************** 0080 Page with one picture 0081 ************************************************************ --> 0082 <xsl:template name="imagePage"> 0083 <xsl:param name="index" select="1"/> 0084 <html> 0085 <head> 0086 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 0087 <title><xsl:value-of select="title"/></title> 0088 <xsl:call-template name="stylePicture"/> 0089 <xsl:call-template name="linkTagsImagePage"/> 0090 </head> 0091 <body> 0092 0093 <div class="rubrique"> 0094 <xsl:value-of select="$TitleOfPage"/> 0095 </div> 0096 0097 <!-- area with navigation buttons --> 0098 <div class="gauche"> 0099 <xsl:choose> 0100 <xsl:when test="count(/collections/collection) > 1"> 0101 <a href="../index.html"><img src="../bluecurved/gohome.png" border="0" alt="{$i18nCollectionList}" title="{$i18nCollectionList}"/></a><br/> 0102 </xsl:when> 0103 </xsl:choose> 0104 <br/> 0105 0106 0107 <xsl:choose> 0108 <xsl:when test="count(/collections/collection) > 1"> 0109 <a href="../{../fileName}.html"><img src="../bluecurved/go-top.png" border="0" title="{../description}" alt="{../description}"/></a> 0110 <br/> 0111 </xsl:when> 0112 <xsl:otherwise> 0113 <a href="../index.html"><img src="../bluecurved/go-top.png" border="0" title="{$i18nCollectionList}" alt="{$i18nCollectionList}"/></a> 0114 <br/> 0115 </xsl:otherwise> 0116 </xsl:choose> 0117 0118 0119 <xsl:if test="$index = 1"> 0120 <img src="../bluecurved/vide.png" border="0" alt="vide" title=""/> 0121 <br/> 0122 </xsl:if> 0123 0124 0125 <xsl:if test="$index > 1"> 0126 <xsl:for-each select="../image[$index - 1]"> 0127 <a href="{full/@fileName}.html"> 0128 <img src="../bluecurved/go-previous.png" border="0" alt="{$i18nPrevious}" title="{$i18nPrevious}"/> 0129 </a> 0130 <br/> 0131 </xsl:for-each> 0132 </xsl:if> 0133 0134 0135 <xsl:if test="$index < count(../image)"> 0136 <xsl:for-each select="../image[$index + 1]"> 0137 <a href="{full/@fileName}.html"> 0138 <img src="../bluecurved/go-next.png" alt="{$i18nNext}" title="{$i18nNext}" /> 0139 </a> 0140 <br/> 0141 </xsl:for-each> 0142 </xsl:if> 0143 </div> 0144 0145 <!-- area with picture --> 0146 <div align="center"> 0147 <br/> 0148 <br/> 0149 0150 <img class="photo" src="{full/@fileName}" width="{full/@width}" height="{full/@height}" alt="{description}" title="{description}"/> 0151 <!-- nom des photos --> 0152 <div class="titre"><xsl:value-of select="title"/></div> 0153 0154 0155 <xsl:if test="original/@fileName != ''"> 0156 <p> 0157 <a href="{original/@fileName}"> <img src="../bluecurved/document-save.png" border="0" alt="{$i18nPrevious}" /> </a> 0158 (<xsl:value-of select="original/@width"/>x<xsl:value-of select="original/@height"/>) 0159 </p> 0160 </xsl:if> 0161 0162 <!-- FIXME title="description, imageSize, fileSize" --> 0163 <br/> 0164 </div> 0165 0166 <!-- FIXME footer --> 0167 </body> 0168 </html> 0169 </xsl:template> 0170 0171 0172 <!-- *********************************************************** 0173 Page with all thumbnails 0174 ************************************************************ --> 0175 <xsl:template name="collectionPage"> 0176 <html> 0177 <head> 0178 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 0179 <title><xsl:value-of select="name"/></title> 0180 <xsl:call-template name="styleIndex"/> 0181 <xsl:call-template name="linkTagsCollectionPage"/> 0182 </head> 0183 <body> 0184 0185 <div class="rubrique"> 0186 <xsl:value-of select="$TitleOfPage"/> 0187 </div> 0188 0189 0190 0191 <div class="gauche"> 0192 <xsl:if test="count(/collections/collection) > 1"> 0193 <a href="index.html"><img src="bluecurved/gohome.png" border="0" alt="{$i18nCollectionList}" title="{$i18nCollectionList}"/></a> 0194 </xsl:if> 0195 </div> 0196 0197 0198 0199 <!-- FIXME: Album info --> 0200 0201 <table> 0202 <xsl:call-template name="thumbnailTable"/> 0203 </table> 0204 0205 <!-- FIXME: Footer --> 0206 </body> 0207 </html> 0208 </xsl:template> 0209 0210 0211 0212 0213 0214 <!-- Called only once per table, use recursion to generate every row --> 0215 <xsl:template name="thumbnailTable"> 0216 <!-- --> 0217 <xsl:param name="index" select="1"/> 0218 0219 <xsl:if test="$index < count(image)+1"> 0220 <tr> 0221 <xsl:call-template name="thumbnailTableCell"> 0222 <xsl:with-param name="index" select="$index"/> 0223 <xsl:with-param name="counter" select="$index + $thumbnailPerRow - 1"/> 0224 </xsl:call-template> 0225 </tr> 0226 0227 <xsl:call-template name="thumbnailTable"> 0228 <xsl:with-param name="index" select="$index + $thumbnailPerRow"/> 0229 </xsl:call-template> 0230 </xsl:if> 0231 </xsl:template> 0232 0233 0234 <!-- Called for every cell, use recursion to generate every cell --> 0235 <xsl:template name="thumbnailTableCell"> 0236 <!-- --> 0237 <xsl:param name="index" select="1"/> 0238 <xsl:param name="counter" select="1"/> 0239 0240 <xsl:if test="$index < count(image) + 1"> 0241 <td align="center"> 0242 <xsl:variable name="folder" select='fileName'/> 0243 <xsl:for-each select="image[$index]"> 0244 <a href='{$folder}/{full/@fileName}.html'> 0245 <img class="photo" src="{$folder}/{thumbnail/@fileName}" width="{thumbnail/@width}" height="{thumbnail/@height}" /> 0246 0247 <!-- nom des photos : mettre une option pour afficher ou non 0248 <div class="titre"><xsl:value-of select="title"/></div> 0249 --> 0250 0251 <!--FIXME image size and file size --> 0252 </a> 0253 0254 <exsl:document href='{$folder}/{full/@fileName}.html'> 0255 <xsl:call-template name="imagePage"> 0256 <xsl:with-param name="index" select="$index"/> 0257 </xsl:call-template> 0258 </exsl:document> 0259 </xsl:for-each> 0260 </td> 0261 0262 <xsl:if test="$counter > $index"> 0263 <xsl:call-template name="thumbnailTableCell"> 0264 <xsl:with-param name="index" select="$index + 1"/> 0265 <xsl:with-param name="counter" select="$counter"/> 0266 </xsl:call-template> 0267 </xsl:if> 0268 </xsl:if> 0269 </xsl:template> 0270 0271 0272 <!-- *********************************************************** 0273 Page with all collections 0274 ************************************************************ --> 0275 <xsl:template name="collectionListPage"> 0276 <!-- --> 0277 <html> 0278 <head> 0279 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 0280 <title><xsl:value-of select="$i18nCollectionList"/></title> 0281 <xsl:call-template name="styleIndex"/> 0282 </head> 0283 <body> 0284 0285 <div class="rubrique"><xsl:value-of select="$i18nCollectionList"/></div> 0286 0287 <div class="gauche"> 0288 <img src="./bluecurved/vide.png" border="0" alt="vide" title=""/> 0289 </div> 0290 0291 0292 <br/> 0293 <center> 0294 <xsl:for-each select="collections/collection"> 0295 <xsl:sort select="name" order="ascending" data-type="text" /> 0296 <xsl:variable name="title" select='concat(name, " [", count(image), "]")'/> 0297 <a href="{fileName}.html"> 0298 <!-- Use first image as collection image --> 0299 <img class="photo" 0300 src="{fileName}/{image[1]/thumbnail/@fileName}" 0301 width="{image[1]/thumbnail/@width}" 0302 height="{image[1]/thumbnail/@height}" 0303 alt="{$title}" 0304 title="{$title}"/> 0305 </a> 0306 <a href="{fileName}.html"><xsl:value-of select="$title"/></a> 0307 <br /> 0308 <exsl:document href="{fileName}.html"> 0309 <xsl:call-template name="collectionPage"/> 0310 </exsl:document> 0311 </xsl:for-each> 0312 </center> 0313 0314 <!-- FIXME: Footer --> 0315 </body> 0316 </html> 0317 </xsl:template> 0318 0319 0320 <xsl:template match="/"> 0321 <!-- --> 0322 <xsl:choose> 0323 <xsl:when test="count(collections/collection) > 1"> 0324 <xsl:call-template name="collectionListPage"/> 0325 </xsl:when> 0326 <xsl:otherwise> 0327 <xsl:for-each select="collections/collection"> 0328 <xsl:call-template name="collectionPage"/> 0329 </xsl:for-each> 0330 </xsl:otherwise> 0331 </xsl:choose> 0332 </xsl:template> 0333 0334 0335 </xsl:transform>