<% var isIndex = page.path === 'index.html' %>
<!DOCTYPE html>
<html lang="en">
    <head>
        <title><%- page.title ? page.title + ' - ' : '' %><%- config.title %></title>
        <meta charset="utf-8">
        <meta name="description" content="<%- config.title %> - <%- config.subtitle %>">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
        <link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600|Roboto Mono' rel='stylesheet' type='text/css'>
        <link href='http://fonts.googleapis.com/css?family=Dosis:300,500&text=Uppy' rel='stylesheet' type='text/css'>
        <link rel="icon" href="<%- config.logo_icon %>" type="image/x-icon">
        <script>
            window.PAGE_TYPE = "<%- page.type %>"
        </script>
        <%- css(isIndex ? 'css/index' : 'css/page') %>
        <%- partial('partials/ga') %>
        <script src="/js/vue.js"></script>
    </head>
    <body>
        <div id="mobile-bar">
            <a class="menu-button"></a>
            <a class="logo" href="/"></a>
        </div>
        <% if (!isIndex) { %>
            <%- partial('partials/header') %>
            <div id="main">
                <% if (page.blog_index) { %>
                    <%- partial('partials/blog') %>
                <% } else { %>
                    <%- body %>
                <% } %>
            </div>
            <script src="/js/smooth-scroll.min.js"></script>
            <script src="/js/common.js"></script>
        <% } else { %>
            <%- body %>
        <% } %>

        <script src="https://cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.min.js"></script>
        <script>
            document.addEventListener('DOMContentLoaded', function() {
              FastClick.attach(document.body);
            }, false);
        </script>
    </body>
</html>
