wrap everything in another div to enable centering of page
[cmcms:cmcms.git] / src / index.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3
4 cmcms == CMCMS Content Management System
5 Copyright (C) 2008,2009,2010,2012  Claude Heiland-Allen <claudiusmaximus@goto10.org>
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU Affero General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU Affero General Public License for more details.
16
17 You should have received a copy of the GNU Affero General Public License
18 along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
20 -->
21 <xsl:stylesheet version="1.0"
22  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
23  xmlns="http://www.w3.org/1999/xhtml">
24 <xsl:output method="xml" indent="no" encoding="UTF-8"
25  doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
26  doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" />
27 <xsl:param name="SITENAME" />
28 <xsl:param name="HEADER1" />
29 <xsl:param name="HEADER2" />
30 <xsl:param name="FOOTER" />
31 <xsl:template match="/">
32 <html>
33 <head>
34 <title>index :: <xsl:value-of select="$SITENAME" /></title>
35 <link rel="stylesheet" type="text/css" href="cmcms.css" title="cmcms" />
36 <link rel="alternate stylesheet" type="text/css" href="print.css" title="print" />
37 <link rel="alternate" type="application/rss+xml" href="index.rss" title="{$SITENAME} news feed" />
38 </head>
39 <body><div class="body">
40 <div class="top">
41 <div class="header">
42 <xsl:copy-of select="document($HEADER1)" />
43 <xsl:copy-of select="document($HEADER2)" />
44 </div>
45 <div class="main">
46 <h2>index</h2>
47 <xsl:for-each select="pages/page">
48 <xsl:variable name="me" select="file" />
49 <div class="pageref" id="p_{file}">
50 <h3><a class="title" href="{file}.html" title="{title}" ><xsl:value-of select="title" /></a></h3>
51 <div class="date"><a href="./#p_{$me}"><xsl:value-of select="date" /></a></div>
52 <ul class="tags">
53 <xsl:for-each select="tag">
54 <li><a class="tag" href="{.}.html#p_{$me}" title="{.}"><xsl:value-of select="." /></a></li>
55 </xsl:for-each>
56 </ul>
57 <div class="summary"><xsl:copy-of select="summary/node()" /></div>
58 </div>
59 </xsl:for-each>
60 <div class="separator" />
61 </div>
62 </div>
63 <xsl:copy-of select="document($FOOTER)" />
64 </div></body>
65 </html>
66 </xsl:template>
67 </xsl:stylesheet>