<aside id="sidebar">
     <!--分类-->
  <div class="widget-wrap">
    <h3 class="widget-title">分类</h3>
    <div class="widget">
      <ul class="category-list">

          {% for r_content in r_content %}
            <li class="category-list-item">
              <a class="category-list-link" href="/category/{{ r_content.category_id }}">{{ r_content.category__cname }}</a>
              <span class="category-list-count">{{ r_content.c }}</span>
            </li>
          {% endfor %}

      </ul>
      </div>
  </div>
     <!--归档-->
  <div class="widget-wrap">
    <h3 class="widget-title">归档</h3>
    <div class="widget">
      <ul class="archive-list">

          {% for archive in r_archive %}
              <li class="archive-list-item">
                <a class="archive-list-link" href="/archive/{{ archive.0|date:'Y'}}/{{ archive.0|date:'m'}}">{{ archive.0|date:'Y-m'}}</a>
                <span class="archive-list-count">{{ archive.1 }}</span>
              </li>
          {% endfor %}


      </ul>
    </div>
  </div>
    <!--近期文章-->
  <div class="widget-wrap">
    <h3 class="widget-title">近期文章</h3>
    <div class="widget">
      <ul>
          {% for recent_post in r_recent_post %}
            <li>
                <a href="/post/{{ recent_post.category_id }}" target="_blank">{{ recent_post.title }}</a>
            </li>
          {% endfor %}

      </ul>
    </div>
  </div>
    <!--友情链接-->
  <div class="widget-wrap">
    <h3 class="widget-title">友情链接</h3>
    <div class="widget">
      <ul>
          <li>
            <a href="http://www.bjsxt.com/" target="_blank">尚学堂</a>
          </li>
          <li>
            <a href="http://www.sxt.cn/" target="_blank">速学堂</a>
          </li>
      </ul>
    </div>
  </div>
</aside>