source: main/waeup.diazo/trunk/kofa/base.xml @ 10525

Last change on this file since 10525 was 10164, checked in by uli, 12 years ago

More markup and rules to get the layout basically working.

File size: 2.9 KB
RevLine 
[10114]1<?xml version="1.0" encoding="UTF-8"?>
2<rules
3    xmlns="http://namespaces.plone.org/diazo"
4    xmlns:css="http://namespaces.plone.org/diazo/css"
5    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6    xmlns:xi="http://www.w3.org/2001/XInclude">
7
8  <rules>
9
10    <theme href="theme.html" />
11
[10159]12    <!-- head elements -->
[10114]13    <replace css:theme="html head title"
14             css:content="html head title" />
15    <after css:theme-children="html head"
16           css:content="html head meta" />
17    <after css:theme-children="html head"
18           css:content="html head base" />
[10159]19
20    <!-- top navigation -->
21    <!-- left top navigation -->
22    <replace css:theme-children="ul.kofa-navbar-left"
23             css:content-children="ul.kofa-navbar-left" />
24
25    <!-- the language selector
26
27      quite tricky. We insert a <li> element at end of
28      ul.kofa-navbar-left. This <li> has a header element
29      (the 'Language' button) and the a number of <li> elements
30      representing the supported languages.
31      We change the input content of format
32
33         <a href="foo" title="Lang">Abbrev</a>
34
35      to
36
37         <a href="foo">Lang</a>
38
39      creating new nodes (<xsl:element>) with attributes copied over.
40    -->
41    <after css:theme-children="ul.kofa-navbar-left">
42      <li class="dropdown kofa-langselect">
43        <a href="#" class="dropdown-toggle"
44           data-toggle="dropdown">Language <b class="caret"></b></a>
45        <ul class="dropdown-menu">
46          <xsl:for-each css:select=" .language a">
47            <li class="kofa-language">
48              <xsl:element name="a">
49                <xsl:attribute name="href">
50                  <xsl:value-of select="@href" />
51                </xsl:attribute>
52                <xsl:value-of select="@title" />
53              </xsl:element>
54            </li>
55          </xsl:for-each>
56        </ul>
57      </li>
58    </after>
59
60    <!-- right side top navigation -->
61    <replace css:theme-children="ul.kofa-navbar-right"
62             css:content-children="ul.kofa-navbar-right" />
63
[10164]64    <!-- breadcrumbs -->
65    <replace css:theme-children="ul.kofa-breadcrumbs"
66             css:content="ul.breadcrumb li" />
67    <drop css:theme="div.kofa-breadcrumbs-box"
68          css:if-not-content="ul.breadcrumb" />
[10159]69
[10164]70    <!-- sidebar -->
71    <drop css:theme="div.kofa-sidebar"
72          css:if-not-content="div.sidebar" /><!-- drop if not in content -->
73    <replace css:theme-children=".kofa-sidebar-title"
74             css:content-children="div.sidebar h5" />
75    <replace css:theme-children=".kofa-sidebar-body"
76             css:content-children="div.sidebar ul" />
77
78    <!-- content -->
79
80    <!-- drop one of the both content areas, depending on sidebar -->
81    <drop css:theme="div.kofa-content-narrow"
82          css:if-not-content="div.sidebar" />
83    <drop css:theme="div.kofa-content-wide"
84          css:if-content="div.sidebar" />
85
86    <replace css:theme-children="div.kofa-content"
87             css:content-children="div.content" />
88
89
[10114]90  </rules>
91
92</rules>
Note: See TracBrowser for help on using the repository browser.