{% extends "base.twig" %}

{% block content %}
    {% if post.parent %}
        <a class="back" href="{{ post.parent.link }}"><svg class="icon icon-chevron-left animated"><use xlink:href="#icon-chevron-left"></use></svg></a>
    {% endif %}
    <div class="container-fluid loc-container">
        <h2 class="loc-title">{{ post.title }}</h2>  
        {% if post.get_children(['page']) %}
        <div class="locations">
            {% for child in post.get_children(['page']) %}
                <a href="{{ child.link }}">
                    <div class="loc-item">
                        <h2>{{ child.title }}</h2>
                        <img src="{{ child.thumbnail.src }}" alt="{{ child.thumbnail.alt }}">
                    </div>
                </a>
            {% endfor %}
        </div>
        {% endif %}
    </div>
    <script>
        $(function () { objectFitImages() });
    </script>
{% endblock content %}
{% extends "base.twig" %}

{% block content %}
    {% if post.parent %}
        <a class="back" onclick="goBack()"><svg class="icon icon-chevron-left animated"><use xlink:href="#icon-chevron-left"></use></svg></a>
        <script>
            function goBack() {
                window.history.back();
            }
        </script>
    {% endif %}
    <div class="container-fluid loc-container">
        <h2 class="loc-title">{{ post.title }}</h2>  
        {% if post.get_children(['page']) %}
        <div class="locations">
            {% for child in post.get_children(['page']) %}
                <a href="{{ child.link }}">
                    <div class="loc-item">
                        <h2>{{ child.title }}</h2>
                        <img src="{{ child.thumbnail.src }}" alt="{{ child.thumbnail.alt }}">
                    </div>
                </a>
            {% endfor %}
        </div>
        {% endif %}
    </div>
    <script>
        $(function () { objectFitImages() });
    </script>
{% endblock content %}
Change back button to go back in history.
Change back button to go back in history.
