index.html
This file
Path
examples/tutorial/flaskr/templates/blog/index.html
28 lines · 790 bytes · HTML
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than 73739a2 point at it.
Merge branch '2.2.x'David Lordbefore adoption73739a2
lines 1–28why, one step back1{% extends 'base.html' %}23{% block header %}4 <h1>{% block title %}Posts{% endblock %}</h1>5 {% if g.user %}6 <a class="action" href="{{ url_for('blog.create') }}">New</a>7 {% endif %}8{% endblock %}910{% block content %}11 {% for post in posts %}12 <article class="post">13 <header>14 <div>15 <h1>{{ post['title'] }}</h1>16 <div class="about">by {{ post['username'] }} on {{ post['created'].strftime('%Y-%m-%d') }}</div>17 </div>18 {% if g.user['id'] == post['author_id'] %}19 <a class="action" href="{{ url_for('blog.update', id=post['id']) }}">Edit</a>20 {% endif %}21 </header>22 <p class="body">{{ post['body'] }}</p>23 </article>24 {% if not loop.last %}25 <hr>26 {% endif %}27 {% endfor %}28{% endblock %}