diff --git a/assets/scss/_custom.scss b/assets/scss/_custom.scss index a0ebb42745..10935044a5 100644 --- a/assets/scss/_custom.scss +++ b/assets/scss/_custom.scss @@ -732,6 +732,8 @@ body.td-documentation { } } +/* Announcements */ + #announcement { > * { color: inherit; @@ -753,10 +755,21 @@ body.td-documentation { padding-top: 40px; } +// Don't show announcements when javascript is not available + +html.no-js body div#announcement { + display: none; +} + +#announcement.display-announcement{ + display: block; // apply this class to display the announcement +} + #announcement { // default background is blue; overrides are possible color: #fff; - + display: none; // When javascript is available, Let javascript handle the state of the announcement + .announcement-main { margin-left: auto; margin-right: auto; diff --git a/data/i18n/en/en.toml b/data/i18n/en/en.toml index df7760e731..d90808d533 100644 --- a/data/i18n/en/en.toml +++ b/data/i18n/en/en.toml @@ -12,6 +12,9 @@ other = """
This page is automatically generated.
If you plan to report [blog_post_show_more] other = "Show More Posts..." +[banner_acknowledgement] +other = "Hide this notice" + [caution] other = "Caution:" diff --git a/layouts/partials/announcement.html b/layouts/partials/announcement.html index bff71bfe4c..497a4b56ec 100644 --- a/layouts/partials/announcement.html +++ b/layouts/partials/announcement.html @@ -15,7 +15,7 @@ {{- if or (eq .endTime nil ) (gt ( time .endTime ) now ) -}} {{- if not $announcementShown -}} {{- $announcementShown = true -}} -