Permalink
Browse files

again some css fixes making it future proof. changes in show_packages.

  • Loading branch information...
1 parent 50b19ad commit 8ec47f3440316ef1ec9c9da8e1e2a1d0045ada81 @kra3 kra3 committed Mar 7, 2011
Showing with 23 additions and 6 deletions.
  1. +6 −3 py3k/packages.py
  2. +4 −3 py3k/static/css/style.css
  3. +2 −0 py3k/templates/layout.html
  4. +11 −0 py3k/templates/show_package.html
View
@@ -140,8 +140,11 @@ def packages_details(name):
@app.route('/project', methods=['GET', 'POST'])
@app.route('/project/+<int:page>')
def packages(page=1):
- if request.method == 'POST':
+ if request.method == 'POST': # if some one searched, then
return redirect(url_for('search_package', name=request.form['pkgname'], page=1))
- else:
+ else: # for browse all
result = Distribution.query.order_by(Distribution.name).paginate(page)
- return render_template('show_package.html', page_obj=result)
+ no_comments_packages = db.session.query(Distribution).outerjoin(Comment).filter(Comment.distribution_id==None).limit(5)
+ return render_template('show_package.html',
+ no_comments_packages=no_comments_packages,
+ page_obj=result)
@@ -184,9 +184,10 @@ header>form a:hover{
section#main > article{
padding-top:20px;
- height: 270px;
+ min-height: 270px;
+ width:100%;
text-align:center;
- position:relative;
+ float:left;
}
section#main > article h2{
font-weight:normal;
@@ -195,7 +196,7 @@ section#main > article h2{
}
section#main > article:first-child{
background: #f9f9f9;
- overflow:hidden;
+ /*overflow:hidden;*/
}
section#main > article:first-child ul#credits{
list-style:decimal-leading-zero;
@@ -50,6 +50,8 @@ <h1>Want to use <span class="works">Python 3</span><br> for your next project ?<
</article>
+ <br style="clear: both;">
+
<article>
<h2>Get Involved!</h2>
<section>
@@ -40,3 +40,14 @@
</table>
{% endblock %}
+
+{% block trypkg %}
+ <ul>
+ <li>
+ {% for distribution in no_comments_packages %}
+ <a href="{{ url_for('packages_details', name=distribution.name) }}">
+ {{ distribution.name }}</a>
+ {% endfor %}
+ </li>
+ </ul>
+{% endblock %}

0 comments on commit 8ec47f3

Please sign in to comment.