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

✨ feat(tags): add compact_tags option #232

Merged
merged 1 commit into from
Dec 30, 2023
Merged

Conversation

welpo
Copy link
Owner

@welpo welpo commented Dec 30, 2023

Summary

Adds an option to display tags in the All Tags page in a more compact way.

By default, the tags page displays tags as:

TagName — n post[s]

Setting compact_tags = true will display them as:

TagName n

Related issue

Implements #230.

Accessibility

The smaller superscript is slightly less accessible. This is why:

  • It's an optional setting;
  • The aria-label indicates screen readers should read aloud "tag name n posts" (not just "tag name n");
  • It's not part of the link, increasing text-background contrast.

Screenshots

Default, compact_tags = false:

compact_tags = true:

Type of change

  • Bug fix (fixes an issue without altering functionality)
  • New feature (adds non-breaking functionality)
  • Breaking change (alters existing functionality)
  • UI/UX improvement (enhances user interface without altering functionality)
  • Refactor (improves code quality without altering functionality)
  • Documentation update
  • Other (please describe below)

Checklist

  • I have verified the accessibility of my changes
  • I have tested all possible scenarios for this change
  • I have updated theme.toml with a sane default for the feature
  • I have made corresponding changes to the documentation:
    • Updated config.toml comments
    • Updated theme.toml comments
    • Updated "Mastering tabi" post in English
    • (Optional) Updated "Mastering tabi" post in Spanish
    • (Optional) Updated "Mastering tabi" post in Catalan

@welpo welpo added the enhancement New feature or request label Dec 30, 2023
@welpo welpo merged commit d257e02 into main Dec 30, 2023
1 check passed
@welpo welpo deleted the feat/multi-column-tags branch December 30, 2023 15:41
@welpo welpo mentioned this pull request Dec 30, 2023
Smtbook pushed a commit to Smtbook/zola-theme-tabi that referenced this pull request Feb 29, 2024
Co-authored-by: arichtman <10679234+arichtman@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant