<html>
<head>
    <link rel="stylesheet" type="text/css" href="<%= cdnURL %>/css/juxt.css">
    <script src="<%= cdnURL %>/js/pjax.min.js"></script>
    <script src="<%= cdnURL %>/js/juxt.js"></script>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-279PNEDGEE"></script>
    <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());

        gtag('config', 'G-279PNEDGEE');

        <!-- Google Tag Manager -->
        <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
            new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
            j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
            'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
        })(window,document,'script','dataLayer','GTM-T9NZ7BK');</script>
    <!-- End Google Tag Manager -->
    </script>
</head>
<body>
<%- include('nav_bar', { selection: 2 }); %>
<div id="main">
    <div class="community-page-header" style="background-image: url('<%= cdnURL %>/banner/<%= community.community_id %>.png')"></div>
    <div class="community-page-follow-button-wrapper" style="display: none">
        <p class="community-page-follow-button-text" id="<%= community.community_id %>" onclick="followCommunity(this)"><%= lang.community.follow %></p>
    </div>
    <div class="community-page-info-container" style="min-height: 150px">
        <img class="community-page-info-icon" src="/icons/<%= community.community_id %>.png">
        <h2 class="community-page-title"><%= community.name %></h2>
        <h4 class="community-page-description"><%= community.description %></h4>
    </div>
    <div class="community-page-post-box" style="margin-top: -40px;">
        <div id="wrapper">
            <% if(totalNumPosts === 0) {%>
                <p class="no-posts-text"><%= lang.global.no_posts %></p>
            <%} else { %>
                    <button id="load-more-posts-button" data-offset="20"  onclick="loadCommunityPosts(this, true)"><%= lang.global.more %></button>
                <% newPosts.forEach(function(post) { %>
                    <%- include('post_template', { post: post, mii_image_CDN: mii_image_CDN, lang: lang, reply: false  }); %>
                <% }); %>
            <%}%>
        </div>
    </div>
    <img src="" onerror="wiiuBrowser.showLoadingIcon(!1);window.scroll(0, 0);">
</div>
<br>
<body onload="stopLoading(); wiiuBrowser.showLoadingIcon(!1);wiiuBrowser.lockUserOperation(false);">
</body>
</html>
