source: documentation/trunk/tutorial_sample_files/libraries/althor/transform/pages/home.xsl@ 28599

Last change on this file since 28599 was 28599, checked in by jlwhisler, 10 years ago

Draft interface for use in Defining Libraries tutorial.

File size: 2.4 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:java="http://xml.apache.org/xslt/java"
5 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
6 xmlns:gslib="http://www.greenstone.org/skinning"
7 extension-element-prefixes="java util"
8 exclude-result-prefixes="java util">
9
10 <!-- the page content -->
11 <xsl:template match="/page/pageResponse">
12 <!-- SLIDER -->
13 <div class="slider-wrapper theme-default theme-project theme-home">
14 <div class="ribbon"><xsl:text> </xsl:text></div>
15 <div id="slider" class="nivoSlider">
16 <xsl:call-template name="collSlider"/>
17 </div>
18 </div>
19 <!-- ENDS SLIDER -->
20
21 <!-- headline -->
22 <div class="headline">Select a collection to explore!</div>
23 <!-- ENDS headline -->
24 <!-- Feature -->
25 <ul id="filter-container-feature" class="feature">
26 <xsl:call-template name="collList"/>
27 </ul>
28 <!-- ENDS feature -->
29 </xsl:template>
30
31
32<xsl:template name="collSlider">
33<xsl:for-each select="./collectionList/collection">
34<xsl:variable name="homeImage" select="displayItem[@name='smallicon']"/>
35
36<xsl:choose>
37<xsl:when test="$homeImage">
38<xsl:variable name="collectionFolder" select="@name"/>
39<xsl:variable name="collectionName" select="displayItem[@name='name']"/>
40
41<a href="{$library_name}/collection/{$collectionFolder}/page/about">
42<img src="sites/{$site_name}/collect/{$collectionFolder}/images/{$homeImage}" title="{$collectionName}" />
43</a>
44</xsl:when>
45<xsl:otherwise/>
46</xsl:choose>
47
48</xsl:for-each>
49</xsl:template>
50
51<xsl:template name="collList">
52<xsl:for-each select="./collectionList/collection">
53<xsl:variable name="collectionFolder" select="@name"/>
54<xsl:variable name="collectionName" select="displayItem[@name='name']"/>
55<xsl:variable name="homeImage" select="displayItem[@name='smallicon']"/>
56
57 <li>
58 <a href="{$library_name}/collection/{$collectionFolder}/page/about" class="thumb" >
59 <xsl:choose>
60<xsl:when test="$homeImage">
61<img src="sites/{$site_name}/collect/{$collectionFolder}/images/{$homeImage}" title="{$collectionName}" />
62</xsl:when>
63<xsl:otherwise>
64<img src="interfaces/{$interface_name}/images/default.jpg" title="{$collectionName}" />
65</xsl:otherwise>
66</xsl:choose>
67
68
69 <div class="caption"><xsl:value-of select="$collectionName"/></div></a>
70 </li>
71
72
73</xsl:for-each>
74</xsl:template>
75</xsl:stylesheet>
76
77
Note: See TracBrowser for help on using the repository browser.