docs/includes/header-notification.html

58 строки
2.3 KiB
HTML

<!-- START TRANSLATIONS NOTICES -->
{% if currentLanguage != 'en' %}
{% assign translation_notification_type = "true" %}
<!-- Site policy translations notice -->
{% if page.relativePath contains '/site-policy/' %}
{% assign translation_notification = site.data.reusables.policies.translation %}
<!-- Completed translations notice -->
{% elsif languages[currentLanguage].wip != true %}
{% assign translation_notification = site.data.ui.header.notices.localization_complete %}
<!-- In-progress translations notice -->
{% elsif languages[currentLanguage].wip %}
{% assign translation_notification = site.data.ui.header.notices.localization_in_progress %}
{% endif %}
{% 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 -->
<!-- ONEOFF EARLY ACCESS NOTICE -->
{% if page.hidden and page.relativePath contains "early-access/" %}
{% assign early_access_notification_type = true %}
{% assign early_access_notification = site.data.ui.header.notices.early_access %}
{% endif %}
<!-- END ONEOFF EARLY ACCESS NOTICE -->
{% if translation_notification_type %}
<div class="header-notifications text-center f5 color-bg-info color-text-primary py-4 px-6 translation_notice{% if release_notification_type %} border-bottom color-border-tertiary{% endif %}">
{{ translation_notification }}
</div>
{% endif %}
{% if release_notification_type %}
<div class="header-notifications text-center f5 color-bg-info color-text-primary py-4 px-6 release_notice{% if early_access_notification_type %} border-bottom color-border-tertiary{% endif %}">
{{ release_notification }}
</div>
{% endif %}
{% if early_access_notification_type %}
<div class="header-notifications text-center f5 color-bg-danger color-text-primary py-4 px-6 early_access">
{{ early_access_notification }}
</div>
{% endif %}