-
Notifications
You must be signed in to change notification settings - Fork 8
/
test.html
70 lines (49 loc) · 1.52 KB
/
test.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
# test page for liquid code
---
<!-- sort by year reverse e.g. latest year first -->
{% assign books = site.books | reverse %}
{% assign categories = books | map: "categories" | uniq | sort_natural %}
{% assign authors = books | map: "authors" | uniq | sort_natural %}
{% assign editors = books | map: "editor" | uniq | sort_natural %}
<h1>Best of Crypto Books - Liquid Test Page</h1>
<!-- todos/check:
possible to get the file date / collection document date
for a book for last updated? - was using the git date before
-->
<h2>{{ books.size }} Books</h2>
{% for book in books %}
<div class='book'
data-categories="{{ book.categories | join: ' • ' }}"
data-authors="{{ book.authors | join: ' • ' }}"
data-editor="{{ book.editor }}">
<h3> <a href="{{ book.home_url }}">{{ book.title | truncate: 40 }}</a> </h3>
<p>
{% for category in book.categories %}
{{ category }}
{% endfor %}
</p>
<p>
{% for author in book.authors %}
{{author}}{% unless forloop.last %},{% endunless %}
{% endfor %}
</p>
<p>
{{ book.editor }}, {{ book.year }}
</p>
<p>{{ book.prices }}</p>
<p>info last updated on {{ book.updated_on }}</p>
</div>
{% endfor %}
<h3>{{ categories.size }} Categories</h3>
<p>
{{ categories | join: " • "}}
</p>
<h3>{{ authors.size }} Authors</h3>
<p>
{{ authors | join: " • " }}
</p>
<h3>{{ editors.size }} Editors</h3>
<p>
{{ editors | join: " • " }}
</p>