Add tag cloud to post, fix appearance

This commit is contained in:
Michal Jirku 2021-02-20 21:45:31 +01:00
parent 7d428423ad
commit 0157b049b0
3 changed files with 16 additions and 3 deletions

View File

@ -23,6 +23,14 @@ layout: default
</div>
<h1 class="post-title">{{ page.title }}</h1>
<div class="tags-clouds">
{% assign pt = page.tags | sort -%}
{% for tag in pt -%}
<a href="/tags/#{{ tag }}">{{ tag }}</a>
{% endfor %}
</div><br />
<div class="post-line"></div>
{{ content }}

View File

@ -10,11 +10,12 @@ permalink: /tags/
<div class="tags-header-line"></div>
</div>
<div class="tags-clouds">
{% for tag in site.tags -%}
<a href="#{{ tag[0] }}">{{ tag[0] }}</a>
{% assign st = site.tags | sort -%}
{% for tag in st -%}
<a href="#{{ tag[0] }}">{{ tag[0] | replace: '_', ' ' }}</a>
{% endfor %}
</div>
{% for tag in site.tags -%}
{% for tag in st -%}
<div class="tags-item" id="{{ tag[0] }}">
<svg
class="tags-item-icon"

View File

@ -32,6 +32,10 @@
text-align: justify;
}
.tags-clouds a:hover {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}