generated from ar363/eleventy-stylus-blog-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathallextensions.njk
37 lines (35 loc) · 1.3 KB
/
allextensions.njk
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
---
layout: layouts/base.njk
permalink: /extensions/
title: 所有推荐扩展
eleventyNavigation:
key: 扩展
weight: 1
---
<div class="container">
<h1>所有推荐扩展</h1>
<div class="card-grid">
{% for post in collections.all %}
{% if post.data.icon %}
<div class="card">
<img src="/extensions/{{ post.data.icon }}" alt="{{ post.data.title }} icon" class="card__icon">
<h2 class="card__title">
<a href="{{ post.url }}">{{ post.data.title }}</a>
</h2>
<div class="card__categories">
{% for category in post.data.categories %}
{% if category != "extensions" %}
{% if loop.index <= 4 %}
<a href="/categorieslist/{{ category }}" class="card__category">{{ category }}</a>
{% endif %}
{% endif %}
{% endfor %}
{% if post.data.categories.length > 4 %}
<a href="/categorieslist/" class="card__category">更多...</a>
{% endif %}
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div>