File tree 4 files changed +44
-13
lines changed
themes/vocabulary_theme/templates
4 files changed +44
-13
lines changed Original file line number Diff line number Diff line change @@ -19,4 +19,4 @@ order_by = -pub_date, title
19
19
20
20
[pagination]
21
21
enabled = yes
22
- per_page = 10
22
+ per_page = 12
Original file line number Diff line number Diff line change 3
3
{% from "macros/pagination.html" import render_pagination %}
4
4
{% from "macros/posts.html" import render_posts %}
5
5
6
+
6
7
{% block title %}{{ this.title }}{% endblock %}
7
8
{% block body %}
8
- {{ this.description }}
9
- {{ render_posts(this.pagination.items) }}
10
- {% if this.pagination.pages > 1 %}
11
- {{ render_pagination(this.pagination) }}
12
- {% endif %}
9
+ < div class ="container ">
10
+ {{ this.description }}
11
+ {{ render_posts(this.pagination.items) }}
12
+ {% if this.pagination.pages > 1 %}
13
+ {{ render_pagination(this.pagination) }}
14
+ {% endif %}
15
+ </ div >
13
16
{% endblock %}
Original file line number Diff line number Diff line change 1
1
{% from "macros/author_name.html" import render_author_name %}
2
2
3
3
{% macro render_posts(posts) %}
4
- < ul class ="blog-index list-unstyled ">
4
+ < div class ="columns is-multiline ">
5
5
{% for post in posts %}
6
6
{% set author = post.parent.parent.children.get('authors').children.get(post.author) %}
7
- < li >
8
- < a href ="{{ post|url }} "> {{ post.title }}</ a >
9
- < p class ="text-muted small "> by < a href ="{{ author|url }} "> {{ render_author_name(author) }}</ a >
10
- on {{ post.pub_date|dateformat("YYYY-MM-dd") }}</ p >
11
- </ li >
7
+ < article class ="card entry-post horizontal no-border blog-entry column is-one-third ">
8
+ < header >
9
+ < figure class ="image blog-image ">
10
+ {% if author.about %}
11
+ {% if author.md5_hashed_email %}
12
+ < img class ="profile " src ="https://secure.gravatar.com/avatar/{{ author.md5_hashed_email }}?size=200 "
13
+ alt ="gravatar " />
14
+ {% endif %}
15
+ {% endif %}
16
+ </ figure >
17
+ </ header >
18
+ < div class ="blog-content ">
19
+ < h4 class ="b-header "> < a class ="blog-title " href ="{{ post|url }} "> {{ post.title }}</ a > </ h4 >
20
+ < span class ="blog-author "> by < a class ="author-name " href ="{{ author|url }} "> {{ render_author_name(author) }}</ a >
21
+ on {{ post.pub_date|dateformat("YYYY-MM-dd") }}</ span >
22
+ <!-- TODO : Discuss how to extract an excerpt -->
23
+ < div class ="excerpt ">
24
+ {{ post.body | excerpt | string | striptags() | truncate(100) }}
25
+ </ div >
26
+ </ div >
27
+ </ article >
12
28
{% endfor %}
13
- </ ul >
29
+ </ div >
14
30
{% endmacro %}
Original file line number Diff line number Diff line change @@ -33,6 +33,18 @@ $project-card-theme: $blue;
33
33
}
34
34
}
35
35
36
+ .blog-entry {
37
+ @extend .padding-big ;
38
+
39
+ .blog-title {
40
+ @extend .has-color-dark-slate-gray ;
41
+ }
42
+
43
+ .author-name {
44
+ @extend .has-color-forest-green ;
45
+ }
46
+ }
47
+
36
48
h2 {
37
49
font-weight : 600 ;
38
50
padding-bottom : 0.5rem ;
You can’t perform that action at this time.
0 commit comments