-
Notifications
You must be signed in to change notification settings - Fork 4
Add Freshness Badges to FAQ Titles and FAQ Accordion #192
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
base: main
Are you sure you want to change the base?
Add Freshness Badges to FAQ Titles and FAQ Accordion #192
Conversation
tobie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Semantically, would it make sense to have the badges outside of the element that contains the question? |
| <span class="question-text"> | ||
| {{ faq.question | markdownInline | safe }} | ||
| {% include "components/badges/freshness.njk" %} | ||
| </span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be more semantically correct here to move the components out of the <span class="question-text">.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want them in the same place visually as they were before.
src/faq/faqs.njk
Outdated
| <h1 class="section-header"> | ||
| {{ faq.question | markdownInline | safe }} | ||
| {% include "components/badges/freshness.njk" %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The components really belong outside of the <h1>. Maybe you'll need to add a <header> around it to make it work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we want them in the same place visually, but not inside of the h1
6a27984 to
9dff6ff
Compare
9dff6ff to
43bc463
Compare


Add the "freshness" badge directly inline with FAQ titles in both single FAQ pages and accordion views, making it immediately visible when viewing FAQ questions.
Changes:
The badge now appears inline immediately after FAQ titles for FAQs created within the last 30 days, in
both individual FAQ pages and FAQ accordion lists. In those specific cases, you don't have to toggle admin info.
Closes #189