initial save
This commit is contained in:
67
templates/index.html
Normal file
67
templates/index.html
Normal file
@@ -0,0 +1,67 @@
|
||||
{% extends "base.html" %} {% block title %}{{blog_title.title}}{% endblock %} {%
|
||||
block content %}
|
||||
<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>
|
||||
<!-- stytle customed, expanded and unextanded posts have different margin-->
|
||||
{% if post.displayall %}
|
||||
<div>{{ post.content | safe }}</div>
|
||||
<hr
|
||||
style="
|
||||
width: 100%;
|
||||
margin-top: 25px;
|
||||
margin-bottom: 60px;
|
||||
border: 1px solid #000;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
|
||||
"
|
||||
/>
|
||||
|
||||
{% else %}
|
||||
<div>{{ post.content | striptags | truncate(200) }}</div>
|
||||
<!--div>{{ post.content[:200] | safe }}...</div-->
|
||||
<a
|
||||
class="btn btn-default btn-custom"
|
||||
href="{{ url_for('post_detail', post_id=post.id) }}"
|
||||
>Read More</a
|
||||
>
|
||||
<hr
|
||||
style="
|
||||
width: 100%;
|
||||
margin-top: 75px;
|
||||
margin-bottom: 60px;
|
||||
border: 1px solid #000;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
|
||||
"
|
||||
/>
|
||||
{% endif %} {% endfor %}
|
||||
<ul class="pager">
|
||||
{% if prev_url %}
|
||||
<li class="previous"><a href="{{ prev_url }}">← Older</a></li>
|
||||
{% else %}
|
||||
<li class="previous disabled"><a href="#">← Older</a></li>
|
||||
{% endif %}
|
||||
|
||||
<span class="text-muted"
|
||||
>Page {{ current_page }} of {{ total_pages }}</span
|
||||
>
|
||||
|
||||
{% if next_url %}
|
||||
<li class="next"><a href="{{ next_url }}">Newer →</a></li>
|
||||
{% else %}
|
||||
<li class="next disabled"><a href="#">Newer →</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user