docs: Add Banner Configuration#3274
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the existing migration banner into a more flexible and configurable general announcement banner system. The changes include introducing a configuration object for banner content, updating CSS for a responsive layout with a close button, and implementing session-based dismissal logic. Feedback provided highlights several areas for improvement: supporting internationalization by moving hardcoded strings to the Hugo configuration, restoring the sticky positioning of the banner, including the banner ID in the storage key to handle updates correctly, and addressing a potential XSS vulnerability by avoiding the use of innerHTML for content injection.
|
🚀 Cloudflare Preview Ready! 🔎 View Preview: https://pr-3274.toolbox-docs-6xc.pages.dev (Note: Subsequent pushes to this PR will automatically update the preview at this same URL) |
|
🧨 Preview deployments removed. Cloudflare Pages environments for |
This PR adds a general banner configuration with a sessionStorage to make the banner closable for a session for a user. Before merging, please alter the title, message, linkText and linkURL --------- Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> 41dfcb7
This PR adds a general banner configuration with a sessionStorage to make the banner closable for a session for a user. Before merging, please alter the title, message, linkText and linkURL --------- Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> 41dfcb7
This PR adds a general banner configuration with a sessionStorage to make the banner closable for a session for a user. Before merging, please alter the title, message, linkText and linkURL --------- Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> 41dfcb7
This PR adds a general banner configuration with a sessionStorage to make the banner closable for a session for a user. Before merging, please alter the title, message, linkText and linkURL --------- Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> 41dfcb7
This PR adds a general banner configuration with a sessionStorage to make the banner closable for a session for a user.
Before merging, please alter the title, message, linkText and linkURL