-
Notifications
You must be signed in to change notification settings - Fork 7
/
highlights.html
54 lines (50 loc) · 2.75 KB
/
highlights.html
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
---
title: Highlights
section: library
permalink: /library/highlights
image: "https://www.buddhistuniversity.net/imgs/Kyoto-temple.jpg"
big_image: https://upload.wikimedia.org/wikipedia/commons/3/3d/Nanzen-ji%2C_a_Zen_Buddhist_temple%2C_and_its_surroundings%2C_Kyoto%3B_November_2016_%2801%29.jpg
big_width: 5928
big_height: 3952
image_width: 1280
image_center_y: 53%
image_center_x: 50%
image_height: 853
banner_info: <a href="https://commons.wikimedia.org/wiki/File:Nanzen-ji,_a_Zen_Buddhist_temple,_and_its_surroundings,_Kyoto;_November_2016_(01).jpg">雷太</a>, <a href="https://creativecommons.org/licenses/by/2.0">CC BY 2.0</a>
---
{% assign allcontent = site.content | where_exp: "c", "c.external_url or c.drive_links or c.file_links" %}
{% capture thisyear %}{{ 'now' | date: "%Y" }}{% endcapture %}
{% assign lastyear = thisyear | minus: 1 %}
<h2>Table of Contents</h2><ul id="toc">
{% if site.show_timestamps %}<li><a href="#latest">Latest Arrivals</a></li>{% endif %}
<li><a href="#recent">Recently Published</a></li>
<li><a href="#bestof">Featured Content</a></li>
</ul>
{% if site.show_timestamps %}
<h2 id="latest"><i class="fas fa-clock"></i> Latest Arrivals</h2>
<p>Just added to the library:</p>
{% assign newc = allcontent | sort: "date" | reverse | slice: 0, 10 %}
{% for c in newc %}
<div class="mb-3">{% include simple_content_title.html content=c %}<ul><li>Added {{ c.date | date_to_long_string: "ordinal" }}</li></ul></div>
{% endfor %}
<p>... To continue, see <a href="/content/all/?n=10&order=5.desc&cols=0.3.5">the content table, sorted by date</a>.</p>
{% endif %}
{% assign allcontent = allcontent | where: "status", "featured" %}
{% assign courses = site.courses | map: "slug" %}
{% assign tags = site.tags | where: "status", "published" | map: "slug" | concat: courses %}
{% assign thisyears = allcontent | where: "year", thisyear | where_exp: "c", "tags contains c.course" %}
{% assign lastyears = allcontent | where: "year", lastyear | where_exp: "c", "tags contains c.course" %}
{% assign featurecontent = lastyears | concat: thisyears %}
<h2 id="recent"><i class="fas fa-calendar-week"></i> Recently Published</h2>
<p>Within the last couple years.</p>
{% for c in featurecontent %}
<div class="mb-3">{% include simple_content_title.html content=c %}</div>{% endfor %}
<h2 id="bestof"><i class="fas fa-medal"></i> Featured Selections</h2>
<p>A couple works are selected as the cream of the crop each year.</p>
{% capture fe %}c.year < {{ lastyear }}{% endcapture %}
{% assign featurecontent = allcontent | where_exp: "c", fe | where: "stars", 5 | group_by: "year" | sort: "name" | reverse %}
{% for y in featurecontent %}
<h3>{{ y.name }}</h3>
{% for c in y.items %}
<div class="mb-3">{% include simple_content_title.html content=c %}</div>{% endfor %}
{% endfor %}