Advertisement
Guest User

Untitled

a guest
May 6th, 2024
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.51 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <rules xmlns="http://namespaces.plone.org/diazo"
  3. xmlns:css="http://namespaces.plone.org/diazo/css"
  4. xmlns:xhtml="http://www.w3.org/1999/xhtml"
  5. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  6. xmlns:xi="http://www.w3.org/2001/XInclude">
  7.  
  8. <!--
  9. You can include this rules file in your own theme as follows:
  10.  
  11. <rules xmlns="http://namespaces.plone.org/diazo"
  12. xmlns:css="http://namespaces.plone.org/diazo/css"
  13. xmlns:xhtml="http://www.w3.org/1999/xhtml"
  14. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  15. xmlns:xi="http://www.w3.org/2001/XInclude">
  16. <xi:include href="++theme++barceloneta/backend.xml" />
  17. <rules css:if-content="body.viewpermission-view, body.viewpermission-none">
  18. <theme href="index.html" />
  19. ... your rules
  20. </rules>
  21. </rules>
  22.  
  23. This will include the toolbar in your theme and use Barceloneta to theme
  24. all your backend pages such as site setup and edit.
  25. -->
  26.  
  27. <!-- Toolbar -->
  28. <before css:theme-children="body" css:content-children="#edit-bar" css:if-not-content=".ajax_load" css:if-content=".userrole-authenticated" />
  29. <replace css:theme="#anonymous-actions" css:content-children="#portal-personaltools-wrapper" css:if-not-content=".ajax_load" css:if-content=".userrole-anonymous" />
  30.  
  31. <!-- We don't want overlays -->
  32. <drop attributes="class" css:content="#edit-bar a.pat-plone-modal" />
  33.  
  34. <!-- Cut down barceloneta without just for backend UI -->
  35. <rules css:if-not-content="body.viewpermission-view, body.viewpermission-none">
  36.  
  37. <theme href="../++theme++barceloneta/index.html" />
  38. <notheme css:if-not-content="#visual-portal-wrapper" />
  39.  
  40. <!-- We can't control the bundle from here due to include. Just hard code -->
  41. <after css:theme-children="head">
  42. <link rel="stylesheet" href="/++theme++barceloneta/less/barceloneta-compiled.css" />
  43. </after>
  44.  
  45. <rules css:if-content="#portal-top">
  46. <!-- Attributes -->
  47. <copy attributes="*" css:theme="html" css:content="html" />
  48. <!-- Base tag -->
  49. <before css:theme="title" css:content="base" />
  50. <!-- Title -->
  51. <replace css:theme="title" css:content="title" />
  52. <!-- Pull in Plone Meta -->
  53. <after css:theme-children="head" css:content="head meta" />
  54. <!-- Don't use Plone icons, use the theme's -->
  55. <drop css:content="head link[rel='apple-touch-icon']" />
  56. <drop css:content="head link[rel='shortcut icon']" />
  57. </rules>
  58.  
  59. <!-- Copy over the id/class attributes on the body tag. This is important for per-section styling -->
  60. <copy attributes="*" css:content="body" css:theme="body" />
  61.  
  62. <!-- CSS -->
  63. <drop css:content="head link[data-bundle='diazo']" />
  64. <after css:theme-children="head" css:content="head link" />
  65.  
  66. <!-- Script -->
  67. <drop css:content="head script[data-bundle='diazo']" />
  68. <after css:theme-children="head" css:content="head script" />
  69.  
  70. <!-- We don't need global nav -->
  71. <drop css:theme="#mainnavigation-wrapper" />
  72.  
  73. <!-- Hero unit on homepage only -->
  74. <drop css:theme="div.principal" css:if-not-content="body.template-document_view.section-front-page" />
  75.  
  76. <!-- Full-width breadcrumb -->
  77. <replace css:theme="#above-content" css:content="#viewlet-above-content" />
  78. <after css:theme-children="head">
  79. <style>.plone-breadcrumb {margin-top: 0;}</style>
  80. </after>
  81.  
  82. <!-- Central column -->
  83. <replace css:theme="#content-container" method="raw">
  84. <xsl:variable name="central">
  85. <xsl:if test="//aside[@id='portal-column-one'] and //aside[@id='portal-column-two']">col-xs-12 col-sm-6</xsl:if>
  86. <xsl:if test="//aside[@id='portal-column-two'] and not(//aside[@id='portal-column-one'])">col-xs-12 col-sm-9</xsl:if>
  87. <xsl:if test="//aside[@id='portal-column-one'] and not(//aside[@id='portal-column-two'])">col-xs-12 col-sm-9</xsl:if>
  88. <xsl:if test="not(//aside[@id='portal-column-one']) and not(//aside[@id='portal-column-two'])">col-xs-12 col-sm-12</xsl:if>
  89. </xsl:variable>
  90. <div class="{$central}">
  91. <div class="row">
  92. <div class="col-xs-12 col-sm-12">
  93. <xsl:apply-templates css:select="#content" />
  94. </div>
  95. </div>
  96. <footer class="row">
  97. <div class="col-xs-12 col-sm-12">
  98. <xsl:copy-of css:select="#viewlet-below-content" />
  99. </div>
  100. </footer>
  101. </div><!--/row-->
  102. </replace>
  103.  
  104. <!-- Alert message -->
  105. <replace css:theme-children="#global_statusmessage" css:content-children="#global_statusmessage" />
  106.  
  107. <!-- Left column -->
  108. <rules css:if-content="#portal-column-one">
  109. <replace css:theme="#column1-container">
  110. <div class="col-xs-6 col-sm-3 sidebar-offcanvas">
  111. <aside id="portal-column-one">
  112. <xsl:copy-of css:select="#portal-column-one > *" />
  113. </aside>
  114. </div>
  115. </replace>
  116. </rules>
  117.  
  118. <!-- Right column -->
  119. <rules css:if-content="#portal-column-two">
  120. <replace css:theme="#column2-container">
  121. <div class="col-xs-6 col-sm-3 sidebar-offcanvas" role="complementary">
  122. <aside id="portal-column-two">
  123. <xsl:copy-of css:select="#portal-column-two > *" />
  124. </aside>
  125. </div>
  126. </replace>
  127. </rules>
  128.  
  129. <!-- Content header -->
  130. <drop css:theme="#portal-top" />
  131. <drop css:theme="#portal-footer-wrapper" />
  132.  
  133. </rules>
  134.  
  135. </rules>
  136.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement