|
2 | 2 | title: Tags
|
3 | 3 | layout: page
|
4 | 4 | ---
|
| 5 | + |
5 | 6 | {% assign max_posts = page.max_posts | default: 6 %}
|
| 7 | +{% assign tag_posts = 0 %} |
| 8 | + |
6 | 9 | <h1 class="h3-mktg mt-4 mb-6 mb-md-8">{{ page.title }}</h1>
|
7 | 10 |
|
8 | 11 | {% for tag in site.tags %}
|
9 | 12 | <h2 class="h6-mktg section-heading">{{ tag[0] | capitalize }}</h2>
|
10 | 13 | <div class="d-flex flex-wrap gutter-spacious">
|
11 |
| - {% for post in tag[1] limit: max_posts %} |
12 |
| - {%- include post-card.html %} |
13 |
| - {% endfor %} |
14 |
| - {% if tag[1].size > max_posts %} |
15 |
| - {%- if site.tag_page_dir -%} |
16 |
| - {%- capture tag_link %}/{{ site.tag_page_dir }}/{{ tag | first | jekyll_tagging_slug }}{% |
17 |
| - endcapture %} |
18 |
| - {%- else -%} |
19 |
| - {%- capture tag_link %}{{site.tag_archive_path}}{{ tag | first | slugify }}{% endcapture %} |
20 |
| - {%- endif -%} |
21 |
| - <div class="px-4"> |
22 |
| - <a href="{{ tag_link }}" class="link-mktg arrow-target-mktg text-semibold f4-mktg"> |
23 |
| - More |
24 |
| - <svg xmlns="http://www.w3.org/2000/svg" class="octicon arrow-symbol-mktg" width="16" height="16" |
25 |
| - viewBox="0 0 16 16" fill="none"> |
26 |
| - <path fill="currentColor" |
27 |
| - d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"> |
28 |
| - </path> |
29 |
| - <path stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path> |
30 |
| - </svg> |
31 |
| - </a> |
32 |
| - </div> |
33 |
| - {%- endif %} |
| 14 | + |
| 15 | + {% for post in site.posts %} |
| 16 | + {% if post.tags contains tag[0] %} |
| 17 | + {% include post-card.html %} |
| 18 | + {% tag_posts | plus: 1 %} |
| 19 | + {% if tag_posts == max_posts %} |
| 20 | + {% if tag[1].size > max_posts %} |
| 21 | + {% capture tag_url %}{{ site.url }}{{ site.baseurl }}{{ site.tag_page_dir | default: tags }}/{{ tag | first | slugify }}{% endcapture%} |
| 22 | + <div class="px-4"> |
| 23 | + <a href="{{ tag_url }}" class="link-mktg arrow-target-mktg text-semibold f4-mktg"> |
| 24 | + More |
| 25 | + <svg xmlns="http://www.w3.org/2000/svg" class="octicon arrow-symbol-mktg" width="16" height="16" viewBox="0 0 16 16" fill="none"> |
| 26 | + <path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path> |
| 27 | + <path stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path> |
| 28 | + </svg> |
| 29 | + </a> |
| 30 | + </div> |
| 31 | + {% endif %} |
| 32 | + {% break %} |
| 33 | + {% endif %} |
| 34 | + {% endif %} |
| 35 | + {% endfor %} |
34 | 36 | </div>
|
35 | 37 | {% endfor %}
|
0 commit comments