Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/index.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'index.xsl')
-rw-r--r--index.xsl376
1 files changed, 376 insertions, 0 deletions
diff --git a/index.xsl b/index.xsl
new file mode 100644
index 0000000..205e5ff
--- /dev/null
+++ b/index.xsl
@@ -0,0 +1,376 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="xml"
+ version="1.0"
+ encoding="UTF-8"
+ indent="yes"
+ omit-xml-declaration="yes"
+ doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" />
+
+<xsl:template match="/">
+
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+
+<!-- Establish character encoding -->
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+
+<!-- Force reload from server, not local cache -->
+<meta http-equiv="pragma" content="no-cache" />
+
+<!-- Allows search engine bots to index this page -->
+<meta name="ROBOTS" content="ALL" />
+
+<!-- Disables Microsoft's Smart Tags functionality on this page -->
+<meta name="MSSmartTagsPreventParsing" content="true" />
+
+<!-- Provides keywords for search engines -->
+<meta name="KEYWORDS"><xsl:attribute name="content"><xsl:value-of select="xml/global/keywords"/></xsl:attribute></meta>
+
+<title><xsl:value-of select="xml/global/title" /></title>
+
+<!-- Default stylesheet -->
+<style media="all" type="text/css">@import "css/styles_black.css";</style>
+
+<xsl:comment><![CDATA[[if IE]><link rel="stylesheet" href="css/ie.css" type="text/css" /><![endif] ]]></xsl:comment>
+<xsl:comment><![CDATA[[if lte IE 6]><link rel="stylesheet" type="text/css" media="screen" href="css/ie6.css" /><![endif]]]></xsl:comment>
+
+<script type="text/javascript" language="JavaScript">
+<xsl:comment><![CDATA[
+ logos = new Array();
+ logos[0] = 'assets/logo_black_01.png';
+ logos[1] = 'assets/logo_black_02.png';
+ logos[2] = 'assets/logo_black_03.png';
+ logos[3] = 'assets/logo_black_04.png';
+ logos[4] = 'assets/logo_black_05.png';
+ logos[5] = 'assets/logo_black_06.png';
+ logos[6] = 'assets/logo_black_07.png';
+ logos[7] = 'assets/logo_black_08.png';
+ logos[8] = 'assets/logo_black_09.png';
+ logos[9] = 'assets/logo_black_10.png';
+ logos[10] = 'assets/logo_black_11.png';
+ logos[11] = 'assets/logo_black_12.png';
+
+ var loadCSS = function(file) {
+ var link = document.createElement('link');
+ link.href = file;
+ link.rel = 'stylesheet';
+ link.type = 'text/css';
+ document.getElementsByTagName('head')[0].appendChild(link);
+ };
+
+ function newImage()
+ {
+ r = Math.round(Math.random()*11);
+ document.getElementById("logo").setAttribute("src", logos[r])
+
+ // get corresponding stylesheet
+ if (r == 0) { loadCSS('css/styles_black_01.css'); }
+ if (r == 1) { loadCSS('css/styles_black_02.css'); }
+ if (r == 2) { loadCSS('css/styles_black_03.css'); }
+ if (r == 3) { loadCSS('css/styles_black_04.css'); }
+ if (r == 4) { loadCSS('css/styles_black_05.css'); }
+ if (r == 5) { loadCSS('css/styles_black_06.css'); }
+ if (r == 6) { loadCSS('css/styles_black_07.css'); }
+ if (r == 7) { loadCSS('css/styles_black_08.css'); }
+ if (r == 8) { loadCSS('css/styles_black_09.css'); }
+ if (r == 9) { loadCSS('css/styles_black_10.css'); }
+ if (r == 10) { loadCSS('css/styles_black_11.css'); }
+ if (r == 11) { loadCSS('css/styles_black_12.css'); }
+
+ }
+]]></xsl:comment>
+</script>
+
+<script src="scripts/menu.js" type="text/javascript"></script>
+
+</head>
+
+<body>
+
+<!-- logo -->
+<div class="logo"><a href="index.php"><img src="assets/spacer.gif" alt="sugarlabs" width="202" height="45" border="0" id="logo" /></a></div>
+
+<!-- menu -->
+
+<!-- set variable to get section -->
+<ul id="menu">
+ <li>
+ <a href="#" name="hint" class="current">menu</a>
+ <ul id="expanded_menu_1">
+ <li><a href="index.php" name="index" class="selected">index</a></li>
+
+ <xsl:for-each select="//xml/sections/section">
+
+ <li>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:text>index.php?template=page&amp;page=</xsl:text>
+ <xsl:value-of select="./@id"/>
+ </xsl:attribute>
+ <xsl:value-of select="./@title"/>
+ </a>
+
+ <xsl:if test="section">
+ <ul id="expanded_menu_2">
+ <xsl:for-each select="section">
+ <li>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:text>index.php?template=page&amp;page=</xsl:text>
+ <xsl:value-of select="./@id"/>
+ </xsl:attribute>
+ <xsl:value-of select="./@title"/>
+ </a>
+
+ <xsl:if test="section">
+ <ul id="expanded_menu_3">
+ <xsl:for-each select="section">
+ <li>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:text>index.php?template=page&amp;page=</xsl:text>
+ <xsl:value-of select="./@id"/>
+ </xsl:attribute>
+ <xsl:value-of select="./@title"/>
+ </a>
+
+ <xsl:if test="section">
+ <ul id="expanded_menu_4">
+ <xsl:for-each select="section">
+ <li>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:text>index.php?template=page&amp;page=</xsl:text>
+ <xsl:value-of select="./@id"/>
+ </xsl:attribute>
+ <xsl:value-of select="./@title"/>
+ </a>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </li>
+</ul>
+
+<!-- global links -->
+<div class="links-container">
+ <span class="links">
+ <xsl:for-each select="xml/links/link">
+ <a class="link">
+ <xsl:attribute name="href">
+ <xsl:value-of select="./@url"/>
+ </xsl:attribute>
+ <xsl:value-of select="."/>
+ </a>
+ <xsl:if test="position() &lt; count(//xml/links/link)">
+ <xsl:text> / </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </span>
+</div>
+
+<!-- main content well -->
+<div class="content-container">
+
+ <div class="content">
+ <ul id="keyphrases" class="content">
+ <xsl:for-each select="//keyphrase">
+
+ <xsl:sort select="." data-type="text" order="ascending"/>
+
+ <li class="keyphrase">
+ <xsl:attribute name="id">
+ <xsl:text>line</xsl:text>
+ <xsl:value-of select="position()"/>
+ </xsl:attribute>
+
+ <xsl:variable name="key"><xsl:value-of select="." /></xsl:variable>
+ <a class="link">
+ <xsl:attribute name="href">
+ <xsl:text>index.php?template=page&amp;page=</xsl:text>
+ <xsl:value-of select="ancestor::page/@id" />
+
+ <xsl:text>#phrase</xsl:text>
+ <xsl:for-each select="//keyphrase">
+
+ <xsl:if test=". = $key">
+ <xsl:value-of select="position()" />
+ </xsl:if>
+
+ </xsl:for-each>
+ </xsl:attribute>
+ <xsl:text>...</xsl:text>
+ <xsl:value-of select="./@title"/>
+ <xsl:text>...</xsl:text>
+ </a>
+
+ </li>
+ </xsl:for-each>
+ </ul>
+ </div>
+
+ <!-- sidebar -->
+ <xsl:if test="//xml/page[@id = 'index']/sidebar">
+ <div class="sidebar">
+ <xsl:for-each select="//xml/page[@id = 'index']/sidebar/*">
+ <xsl:if test="local-name()='thumbnail'">
+ <div class="thumb-wrapper spc last">
+ <div class="spc">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:if test="@id">
+ <xsl:text>index.php?template=page&amp;page=</xsl:text>
+ <xsl:value-of select="@id"/>
+ </xsl:if>
+ <xsl:if test="@url">
+ <xsl:value-of select="@url"/>
+ </xsl:if>
+ </xsl:attribute>
+
+ <xsl:apply-templates select="image" />
+ </a>
+ </div>
+ <xsl:if test="title">
+ <div>
+ <a class="link">
+ <xsl:attribute name="href">
+ <xsl:if test="@id">
+ <xsl:text>index.php?template=page&amp;page=</xsl:text>
+ <xsl:value-of select="@id"/>
+ </xsl:if>
+ <xsl:if test="@url">
+ <xsl:value-of select="@url"/>
+ </xsl:if>
+ </xsl:attribute>
+
+ <xsl:value-of select="title"/>
+ </a>
+ </div>
+ </xsl:if>
+ <xsl:if test="caption">
+ <div class="links"><xsl:apply-templates select="caption"/></div>
+ </xsl:if>
+ </div>
+ </xsl:if>
+ <xsl:if test="local-name()='paragraph'">
+ <div class="links clr"><xsl:apply-templates select="."/></div>
+ </xsl:if>
+ </xsl:for-each>
+ </div>
+ </xsl:if>
+</div>
+
+<!-- global pagination -->
+
+<xsl:if test="//page[@id = 'index']/@paginate">
+<div class="pagination">
+
+ <xsl:if test="2 &lt;= count(//page[@paginate])">
+ <a class="link">
+ <xsl:attribute name="href">
+ <xsl:text>index.php?template=page&amp;page=</xsl:text>
+
+ <xsl:for-each select="//page[@paginate]">
+ <xsl:if test="position() = 2">
+ <xsl:value-of select="./@id"/>
+ </xsl:if>
+ </xsl:for-each>
+
+ </xsl:attribute>
+ <xsl:text>next &#62;</xsl:text>
+ </a>
+ </xsl:if>
+
+</div>
+</xsl:if>
+
+<!-- footer -->
+<div class="footer"><xsl:apply-templates select="xml/global/footer" /></div>
+
+<script type="text/javascript">
+<xsl:comment><![CDATA[
+
+newImage();
+
+var res = new Array();
+var timeout_val = 100;
+
+var n = 0;
+var keyphrases = document.getElementById("keyphrases");
+var labels = keyphrases.getElementsByTagName("li");
+
+for (n = 1; n <= labels.length; n++) {
+ var str = "line" + n;
+ document.getElementById(str).style.visibility = "hidden";
+ var str2 = "timer_func(" + n + ")";
+ res[n] = setTimeout(str2, timeout_val * n);
+}
+
+function timer_func(line)
+{
+ var str = "line" + line;
+ document.getElementById(str).style.visibility = "visible";
+}
+
+]]></xsl:comment>
+</script>
+</body>
+</html>
+</xsl:template>
+
+<!-- formatting -->
+
+<xsl:template match="link">
+ <a xmlns="http://www.w3.org/1999/xhtml" class="link">
+ <xsl:if test="@external">
+ <xsl:attribute name="target">_blank</xsl:attribute>
+ </xsl:if>
+ <xsl:attribute name="href">
+ <xsl:if test="@url"><xsl:value-of select="@url"/></xsl:if>
+ <xsl:if test="@id">index.php?template=page&#38;page=<xsl:value-of select="@id"/></xsl:if>
+ </xsl:attribute>
+ <xsl:value-of select="."/>
+ </a>
+</xsl:template>
+
+<xsl:template match="line-break">
+ <br xmlns="http://www.w3.org/1999/xhtml" />
+</xsl:template>
+
+<xsl:template match="italic">
+ <em xmlns="http://www.w3.org/1999/xhtml">
+ <xsl:value-of select="."/>
+ </em>
+</xsl:template>
+
+<xsl:template match="image">
+ <img border="0">
+ <xsl:attribute name="src"><xsl:value-of select="@url"/></xsl:attribute>
+ <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
+ <xsl:attribute name="height"><xsl:value-of select="@height"/></xsl:attribute>
+ <xsl:if test="./@border">
+ <xsl:attribute name="class">thumb</xsl:attribute>
+ </xsl:if>
+ </img>
+</xsl:template>
+
+<xsl:template match="headline">
+ <span class="headline">
+ <xsl:value-of select="."/>
+ </span>
+</xsl:template>
+
+</xsl:stylesheet> \ No newline at end of file