Skip to content

Commit cf2da62

Browse files
committed
Slightly redesign author work lists
1 parent a4bee0c commit cf2da62

7 files changed

Lines changed: 47 additions & 29 deletions

File tree

‎Gemfile.lock‎

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,17 @@ GEM
3030
public_suffix (>= 2.0.2, < 6.0)
3131
coderay (1.1.3)
3232
colorator (1.1.0)
33-
concurrent-ruby (1.2.2)
33+
concurrent-ruby (1.2.3)
3434
em-websocket (0.5.3)
3535
eventmachine (>= 0.12.9)
3636
http_parser.rb (~> 0)
3737
eventmachine (1.2.7)
3838
ffi (1.16.3)
3939
forwardable-extended (2.6.0)
40-
google-protobuf (3.25.2)
40+
google-protobuf (4.26.1)
41+
rake (>= 13)
4142
http_parser.rb (0.8.0)
42-
i18n (1.14.1)
43+
i18n (1.14.4)
4344
concurrent-ruby (~> 1.0)
4445
jekyll (4.3.3)
4546
addressable (~> 2.4)
@@ -70,28 +71,28 @@ GEM
7071
kramdown-parser-gfm (1.1.0)
7172
kramdown (~> 2.0)
7273
liquid (4.0.4)
73-
listen (3.8.0)
74+
listen (3.9.0)
7475
rb-fsevent (~> 0.10, >= 0.10.3)
7576
rb-inotify (~> 0.9, >= 0.9.10)
7677
mercenary (0.4.0)
77-
method_source (1.0.0)
78+
method_source (1.1.0)
7879
pathutil (0.16.2)
7980
forwardable-extended (~> 2.6)
8081
posix-spawn (0.3.15)
81-
priority_queue_cxx (0.3.6)
82+
priority_queue_cxx (0.3.7)
8283
pry (0.14.2)
8384
coderay (~> 1.1)
8485
method_source (~> 1.0)
85-
public_suffix (5.0.4)
86-
rake (13.1.0)
86+
public_suffix (5.0.5)
87+
rake (13.2.1)
8788
rb-fsevent (0.11.2)
8889
rb-inotify (0.10.1)
8990
ffi (~> 1.0)
9091
rexml (3.2.6)
91-
rouge (4.2.0)
92+
rouge (4.2.1)
9293
safe_yaml (1.0.5)
93-
sass-embedded (1.69.7)
94-
google-protobuf (~> 3.25)
94+
sass-embedded (1.75.0)
95+
google-protobuf (>= 3.25, < 5.0)
9596
rake (>= 13.0.0)
9697
terminal-table (3.0.2)
9798
unicode-display_width (>= 1.1.1, < 3)

‎_authors/werner-karel.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
title: "Karel Werner"
33
---
44

5-
A scholar of ancient, Indian Buddhism.
5+
A scholar of ancient Indian Buddhism.

‎_content/canon/kd.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Khuddakapāṭha"
2+
title: "The Khuddakapāṭha"
33
translator: anandajoti
44
external_url: "https://www.ancient-buddhist-texts.net/Texts-and-Translations/Khuddakapatha/Khuddakapatha.htm"
55
drive_links:

‎_content/canon/lal26.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "The Dharmacakrapravartana Sūtra"
2+
title: "Lal 26 Dharmacakrapravartana Sūtra"
33
slug: "lal.26"
44
translator: anandajoti
55
external_url: "https://www.ancient-buddhist-texts.net/Texts-and-Translations/Short-Pieces-in-Sanskrit/Dharmacakrapravartanasutram.htm"

‎_content/canon/sf238.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "The Pratītyasamutpādā Di-vibhaṅga Nirdeśa Sūtra"
2+
title: "SF 238 Pratītyasamutpādā Di-vibhaṅga Nirdeśa Sūtra"
33
translator: anandajoti
44
external_url: "https://www.ancient-buddhist-texts.net/Texts-and-Translations/Short-Pieces-in-Sanskrit/Pratityasamutpadadivibhanganirdesasutram.htm"
55
source_url: "https://www.dsbcproject.org/canon-text/book/65"

