</main>
</div>
</div>

<footer class="footer">

	{# Add custom footer #}
	{{ page.back.custom.footer|removeComments|replace({'{{copy}}': '<p>&copy; ' ~ page.current_year ~ ' <a href="' ~ rootpath ~ '/">' ~ page.base_url ~ '</a></p>'})|trim }}

	{# Below link will NOT display for licensed X3 websites.
		 Removing the below code will break the X3 application. Get a license! #}
	<p class="x3-footer-link"><span data-nosnippet>X3 {{ random(['Photo Gallery Website', 'Photography Website', 'Image Gallery CMS', 'Website for Photographers', 'Online Portfolio']) }} by <a href="https://www.photo.gallery">www.photo.gallery</a></span></p>
</footer>

{# X3 Settings + JS #}
<script>
var x3_settings = {{ jsonSettings(page) }};
var x3_page = {{ pageJson(page_title, page_description, '', page.template_name, page.id, preview_image_full, page.permalink, page.file_path) }};
{% if page.settings.cdn_core %}
function jsFail(){
	var s = document.createElement('script');
	s.type = 'text/javascript';
	s.onload = imagevue_;
	s.src = '{{ local_js }}';
	document.getElementsByTagName('head')[0].appendChild(s);
}
{% endif %}
</script>

{# Custom Javascript files from /content/custom/javascript #}
{% set custom_js_files = x3_glob('./content/custom/files/javascript/*include*.js', '<script id="custom_javascript_{{index}}" src="' ~ assetspath ~ '/content/custom/files/javascript/{{basename}}"></script>') %}
{% if custom_js_files %}{{ custom_js_files }}{% endif %}

{# Custom Javascript #}
{% if page.back.custom.js|trim is not empty %}
<script id="custom-javascript">{{ page.back.custom.js|trim }}</script>
{% endif %}

{# Javascript#}
{% if page.settings.cdn_core %}
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/animejs@3.2.1/lib/anime.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/velocity-animate@1.0.1/velocity.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/velocity-animate@1.0.1/velocity.ui.min.js"></script>
{% if page.gallery.layout == 'slideshow' %}<script src="https://cdn.jsdelivr.net/npm/fotorama@4.6.4/fotorama.js"></script>{% endif %}
<script src="https://cdn.jsdelivr.net/npm/string@3.3.3/dist/string.min.js"></script>
{% else %}
<script src="{{ local_public }}/vendor/jquery/3.5.1/jquery.min.js"></script>
<script src="{{ local_public }}/vendor/animejs/3.2.1/anime.min.js"></script>
<script src="{{ local_public }}/vendor/velocity/1.0.1/velocity.min.js"></script>
<script src="{{ local_public }}/vendor/velocity/1.0.1/velocity.ui.min.js"></script>
{% if page.gallery.layout == 'slideshow' %}<script src="{{ local_public }}/vendor/fotorama/4.6.4/fotorama.js"></script>{% endif %}
<script src="{{ local_public }}/vendor/stringjs/3.3.3/string.min.js"></script>
{% endif %}

{# X3 JS App #}
<script src="{{ core_js }}"{% if page.settings.cdn_core %} onerror="jsFail()"{% endif %} onload="imagevue{% if page.settings.cdn_core %}_{% endif %}();"></script>

</body>
</html>