Skip to content

Commit 2eacfbf

Browse files
committed
Hide the empty trending tags from panel.
1 parent 1a2de71 commit 2eacfbf

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

_includes/panel.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,22 @@ <h3 data-toc-skip>
4545

4646
{% endif %} <!-- site.data.updates -->
4747

48+
{% include trending_tags.html %}
49+
50+
{% if trending_tags.size > 0 %}
4851
<div id="access-tags">
4952
<h3 data-toc-skip>
5053
{{- site.data.label.panel.trending_tags -}}
5154
</h3>
5255
<div class="d-flex flex-wrap mt-3 mb-1 mr-3">
53-
{% include trending-tags.html %}
56+
5457
{% for tag in trending_tags %}
5558
{% capture url %}/tags/{{ tag | downcase | url_encode }}/{% endcapture %}
5659
<a class="post-tag" href="{{ url | relative_url }}">{{ tag | replace: '-', ' ' }}</a>
5760
{% endfor %}
5861
</div>
5962
</div>
63+
{% endif %}
6064

6165
</div> <!-- .access -->
6266

_includes/search-results.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<div class="col-12 col-xl-11 post-content">
1010
<div id="search-hints">
1111
<h4 class="text-muted mb-4">{{ site.data.label.panel.trending_tags }}</h4>
12-
{% include trending-tags.html %}
12+
{% include trending_tags.html %}
1313
{% for tag in trending_tags %}
1414
{% capture url %}/tags/{{ tag | downcase | url_encode }}/{% endcapture %}
1515
<a class="post-tag" href="{{ url | relative_url }}">{{ tag | replace: '-', ' ' }}</a>
File renamed without changes.

assets/js/data/cache-list.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const include = [
6565
{% endfor %}
6666

6767
/* Trending tags */
68-
{% include trending-tags.html %}
68+
{% include trending_tags.html %}
6969
{% for tag in trending_tags %}
7070
{% capture tag_url %}/tags/{{ tag | downcase | url_encode }}/{% endcapture %}
7171
'{{ tag_url | relative_url }}',

0 commit comments

Comments
 (0)