Skip to content

Commit

Permalink
Hide the empty trending tags from panel.
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed Jun 1, 2020
1 parent ab00d09 commit 1448926
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion _includes/panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,22 @@ <h3 data-toc-skip>

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

{% include trending_tags.html %}

{% if trending_tags.size > 0 %}
<div id="access-tags">
<h3 data-toc-skip>
{{- site.data.label.panel.trending_tags -}}
</h3>
<div class="d-flex flex-wrap mt-3 mb-1 mr-3">
{% include trending-tags.html %}

{% for tag in trending_tags %}
{% capture url %}/tags/{{ tag | downcase | url_encode }}/{% endcapture %}
<a class="post-tag" href="{{ url | relative_url }}">{{ tag | replace: '-', ' ' }}</a>
{% endfor %}
</div>
</div>
{% endif %}

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

Expand Down
2 changes: 1 addition & 1 deletion _includes/search-results.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="col-12 col-xl-11 post-content">
<div id="search-hints">
<h4 class="text-muted mb-4">{{ site.data.label.panel.trending_tags }}</h4>
{% include trending-tags.html %}
{% include trending_tags.html %}
{% for tag in trending_tags %}
{% capture url %}/tags/{{ tag | downcase | url_encode }}/{% endcapture %}
<a class="post-tag" href="{{ url | relative_url }}">{{ tag | replace: '-', ' ' }}</a>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion assets/js/data/cache-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const include = [
{% endfor %}
/* Trending tags */
{% include trending-tags.html %}
{% include trending_tags.html %}
{% for tag in trending_tags %}
{% capture tag_url %}/tags/{{ tag | downcase | url_encode }}/{% endcapture %}
'{{ tag_url | relative_url }}',
Expand Down

0 comments on commit 1448926

Please sign in to comment.