Upload Testproject
This commit is contained in:
20
Podcast/templates/macros/blog.html
Normal file
20
Podcast/templates/macros/blog.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{% macro render_blog_post(post, from_index=false) %}
|
||||
<div class="blog-post">
|
||||
{% if from_index %}
|
||||
<h2><a href="{{ post|url }}">{{ post.title }}</a></h2>
|
||||
{% else %}
|
||||
<h2>{{ post.title }}</h2>
|
||||
{% endif %}
|
||||
<p class="meta">
|
||||
written by
|
||||
{% if post.twitter_handle %}
|
||||
<a href="https://twitter.com/{{ post.twitter_handle
|
||||
}}">{{ post.author or post.twitter_handle }}</a>
|
||||
{% else %}
|
||||
{{ post.author }}
|
||||
{% endif %}
|
||||
on {{ post.pub_date }}
|
||||
</p>
|
||||
{{ post.body }}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
15
Podcast/templates/macros/pagination.html
Normal file
15
Podcast/templates/macros/pagination.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{% macro render_pagination(pagination) %}
|
||||
<div class="pagination">
|
||||
{% if pagination.has_prev %}
|
||||
<a href="{{ pagination.prev|url }}">« Previous</a>
|
||||
{% else %}
|
||||
<span class="disabled">« Previous</span>
|
||||
{% endif %}
|
||||
| {{ pagination.page }} |
|
||||
{% if pagination.has_next %}
|
||||
<a href="{{ pagination.next|url }}">Next »</a>
|
||||
{% else %}
|
||||
<span class="disabled">Next »</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
Reference in New Issue
Block a user