Warning, /graphics/digikam/core/dplugins/generic/tools/htmlgallery/themes/blueframes/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-08-18
0010  * Description : A blue frames 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 "&#187;" >
0021 <!ENTITY blank "&#160;" >
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 imag                          ** -->
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" href="../blueframes/style.css"/>
0038         </head>
0039         <body id="imagePage">
0040         <div id="imagePage">
0041                 <table border="0" width="100%">
0042                 <tr>
0043                         <td align="center">
0044                                 <img src="{full/@fileName}" width="{full/@width}" height="{full/@height}" />
0045                                 <xsl:if test="original/@fileName != ''">
0046                                         <p>
0047                                         <a href="{original/@fileName}"><xsl:value-of select="$i18nOriginalImage"/></a>
0048                                         (<xsl:value-of select="original/@width"/>x<xsl:value-of select="original/@height"/>)
0049                                         </p>
0050                                 </xsl:if>
0051 ยด                      </td>
0052                 </tr>
0053                 </table>
0054         </div>
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" href="blueframes/style.css"/>
0072         </head>
0073                 <h1>
0074                 <span>
0075                         <xsl:value-of select="name"/>
0076                 </span>
0077         </h1>
0078 
0079         <body id="collectionPage">
0080         <div id="content">
0081         <ul>
0082                         <xsl:variable name="folder" select='fileName'/>
0083                         <xsl:for-each select="image">
0084                                 <li>
0085                                         <a href="{$folder}/{full/@fileName}.html" target="image">
0086                                                 <img src="{$folder}/{thumbnail/@fileName}" width="{thumbnail/@width}" height="{thumbnail/@height}"/>
0087                                         </a><br/>
0088                                         (<xsl:value-of select="position()"/>/<xsl:value-of select="last()"/>)
0089                                 </li>
0090                                 <exsl:document href='{$folder}/{full/@fileName}.html'>
0091                                         <xsl:call-template name="createImagePage"/>
0092                                 </exsl:document>
0093                         </xsl:for-each>
0094         </ul>
0095         </div>
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="4.9*image[1]/thumbnail/@width + 10"/>
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" href="blueframes/style.css"/>
0115         </head>
0116         <frameset cols="{$tsize},*" noresize="1" border="0">
0117                 <frame src="thmbs.html" name="mythmbs"/>
0118                 <frame src="blank.html" name="image"/>
0119         </frameset>
0120         <exsl:document href="thmbs.html">
0121                 <xsl:call-template name="createThumbnailPage"/>
0122         </exsl:document>
0123         </html>
0124 </xsl:template>
0125 
0126 <!-- ********************************************************************* -->
0127 <!-- ** Create the collection index page when more than one collection  ** -->
0128 <!-- ********************************************************************* -->
0129 <xsl:template name="createCollectionIndexPage">
0130         <html>
0131         <head>
0132                 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
0133                 <title><xsl:value-of select="$i18nCollectionList"/></title>
0134                 <link rel="stylesheet" type="text/css" href="blueframes/style.css"/>
0135         </head>
0136         <body id="collectPage">
0137         <div id="CollectPageContent">
0138                         <xsl:for-each select="collections/collection">
0139                                         &blank;
0140                                         <a href="Thmbs{fileName}.html" target="mythmbs">
0141                                                 <xsl:value-of select="name"/>
0142 
0143                                         </a>
0144                                         <xsl:for-each select="image">
0145                                                 <xsl:choose>
0146                                                         <xsl:when test="position()=last()">
0147                                                                 (<xsl:value-of select="last()"/>)
0148                                                         </xsl:when>
0149                                                 </xsl:choose>
0150                                         </xsl:for-each>
0151                                 <exsl:document href="Thmbs{fileName}.html">
0152                                         <xsl:call-template name="createThumbnailPage"/>
0153                                 </exsl:document>
0154                                 
0155                         </xsl:for-each>
0156         </div> <!-- /content -->
0157         </body>
0158         </html>
0159         
0160 </xsl:template>
0161 
0162 <!-- ********************************************************************* -->
0163 <!-- ** Create the frameset page when more than one collection          ** -->
0164 <!-- ********************************************************************* -->
0165 <xsl:template name="createCollectionFrameSetPage">
0166 <!-- ** create variable tsize for the width of the thumbnails frame            ** -->
0167 <!-- ** add 10 pixel to tsize for the border around the thumbnail              ** -->
0168         <xsl:variable name="tsize" select="4.9*collections/collection[1]/image[1]/thumbnail/@width + 10"/>
0169         <html>
0170         <head>
0171                 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
0172 
0173                 <title>
0174                 <xsl:value-of select="name"/>
0175                 </title>
0176                 <link rel="stylesheet" type="text/css" href="blueframes/style.css"/>
0177         </head>
0178         <frameset rows="40,*" noresize="1" border="0">
0179                 <frame src="collect.html" name="collection"/>
0180                 <frameset cols="{$tsize},*" noresize="1" border="0">
0181                         <frame src="blank.html" name="mythmbs"/>
0182                         <frame src="blank.html" name="image"/>
0183                 </frameset>
0184         </frameset>
0185         </html>
0186         <exsl:document href="collect.html">
0187                 <xsl:call-template name="createCollectionIndexPage"/>
0188         </exsl:document>
0189 </xsl:template>
0190 
0191 <!-- ********************************************************************* -->
0192 <!-- ** Create a blank page                                             ** -->
0193 <!-- ** as a starting page when more than one collection is used        ** -->
0194 <!-- ********************************************************************* -->
0195 <xsl:template name="createBlankPage">
0196         <html>
0197         <head>
0198                 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
0199 
0200                 <title>
0201                 <xsl:value-of select="name"/>
0202                 </title>
0203                 <link rel="stylesheet" type="text/css" href="blueframes/style.css"/>
0204         </head>
0205         <body id="blankPage">
0206                 <xsl:value-of select="title"/>
0207         </body>
0208 
0209         </html>
0210 </xsl:template>
0211 
0212 
0213 <!-- ********************************************************************* -->
0214 <!-- ** the beginning of all                                            ** -->
0215 <!-- ********************************************************************* -->
0216 <xsl:template match="/">
0217         <xsl:choose>
0218                 <xsl:when test="count(collections/collection) &gt; 1">
0219                         <xsl:call-template name="createCollectionFrameSetPage"/>
0220                 </xsl:when>
0221                 <xsl:otherwise>
0222                         <xsl:for-each select="collections/collection">
0223                                 <xsl:call-template name="createFrameSetPage"/>
0224                         </xsl:for-each>
0225                 </xsl:otherwise>
0226         </xsl:choose>
0227         <exsl:document href="blank.html">
0228                 <xsl:call-template name="createBlankPage"/>
0229         </exsl:document>
0230 </xsl:template>
0231 
0232 </xsl:transform>