source: main/waeup.kofa/branches/uli-diazo-themed/layout/rules.xml @ 11035

Last change on this file since 11035 was 11030, checked in by Henrik Bettermann, 11 years ago

Move student status into seperate box.

Enable responsive design in IE less than 9.

File size: 4.8 KB
Line 
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  <!-- Cases where we do not want themes... -->
9  <notheme if-path="/++grokui++" />  <!-- do not theme GrokUI -->
10  <notheme if-path="/_debug" /><!-- output by debugger -->
11  <notheme css:if-content="div#error-area" />
12
13  <!-- use error page if there is a <table class="layout">
14       tag in content. This tag is rendered in Zope 3 errors. -->
15  <rules css:if-content="table#layout">
16    <theme href="error-zope.html" />
17    <replace css:theme-children="#kofa-error-message"
18             css:content-children="h3" />
19  </rules>
20  <!-- use error page if there is no <div> tag in content.
21       This happens if something in the application went wrong. -->
22  <rules css:if-not-content="div">
23    <theme href="error-zope.html" />
24    <replace css:theme-children="#kofa-error-message"
25             css:content-children="body" />
26  </rules>
27
28  <!-- regular rules -->
29  <rules css:if-content="body.kofa-body">
30
31    <theme href="theme.html" />
32
33    <!-- head elements -->
34    <replace css:theme="html head title"
35             css:content="html head title" />
36
37    <!-- brand (upper left) -->
38    <copy attributes="href" css:theme="a.kofa-brand-link"
39          css:content="a.kofa-brand-link" />
40    <replace css:theme-children="a.kofa-brand-link"
41             css:content-children="a.kofa-brand-link" />
42
43    <!-- left top navigation -->
44    <replace css:theme-children="ul.kofa-navbar-left"
45             css:content-children="ul.kofa-navbar-left" />
46
47    <!-- right side top navigation -->
48    <replace css:theme-children="ul.kofa-navbar-right"
49             css:content-children="ul.kofa-navbar-right" />
50
51    <!-- breadcrumbs -->
52    <drop css:theme="div.kofa-breadcrumbs-box-long"
53          css:if-not-content="ul.breadcrumb" />
54    <drop css:theme="div.kofa-breadcrumbs-box-long"
55          css:if-content="div.wfstatus" />
56    <drop css:theme="div.kofa-breadcrumbs-box-short"
57          css:if-not-content="ul.breadcrumb" />
58    <drop css:theme="div.kofa-breadcrumbs-box-short"
59          css:if-not-content="div.wfstatus" />
60    <replace css:theme-children="ol.kofa-breadcrumbs"
61             css:content-children="ul.breadcrumb" />
62
63    <!-- student status -->
64    <drop css:theme="div.kofa-student-status-box"
65          css:if-not-content="div.wfstatus" />
66    <replace css:theme-children="div.wfstatus"
67             css:content-children="div.wfstatus" />
68
69    <!-- sidebar -->
70
71    <drop css:theme="div.kofa-sidebar"
72          css:if-not-content="div.sidebar" />
73    <replace css:theme-children="div.sidebar-nav"
74             css:content-children="div.sidebar" />
75
76    <!-- content -->
77
78    <!-- drop one of the both content areas, depending on sidebar -->
79
80    <drop css:theme="div.kofa-content-narrow"
81          css:if-not-content="div.sidebar" />
82    <drop css:theme="div.kofa-content-wide"
83          css:if-content="div.sidebar" />
84    <replace css:theme-children="div.kofa-content"
85             css:content-children="div.kofa-content" />
86
87
88    <!-- scripts -->
89    <drop css:theme="script.kofa-script-tooltip"
90          css:if-not-content="[data-toggle=tooltip]" />
91
92<!--
93    <after css:theme-children="html head"
94           css:content="html head meta" />
95-->
96<!--
97    <after css:theme-children="html head"
98           css:content="html head base" />
99-->
100
101    <!-- top navigation -->
102    <!-- left top navigation -->
103<!--
104    <replace css:theme-children="ul.kofa-navbar-left"
105             css:content-children="ul.kofa-navbar-left" />
106-->
107
108    <!-- the language selector
109
110      quite tricky. We insert a <li> element at beginning of
111      ul.kofa-navbar-right. This <li> has a header element
112      (the 'Language' button) and the a number of <li> elements
113      representing the supported languages.
114      We change the input content of format
115
116         <a href="foo" title="Lang">Abbrev</a>
117
118      to
119
120         <a href="foo">Lang</a>
121
122      creating new nodes (<xsl:element>) with attributes copied over.
123    -->
124    <after css:theme-children="ul.kofa-navbar-right">
125      <li class="dropdown kofa-langselect">
126        <a href="#" class="dropdown-toggle"
127           data-toggle="dropdown">
128           <img src="/static/static/img/earth.png" />
129        </a>
130        <ul class="dropdown-menu">
131          <xsl:for-each css:select=" .language a">
132            <li class="kofa-language">
133              <xsl:element name="a">
134                <xsl:attribute name="href">
135                  <xsl:value-of select="@href" />
136                </xsl:attribute>
137                <xsl:value-of select="@title" />
138              </xsl:element>
139            </li>
140          </xsl:for-each>
141        </ul>
142      </li>
143    </after>
144
145
146
147
148  </rules>
149
150</rules>
Note: See TracBrowser for help on using the repository browser.