File tree 5 files changed +17
-14
lines changed
5 files changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ label = {{ this.name }}
4
4
hidden = yes
5
5
6
6
[children]
7
- replaced_with = site.query(' /archives/old-tech-blog' ).filter(F.author.contains(this))
7
+ replaced_with = site.query(' /archives/old-tech-blog/entries ' ).filter(F.author.contains(this))
8
8
9
9
[fields.name]
10
10
label = Name
Original file line number Diff line number Diff line change 1
1
{% extends "layout.html" %}
2
- {% from "macros/authors .html" import render_blog_list %}
2
+ {% from "macros/posts .html" import render_posts %}
3
3
{% block title %}{{ this.name }}{% endblock %}
4
4
{% block header %}Archive: CC Technical Blog (2007-2014){% endblock %}
5
5
{% block body %}
6
6
< h2 > Posts by {{ this.name }}</ h2 >
7
- {{ render_blog_list (this.children) }}
7
+ {{ render_posts (this.children) }}
8
8
< hr >
9
9
< strong > < a href ="/blog/authors "> All Authors</ a > </ strong >
10
10
{% endblock %}
Original file line number Diff line number Diff line change 3
3
{% block title %}Authors{% endblock %}
4
4
{% block header %}Archive: CC Technical Blog (2007-2014){% endblock %}
5
5
{% block body %}
6
- < h1 > Authors</ h1 >
6
+ < h2 > Authors</ h2 >
7
7
{{ render_authors() }}
8
8
{% endblock %}
Original file line number Diff line number Diff line change 1
1
{% macro render_authors() %}
2
- < ul >
2
+ < ul class =" list-inline " >
3
3
{% for author in site.query('/authors') %}
4
- < li > < a href ="{{ author|url }} "> {{ author.name }}</ a > </ li >
5
- {% endfor %}
6
- </ ul >
7
- {% endmacro %}
8
-
9
- {% macro render_blog_list(blogs) %}
10
- < ul >
11
- {% for blog in blogs %}
12
- < li > < a href ="{{ blog|url }} "> {{ blog.title }}</ a > </ li >
4
+ < li class ="list-inline-item "> < a href ="{{ author|url }} "> {{ author.name }}</ a > </ li >
13
5
{% endfor %}
14
6
</ ul >
15
7
{% endmacro %}
Original file line number Diff line number Diff line change
1
+ {% macro render_posts(posts) %}
2
+ < ul class ="blog-index list-unstyled ">
3
+ {% for post in posts %}
4
+ < li >
5
+ < a href ="{{ post|url }} "> {{ post.title }}</ a >
6
+ < p class ="text-muted small "> by < a href ="/blog/authors/{{ post.author }} "> {{ post.author }}</ a >
7
+ on {{ post.pub_date|dateformat("YYYY-MM-dd") }}</ p >
8
+ </ li >
9
+ {% endfor %}
10
+ </ ul >
11
+ {% endmacro %}
You can’t perform that action at this time.
0 commit comments