mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
commit
853ce866cb
1 changed files with 23 additions and 3 deletions
|
|
@ -522,14 +522,34 @@ Setting name (default value) What does it do?
|
||||||
|
|
||||||
The default theme does not include a tag cloud, but it is pretty easy to add::
|
The default theme does not include a tag cloud, but it is pretty easy to add::
|
||||||
|
|
||||||
<ul>
|
<ul class="tagcloud">
|
||||||
{% for tag in tag_cloud %}
|
{% for tag in tag_cloud %}
|
||||||
<li class="tag-{{ tag.1 }}"><a href="{{ SITEURL }}/{{ tag.0.url }}">{{ tag.0 }}</a></li>
|
<li class="tag-{{ tag.1 }}"><a href="{{ SITEURL }}/{{ tag.0.url }}">{{ tag.0 }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
You should then also define a CSS style with the appropriate classes (tag-0 to tag-N, where
|
You should then also define CSS styles with appropriate classes (tag-0 to tag-N, where
|
||||||
N matches `TAG_CLOUD_STEPS` -1).
|
N matches `TAG_CLOUD_STEPS` -1), tag-0 being the most frequent, and define a ul.tagcloud
|
||||||
|
class with appropriate list-style to create the cloud, for example::
|
||||||
|
|
||||||
|
ul.tagcloud {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.tagcloud li {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.tag-0 {
|
||||||
|
font-size: 150%;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.tag-1 {
|
||||||
|
font-size: 120%;
|
||||||
|
}
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
Translations
|
Translations
|
||||||
============
|
============
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue