-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathauthor.html
More file actions
85 lines (81 loc) · 3.57 KB
/
author.html
File metadata and controls
85 lines (81 loc) · 3.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
layout: default
---
<article class="author">
<header class="post-header">
<div class="back">
<a href="/authors/">Authors</a>
/</div>
<h1 class="post-title">{{ page.title | escape }}</h1>
</header>
<div class="post-content">
<div class="description">{{ content }}</div>
{% unless site.partial_build %}
<div class="content">
{% capture filter %}c.authors contains '{{ page.slug }}'{% endcapture %}
{% assign contents = site.content | where_exp: "c", filter %}
{% capture filter %}c.translator contains " and {{page.slug}}" or c.translator contains "{{page.slug}} and " or c.translator == "{{page.slug}}"{% endcapture %}
{% assign transcont = site.content | where_exp: "c", filter | where_exp: "c", "c.status != 'rejected'" | sort: "slug" %}
{% capture filter %}c.editor contains " and {{page.slug}}" or c.editor contains "{{page.slug}} and " or c.editor == "{{page.slug}}"{% endcapture %}
{% assign editcont = site.content | where_exp: "c", filter %}
{% assign readcont = site.content | where: "reader", page.slug %}
{%- assign contents = contents | concat: editcont | concat: readcont | where_exp: "c", "c.status != 'rejected'" -%}
{%- assign editcont = editcont | map: "url" -%}
{%- assign c_by_year = contents | group_by: "year" | sort: "name" -%}
{%- if contents.size > 0 -%}
<h2>Selected Works by year</h2>
<div>
<p>
{%- for year in c_by_year -%}
<a href="#{{year.name}}">{{ year.name }}</a>
{% unless forloop.last %}
•
{% endunless %}
{%- endfor -%}
{%- if transcont.size > 0 -%}
•
<a href="#translations">Translations</a>
{%- endif -%}
</p>
{%- for year in c_by_year -%}
<h3 id="{{year.name}}">{{ year.name }}</h3>
{%- assign year_items = year.items | sort: 'title' -%}
<div class="minimal_content_list">
{% for c in year_items %}
<div class="mb-3 inline_content">
{% case c.stars %}
{% when 5 %}
<i class="fas fa-medal"></i>
{% when 4 %}
<i class="fas fa-star"></i>
{% endcase %}
{%- include_cached content_icon.html category=c.category subcat=c.subcat -%}
<a href="{{c.url}}">{{ c.title | markdownify | remove: '<p>' | remove: '</p>' }}</a>
{%- if editcont contains c.url -%}(edited){%- endif -%}
</div>
{% endfor %}
</div>
{%- endfor -%}
</div>
{%- endif -%}
{% if transcont.size > 0 %}
<h3 id="translations">Translations by {{ page.title }}:</h3>
<div class="minimal_content_list">
{% for c in transcont %}
<div class="mb-3 inline_content">
{% case c.stars %}
{% when 5 %}
<i class="fas fa-medal"></i>
{% when 4 %}
<i class="fas fa-star"></i>
{% endcase %}
{%- include_cached content_icon.html category=c.category subcat=c.subcat -%}
<a href="{{c.url}}">{{ c.title | markdownify | remove: '<p>' | remove: '</p>' }}</a>
</div>
{% endfor %}
</div>
{% endif %}
</div>
{% endunless %}
</div>
</article>