File tree Expand file tree Collapse file tree 3 files changed +79
-14
lines changed
themes/vocabulary_theme/templates Expand file tree Collapse file tree 3 files changed +79
-14
lines changed Original file line number Diff line number Diff line change 11{% extends "layout.html" %}
22
3- {% from "macros/posts .html" import render_posts %}
3+ {% from "macros/author_posts .html" import render_author_posts %}
44{% from "macros/author_name.html" import render_author_name %}
55
6- {% block title %}{{ render_author_name(this) + ' - ' + this.parent.parent.children.get('entries').title }}{% endblock %}
7- {% block header %}{{ this.parent.parent.children.get('entries').title }}{% endblock %}
86{% block body %}
9- < h2 > {{ render_author_name(this) }}</ h2 >
10- {% if this.about %}
11- {% if this.md5_hashed_email %}
12- < img src ="https://secure.gravatar.com/avatar/{{ this.md5_hashed_email }}?size=200 " alt ="gravatar " style ="float:right; " class ="px-3 pb-3 " />
13- {% endif %}
14- {{ this.about }}
15- {% endif %}
16- < h3 > Posts</ h3 >
17- {{ render_posts(this.children) }}
18- < hr />
19- < p class ="text-muted "> < strong > < a href ="{{ this.parent|url }} "> All Authors</ a > </ strong > </ p >
7+ < div class ="author-posts ">
8+ < div class ="title ">
9+ < div class ="container ">
10+ < div class ="columns ">
11+ < div class ="column is-2 ">
12+ {% if this.about %}
13+ {% if this.md5_hashed_email %}
14+ < figure class ="image profile ">
15+ < img class ="profile " src ="https://secure.gravatar.com/avatar/{{ this.md5_hashed_email }}?size=200 ">
16+ </ figure >
17+ {% endif %}
18+ {% endif %}
19+ </ div >
20+ < div class ="column is-8 ">
21+ < h2 > {{ render_author_name(this) }}</ h2 >
22+ {% if this.about %}
23+ < div class ="about "> {{ this.about }}</ div >
24+ {% endif %}
25+ < a class ="button small " href ="{{ this.parent|url }} "> See all authors</ a >
26+ </ div >
27+ </ div >
28+ </ div >
29+ </ div >
30+ < div class ="posts container ">
31+ {{ render_author_posts(this.children) }}
32+ </ div >
33+ </ div >
2034{% endblock %}
Original file line number Diff line number Diff line change 1+ {% from "macros/author_name.html" import render_author_name %}
2+
3+ {% macro render_author_posts(posts) %}
4+ < div class ="columns is-multiline blog-entries ">
5+ {% for post in posts %}
6+ {% set author = post.parent.parent.children.get('authors').children.get(post.author) %}
7+ < article class ="card entry-post horizontal no-border blog-entry column is-one-third ">
8+ < div class ="blog-content ">
9+ < h4 class ="b-header "> < a class ="blog-title " href ="{{ post|url }} "> {{ post.title }}</ a > </ h4 >
10+ < span class ="blog-author "> by < a href ="{{ author|url }} "> {{ render_author_name(author) }}</ a >
11+ on {{ post.pub_date|dateformat("YYYY-MM-dd") }}</ span >
12+ < div class ="excerpt ">
13+ {{ post.body | excerpt | string | striptags() | truncate(100) }}
14+ </ div >
15+ </ div >
16+ </ article >
17+ {% endfor %}
18+ </ div >
19+ {% endmacro %}
Original file line number Diff line number Diff line change 223223 @extend .padding-bottom-xxl ;
224224 }
225225}
226+
227+ .author-posts {
228+ .title {
229+ background-color : $color-lighter-gray ;
230+
231+ .container {
232+ @extend .padding-horizontal-big ;
233+ @extend .padding-bottom-xl ;
234+
235+ .image {
236+ width : 9.5rem ;
237+ height : 9.5rem ;
238+ }
239+
240+ .about {
241+ @extend .body-big ;
242+ @extend .padding-top-big ;
243+
244+ line-height : 1.8125 ;
245+ }
246+
247+ .button {
248+ @extend .margin-top-bigger ;
249+ }
250+ }
251+ }
252+
253+ .posts {
254+ @extend .padding-top-xl ;
255+ @extend .padding-bottom-xxl ;
256+ }
257+ }
You can’t perform that action at this time.
0 commit comments