Skip to content

Commit

Permalink
Create tagcloud.html
Browse files Browse the repository at this point in the history
  • Loading branch information
ibbsbbr authored Jul 18, 2024
1 parent 7480ddf commit 4ec871d
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions _includes/_helper/tagcloud.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
layout: default
---

{% comment %} tagcloud {% endcomment %}
<ul class="tagcloud-list" style="list-style: none; padding: 0; font-family: 'BitPotionExt'; display: flex; flex-direction: column;">
{% assign tags_list = site.tags %}
{% assign sorted_tags = tags_list | sort: "size" %}
{% for tag in sorted_tags %}
{% assign tag_name = tag[0] %}
{% assign tag_count = tag[1].size %}
{% assign tag_url = tag_name | slugify %}
<li class="tagcloud-item" style="margin-bottom: 10px;">
<a href="#{{ tag_url }}" class="tagcloud-link" style="color: #FFFFFF; text-decoration: none;">
{{ tag_name }}
</a>
<span class="tagcloud-count" style="color: #000000;"> ({{ tag_count }})</span>
<div class="blog-grid-container" id="{{ tag_url }}">
{% assign pages_list = tag[1] %}
{% for post in pages_list %}
{% if post.title %}
<a href="{{ post.url }}" style="color: #FFFFFF; text-decoration: none;">
{{ post.title }}
</a><br>
{% endif %}
{% endfor %}
</div>
</li>
{% endfor %}
</ul>

0 comments on commit 4ec871d

Please sign in to comment.