‎_content/canon/sn48.10.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Indriya Vibhaṅga Sutta: The Second Discourse Giving an Analysis of the Faculties"
2+
title: "SN 48.10 Indriya Vibhaṅga Sutta: The Second Discourse Giving an Analysis of the Faculties"
33
slug: "sn.048.010"
44
translator: anandajoti
55
external_url: "https://www.ancient-buddhist-texts.net/Texts-and-Translations/Short-Pieces/Indriyavibhangasuttam.htm"

‎_layouts/author.html‎

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,43 @@ <h1 class="post-title">{{ page.title | escape }}</h1>
1111
<div class="post-content">
1212
<div class="description">{{ content }}</div>{% unless site.partial_build %}
1313
<div class="content">
14-
<h2>Selected Works <small>(in chronological order)</small></h2>
15-
{% capture filter %}c.authors contains '{{ page.slug }}'{% endcapture %}
14+
{% capture filter %}c.authors contains '{{ page.slug }}'{% endcapture %}
1615
{% assign contents = site.content | where_exp: "c", filter %}
1716
{% capture filter %}c.translator contains " and {{page.slug}}" or c.translator contains "{{page.slug}} and " or c.translator == "{{page.slug}}"{% endcapture %}
18-
{% assign transcont = site.content | where_exp: "c", filter %}
17+
{% assign transcont = site.content | where_exp: "c", filter | where_exp: "c", "c.status != 'rejected'" | sort: "slug" %}
1918
{% capture filter %}c.editor contains " and {{page.slug}}" or c.editor contains "{{page.slug}} and " or c.editor == "{{page.slug}}"{% endcapture %}
2019
{% assign editcont = site.content | where_exp: "c", filter %}
2120
{% assign readcont = site.content | where: "reader", page.slug %}
22-
<div>{% include content_list.html contents=contents orderby="year" %}</div>
23-
{% if readcont.size > 0 %}
24-
<h3 id="readings">Readings:</h3>
25-
<div>{% include content_list.html contents=readcont orderby="year" %}</div>
26-
{% endif %}
27-
{% if editcont.size > 0 %}
28-
<h3 id="edits">Edited:</h3>
29-
<div>{% include content_list.html contents=editcont orderby="year" %}</div>
30-
{% endif %}
21+
22+
{%- assign contents = contents | concat: editcont | concat: readcont | where_exp: "c", "c.status != 'rejected'" -%}
23+
{%- assign editcont = editcont | map: "url" -%}
24+
{%- assign c_by_year = contents | group_by: "year" | sort: "name" -%}
25+
<h2>Selected Works by year</h2>
26+
<div>
27+
<p>{%- for year in c_by_year -%}<a href="#{{year.name}}">{{year.name}}</a>{% unless forloop.last %} • {% endunless %}{%- endfor -%}</p>
28+
{%- if transcont.size > 0 -%}
29+
<p><a href="#translations">Click here</a> to see {{ page.title }}'s translations.</p>
30+
{%- endif -%}
31+
{%- for year in c_by_year -%}
32+
<h3 id="{{year.name}}">{{year.name}}</h3>
33+
{%- assign year_items = year.items | sort: 'title' -%}
34+
<div class="minimal_content_list">
35+
{% for c in year_items %}<div class="mb-3 inline_content">
36+
{% 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 -%}
37+
<a href="{{c.url}}">{{ c.title | markdownify | remove: '<p>' | remove: '</p>' }}</a>
38+
{%- if editcont contains c.url -%}(edited){%- endif -%}
39+
</div>{% endfor %}
40+
</div>
41+
{%- endfor -%}
42+
</div>
3143
{% if transcont.size > 0 %}
3244
<h3 id="translations">Translations by {{ page.title }}:</h3>
33-
<div>{% include content_list.html contents=transcont orderby="slug" %}</div>
45+
<div class="minimal_content_list">
46+
{% for c in transcont %}<div class="mb-3 inline_content">
47+
{% 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 -%}
48+
<a href="{{c.url}}">{{ c.title | markdownify | remove: '<p>' | remove: '</p>' }}</a>
49+
</div>{% endfor %}
50+
</div>
3451
{% endif %}
3552
</div>{% endunless %}
3653
</div>

0 commit comments

Comments
 (0)