<rules
    xmlns="http://namespaces.plone.org/diazo"
    xmlns:css="http://namespaces.plone.org/diazo/css"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <!-- IDENTIFY THE THEME HTML TEMPLATE -->
    <theme href="http://pigeonflight.github.com/diazodemo/index.html"
         css:if-content="#visual-portal-wrapper"/>

    <!-- * METADATA * -->
    <!-- REPLACE THE TITLE -->
    <replace theme="/html/head/title" content="/html/head/title" /> 

    <!-- ADD STYLE, SCRIPT and META TAGS from CONTENT -->
    <before theme-children="/html/head" 
        content="/html/head/link | /html/head/style | /html/head/script | /html/head/meta" />


    <!-- * MAIN CONTENT * -->
    <replace css:theme-children="#main_content"
     css:content-children="#content"/> 

    <!-- NAVIGATION moved to the FOOTER -->
    <replace css:theme-children="footer .ribbon-inner"
        css:content="#portal-globalnav" />

    <drop css:content="#portal-globalnav" attributes="id" />


    <!-- * CUSTOM HEADER * -->
    <replace css:theme-children="header h1">
         <xsl:value-of select="//*[@id='portal-logo']/@title"/>
    </replace>
    <replace css:theme-children="header h2">
          <xsl:value-of 
             select="/html/head/meta[@name='description']/@content"/>
    </replace>
    <after css:theme="#forkme_banner">
        <!-- utility to get back to the theming panel -->
        <a id="adjust-theme" class="shadowed" href="../../../../@@theming-controlpanel">theme controlpanel</a>
        
    </after>

</rules>
