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