个人中心标签页导航

Posted xulishuai

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了个人中心标签页导航相关的知识,希望对你有一定的参考价值。

{% extends base.html %}
{% block title %}个人中心{% endblock %}

{% block head %}
     <style>
         .nav_ul li{
             list-style: none;
             float:left;
             margin:10px;
         }
     </style>
{% endblock %}

{% block main %}
     <ul class="nav_ul">
        <li role="presentation"><a href="{{ url_for(‘usercenter‘,user_id=user.id,tag=‘user1‘) }}">全部问答</a></li>
        <li role="presentation"><a href="{{ url_for(‘usercenter‘,user_id=user.id,tag=‘user2‘) }}">全部评论</a></li>
        <li role="presentation"><a href="{{ url_for(‘usercenter‘,user_id=user.id,tag=‘user3‘) }}">个人信息</a></li>
     </ul>
{% endblock %}
{% extends userbase.html %}

{% block user %}

    <div class="page-header">
        <h3><span class="glyphicon glyphicon-user" aria-hidden="true"></span> {{ username }}<br><small>全部问答 <span class="badge"></span></small></h3>
        <ul class="list-group" style="...">
            {% for foo in questions %}
                <li class="list-group-item">
                    <span class="glyphicon glyphicon-heart-empty" aria-hidden="true"></span>
                    <a href="#">{{ foo.author.username }}</a>
                    <span class="badge">{{ foo.creat_time }}</span>

                    <p style="..."> {{ foo.detail }}</p>
                </li>
            {% endfor %}
        </ul>

    </div>

     <div class="page-header">
         <h3><span class="glyphicon glyphicon-user" aria-hidden="true"></span> {{ user }}<br><small>全部评论 <span class="badge"></span></small></h3>
        <ul class="list-group" style="...">
            {% for foo in comments %}
                <li class="list-group-item">
                    <span class="glyphicon glyphicon-heart-empty" aria-hidden="true"></span>
                    <a href="#">{{ foo.author.username }}</a>
                    <span class="badge">{{ foo.creat_time }}</span>

                    <p style="..."> {{ foo.detail }}</p>
                </li>
            {% endfor %}
        </ul>

     </div>

     <div class="page-header">
         <h3><span class="glyphicon glyphicon-user" aria-hidden="true"></span> {{ user }}<br><small>个人信息 <span class="badge"></span></small></h3>
        <ul class="list-group" style="...">

                 <li class="list-group-item">用户:{{ username }}</li>
                 <li class="list-group-item">编号:</li>
                 <li class="list-group-item">昵称:</li>
                 <li class="list-group-item">文章篇数:</li>
        </ul>

     </div>


{% endblock %}

user1.html

{% extends usercenter.html %}

{% block user %}


     <div class="page-header">
       <h3><span class="glyphicon glyphicon-user"aria-hidden="true"></span>{{ user }}<br><small>全部问答<span class="badge"></span></small></h3>
       <ul class="list-group" style="...">
       {% for foo in user-questions %}
           <li class="list-group-item">
           <span class="glyphicon glyphicon-heart-empty"aria-hidden="true"></span>
           <a href="#" >{{ foo.author.username }}</a>
           <span class="badge">{{ foo.creat_time }}</span>

          <p style="...">{{ foo.detail }}</p>

          </li>
         {% endfor %}
       </ul>

     </div>

{% endblock %}

user2.html

{% extends usercenter.html %}

{% block user %}


     <div class="page-header">
       <h3><span class="glyphicon glyphicon-user"aria-hidden="true"></span>{{ user }}<br><small>全部评论<span class="badge"></span></small></h3>
       <ul class="list-group" style="...">
       {% for foo in user-commments %}
           <li class="list-group-item">
           <span class="glyphicon glyphicon-heart-empty"aria-hidden="true"></span>
           <a href="#" >{{ foo.author.username }}</a>
           <span class="badge">{{ foo.creat_time }}</span>

          <p style="...">{{ foo.detail }}</p>

          </li>
         {% endfor %}
       </ul>

     </div>

{% endblock %}

user3.html

{% extends usercenter.html %}

{% block user %}


     <div class="page-header">
       <h3><span class="glyphicon glyphicon-user"aria-hidden="true"></span>{{ user }}<br><small>个人信息<span class="badge"></span></small></h3>
       <ul class="list-group" style="...">
           <li class="list-group-item">用户:{{ username }}</li>
           <li class="list-group-item">编号:</li>
           <li class="list-group-item">昵称:</li>
           <li class="list-group-item">文章篇数:</li>
       </ul>
   </div>


{% endblock %}

 

以上是关于个人中心标签页导航的主要内容,如果未能解决你的问题,请参考以下文章

个人中心标签页导航

个人中心标签页导航

个人中心标签页导航

个人中心标签页导航

个人中心标签页导航

个人中心标签页导航