Files
flask_blog/templates/index.html
2026-03-14 06:58:06 +01:00

43 lines
1.3 KiB
HTML

{% from "components/post_preview.html" import render_post %} {% extends
"base.html" %} {% block title %}{{blog_title.title}}{% endblock %} {% block
content %}
<!--timeline as a component which will be filled with callable function
### double curly brace timeline("career") this is a part of html string
### nested render-->
<div class="row">
<div class="col-md-12">
{% for post in posts %}
<h2 class="post-title">
<a href="{{ url_for('post_detail', post_id=post.id) }}"
>{{ post.title }}</a
>
</h2>
<!--p class="lead">
by **{{ post.author }}**
</p-->
<p>
<span class="glyphicon glyphicon-time"></span> Posted on {{ post.date }}
</p>
{{ render_post(post, post.displayall) }} {% endfor %}
<ul class="pager">
{% if prev_url %}
<li class="previous"><a href="{{ prev_url }}">&larr; Newer</a></li>
{% else %}
<li class="previous disabled"><a href="#">&larr; Newer</a></li>
{% endif %}
<span class="text-muted"
>Page {{ current_page }} of {{ total_pages }}</span
>
{% if next_url %}
<li class="next"><a href="{{ next_url }}">Older &rarr;</a></li>
{% else %}
<li class="next disabled"><a href="#">Older &rarr;</a></li>
{% endif %}
</ul>
</div>
</div>
{% endblock %}