init staticcms
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
This commit is contained in:
commit
57d66eb0c1
16 changed files with 221 additions and 0 deletions
20
templates/macros/blog.html
Normal file
20
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 %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue