<!DOCTYPE html>
<html lang="{{lang}}">
<head>

    {{> theme_head}}

    {{!-- Ghost outputs important style and meta data with this tag --}}
    {{ghost_head}}
    
</head>
<body class="subscribe">

    <header>
        <div class="container">
            <a href="{{@blog.url}}" class="back"></a>
        </div>
    </header>

    <main id="content" class="container" role="main">
        <article class="{{post_class}}">
            <h1 class="post-title">
                {{^if success}}
                    {{t "Subscribe to {blogtitle}" blogtitle=@blog.title}}
                {{else}}
                    {{t "Subscribed!"}}
                {{/if}}
            </h1>
            <section class="post-content">
                {{^if success}}
                    {{subscribe_form
                        form_class="gh-signin"
                        input_class="gh-input"
                        button_class="gh-btn gh-btn-blue gh-btn-block"
                        placeholder=(t "Your email address")
                        autofocus="true"
                    }}
                {{else}}
                    <p>
                        {{t "You've successfully subscribed to"}} <em>{{@blog.title}}</em>
                        {{t "with the email address"}} <em>{{email}}</em>.
                    </p>
                {{/if}}
            </section>
        </article>
    </main>
    <footer>
        <div class="social">
            {{#if @blog.facebook}}
                <a href="{{facebook_url}}" class="facebook" title="{{@blog.facebook}}" target="_blank" rel="noopener noreferrer"><i class="fab fa-facebook-f"></i></a>
            {{/if}}
            {{#if @blog.twitter}}
                <a href="{{twitter_url}}" class="twitter" title="{{@blog.twitter}}" target="_blank" rel="noopener noreferrer"><i class="fab fa-twitter"></i></a>
            {{/if}}
        </div>
        <div class="copyright">{{t "Copyright"}} &copy; {{date format="YYYY"}}, <a href="{{@blog.url}}">{{@blog.title}}</a>. {{t "All Right Reserved"}}.</div>
    </footer>

    {{!-- Ghost Content API --}}
    <script type="text/javascript" src="https://unpkg.com/@tryghost/content-api@1.0.0/umd/content-api.min.js"></script>

    {{!-- 3rd party scripts --}}
    <script type="text/javascript" src="{{asset "js/libraries.js"}}"></script>
    
    {{!-- The main JavaScript file for Tawau --}}
    <script type="text/javascript" src="{{asset "js/main.js"}}"></script>

    {{!-- Ghost outputs important scripts and data with this tag --}}
    {{ghost_foot}}
</body>
</html>