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> </div>
<h1 class="post-title">{{ page.title }}</h1> <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> <div class="post-line"></div>
{{ content }} {{ content }}

View File

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

View File

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