Warning, /graphics/digikam/core/dplugins/generic/tools/htmlgallery/themes/dateframes/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 date framed 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 xmlns:dt="http://xsltsl.org/date-time" 0028 extension-element-prefixes="exsl"> 0029 0030 <xsl:import href="http://xsltsl.sourceforge.net/modules/date-time.xsl"/> 0031 0032 <!-- ********************************************************************* --> 0033 <!-- ** Create single image page for each image ** --> 0034 <!-- ********************************************************************* --> 0035 <xsl:template name="createImagePage"> 0036 <xsl:param name="prevPic"/> 0037 <xsl:param name="nextPic"/> 0038 <html> 0039 <head> 0040 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 0041 <title><xsl:value-of select="title"/></title> 0042 <link rel="stylesheet" type="text/css" href="../dateframes/style.css"/> 0043 </head> 0044 <body id="imagePage"> 0045 <!-- Add Previous/Next Links --> 0046 <xsl:if test="string($prevPic)"> 0047 <a href="{$prevPic}.html"> 0048 <xsl:value-of select="$i18nPrevious"/> 0049 </a> 0050 </xsl:if> 0051 <xsl:if test="string($prevPic) and string($nextPic)"> 0052 | 0053 </xsl:if> 0054 <xsl:if test="string($nextPic)"> 0055 <a href="{$nextPic}.html"> 0056 <xsl:value-of select="$i18nNext"/> 0057 </a> 0058 </xsl:if> 0059 <br/> 0060 0061 <!-- Draw the picture --> 0062 <img src="{full/@fileName}" width="{full/@width}" height="{full/@height}" /> 0063 <br/> 0064 0065 <!-- Add Previous/Next Links --> 0066 <xsl:if test="string($prevPic)"> 0067 <a href="{$prevPic}.html"> 0068 <xsl:value-of select="$i18nPrevious"/> 0069 </a> 0070 </xsl:if> 0071 <xsl:if test="string($prevPic) and string($nextPic)"> 0072 | 0073 </xsl:if> 0074 <xsl:if test="string($nextPic)"> 0075 <a href="{$nextPic}.html"> 0076 <xsl:value-of select="$i18nNext"/> 0077 </a> 0078 </xsl:if> 0079 <br/> 0080 0081 0082 <!-- Add Original File Link, if present --> 0083 <xsl:if test="original/@fileName != ''"> 0084 <p> 0085 <a href="{original/@fileName}"><xsl:value-of select="$i18nOriginalImage"/></a> 0086 (<xsl:value-of select="original/@width"/>x<xsl:value-of select="original/@height"/>) 0087 </p> 0088 </xsl:if> 0089 0090 <!-- Add Caption and Date--> 0091 <div id="caption"> 0092 <xsl:value-of select="description"/> 0093 <br/> 0094 <xsl:call-template name="dt:format-date-time"> 0095 <xsl:with-param name="xsd-date-time" select="date"/> 0096 <xsl:with-param name="format" select="$longformat"/> 0097 </xsl:call-template> 0098 <br/> 0099 </div> 0100 </body> 0101 </html> 0102 </xsl:template> 0103 0104 <!-- ********************************************************************* --> 0105 <!-- ** Create thumbnail page for each collection ** --> 0106 <!-- ********************************************************************* --> 0107 <xsl:template name="createThumbnailPage"> 0108 <html> 0109 <head> 0110 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 0111 <title><xsl:value-of select="name"/></title> 0112 <link rel="stylesheet" type="text/css" href="dateframes/style.css"/> 0113 </head> 0114 <h1> 0115 <span> 0116 <xsl:value-of select="name"/> 0117 </span> 0118 </h1> 0119 0120 <body id="collectionPage"> 0121 <div id="comment"> 0122 <xsl:value-of select="comment"/><br/> 0123 </div> 0124 <ul> 0125 <xsl:variable name="folder" select='fileName'/> 0126 <xsl:for-each select="image"> 0127 <xsl:variable name="cur" select="position()"/> 0128 <li> 0129 <a href="{$folder}/{full/@fileName}.html" target="image"> 0130 <img src="{$folder}/{thumbnail/@fileName}" width="{thumbnail/@width}" height="{thumbnail/@height}"/> 0131 </a><br/> 0132 <xsl:call-template name="dt:format-date-time"> 0133 <xsl:with-param name="xsd-date-time" select="date"/> 0134 <xsl:with-param name="format" select="$shortformat"/> 0135 </xsl:call-template> 0136 <br/> 0137 </li> 0138 <exsl:document href='{$folder}/{full/@fileName}.html'> 0139 <xsl:call-template name="createImagePage"> 0140 <xsl:with-param name="prevPic" select="preceding-sibling::*[1]/full/@fileName"/> 0141 <xsl:with-param name="nextPic" select="following-sibling::*[1]/full/@fileName"/> 0142 </xsl:call-template> 0143 </exsl:document> 0144 </xsl:for-each> 0145 </ul> 0146 </body> 0147 </html> 0148 </xsl:template> 0149 0150 0151 <!-- ********************************************************************* --> 0152 <!-- ** Create the collection index page when more than one collection ** --> 0153 <!-- ********************************************************************* --> 0154 <xsl:template name="createCollectionIndexPage"> 0155 <html> 0156 <head> 0157 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 0158 <title><xsl:value-of select="$i18nCollectionList"/></title> 0159 <link rel="stylesheet" type="text/css" href="dateframes/style.css"/> 0160 </head> 0161 <body id="collectPage"> 0162 <xsl:for-each select="collections/collection"> 0163 <xsl:sort select="name" order="ascending" data-type="text" /> 0164 ␣ 0165 <a href="Thmbs{fileName}.html" target="mythmbs"> 0166 <xsl:value-of select="name"/> 0167 0168 </a> 0169 <xsl:for-each select="image"> 0170 <xsl:choose> 0171 <xsl:when test="position()=last()"> 0172 (<xsl:value-of select="position()"/>) 0173 </xsl:when> 0174 </xsl:choose> 0175 </xsl:for-each> 0176 <exsl:document href="Thmbs{fileName}.html"> 0177 <xsl:call-template name="createThumbnailPage"/> 0178 </exsl:document> 0179 0180 </xsl:for-each> 0181 </body> 0182 </html> 0183 0184 </xsl:template> 0185 0186 <!-- ********************************************************************* --> 0187 <!-- ** Create the frameset page ** --> 0188 <!-- ********************************************************************* --> 0189 <xsl:template name="createCollectionFrameSetPage"> 0190 <!-- ** create variable tsize for the width of the thumbnails frame ** --> 0191 <!-- ** add 10 pixel to tsize for the border around the thumbnail ** --> 0192 <xsl:variable name="tsize" select="3*(collections/collection[1]/image[1]/thumbnail/@width + 18) + 65"/> 0193 <html> 0194 <head> 0195 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 0196 0197 <title> 0198 <xsl:value-of select="name"/> 0199 </title> 0200 <link rel="stylesheet" type="text/css" href="dateframes/style.css"/> 0201 </head> 0202 <frameset rows="40,*" noresize="1" border="0"> 0203 <frame src="collect.html" name="collection"/> 0204 <frameset cols="{$tsize},*" noresize="1" border="0"> 0205 <frame src="blank.html" name="mythmbs"/> 0206 <frame src="intro.html" name="image"/> 0207 </frameset> 0208 </frameset> 0209 </html> 0210 <exsl:document href="collect.html"> 0211 <xsl:call-template name="createCollectionIndexPage"/> 0212 </exsl:document> 0213 </xsl:template> 0214 0215 <!-- ********************************************************************* --> 0216 <!-- ** Create a blank page ** --> 0217 <!-- ** as a starting page when more than one collection is used ** --> 0218 <!-- ********************************************************************* --> 0219 <xsl:template name="createBlankPage"> 0220 <html> 0221 <head> 0222 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 0223 0224 <title> 0225 <xsl:value-of select="name"/> 0226 </title> 0227 <link rel="stylesheet" type="text/css" href="dateframes/style.css"/> 0228 </head> 0229 <body id="blankPage"> 0230 <xsl:value-of select="title"/> 0231 </body> 0232 0233 </html> 0234 </xsl:template> 0235 0236 <!-- ********************************************************************* --> 0237 <!-- ** Create the intro page ** --> 0238 <!-- ********************************************************************* --> 0239 <xsl:template name="createIntroPage"> 0240 <html> 0241 <head> 0242 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 0243 0244 <title> 0245 <xsl:value-of select="name"/> 0246 </title> 0247 <link rel="stylesheet" type="text/css" href="dateframes/style.css"/> 0248 </head> 0249 <body id="intro"> 0250 <xsl:value-of select="$intro"/> 0251 </body> 0252 0253 </html> 0254 </xsl:template> 0255 0256 0257 <!-- ********************************************************************* --> 0258 <!-- ** Create css style sheet ** --> 0259 <!-- ********************************************************************* --> 0260 <xsl:template name="createStyleSheet"> 0261 body { 0262 background-color: <xsl:value-of select="$color1"/>; /*background behind thumbnails, outside boxes*/ 0263 color: <xsl:value-of select="$color2"/>; /*default text color*/ 0264 font-size: 14pt; 0265 text-align: center; 0266 font-family: Bitstream Vera Serif, serif; 0267 margin: 0in; 0268 padding: 0in; 0269 } 0270 0271 a { /*links (album titles)*/ 0272 color: #FFFFFF; 0273 text-decoration: none; 0274 } 0275 0276 a:hover { /*links when mouse is over them (album titles)*/ 0277 color: #5555FF; 0278 text-decoration: underline; 0279 } 0280 0281 h1 { /*album title above thumbnails*/ 0282 padding-top: 0.1em; 0283 color: <xsl:value-of select="$color2"/>; 0284 font-size: 14pt; 0285 text-align: center; 0286 } 0287 0288 /* Collection page */ 0289 #collectionPage { 0290 background-color: <xsl:value-of select="$color1"/>; 0291 color: <xsl:value-of select="$color2"/>; 0292 padding-left: 2%; 0293 text-align: center; 0294 width: 95%; 0295 } 0296 0297 #comment { 0298 width: 95%; 0299 text-align: center; 0300 } 0301 0302 #collectionPage h1 { 0303 margin-top: 12px; 0304 } 0305 0306 #collectionPage ul { /*affects list of thumbnails*/ 0307 padding: 0; 0308 } 0309 0310 #collectionPage li { /*affects stuff in boxes with thumbnails*/ 0311 display: block; 0312 float: left; 0313 margin-left: 6px; 0314 margin-top: 6px; 0315 padding: 5px; 0316 color: <xsl:value-of select="$color1"/>; 0317 font-size: 8pt; 0318 background-color: <xsl:value-of select="$color2"/>; 0319 border: 1px solid #000000; 0320 } 0321 0322 /* Blank Page */ 0323 #blankPage { 0324 background-color: <xsl:value-of select="$color1"/>; 0325 } 0326 0327 #intro { 0328 padding: 10%; 0329 background-color: <xsl:value-of select="$color2"/>; 0330 color: <xsl:value-of select="$color1"/>; 0331 font-size: 16pt; 0332 text-align: center; 0333 } 0334 0335 /* Collect Page */ 0336 #collectPage { /*album titles at top*/ 0337 background-color: <xsl:value-of select="$color3"/>; 0338 font-size: 12pt; 0339 padding-top: 0.5em; 0340 margin: 0 auto; 0341 width: 95%; 0342 color: #AAAAAA; /*number of pics in collection*/ 0343 text-align: center; 0344 } 0345 0346 0347 /* Image page */ 0348 #imagePage { 0349 padding:.5em; 0350 background-color:<xsl:value-of select="$color2"/>; /*background color behind the big image*/ 0351 text-align: center; 0352 color: <xsl:value-of select="$color1"/>; 0353 } 0354 0355 0356 #caption { /*caption below photo*/ 0357 padding-bottom:1em; 0358 padding-top:1em; 0359 color: <xsl:value-of select="$color1"/>; 0360 font-size: 16pt; 0361 } 0362 0363 #imagePage img { 0364 border: 1px solid #CECECE; /*border around picture*/ 0365 } 0366 0367 #imagePage a { /*links*/ 0368 color: <xsl:value-of select="$color1"/>; 0369 text-decoration: none; 0370 } 0371 0372 #imagePage a:hover { /*links when mouse is over them*/ 0373 color: <xsl:value-of select="$color1"/>; 0374 text-decoration: underline; 0375 } 0376 0377 0378 </xsl:template> 0379 0380 <!-- ********************************************************************* --> 0381 <!-- ** the beginning of all ** --> 0382 <!-- ********************************************************************* --> 0383 <xsl:template match="/"> 0384 <xsl:call-template name="createCollectionFrameSetPage"/> 0385 <exsl:document href="blank.html"> 0386 <xsl:call-template name="createBlankPage"/> 0387 </exsl:document> 0388 <exsl:document href="intro.html"> 0389 <xsl:call-template name="createIntroPage"/> 0390 </exsl:document> 0391 <exsl:document href="dateframes/style.css"> 0392 <xsl:call-template name="createStyleSheet"/> 0393 </exsl:document> 0394 </xsl:template> 0395 0396 </xsl:transform>