Commit bc053b6965c90204a51bed73a870fe3c2b42c424
Home page: allow list of entries to expand
Instead of always showing only the first 3 entries, (plus the bio), also show any older entries from the same month as the 3rd entry. This allows the list to expand when there are many entries in quick succession. I'd like to be able to show any entries newer than n days ago, but I haven't worked out how to add or subtract from a date before comparing against it.Greg K Nicholson committed on 2/26/2018, 12:18:06 AM
Parent: 9c3c14e63d6a6b81238b18f9ad401b74f6145862
Files changed
themes/ran/templates/index.html | changed |
themes/ran/templates/index.html | ||
---|---|---|
@@ -9,9 +9,15 @@ | ||
9 | 9 … | {%- endblock -%} |
10 | 10 … | {%- block maincontent -%} |
11 | 11 … | <ul class="biglinks"> |
12 | 12 … | {%- for article in dates -%} |
13 | - {%- if loop.index <= 3 or article.slug == AUTHOR_URL -%} | |
13 … | + {%- if article.slug == AUTHOR_URL | |
14 … | + or article.date | strftime('%Y-%m') >= | |
15 … | + articles[2].date | strftime('%Y-%m') -%} | |
16 … | + {# <!-- Show the bio, | |
17 … | + plus the first 3 entries (0 to 2), | |
18 … | + plus any other entries in the same month | |
19 … | + as the 3rd entry. --> #} | |
14 | 20 … | {{- entry_link(article) -}} |
15 | 21 … | {%- endif -%} |
16 | 22 … | {%- endfor -%} |
17 | 23 … | <li> |
Built with git-ssb-web