forked from github/pelican
remove tag_cloud from core
This commit is contained in:
parent
d0c15d5a0c
commit
9dd4080fe6
3 changed files with 2 additions and 79 deletions
|
|
@ -620,53 +620,6 @@ This would cause the first page to be written to
|
|||
``page/{number}`` directories.
|
||||
|
||||
|
||||
Tag cloud
|
||||
=========
|
||||
|
||||
If you want to generate a tag cloud with all your tags, you can do so using the
|
||||
following settings.
|
||||
|
||||
================================================ =====================================================
|
||||
Setting name (followed by default value) What does it do?
|
||||
================================================ =====================================================
|
||||
``TAG_CLOUD_STEPS = 4`` Count of different font sizes in the tag
|
||||
cloud.
|
||||
``TAG_CLOUD_MAX_ITEMS = 100`` Maximum number of tags in the cloud.
|
||||
================================================ =====================================================
|
||||
|
||||
The default theme does not include a tag cloud, but it is pretty easy to add one::
|
||||
|
||||
<ul class="tagcloud">
|
||||
{% for tag in tag_cloud %}
|
||||
<li class="tag-{{ tag.1 }}"><a href="{{ SITEURL }}/{{ tag.0.url }}">{{ tag.0 }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
You should then also define CSS styles with appropriate classes (tag-1 to tag-N,
|
||||
where N matches ``TAG_CLOUD_STEPS``), tag-1 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-1 {
|
||||
font-size: 150%;
|
||||
}
|
||||
|
||||
li.tag-2 {
|
||||
font-size: 120%;
|
||||
}
|
||||
|
||||
...
|
||||
|
||||
|
||||
Translations
|
||||
============
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue