<html>
{% set meta_page_title = page.seo.title|default(page_title)|striptags|e('html')|trim %}
{% set meta_page_description = page.seo.description|default(page_description)|striptags|e('html')|trim %}
<head>

{# Global site tag (gtag.js) - Google Analytics #}
{% if page.accounts.google_analytics %}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ page.accounts.google_analytics }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{ page.accounts.google_analytics }}');
</script>
{% endif %}

  {# Default Meta tags #}
  <meta charset="utf-8">
  <title>{{ meta_page_title }}</title>
  {% if meta_page_description %}<meta name="description" content="{{ meta_page_description }}">{% endif %}
  {% if page.seo.keywords %}<meta name="keywords" content="{{ page.seo.keywords|trim }}">{% endif %}
  {% if page.seo.robots %}<meta name="robots" content="{{ page.seo.robots|trim }}">{% endif %}
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <link rel="canonical" href="{{ absolutepath_page }}">

  {# Prefetch #}
  <link rel="dns-prefetch" href="//auth.photo.gallery">
  {% if page.settings.cdn_core %}<link rel="dns-prefetch" href="//cdn.jsdelivr.net">{% endif %}
  {% if page.settings.cdn_files %}<link rel="dns-prefetch" href="{{ page.settings.cdn_files|lower|trim('/')|trim('http:')|trim('https:') }}">{% endif %}

  {# Google Authorship, Publisher and site-verification #}
  {% if not page.accounts.google_author is empty %}<link rel="author" href="https://plus.google.com/{{ page.accounts.google_author }}">{% endif %}
  {% if page.accounts.google_site_verification is not empty %}<meta name="google-site-verification" content="{{ page.accounts.google_site_verification }}">{% endif %}

  {# Twitter Card data #}
  {% if not page.accounts.twitter_username is empty %}<meta name="twitter:site" content="@{{ page.accounts.twitter_username }}">{% endif %}

  {# Open Graph data #}
  <meta property="og:title" content="{{ meta_page_title }}">
  {% if meta_page_description %}<meta property="og:description" content="{{ meta_page_description }}">{% endif %}
  <meta property="og:url" content="{{ absolutepath_page }}">
  <meta property="og:type" content="website">
  <meta property="og:updated_time" content="{{ page.updated }}">
  {% if not page.accounts.facebook_author is empty %}<meta property="article:author" content="{{ page.accounts.facebook_author }}">{% endif %}
  {% if not page.accounts.facebook_publisher is empty %}<meta property="article:publisher" content="{{ page.accounts.facebook_publisher }}">{% endif %}

  {# og:image #}
  <meta property="og:image" content="{{ preview_image_full|e|replace({' ': '%20'}) }}">

  {# og image properties #}
  {% set imgInfo = getimginfo(preview_image) %}
  {% if imgInfo['mime'] %}<meta property="og:image:type" content="{{ imgInfo['mime'] }}">{% endif %}
  {% if imgInfo[0] %}<meta property="og:image:width" content="{{ imgInfo[0] }}" />{% endif %}
  {% if imgInfo[1] %}<meta property="og:image:height" content="{{ imgInfo[1] }}" />{% endif %}

  {# Fav Icon #}
  {% set favicon = firstImage('./content/custom/favicon') %}
  {% if favicon %}
  <link rel="icon" href="{{ assetspath }}{{ favicon }}">
  {% endif %}

  {# Atom Feed link #}
  {% if page.settings.feed %}
  <link href="{{ absolutepath }}/feed/" type="application/atom+xml" rel="alternate" title="Atom Feed">
  {% endif %}

  {# Add fallback for Skin CSS CDN fail #}
  {% if page.settings.cdn_core %}
<script>
var css_counter = 0;
function imagevue_(){
	css_counter ++;
	if(css_counter === 1) imagevue();
};
function cssFail(){
	css_counter --;
	var l = document.createElement('link');
	l.onload = imagevue_;
	l.rel = 'stylesheet';
	l.id = '{{ page.style.skin.skin }}';
	l.href = '{{ local_css }}';
	document.getElementsByTagName('head')[0].appendChild(l);
}
</script>
  {% endif %}

  {# Skin #}
  <link rel="stylesheet" id="{{ page.style.skin.skin }}" href="{{ core_css }}"{% if page.settings.cdn_core %} onerror="cssFail();"{% endif %}>

  {# interface language / must load after stylesheet to override #}
  {#{% if page.settings.lang != 'en' %}
  <link rel="stylesheet" href="{{ local_public }}/lang/{{ page.settings.lang }}.css">
  {% endif %}#}

	{# Google webfonts #}
	{% if page.style.font.font is not empty and page.style.font.font != 'none' %}
	<link rel="stylesheet" href="https://fonts.googleapis.com/css?family={{ page.style.font.font|default("Lato:400,700,900,400italic,700italic,900italic")|getfontstring }}">
	{% endif %}

	{# Custom HEAD #}
	{{ page.back.custom.head|removeComments|trim }}

	{# Default fonts #}
  <style id="default-fonts"><!-- body,h1,h2,h3,h4,h5,h6 {font-family: "Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;} --></style>

  {# Custom CSS #}
  {% if page.back.custom.css is not empty %}
  <style id="custom-css"><!-- {{ page.back.custom.css|minify }} --></style>
  {% endif %}

  {# custom page css #}
  {% if page.page_css %}
  <style id="custom-page-css">{{ page.page_css|minify }}</style>
  {% endif %}

  {# Custom logo css #}
  {% if page.back.custom.logo_css is not empty %}
  <style id="logo"><!-- {{ page.back.custom.logo_css|minify }} --></style>
  {% endif %}

  {# Custom CSS files from /content/custom/css #}
  {% set custom_css_files = x3_glob('./content/custom/files/css/*include*.css', '<link rel="stylesheet" id="custom_css_{{index}}" href="' ~ assetspath ~ '/content/custom/files/css/{{basename}}">') %}
  {% if custom_css_files %}{{ custom_css_files }}{% endif %}

  {# Style elements for custom colors and x3 app #}
  <style id="x3app"></style>

</head>

{% set layout = page.style.layout.layout|default('topbar-float') %}
{% if 'topbar' in layout %}{% set fixed = page.style.layout.fixed %}{% endif %}
{% if page.style.layout.wide %}{% set wide = 'wide' %}{% endif %}
{% set data_layout = (page.include.body ~ ' ' ~ page.body ~ ' ' ~ layout ~ ' ' ~ page.style.skin.skin ~ ' ' ~ fixed ~ ' ' ~ wide ~ ' ' ~ page.style.skin.clear ~ ' x3-' ~ page.template_name ~ ' slug-' ~ page.slug|attribute_friendly|default('index') ~ ' page-' ~ page.permalink|trim('/')|attribute_friendly|default('index'))|cleanData %}

{# body #}
<body class="fa-loading initializing {{ data_layout }}" data-include="{{ page.include.body|cleanData }}">
<div class="x3-loader" title="loading"></div>
<div class="sb-site-container">
  <div>

    {# Header navigation #}
    {% include 'partials/nav/header.html' %}

  	<main class="main" id="content">