{% load wagtailcore_tags %}
<!doctype html>
<html ⚡>
    <head>
        {% block html_head %}
            <meta charset="utf-8">
            <script async src="https://cdn.ampproject.org/v0.js"></script>
            <script async custom-element="amp-story" src="https://cdn.ampproject.org/v0/amp-story-1.0.js"></script>
            <link rel="canonical" href="{{ page.full_url }}">
            <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
            <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
            <title>{{ page.seo_title|default:page.title }}</title>
            <script type="application/ld+json">
                {{ ld_json|safe }}
            </script>
            {% if page.custom_css %}
                <style amp-custom>{{ page.custom_css|safe }}</style>
            {% endif %}
        {% endblock %}
    </head>
    <body>
        {% block html_body %}
            <amp-story standalone
                title="{{ page.title }}"
                publisher="{{ page.publisher }}"
                publisher-logo-src="{{ page.publisher_logo_src }}"
                poster-portrait-src="{{ page.poster_portrait_src }}"
                {% if page.poster_square_src %}poster-square-src="{{ page.poster_square_src }}"{% endif %}
                {% if page.poster_landscape_src %}poster-landscape-src="{{ page.poster_landscape_src }}"{% endif %}
            >
                {% for story_page in page.pages %}
                    {% include_block story_page.value.html %}
                {% endfor %}
            </amp-story>
        {% endblock %}
    </body>
</html>
