1
0
mirror of synced 2025-12-31 06:02:42 -05:00
Files
docs/includes/header-notification.html
Sarah Schneider 712003941f Release candidate banner script (#16427)
* remove middleware that sets notification flags

* move all notification handling into includes/header-notification.html

* update tests

* add release candidate header notification

* add release candidate banner text

* new script to add or remove a release candidate banner

* Update script/release-banner.js

Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>

* clarify error message

* empty commit to rerun CI

Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
2020-11-13 12:12:53 -05:00

43 lines
1.9 KiB
HTML

<!-- START TRANSLATIONS NOTICES -->
<!-- Site policy translations notice -->
{% if currentLanguage != 'en' and page.relativePath contains '/site-policy/' %}
{% assign translation_notification_type = "true" %}
{% assign translation_notification = site.data.reusables.policies.translation %}
<!-- Completed translations notice -->
{% elsif currentLanguage != 'en' && !languages[currentLanguage].wip %}
{% assign translation_notification_type = "true" %}
{% assign translation_notification = site.data.ui.header.notices.localization_complete %}
<!-- In-progress translations notice -->
{% elsif currentLanguage != 'en' && languages[currentLanguage].wip %}
{% assign translation_notification_type = "true" %}
{% assign translation_notification = site.data.ui.header.notices.localization_in_progress %}
{% endif %}
<!-- END TRANSLATIONS NOTICES -->
<!-- START RELEASE NOTICES -->
<!-- Custom GitHub AE notice -->
{% if currentVersion == "github-ae@latest" %}
{% assign release_notification_type = "true" %}
{% assign release_notification = site.data.ui.header.notices.ghae_silent_launch %}
<!-- Release candidate notice -->
{% elsif currentVersion == site.data.variables.release_candidate.version %}
{% assign release_notification_type = "true" %}
{% assign release_notification = allVersions[currentVersion].versionTitle | append: site.data.ui.header.notices.release_candidate %}
{% endif %}
<!-- END RELEASE NOTICES -->
{% if translation_notification_type %}
<div class="header-notifications text-center f5 bg-blue-1 text-gray-dark py-4 px-6 translation_notice{% if release_notification_type %} border-bottom border-black-fade{% endif %}">
{{ translation_notification }}
</div>
{% endif %}
{% if release_notification_type %}
<div class="header-notifications text-center f5 bg-blue-1 text-gray-dark py-4 px-6 release_notice">
{{ release_notification }}
</div>
{% endif %}