Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render tag cloud on tags page #37

Merged
merged 1 commit into from
Sep 29, 2018
Merged

Conversation

sio
Copy link
Contributor

@sio sio commented Sep 14, 2018

Tags page was quite boring and didn't use horizontal space efficiently. This commit replaces plain tag list with tag cloud that gracefully scales to any screen (Attila's responsive design principle is not violated).

Details:

  • Tags are still sorted alphabetically
  • Tags with more articles have bigger font size
  • Number of font size steps is defined via TAG_CLOUD_STEPS variable. If that variable is not set or is zero, default value of 5 steps is used. Stylesheet is written to support up to 10 steps.
  • Tag tooltip shows number of articles with that tag

There exists a separate plugin for tag cloud, but using it still requires making changes to the theme. Trivial math calculations can be done as easily in Jinja as in Python, so the dependency on external package can and should be avoided.

Screenshots: before, after

@arulrajnet arulrajnet self-assigned this Sep 24, 2018
@arulrajnet
Copy link
Owner

@sio please update this setting about in README. Otherwise LGTM

Tags page was quite boring and didn't use horizontal space efficiently.
This commit replaces plain tag list with tag cloud that gracefully scales
to any screen (Attila's responsive design principle is not violated).

Details:

- Tags are still sorted alphabetically
- Tags with more articles have bigger font size
- Number of font size steps is defined via TAG_CLOUD_STEPS variable.
  If that variable is not set or is zero, default value of 5 steps is
  used. Stylesheet is written to support up to 10 steps.
- Tag tooltip shows number of articles with that tag

There exists a separate plugin for tag cloud[1], but using it still
requires making changes to the theme. Trivial math calculations can be
done as easily in Jinja as in Python, so the dependency on external
package can and should be avoided.

Screenshots: before [[2]], after [[3]]

[1]: https://github.com/getpelican/pelican-plugins/tree/master/tag_cloud
[2]: https://i.imgur.com/ivZQIxi.png
[3]: https://i.imgur.com/fLNVKpj.png
@sio
Copy link
Contributor Author

sio commented Sep 24, 2018 via email

@arulrajnet arulrajnet merged commit 84e7843 into arulrajnet:master Sep 29, 2018
@sio sio deleted the tags-page branch October 1, 2018 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants