diff --git a/cms/static/images/close-icon.svg b/cms/static/images/close-icon.svg new file mode 100644 index 000000000000..0c47cbf3cf65 --- /dev/null +++ b/cms/static/images/close-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/cms/static/images/external-link-icon.svg b/cms/static/images/external-link-icon.svg new file mode 100644 index 000000000000..89ccf223e706 --- /dev/null +++ b/cms/static/images/external-link-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/cms/static/sass/_build-v1.scss b/cms/static/sass/_build-v1.scss index 2a32c688e5a1..4f3564b76c85 100644 --- a/cms/static/sass/_build-v1.scss +++ b/cms/static/sass/_build-v1.scss @@ -55,6 +55,7 @@ @import 'elements/uploaded-assets'; // layout for asset tables @import 'elements/creative-commons'; @import 'elements/tooltip'; +@import 'elements/feature-anouncement'; // +Base - Specific Views // ==================== diff --git a/cms/static/sass/elements/_feature-anouncement.scss b/cms/static/sass/elements/_feature-anouncement.scss new file mode 100644 index 000000000000..697f9368910f --- /dev/null +++ b/cms/static/sass/elements/_feature-anouncement.scss @@ -0,0 +1,43 @@ +// studio - elements - announcement bar +// ==================================== + +.announcement-bar { + position: relative; + background: #03c7e8; + text-align: center; + color: $black; + padding: ($baseline*0.3) ($baseline*2.2); + font: 500 1.4rem/2rem $font-family-sans-serif; +} + +.announcement-bar-link { + color: inherit; + text-decoration: underline; + + &:hover, + &:focus { + color: inherit; + text-decoration: none; + } +} + +.announcement-bar-icon { + display: inline-block; + vertical-align: middle; +} + +.announcement-bar-close { + @include right(0); + + position: absolute; + top: 50%; + transform: translateY(-50%); + background: transparent url('#{$static-path}/images/close-icon.svg') center; + width: ($baseline*1.2); + height: ($baseline*1.2); + border: none; + + &:hover { + opacity: 0.7; + } +} diff --git a/cms/templates/base.html b/cms/templates/base.html index 2e420568ef75..aab53ede6072 100644 --- a/cms/templates/base.html +++ b/cms/templates/base.html @@ -103,6 +103,8 @@ <% online_help_token = self.online_help_token() if hasattr(self, 'online_help_token') else None %> <%include file="widgets/header.html" args="online_help_token=online_help_token" /> + <%include file="widgets/feature-announcement.html" /> + <% banner_messages = list(PageLevelMessages.user_messages(request)) %> diff --git a/cms/templates/widgets/feature-announcement.html b/cms/templates/widgets/feature-announcement.html new file mode 100644 index 000000000000..073320e0a879 --- /dev/null +++ b/cms/templates/widgets/feature-announcement.html @@ -0,0 +1,44 @@ + +<%page args="course=None" expression_filter="h" /> +<%namespace name='static' file='../static_content.html'/> +<%! from django.utils.translation import gettext as _ %> + + + +