<div class="bg-cover <% if (is_home() && page.current === 1) { %>index-cover<% } %> about-cover" style="background-image: url('/medias/cover.jpg')">
    <div class="container">
        <div class="row">
            <div class="col s10 offset-s1 m8 offset-m2 l8 offset-l2">
                <div class="brand">
                    <div class="title center-align">
                    <% if (config.subtitle && config.subtitle.length > 0) { %>
                        <%= config.subtitle %>
                    <% } else { %>
                        subtitle
                    <% } %>
                    </div>

                    <div class="description center-align">
                    <% if (config.description && config.description.length > 0) { %>
                        <%= config.description %>
                    <% } else { %>
                        This is your root _config.yml 'description' value.
                    <% } %>
                    </div>
                </div>
            </div>
        </div>
        <% if (is_home() && page.current === 1) { %>
        <div class="cover-btns">
            <a href="#recommend-sections" class="waves-effect waves-light btn">
                <i class="fa fa-angle-double-down"></i>继续阅读
            </a>

            <% if (theme.indexbtn && theme.indexbtn.enable) { %>
            <a href="<%- theme.indexbtn.url %>" class="waves-effect waves-light btn" target="_blank">
                <i class="fa <%- theme.indexbtn.icon %>"></i><%- theme.indexbtn.name %>
            </a>
            <% } else if (theme.githubLink.enable) { %>
            <a href="<%- theme.githubLink.url %>" class="waves-effect waves-light btn" target="_blank">
                <i class="fa fa-github %>"></i><%- theme.githubLink.title %>
            </a>
            <% } %>
        </div>
        <div class="cover-social-link"><%- partial('_partial/social-link') %></div>
        <% } %>
    </div>
</div>

<script>
// Dynamically switch banner pictures every day.
$('.bg-cover').css('background-image', 'url(/medias/banner/' + new Date().getDay() + '.jpg)');
</script>