{namespace vh=Newland\NeosViewHelpers\ViewHelpers}
{namespace city=Newland\CityTheme\ViewHelpers}

<f:section name="body">
    <head>
        <f:if condition="{metaTag}">
            <meta id="{metaTag}"/>
        </f:if>

        <f:if condition="{titleTag}">
            <meta id="{titleTag}"/>
        </f:if>

        <link rel="apple-touch-icon" sizes="180x180" href="{neos.media:uri.image(image: appleIcon)}">
        <link rel="icon" type="image/png" sizes="32x32" href="{neos.media:uri.image(image: appleIcon)}">
        <link rel="icon" type="image/png" sizes="16x16" href="{neos.media:uri.image(image: appleIcon)}">
        <link rel="shortcut icon" href="{neos.media:uri.image(image: appleIcon)}">

        <f:render partial="TportalCriticalCSS" />

        {colors -> city:cssVariables.renderTag(prefix: 'color')}

        {headingFontSizeBase -> city:cssVariables.renderTag(prefix: 'heading-font-size-base')}
        {textFontSizeBase -> city:cssVariables.renderTag(prefix: 'text-font-size-base')}

        <f:render partial="Fonts" arguments="{_all}"/>
        <f:render partial="AsynchronousFontLoading" />

        <f:if condition="{headTag}">
            <div id="{headTag}"></div>
        </f:if>
    </head>

    <body>
        <f:render partial="IconSprite" />
        <f:render partial="Header" arguments="{_all}" />

        <f:if condition="{contentTag}">
            <div id="{contentTag}"></div>
        </f:if>

        <f:render partial="Footer" arguments="{_all}" />

        <f:if condition="{javascriptTag}">
            <div id="{javascriptTag}"></div>
        </f:if>

        <script>
            window.__citytheme_public_path__ = "{f:uri.resource(path: 'Scripts/', package: 'Newland.CityTheme')}";
        </script>

        <script src="{vh:uri.resource(path: 'Scripts/main.js', package: 'Newland.CityTheme')}"></script>
    </body>
</f:section>
