[10917] | 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 | |
---|
[10936] | 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" /> |
---|
[10917] | 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 --> |
---|
[10925] | 29 | <rules css:if-content="body.kofa-body"> |
---|
[10917] | 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 | <replace css:theme-children="ol.kofa-breadcrumbs" |
---|
| 53 | css:content="ul.breadcrumb li" /> |
---|
| 54 | <drop css:theme="div.kofa-breadcrumbs-box" |
---|
| 55 | css:if-not-content="ul.breadcrumb" /> |
---|
| 56 | |
---|
| 57 | <!-- sidebar --> |
---|
| 58 | |
---|
| 59 | <drop css:theme="div.kofa-sidebar" |
---|
| 60 | css:if-not-content="div.sidebar" /> |
---|
[10969] | 61 | <replace css:theme-children="div.sidebar-nav" |
---|
| 62 | css:content-children="div.well" /> |
---|
[10917] | 63 | |
---|
| 64 | <!-- content --> |
---|
| 65 | |
---|
| 66 | <!-- drop one of the both content areas, depending on sidebar --> |
---|
| 67 | |
---|
| 68 | <drop css:theme="div.kofa-content-narrow" |
---|
| 69 | css:if-not-content="div.sidebar" /> |
---|
| 70 | <drop css:theme="div.kofa-content-wide" |
---|
| 71 | css:if-content="div.sidebar" /> |
---|
| 72 | <replace css:theme-children="div.kofa-content" |
---|
| 73 | css:content-children="div.kofa-content" /> |
---|
| 74 | |
---|
| 75 | |
---|
| 76 | <!-- scripts --> |
---|
| 77 | <drop css:theme="script.kofa-script-tooltip" |
---|
| 78 | css:if-not-content="[data-toggle=tooltip]" /> |
---|
| 79 | |
---|
| 80 | <!-- |
---|
| 81 | <after css:theme-children="html head" |
---|
| 82 | css:content="html head meta" /> |
---|
| 83 | --> |
---|
| 84 | <!-- |
---|
| 85 | <after css:theme-children="html head" |
---|
| 86 | css:content="html head base" /> |
---|
| 87 | --> |
---|
| 88 | |
---|
| 89 | <!-- top navigation --> |
---|
| 90 | <!-- left top navigation --> |
---|
| 91 | <!-- |
---|
| 92 | <replace css:theme-children="ul.kofa-navbar-left" |
---|
| 93 | css:content-children="ul.kofa-navbar-left" /> |
---|
| 94 | --> |
---|
| 95 | |
---|
| 96 | <!-- the language selector |
---|
| 97 | |
---|
| 98 | quite tricky. We insert a <li> element at end of |
---|
| 99 | ul.kofa-navbar-left. This <li> has a header element |
---|
| 100 | (the 'Language' button) and the a number of <li> elements |
---|
| 101 | representing the supported languages. |
---|
| 102 | We change the input content of format |
---|
| 103 | |
---|
| 104 | <a href="foo" title="Lang">Abbrev</a> |
---|
| 105 | |
---|
| 106 | to |
---|
| 107 | |
---|
| 108 | <a href="foo">Lang</a> |
---|
| 109 | |
---|
| 110 | creating new nodes (<xsl:element>) with attributes copied over. |
---|
| 111 | --> |
---|
| 112 | <after css:theme-children="ul.kofa-navbar-left"> |
---|
| 113 | <li class="dropdown kofa-langselect"> |
---|
| 114 | <a href="#" class="dropdown-toggle" |
---|
| 115 | data-toggle="dropdown">Language <b class="caret"></b></a> |
---|
| 116 | <ul class="dropdown-menu"> |
---|
| 117 | <xsl:for-each css:select=" .language a"> |
---|
| 118 | <li class="kofa-language"> |
---|
| 119 | <xsl:element name="a"> |
---|
| 120 | <xsl:attribute name="href"> |
---|
| 121 | <xsl:value-of select="@href" /> |
---|
| 122 | </xsl:attribute> |
---|
| 123 | <xsl:value-of select="@title" /> |
---|
| 124 | </xsl:element> |
---|
| 125 | </li> |
---|
| 126 | </xsl:for-each> |
---|
| 127 | </ul> |
---|
| 128 | </li> |
---|
| 129 | </after> |
---|
| 130 | |
---|
| 131 | |
---|
| 132 | |
---|
| 133 | |
---|
| 134 | </rules> |
---|
| 135 | |
---|
| 136 | </rules> |
---|