Simplified trending tags structure.

This commit is contained in:
Cotes Chung 2019-10-29 17:05:28 +08:00
parent 15a2a98e05
commit 91c7fbe30a
2 changed files with 24 additions and 22 deletions

View file

@ -23,7 +23,7 @@
{% if lastmod_list.size > 0 %}
<div id="access-lastmod" class="post mb-4"">
<h3 data-toc-skip>
{{ site.data.label.panel.lastmod }}
{{- site.data.label.panel.lastmod -}}
</h3>
<ul class="post-content pl-0 pb-1 ml-1 mt-2">
{% assign MAX_SIZE = 5 %}
@ -39,14 +39,16 @@
{% endif %}
{% endfor %}
</ul>
</div><!-- #panel-update -->
</div><!-- #access-lastmod -->
{% endif %}
<div id="access-tags">
<h3 data-toc-skip>
{{ site.data.label.panel.trending_tags }}
{{- site.data.label.panel.trending_tags -}}
</h3>
<div class="d-flex flex-wrap mt-2 pb-1 pr-3">
<div class="d-flex flex-wrap mt-3 mb-1 mr-3">
{% capture tags_array %}
{% for tag in site.tags %}
{{ tag[1] | size }}:{{ tag[0] | replace: ' ', '-' }}
@ -57,7 +59,6 @@
{% assign count = 0 %}
{% assign trends = tags_array | split: " " | sort | reverse %}
<div>
{% for trend in trends %}
{% assign count = count | plus: 1 %}
{% assign tag = trend | split: ":" | last %}
@ -66,19 +67,20 @@
{% break %}
{% endif %}
{% endfor %}
</div>
</div>
</div><!-- #panel-tags -->
</div>
</div> <!-- div.d-flex.flex-wrap -->
{% if page.layout == 'post' and site.toc and page.toc %}
<div id="toc-wrap" class="pl-0 pr-4">
</div> <!-- #access-tags -->
</div> <!-- .access -->
{% if page.layout == 'post' and site.toc and page.toc %}
<div id="toc-wrap" class="pl-0 pr-4">
<h3 data-toc-skip class="pl-3 pt-2">
{{- site.data.label.panel.toc -}}
</h3>
<nav id="toc" data-toggle="toc"></nav>
</div>
{% endif %}
{% endif %}
</div> <!-- #panel-wrap -->

View file

@ -431,7 +431,7 @@ footer .license a {
border: 1px solid #e9ecef;
border-radius: .8rem;
padding: .3rem .5rem;
margin-bottom: .3rem;
margin: 0 .35rem .5rem 0;
}
#access-tags .post-tag:hover {