Skip to content

Commit

Permalink
Merge pull request #345 from nationalarchives/feature/banner
Browse files Browse the repository at this point in the history
Add announcement banner on the death of Queen Elizabeth
  • Loading branch information
Laura Porter authored Sep 8, 2022
2 parents c55daf7 + 5a54dd4 commit 934307f
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 0 deletions.
64 changes: 64 additions & 0 deletions ds_judgements_public_ui/sass/includes/_announcement_banner.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
.announcement-banner {
background-color: $color__black;
color: $color__white;
padding: calc($spacer__unit);

&__container {
}

&__notice {
padding: 0.3em 0;
font-family: "Roboto", sans-serif;
font-size: 1.1rem;
text-align: center;

@media (min-width: $grid__breakpoint-large) {
text-align: center;
font-size: 1.2rem;
}

a {
background-color: $color__white;
padding: 0.5rem 1rem;
color: $color__black;
display: inline-block;
font-weight: bold;
text-decoration: none;
font-family: "Roboto", sans-serif;

&:focus {
outline: 0.3rem solid $color__yellow;
background-color: $color__dark-blue;
color: $color__white;
}

&:hover {
background-color: $color__dark-blue;
color: $color__white;
}
}
}

&__phase {
background-color: $color__white;
color: $color__black;
text-transform: uppercase;
padding: 0 calc($spacer__unit / 4);
margin-right: $spacer__unit;
font-weight: 700;
}

&__message {
margin: 0;
display: block;
line-height: 1.8rem;
font-size: 1.6rem;
padding: 1rem;
font-weight: bold;
}
&__sub-message {
display: block;
font-size: 1.1rem;
font-weight: normal;
}
}
1 change: 1 addition & 0 deletions ds_judgements_public_ui/sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@
@import "includes/homepage_browse";
@import "includes/what_to_expect";
@import "includes/js_enabled";
@import "includes/announcement_banner";
1 change: 1 addition & 0 deletions ds_judgements_public_ui/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
{% include 'includes/cookie_consent/cookie_banner.html' %}
<a id="skip-to-main-content" href="#main-content">{% translate "skiplink" %}</a>
{% include 'includes/gtm/gtm_body.html' %}
{% include 'includes/announcement_banner.html' %}
{% include 'includes/phase_banner.html' %}
<main id="main-content">
{% block content %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="announcement-banner">
<div class="announcement-banner__container">
<div class="announcement-banner__notice">
<p class="announcement-banner__message">HM QUEEN ELIZABETH II <span class="announcement-banner__sub-message">21 April 1926 - 08 September 2022</span></p>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
{% include 'includes/cookie_consent/cookie_banner.html' %}
<a id="skip-to-main-content" href="#main-content">{% translate "skiplink" %}</a>
{% include 'includes/gtm/gtm_body.html' %}
{% include 'includes/announcement_banner.html' %}
{% include 'includes/phase_banner.html' %}
<header class="page-header">
{% include 'includes/breadcrumbs.html' with current=context.page_title title=context.page_title link=request.path %}
Expand Down

0 comments on commit 934307f

Please sign in to comment.