start to work in requests by cleaning up listing code
This commit is contained in:
19
_includes/listings.njk
Normal file
19
_includes/listings.njk
Normal file
@ -0,0 +1,19 @@
|
||||
{% set tag = "offers" %}
|
||||
|
||||
<div id="listings">
|
||||
{% for tag in collections | getKeys | removeCoreTags | sortAlphabetically %}
|
||||
<div class="category">
|
||||
<div class="category-title">
|
||||
<h2>{{ tag }}</h2>
|
||||
<p>{{ tag | getTagline }}</p>
|
||||
</div>
|
||||
{% set listings = collections[tag] | filterByDate(day) | filterByTag(tag) %}
|
||||
{% if listings | length == 0 %}
|
||||
<p>No listings.</p>
|
||||
{% endif %}
|
||||
{% for listing in listings | sortAlphabeticallyByTitle %}
|
||||
{% include "listing.njk" %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
Reference in New Issue
Block a user