[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 --> |
---|
[10878] | 65 | <replace css:theme-children="ol.kofa-breadcrumbs" |
---|
[10164] | 66 | css:content="ul.breadcrumb li" /> |
---|
[10878] | 67 | <drop css:content=".divider" /> |
---|
[10164] | 68 | <drop css:theme="div.kofa-breadcrumbs-box" |
---|
| 69 | css:if-not-content="ul.breadcrumb" /> |
---|
[10159] | 70 | |
---|
[10164] | 71 | <!-- sidebar --> |
---|
| 72 | <drop css:theme="div.kofa-sidebar" |
---|
| 73 | css:if-not-content="div.sidebar" /><!-- drop if not in content --> |
---|
| 74 | <replace css:theme-children=".kofa-sidebar-title" |
---|
| 75 | css:content-children="div.sidebar h5" /> |
---|
| 76 | <replace css:theme-children=".kofa-sidebar-body" |
---|
| 77 | css:content-children="div.sidebar ul" /> |
---|
| 78 | |
---|
| 79 | <!-- content --> |
---|
| 80 | |
---|
| 81 | <!-- drop one of the both content areas, depending on sidebar --> |
---|
| 82 | <drop css:theme="div.kofa-content-narrow" |
---|
| 83 | css:if-not-content="div.sidebar" /> |
---|
| 84 | <drop css:theme="div.kofa-content-wide" |
---|
| 85 | css:if-content="div.sidebar" /> |
---|
| 86 | |
---|
| 87 | <replace css:theme-children="div.kofa-content" |
---|
| 88 | css:content-children="div.content" /> |
---|
| 89 | |
---|
| 90 | |
---|
[10114] | 91 | </rules> |
---|
| 92 | |
---|
| 93 | </rules> |
---|