{% if general.site.site == 'boatcharteralgarve.com' %}
<meta name="google-site-verification" content="sLX8wwKfuHSyBrQSWLFv7CV8zsvpF3xs6S1P755aABE" />
{% endif %}
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>{{ site.title }}</title>
<meta name="description" content="{{ site.seo_desc }}">
<meta name="keywords" content="{{ site.seo_key }}">


{# og tags #}
<meta property="og:url" content="{{ root_url_scheme() }}://{{ general.site.site ?: server_name() }}/{{ siteLang }}"/>
<meta property="og:type" content="website"/>
<meta property="og:title" content="{{ site.title }}"/>
<meta property="og:description" content="{{ site.seo_desc }}"/>
{% for slide in slides %}
	<meta property="og:image" content="{{ root_url_scheme() }}://{{ general.site.site ?: server_name() }}/{{ slide }}"/>
{% endfor %}


{% if site.google_maps %}
<meta name="geo.position" content="{{ site.google_maps.ll | replace({',': ';'}) }}" />
<meta name="ICBM" content="{{ site.google_maps.ll | replace({',': ', '}) }}" />
{% endif %}

{# Previne o uso de iframes redireccionando para o site da WWD #}
{# <script>
	this.top.location !== this.location && (this.top.location = this.location.href = "http://www.worldwidedesign.org");
</script> #}
{% if context != 'preview' %}
<script>
    this.top.location.host !== this.location.host && (this.top.location = this.location.href = "//www.worldwidedesign.org");
</script>
{% endif %}

<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon">
<link rel="canonical" href="{{ root_url_scheme() }}://{{ general.site.site ?: server_name() }}/{{ siteLang }}">

{# verificar depois --  or (SERVER.SERVER_NAME matches '~^c1s\.int$~')#}
{% if (debug and adm_lvl >= 4) %}
<script type="text/javascript" src="//getfirebug.com/firebug-lite.js#startOpened={{ opened ? 'true' : 'false' }}"></script>
<script>
	window.addEventListener && window.addEventListener('error', function(e){
		console.log && console.log(e);
		var loader = document.getElementsByClassName('loader')[0];
		if(loader)
		{
			loader.parentNode.removeChild(loader);
		}
	});
	console.log && console.log({
		'navigator': window.navigator,
		'screen': window.screen,
		'performance': window.performance
	});
</script>
{% endif %}

{% if server_name() matches '~^(?:www\.)?criar1site.pt$~' %}
{# Start Alexa Certify Javascript #}
<script type="text/javascript">
_atrk_opts = { atrk_acct:"CAqBl1agWBr1Cs", domain:"criar1site.pt",dynamic: true};
(function() { var as = documenwindow.addEventListener('error',t.createElement('script')); as.type = 'text/javascript'; as.async = true; as.src = "https://d31qbv1cthcecs.cloudfront.net/atrk.js"; var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(as, s); })();
</script>
<noscript><img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=CAqBl1agWBr1Cs" style="display:none" height="1" width="1" alt="" /></noscript>
{# End Alexa Certify Javascript #}
{# Hotjar Tracking Code for www.criar1site.pt #}
<script>
	(function(h,o,t,j,a,r){
		h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
		h._hjSettings={hjid:62962,hjsv:5};
		a=o.getElementsByTagName('head')[0];
		r=o.createElement('script');r.async=1;
		r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
		a.appendChild(r);
	})(window,document,'//static.hotjar.com/c/hotjar-','.js?sv=');
</script>
{% elseif server_name() matches '~^(?:www\.)?worldwidedesign.pt$~' %}
{# Hotjar Tracking Code for www.worldwidedesign.pt #}
<script>
    (function(h,o,t,j,a,r){
        h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
        h._hjSettings={hjid:62910,hjsv:5};
        a=o.getElementsByTagName('head')[0];
        r=o.createElement('script');r.async=1;
        r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
        a.appendChild(r);
    })(window,document,'//static.hotjar.com/c/hotjar-','.js?sv=');
</script> 
{% elseif server_name() matches '~^(?:www\.)?peadvogados.pt$~' %}
<script type='text/javascript' data-cfasync='false'>window.purechatApi = { l: [], t: [], on: function () { this.l.push(arguments); } }; (function () { var done = false; var script = document.createElement('script'); script.async = true; script.type = 'text/javascript'; script.src = 'https://app.purechat.com/VisitorWidget/WidgetScript'; document.getElementsByTagName('HEAD').item(0).appendChild(script); script.onreadystatechange = script.onload = function (e) { if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) { var w = new PCWidget({c: 'ea5b83f5-1c7f-4c9c-a12b-fea3014235af', f: true }); done = true; } }; })();</script>
{% elseif server_name() matches '~^(?:www\.)?dareu.pt$~' %}
<script type='text/javascript' data-cfasync='false'>window.purechatApi = { l: [], t: [], on: function () { this.l.push(arguments); } }; (function () { var done = false; var script = document.createElement('script'); script.async = true; script.type = 'text/javascript'; script.src = 'https://app.purechat.com/VisitorWidget/WidgetScript'; document.getElementsByTagName('HEAD').item(0).appendChild(script); script.onreadystatechange = script.onload = function (e) { if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) { var w = new PCWidget({c: 'f0eb19dc-a2dd-423c-b36e-d43693f97b17', f: true }); done = true; } }; })();</script>
{% endif %}

{# extensions #}
{%- for ext in general.exts|filter(ext => ext.enabled) -%}
	{%- for dir in ['', '/layouts/' ~ layout_id()] -%}
		{%- set path = ext.ext_name ~ dir ~ '/style.css' -%}
		{%- if file_exists(root_front_path() ~ 'extensions/' ~ path) -%}
			<style>{{ source('@exts/' ~ path, true) | minify_css | raw }}</style>
		{%- endif -%}
	{%- endfor -%}
	{#
		<link href="/{{ ext.ext_name }}/style.css" rel="stylesheet" type="text/css">
		{% set path = ext.ext_name ~ '/style.css' %}
		{% if file_exists(constant('ROOT_FRONT') ~ 'extensions/' ~ path) %}
			<style>{{ source('@exts/' ~ path, true) | minify_css | raw }}</style>
		{% endif %}
		{% set path = ext.ext_name ~ '/layouts/' ~ constant('LAYOUT_ID') ~ '/style.css' %}
		{% if file_exists(constant('ROOT_FRONT') ~ 'extensions/' ~ path) %}
			<style>{{ source('@exts/' ~ path, true) | minify_css | raw }}</style>
		{% endif %}
	#}
	{# <style>
	{{ source('extensions/' ~ ext.ext_name ~ '/style.css', true) }}
	{{ source('extensions/' ~ ext.ext_name ~ '/layouts/' ~ constant('LAYOUT_ID') ~ '/style.css', true) }}
	</style> #}
{%- endfor -%}

{# ficheiros personalizados a adicionar #}
{% include [
		'@docroot/general/head.twig',
		'@doclayout/head.twig',
		'@docpages/head.twig'
	] ignore missing
%}

{# extensoes #}
{% if ext() and ext_file() and ext_enabled() %}
	{% include [
			'@extlayout/head.twig',
			'@extroot/head.twig'
		] ignore missing
	%}
{% endif %}

<style>{{ backgrounds | raw }}</style>

{% if fix_css_content is defined and fix_css_content %}
    <style>{{ fix_css_content | raw }}</style>
{% endif %}