<div class="page-template-container">
    <%
    const friendsTitle = ['friends', 'friend', '友情链接', '友情鏈接', '友情鏈結', '友情鏈結', '朋友', '朋友們', '朋友们', 'links','link', 'Link', 'Links'];
    const friendsTypes = ['links', 'link'];
    const isLoadFriendsLink = (
            theme.links
            && (friendsTypes.includes(page.type) || friendsTitle.includes(page.title))
    );
    const shuoshuoTitle = ['essays', 'essay', 'shuoshuo', '说说', '即刻短文', 'Shuoshuo'];
    const shuoshuoTypes = ['essays', 'essay', 'shuoshuo'];
    const isLoadShuoshuo = (
            (theme.essays || theme.shuoshuo)
            && (shuoshuoTypes.includes(page.type) || shuoshuoTitle.includes(page.title))
    );
    const masonryTitles = ['masonry', 'gallery', 'Masonry', 'Gallery', '照片墙', '照片牆', '相册', '相冊', '瀑布流', '瀑布流', 'photos', 'Photos', 'photo', 'Photo'];
    const masonryTypes = ['masonry', 'gallery', '瀑布流', '相册', 'photos', 'photo'];
    const isLoadMasonry = (
            (theme.masonry || theme.gallery || theme.photos)
            && (masonryTypes.includes(page.type) || masonryTitles.includes(page.title))
    )
    %>
    
    <% if (isLoadFriendsLink) { %>
        <%- partial('_widgets/friends-link') %>
    <% } else if (isLoadShuoshuo) { %>
        <%- partial('_widgets/essays') %>
    <% } else if (isLoadMasonry) { %>
        <%- partial('_widgets/masonry') %>
    <% } %>
    <div class="page-template-content markdown-body">
        <% if (isLoadFriendsLink || page.content || isLoadShuoshuo || isLoadMasonry) { %>
            <%- page.content %>
        <% } else { %>
            <h1><%- page.title %></h1>
        <% } %>
    </div>
    <div class="page-template-comments">
        <% if (page.hasOwnProperty('comment') && (page.comment === true || page.comments === true) ) { %>
            <%- partial('_partials/comments/comment') %>
        <% } %>
    </div>
</div>
