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

<f:section name="body">
    <head>
        <f:if condition="{titleTag}">
            <title>{titleTag}</title>
        </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}">
            {headTag}
        </f:if>
        <f:if condition="{metaTag}">
            {metaTag}
        </f:if>

        <f:if condition="{customHTMLHead}">
            {customHTMLHead -> f:format.raw()}
        </f:if>

        <f:if condition="{customCSS}">
			<style>
				{customCSS}
            </style>
		</f:if>
    </head>

    <body>
        <f:if condition="{customHTML}">
            {customHTML -> f:format.raw()}
        </f:if>

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

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

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

        <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>
        <script src="{vh:uri.resource(path: 'Scripts/sitetracking.js', package: 'Newland.CityTheme')}"></script>

        <f:if condition="{javascriptTag}">
            {javascriptTag}
        </f:if>
    </body>
</f:section>
