<html>
<head>
    <title>Juxt - <%= community.name %></title>
    <%- include('partials/head'); %>
    <!-- Google / Search Engine Tags -->
    <meta itemprop="name" content="Juxt - <%= community.name %>">
    <meta itemprop="description" content="<%= community.description %>">
    <meta itemprop="image" content="<%= cdnURL %>/icons/<%= community.olive_community_id %>/128.png">

    <!-- Open Graph Meta Tags -->
    <meta property="og:title" content="Juxt - <%= community.name %>"/>
    <meta property="og:description" content="<%= community.description %>"/>
    <meta property="og:url" content="https://juxt.pretendo.cc/communities/<%= community.olive_community_id %>/new"/>
    <meta property="og:image" content="<%= cdnURL %>/icons/<%= community.olive_community_id %>/128.png"/>
    <meta property="og:site_name" content="Juxtaposition" />

    <!-- Twitter Meta Tags -->
    <meta name="twitter:card" content="summary_large_image"/>
    <meta name="twitter:title" content="Juxt - <%= community.name %>"/>
    <meta name="twitter:description" content="<%= community.description %>"/>
    <meta name="twitter:site" content="@PretendoNetwork"/>
    <meta name="twitter:image" content="<%= cdnURL %>/icons/<%= community.olive_community_id %>/128.png"/>
    <meta name="twitter:creator" content="@PretendoNetwork"/>

</head>
<body>
<div id="main">
    <h2 id="title" class="page-header"><%= lang.global.communities %></h2>
    <%- include('partials/nav_bar', { selection: 2, pid: pid }); %>
    <div id="toast"></div>
    <div id="wrapper" class="community-page-post-box">
        <div class="community-top">
            <img class="banner" src="<%= cdnURL %>/headers/<%= community.parent ? community.parent : community.olive_community_id %>/WiiU.png"/>
            <div class="community-info">
                <img class="user-icon" src="<%= cdnURL %>/icons/<%= community.parent ? community.parent : community.olive_community_id %>/128.png"/>
                <h2 class="community-title"><%= community.name %></h2>
                <%if(community.permissions.open){%>
                    <% var following = userContent.followed_communities.indexOf(community.olive_community_id) !== -1; %>
                    <a href="#" class="favorite-button <%if(following){ %>checked<%}%>"  onclick="follow(this)" data-sound="SE_WAVE_CHECKBOX_UNCHECK" data-url="/titles/follow"  data-community-id="<%= community.olive_community_id %>" data-text="<% if(following){ %><%= lang.user_page.follow_user %><%} else {%><%= lang.user_page.following_user %><%}%>"><% if(following){ %> <%= lang.user_page.following_user %> <%} else {%> <%= lang.user_page.follow_user %> <%}%></a>
                <%}%>
            </div>
            <h4 class="community-description"><%= community.description %></h4>
            <span class="community-page-follow-button-text" id="<%= community.olive_community_id %>"></span>
            <div class="info-boxes-wrapper">
                <div>
                    <h4><%= lang.community.followers %></h4>
                    <h4 class="community-page-table-text" id="followers"><%= community.followers %></h4>
                </div>
                <div>
                    <h4><%= lang.community.posts %></h4>
                    <h4><%=totalNumPosts%></h4>
                </div>
                <div>
                    <h4><%= lang.community.tags %></h4>
                    <h4>N/A</h4>
                </div>
            </div>
        </div>
		<div class="buttons tabs">
			<a id="recent-tab" class="<%if(type === 0){ %>selected<%}%>" href="/titles/<%= community.olive_community_id %>/new"><%= lang.community.recent %></a>
			<a id="popular-tab" class="<%if(type === 1){ %>selected<%}%>" href="/titles/<%= community.olive_community_id %>/hot"><%= lang.community.popular %></a>
			<!--<a id="verified-tab" class="<%if(type === 2){ %>selected<%}%>" href="/titles/<%= community.olive_community_id %>/verified"><%= lang.community.verified %></a>-->
		</div>
        <%- include('partials/' + template, { bundle }); %>
    </div>
</div>
</body>
</html>
