{% extends 'base/base.html' %}
{% block script %}
<script type="text/javascript" charset="utf-8">
 var sortData = {
     "type" : 'tags',
     "page" : '{{ topics.page }}',
     "uid" : "{{ tag.tagname }}"};
</script>
{{ super()}}
{% endblock %}
{% block content %}
{{ breadcrumb(hrefs={'所有标签':url_for('tag.tag')},active=tag.tagname)}}
<div class="row">
    <div class="col-md-9">
        <div class="panel panel-default">
            <div class="panel-heading">
                {{ tag.tagname }}
                {% if g.user.is_authenticated %}
                {% if current_user in tag.followers %}
                <button class="btn btn-sm btn-default tagfollow active" id="{{ tag.id}}" style="padding:0 5px">取消关注</button>
                {% else %}
                <button class="btn btn-sm btn-default tagfollow" id="{{ tag.id}}" style="padding:0 5px">关注</button>
                {% endif %}
                {% endif %}
                <span class="pull-right">
                    <a href="{{ url_for('tag.rss',tag=tag.tagname)}}">
                        <i class="icon-rss" style="padding:2px">Rss</i>
                    </a>
                </span>
            </div>
            {% from 'topic/topic_list.html' import view as board_view %}
            {{ board_view(topics)}}
            {{ p_footer(topics, 'tag.tag',kw=dict(tag=tag.tagname))}}
        </div>
    </div>
    <div class="col-md-3" style="padding-left:0">
        {% include 'base/panel.html' %}
    </div>
</div>
{% endblock %}
