Warning, /graphics/digikam/core/dplugins/generic/tools/htmlgallery/themes/cleanframes/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-03-30
0010 * Description : A cleaned frame theme for the digiKam html gallery tool.
0011 *
0012 * SPDX-FileCopyrightText: 2011 by Elizabeth Marmorstein <purplegamba at cox dot net>
0013 *
0014 * SPDX-License-Identifier: GPL-2.0-or-later
0015 *
0016 * ============================================================
0017 -->
0018
0019 <!DOCTYPE stylesheet [
0020 <!ENTITY raquo "»" >
0021 <!ENTITY blank " " >
0022 ]>
0023
0024 <xsl:transform version="1.0"
0025 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
0026 xmlns:exsl="http://exslt.org/common"
0027 extension-element-prefixes="exsl">
0028
0029 <!-- ********************************************************************* -->
0030 <!-- ** Create single image page for each image ** -->
0031 <!-- ********************************************************************* -->
0032 <xsl:template name="createImagePage">
0033 <html>
0034 <head>
0035 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
0036 <title><xsl:value-of select="title"/></title>
0037 <link rel="stylesheet" type="text/css">
0038 <xsl:attribute name="href">../cleanframes/<xsl:value-of select="$style"/></xsl:attribute>
0039 </link>
0040 </head>
0041 <body id="imagePage">
0042 <table border="0" width="100%">
0043 <tr>
0044 <td align="center">
0045 <img src="{full/@fileName}" width="{full/@width}" height="{full/@height}" />
0046 <xsl:if test="original/@fileName != ''">
0047 <p>
0048 <a href="{original/@fileName}"><xsl:value-of select="$i18nOriginalImage"/></a>
0049 (<xsl:value-of select="original/@width"/>x<xsl:value-of select="original/@height"/>)
0050 </p>
0051 </xsl:if>
0052 </td>
0053 </tr>
0054 </table>
0055 <div id="caption">
0056 <xsl:value-of select="description"/>
0057
0058 </div>
0059 </body>
0060 </html>
0061 </xsl:template>
0062
0063 <!-- ********************************************************************* -->
0064 <!-- ** Create thumbnail page for each collection ** -->
0065 <!-- ********************************************************************* -->
0066 <xsl:template name="createThumbnailPage">
0067 <html>
0068 <head>
0069 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
0070 <title><xsl:value-of select="name"/></title>
0071 <link rel="stylesheet" type="text/css">
0072 <xsl:attribute name="href">cleanframes/<xsl:value-of select="$style"/></xsl:attribute>
0073 </link>
0074 </head>
0075 <h1>
0076 <span>
0077 <xsl:value-of select="name"/>
0078 </span>
0079 </h1>
0080
0081 <body id="collectionPage">
0082 <ul>
0083 <xsl:variable name="folder" select='fileName'/>
0084 <xsl:for-each select="image">
0085 <li>
0086 <a href="{$folder}/{full/@fileName}.html" target="image">
0087 <img src="{$folder}/{thumbnail/@fileName}" width="{thumbnail/@width}" height="{thumbnail/@height}"/>
0088 </a><br/>
0089 (<xsl:value-of select="position()"/>/<xsl:value-of select="last()"/>)
0090 </li>
0091 <exsl:document href='{$folder}/{full/@fileName}.html'>
0092 <xsl:call-template name="createImagePage"/>
0093 </exsl:document>
0094 </xsl:for-each>
0095 </ul>
0096 </body>
0097 </html>
0098 </xsl:template>
0099
0100 <!-- ********************************************************************* -->
0101 <!-- ** Create frameset page if only one collection ** -->
0102 <!-- ********************************************************************* -->
0103 <xsl:template name="createFrameSetPage">
0104 <!-- ** create variable tsize for the width of the thumbnails frame ** -->
0105 <!-- ** add 10 pixel to tsize for the border around the thumbnail ** -->
0106 <xsl:variable name="tsize" select="3*(image[1]/thumbnail/@width + 18) + 65"/>
0107 <html>
0108 <head>
0109 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
0110
0111 <title>
0112 <xsl:value-of select="name"/>
0113 </title>
0114 <link rel="stylesheet" type="text/css">
0115 <xsl:attribute name="href">cleanframes/<xsl:value-of select="$style"/></xsl:attribute>
0116 </link>
0117 </head>
0118 <frameset cols="{$tsize},*" noresize="1" border="0">
0119 <frame src="thmbs.html" name="mythmbs"/>
0120 <frame src="blank.html" name="image"/>
0121 </frameset>
0122 <exsl:document href="thmbs.html">
0123 <xsl:call-template name="createThumbnailPage"/>
0124 </exsl:document>
0125 </html>
0126 </xsl:template>
0127
0128 <!-- ********************************************************************* -->
0129 <!-- ** Create the collection index page when more than one collection ** -->
0130 <!-- ********************************************************************* -->
0131 <xsl:template name="createCollectionIndexPage">
0132 <html>
0133 <head>
0134 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
0135 <title><xsl:value-of select="$i18nCollectionList"/></title>
0136 <link rel="stylesheet" type="text/css">
0137 <xsl:attribute name="href">cleanframes/<xsl:value-of select="$style"/></xsl:attribute>
0138 </link>
0139 </head>
0140 <body id="collectPage">
0141 <xsl:for-each select="collections/collection">
0142 <xsl:sort select="name" order="ascending" data-type="text" />
0143 ␣
0144 <a href="Thmbs{fileName}.html" target="mythmbs">
0145 <xsl:value-of select="name"/>
0146
0147 </a>
0148 <xsl:for-each select="image">
0149 <xsl:choose>
0150 <xsl:when test="position()=last()">
0151 (<xsl:value-of select="last()"/>)
0152 </xsl:when>
0153 </xsl:choose>
0154 </xsl:for-each>
0155 <exsl:document href="Thmbs{fileName}.html">
0156 <xsl:call-template name="createThumbnailPage"/>
0157 </exsl:document>
0158
0159 </xsl:for-each>
0160 </body>
0161 </html>
0162
0163 </xsl:template>
0164
0165 <!-- ********************************************************************* -->
0166 <!-- ** Create the frameset page when more than one collection ** -->
0167 <!-- ********************************************************************* -->
0168 <xsl:template name="createCollectionFrameSetPage">
0169 <!-- ** create variable tsize for the width of the thumbnails frame ** -->
0170 <!-- ** add 10 pixel to tsize for the border around the thumbnail ** -->
0171 <xsl:variable name="tsize" select="3*(collections/collection[1]/image[1]/thumbnail/@width + 18) + 65"/>
0172 <html>
0173 <head>
0174 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
0175
0176 <title>
0177 <xsl:value-of select="name"/>
0178 </title>
0179 <link rel="stylesheet" type="text/css">
0180 <xsl:attribute name="href">cleanframes/<xsl:value-of select="$style"/></xsl:attribute>
0181 </link>
0182 </head>
0183 <frameset rows="40,*" noresize="1" border="0">
0184 <frame src="collect.html" name="collection"/>
0185 <frameset cols="{$tsize},*" noresize="1" border="0">
0186 <frame src="blank.html" name="mythmbs"/>
0187 <frame src="blank.html" name="image"/>
0188 </frameset>
0189 </frameset>
0190 </html>
0191 <exsl:document href="collect.html">
0192 <xsl:call-template name="createCollectionIndexPage"/>
0193 </exsl:document>
0194 </xsl:template>
0195
0196 <!-- ********************************************************************* -->
0197 <!-- ** Create a blank page ** -->
0198 <!-- ** as a starting page when more than one collection is used ** -->
0199 <!-- ********************************************************************* -->
0200 <xsl:template name="createBlankPage">
0201 <html>
0202 <head>
0203 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
0204
0205 <title>
0206 <xsl:value-of select="name"/>
0207 </title>
0208 <link rel="stylesheet" type="text/css">
0209 <xsl:attribute name="href">cleanframes/<xsl:value-of select="$style"/></xsl:attribute>
0210 </link>
0211 </head>
0212 <body id="collectionPage">
0213 <xsl:value-of select="title"/>
0214 </body>
0215
0216 </html>
0217 </xsl:template>
0218
0219
0220 <!-- ********************************************************************* -->
0221 <!-- ** the beginning of all ** -->
0222 <!-- ********************************************************************* -->
0223 <xsl:template match="/">
0224 <xsl:choose>
0225 <xsl:when test="count(collections/collection) > 1">
0226 <xsl:call-template name="createCollectionFrameSetPage"/>
0227 </xsl:when>
0228 <xsl:otherwise>
0229 <xsl:for-each select="collections/collection">
0230 <xsl:call-template name="createFrameSetPage"/>
0231 </xsl:for-each>
0232 </xsl:otherwise>
0233 </xsl:choose>
0234 <exsl:document href="blank.html">
0235 <xsl:call-template name="createBlankPage"/>
0236 </exsl:document>
0237 </xsl:template>
0238
0239 </xsl:transform>