12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- {% macro ol(category) -%}
- <ol class="breadcrumb" style="margin-bottom:0;">
- <li><a href="{{ url_for('index.forums') }}"><span class="glyphicon glyphicon-home" aria-hidden="true"></span>社区首页</a></li>
- <li class="active">{{ category | chname }}</li>
- </ol>
- {%- endmacro %}
- {% macro header(category) -%}
- <div class="panel-heading" style="background:#2e609b;">
- <a href="{{ url_for('campus.category',category=category,campus_url='forums') }}" style="color:#fff">{{ category | chname }}</a>
- </div>
- {%- endmacro %}
- {% macro body(category) -%}
- {% set classify = category | get_tags('index_tag') %}
- {% for key,value in classify.items() %}
- <div class="panel-body" style="border-bottom:1px solid #f6e1e1;">
- <div class="row" style="padding:0;margin:0;">
- <div class="col-sm-2" style="font-size:12px;">
- <dl style="margin:0;">
- {% set topic,all_topic = key | display_academy(category) %}
- {% if category == 'campus' -%}
- <dd><a href="{{ url_for('campus.index',campus_url=key) }}" style="font-size:14px;">{{ value }}</a></dd>
- {%- else %}
- <dd><a href="{{ url_for('tags.index',campus_url='forums',class_url=category,tag_url=key) }}" style="font-size:14px;">{{ value }}</a></dd>
- {%- endif %}
- <dd>
- <span style="color:#999;">主题:</span>
- <span>{{ topic }}</span>
- <span style="color:#999;">帖子:</span>
- <span>{{ all_topic }}</span>
- </dd>
- </dl>
- </div>
- <div class="col-sm-offset-8 col-sm-2" style="font-size:12px;">
- <dl style="margin:0;">
- {% set last_question = key | get_last_question %}
- {% set last_question = last_question[0] %}
- {% if last_question == 0 %}
- 没有帖子
- {% else %}
- {%- import 'base/link.html' as link -%}
- <dt>{{ link.link(last_question) }}</dt>
- <dd>由{{ link.userlink(last_question.author) }}发表</dd>
- <dd>{{ last_question.time.strftime('%Y-%m-%d %H:%M') }}</dd>
- {% endif %}
- </dl>
- </div>
- </div>
- </div>
- {% endfor %}
- {%- endmacro %}
|