Dowemo

The home article has been laid out, which is done by clicking on the article and jumping to the article 's portal.
New detail. Html.

{% extends 'base.html' %}


{% block title %}详情{% endblock %}


{% block head %}<link rel="stylesheet" href="{{url_for('static',filename = 'css/detail.css')}}"> 


{% endblock %}


{% block main %}


 <div class="container">


 <h3 class="page-title">{{question.title}}</h3>


 <p class="question-info">


 <span>{{question.author.username}}</span>


 <span>{{question.create_time}}</span>


 </p>


 <hr>


 <p class="question-content">{{question.content}}</p>


 <hr>


 <h4>评论:(0)</h4>


 <form action="#" method="post">


 <div class="form-group">


 <input name="answer_content" type="text" class="form-control" placeholder="请填写评论">



 </div>


 <div class="form-group"> 


 <button class="btn btn-primary">立即评论</button>


 </div>


 </form>


</div>


{% endblock %}


Detail. Css.

.question-info{


 text-align: center;


 margin-top: 20px;


}


.container{


 margin: 0;


 width: auto;


}


.form-group{


 text-align: right;


}





And then we add a jump link in index. Html so that you can jump from 图一 to 图二.

<p class="question-title"><a href="{{url_for('detail',question_id = question.id)}}">{{question.title}}</a></p>


这里写图片描述

这里写图片描述




Copyright © 2011 Dowemo All rights reserved.    Creative Commons   AboutUs