Merge pull request 'wordcloud' (#2) from wordcloud into main

Reviewed-on: #2
This commit is contained in:
Tyrel Souza 2022-11-03 04:06:19 +00:00
commit db89389de8
22 changed files with 67 additions and 14 deletions

View File

@ -72,4 +72,4 @@ DEFAULT_METADATA = {
'extras/favicon.ico': {'path': 'favicon.ico'}, 'extras/favicon.ico': {'path': 'favicon.ico'},
} }
THEME = "./themes/simple" THEME = "./themes/solarized"

View File

@ -1,13 +0,0 @@
{% extends "base.html" %}
{% block title %}{{ SITENAME }} - Tags{% endblock %}
{% block content %}
<h1>Tags for {{ SITENAME }}</h1>
<hr class="article-split">
<ul>
{% for tag, articles in tags|sort %}
<li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> ({{ articles|count }})</li>
{% endfor %}
</ul>
{% endblock %}

View File

@ -1,5 +1,6 @@
@import url("reset.css"); @import url("reset.css");
@import url("pygment.css"); @import url("pygment.css");
@import url("wordcloud.css");
body { body {
font-family: 'Lato', 'Trebuchet MS', Trebuchet, 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; font-family: 'Lato', 'Trebuchet MS', Trebuchet, 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
@ -111,3 +112,5 @@ h3.entry-title{
} }
a:link.permalink { text-decoration: none; } a:link.permalink { text-decoration: none; }

View File

@ -0,0 +1,50 @@
.wordcloud {
padding: 0.1rem;
width: 400px;
text-align:center;
}
.size-1 { font-size:1.0rem; }
.size-2 { font-size:1.1rem; }
.size-3 { font-size:1.2rem; }
.size-4 { font-size:1.3rem; }
.size-5 { font-size:1.4rem; }
.size-6 { font-size:1.5rem; }
.size-7 { font-size:1.6rem; }
.size-8 { font-size:1.7rem; }
.size-9 { font-size:1.8rem; }
.size-10 { font-size:1.9rem; }
.size-11 { font-size:2.0rem; }
.size-12 { font-size:2.1rem; }
.size-13 { font-size:2.2rem; }
.size-14 { font-size:2.3rem; }
.size-15 { font-size:2.4rem; }
.size-16 { font-size:2.5rem; }
.size-17 { font-size:2.6rem; }
.size-18 { font-size:2.7rem; }
.size-19 { font-size:2.8rem; }
.size-20 { font-size:2.9rem; }
.size-21 { font-size:3.0rem; }
.size-22 { font-size:3.1rem; }
.size-23 { font-size:3.2rem; }
.size-24 { font-size:3.3rem; }
.size-25 { font-size:3.4rem; }
.size-26 { font-size:3.5rem; }
.size-27 { font-size:3.6rem; }
.size-28 { font-size:3.7rem; }
.size-29 { font-size:3.8rem; }
.size-30 { font-size:3.9rem; }
.size-31 { font-size:4.0rem; }
.size-32 { font-size:4.1rem; }
.size-33 { font-size:4.2rem; }
.size-34 { font-size:4.3rem; }
.size-35 { font-size:4.4rem; }
.size-36 { font-size:4.5rem; }
.size-37 { font-size:4.6rem; }
.size-38 { font-size:4.7rem; }
.size-39 { font-size:4.8rem; }
.size-40 { font-size:4.9rem; }

View File

@ -0,0 +1,13 @@
{% extends "base.html" %}
{% block title %}{{ SITENAME }} - Tags{% endblock %}
{% block content %}
<h1>Tags for {{ SITENAME }}</h1>
<hr class="article-split">
<div class="wordcloud">
{% for tag, articles in tags|sort %}
<a href="{{ SITEURL }}/{{ tag.url }}" class="wordcloud size-{{articles|count}}">{{ tag }}</a>
{% endfor %}
</div>
{% endblock %}