Add Announcement Banner per #118#499
Conversation
Changes: - `conf.py`: loading banner data - `data/top-banner.yaml`: banner content and toggle - `templates/top-banner.tmpl`: template for loading banner - `themes/ansible-community/sass/_top-banner.scss`: banner styling - `themes/ansible-community/sass/main.scss`: minor changes to support banner - `themes/ansible-community/templates/base.tmpl`: change to include banner when enabled
|
This is a basic framework for a banner. I'm happy for feedback on the implementation, on style changes, and on how we can document this for ease of use. |
Co-authored-by: Don Naro <dnaro@redhat.com>
Co-authored-by: Don Naro <dnaro@redhat.com>
Co-authored-by: Don Naro <dnaro@redhat.com>
Most recent commit should include fixes for this too. |
Co-authored-by: Don Naro <dnaro@redhat.com>
|
@x1101 Now that #500 is merged do you want to see if adding |
|
Yeah, I'll get my branch rebased and test this out. |
I ended up having to do |
Hey @x1101 Thanks for this! That makes sense to me, glad you figured it out. I've added @felixfontein as a reviewer who might have an opinion on the whole approach. I also added @samccann and @gundalow as reviewers so they can provide thoughts on the banner itself. |
dev.conf.py
Outdated
| # Update GLOBAL_CONTEXT["BANNER"] to True | ||
| GLOBAL_CONTEXT.update({ "BANNER": True, }) |
There was a problem hiding this comment.
| # Update GLOBAL_CONTEXT["BANNER"] to True | |
| GLOBAL_CONTEXT.update({ "BANNER": True, }) | |
| # Override to display the global banner | |
| # GLOBAL_CONTEXT.update({ "BANNER": True, }) |
There was a problem hiding this comment.
I think it's probably worth commenting this override so the banner is not displayed on subsequent PRs and we don't forget how to update the global context.
… leaving the banner disabled. Per suggestions from @oraNod
|
Does the banner go through any rendering functions? I can't get markdown links to render. |
Nah, it's HTML in YAML. 🤘 |
This is the framework for adding a banner. To enable it change
show_banner: Falsetoshow_banner: Trueindata/top-banner.yamlFor local testing, once you run
nikola serve(ornox serve), you need to edit the html to point to the localmain.cssinstead of the hosted version.Changes:
conf.py: loading banner datadata/top-banner.yaml: banner content and toggletemplates/top-banner.tmpl: template for loading bannerthemes/ansible-community/sass/_top-banner.scss: banner stylingthemes/ansible-community/sass/main.scss: minor changes to support bannerthemes/ansible-community/templates/base.tmpl: change to include banner when enabled