source: main/ngren.theme/trunk/ngren/theme/ngren_theme/rules.xml @ 10433

Last change on this file since 10433 was 10265, checked in by uli, 11 years ago

Avoid full-width rendering also if #portal-column-two appears in page.
We have to extend this CSS or-expression for any id that might appear
in the right side box. Currenlty #newsportlet and #portal-column-two
are the only ones.

File size: 3.7 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  <theme href="home.html" css:if-content="body.template-frontpageview" />
9  <theme href="full.html" css:if-content="#portal-column-content.width-full"/>
10  <theme href="full.html"
11         css:if-not-content="#portal-column-two, #newsportlet" />
12  <theme href="example.html"/>
13  <notheme if="$ajax_load" />
14  <!--<notheme if="contains($path, 'manage')"/>-->
15  <notheme if="contains($path, 'plugins')"/>
16  <notheme if="contains($path, 'querybuilder')"/>
17  <notheme if="contains($path, 'advanced/anchor.htm')"/>
18  <notheme if="contains($path, 'advanced/source_editor.htm')"/>
19  <notheme if="contains($path, 'image_view_fullscreen')"/>
20  <notheme if-path="@@manage-viewlets" />
21
22
23  <!-- Head -->
24  <before content="/html/head/meta" css:theme="meta" />
25  <replace theme="/html/head/title" content="/html/head/title"
26           if-not-path="/" />
27  <replace theme="/html/head/base" content="/html/head/base" />
28  <append theme="/html/head" content="/html/head/script" />
29  <append theme="/html/head" content="/html/head/link | /html/head/style" />
30
31
32  <!-- Top / Header -->
33  <copy attributes="href" css:content='#portal-logo'
34        css:theme="#logo-container a" />
35
36  <!-- User options (upper right) -->
37  <!--      user name in options menu   -->
38  <replace css:theme-children="#user-options-name"
39           css:content-children="#portal-personaltools li:nth-child(1) a" />
40  <!--      href of username link -->
41  <copy attributes="href"
42        css:content="#portal-personaltools li:nth-child(1) a"
43        css:theme="#user-options a:nth-child(1)" />
44
45  <!--      2nd to last link of user options (separators filtered out)
46            These go into user options dropdown
47  -->
48  <copy css:theme="#user-options ul"
49        css:if-content="#portal-personaltools li:nth-child(3)">
50    <xsl:for-each css:select="#portal-personaltools li">
51      <xsl:if test="not(position() mod 2 = 0)">
52        <xsl:if test="not(position() = 1)">
53          <xsl:copy-of select="." />
54        </xsl:if>
55      </xsl:if>
56    </xsl:for-each>
57  </copy>
58  <!--       if user options are empty (only login and separator):
59             avoid dropdown -->
60  <drop css:theme="#user-options ul"
61        css:if-not-content="#portal-personaltools li:nth-child(3)">
62  </drop>
63  <drop css:theme="#user-options a:nth-child(2)"
64        css:if-not-content="#portal-personaltools li:nth-child(3)">
65  </drop>
66  <!-- /user-options -->
67
68  <replace css:theme=".navbar-form" css:content="#portal-searchbox form"/>
69  <drop css:content=".searchSection"/>
70  <drop css:content="#LSResult"/>
71
72
73  <replace css:theme-children="#menu-collapse .nav"
74           css:content-children="#portal-globalnav"/>
75  <!-- Frontpage Content -->
76  <replace css:theme=".full-col" css:content=".full-col"
77           css:if-content="body.template-frontpageview"/>
78  <replace css:theme=".rslides" css:content=".rslides"/>
79  <replace css:theme=".left-col" css:content=".left-col"
80           css:if-content="body.template-frontpageview"/>
81
82
83  <replace css:theme-children=".right-col"
84           css:content-children="#portal-column-two"
85           css:if-not-content="body.template-frontpageview"/>
86  <replace css:theme-children=".right-col"
87           css:content-children="#newsportlet"
88           css:if-content="body.template-frontpageview"/>
89
90  <!-- Content -->
91  <before css:theme=".rslides_container" css:content="#edit-bar"/>
92
93  <copy css:theme=".content-container"
94        css:content-children="#portal-column-content"/>
95
96  <!-- Footer -->
97  <replace css:theme=".footer .section"
98           css:content="#portal-footer-wrapper .section"/>
99
100</rules>
Note: See TracBrowser for help on using the repository browser.