{#- base template for communities (as container for social apps) #}
{% extends "base.html" %}
{% from "macros/box.html" import m_box_forum %}

{% block header %}

  <h1 class="community-header">
    <img src="{{ community_image_url(g.community, s=40) }}"/>
    <span style="color:black;">
    {{ g.community.name }}{% if threads %}</span> -
      <span class="nb-conversation">{{ threads|length }} Conversation(s)</span>{% endif %}
  </h1>
  {%- set tabs = actions.for_category('communities:tabs') %}

  <ul class="nav nav-tabs community-tabs" id="community-tabs">
    {%- for tab in tabs %}
      <li {% if tab.is_current() %}class="active"{% endif %}>{{ tab.render() }}</li>
    {%- endfor %}
  </ul>
{% endblock %}

{% block main %}
  <div class="row">

    <div class="col-md-13">
      {%- block content %}
      {%- endblock %}
    </div>

    {%- block forumcontent %}
    {%- endblock %}

    {%- block forumsidebar %}
    {%- endblock %}
  </div>
  {%- block modals %}
  {% endblock %}
{% endblock %}

{% macro forum_menu(action) %}
  <button type="button"
          class="{% if action.is_current() %}forum-action-active{% else %}forum-action{% endif %}">{{ action.render() }}</button>
{% endmacro %}
