Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert masthead logos to inline #1366

Merged
merged 92 commits into from May 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
f824bed
convert masthead logos to inline
rmccar Feb 10, 2021
b94a116
Merge branch 'master' into convert-masthead-logos-to-inline
rmccar Feb 10, 2021
daa04ef
added mobilelogo back in and fixed breakpoint for nisra logo
rmccar Feb 11, 2021
adef835
get mobile logo working
rmccar Feb 11, 2021
1de2719
get dynamic logo working
rmccar Feb 11, 2021
27a4604
Merge branch 'master' into convert-masthead-logos-to-inline
rmccar Feb 11, 2021
25f817e
add nisra mobile logo
rmccar Feb 11, 2021
e476abf
fix focus state on nisra mobile logo
rmccar Feb 11, 2021
6b2e8b6
Merge branch 'master' into convert-masthead-logos-to-inline
jrbarnes9 Feb 12, 2021
6ce390d
prevent nisra breaking change
rmccar Feb 12, 2021
ba1261d
Merge branch 'convert-masthead-logos-to-inline' of github.com:ONSdigi…
rmccar Feb 12, 2021
2140cab
rename masthead class
rmccar Feb 12, 2021
ad04bb2
remove ability to be optionally responsive [test-visual]
rmccar Feb 12, 2021
fa26f49
add logos back in
rmccar Feb 15, 2021
dfa986b
remove whitespace from logos
rmccar Feb 15, 2021
e472a94
resize logo to fit focus size
rmccar Feb 15, 2021
42c6605
Merge branch 'master' into convert-masthead-logos-to-inline
jrbarnes9 Feb 15, 2021
a8ea5db
tighten focus state on english census logo
rmccar Feb 15, 2021
fd02ee3
Merge branch 'convert-masthead-logos-to-inline' of github.com:ONSdigi…
rmccar Feb 15, 2021
0ed2df2
Merge branch 'master' into convert-masthead-logos-to-inline
rmccar Mar 3, 2021
e478d90
Merge branch 'master' into convert-masthead-logos-to-inline
jrbarnes9 Mar 10, 2021
fd62e73
Merge branch 'master' into convert-masthead-logos-to-inline
rmccar Mar 12, 2021
ad9a484
fix merge conflits
rmccar Mar 17, 2021
e02b76e
Merge branch 'master' into convert-masthead-logos-to-inline [test-vis…
rmccar Mar 17, 2021
aaa1631
Merge branch 'master' into convert-masthead-logos-to-inline
rmccar Apr 13, 2021
8a9b728
Merge branch 'master' into convert-masthead-logos-to-inline [test-vis…
rmccar Mar 17, 2021
cf0cdc9
Merge branch 'convert-masthead-logos-to-inline' of github.com:ONSdigi…
rmccar Apr 13, 2021
9b9481c
fix footer ons logo colour
rmccar Apr 13, 2021
0921dc2
fix percy issues on header and footer
rmccar Apr 13, 2021
c95c252
rename svg class [test-visual]
rmccar Apr 13, 2021
7ab7dd6
add nav back into census example [test-visual]
rmccar Apr 13, 2021
a333411
Merge branch 'master' into convert-masthead-logos-to-inline [test-vis…
rmccar Apr 13, 2021
da7da5e
remove unneeded class [test-visual]
rmccar Apr 13, 2021
9678c75
final tweaks [test-visual]
rmccar Apr 14, 2021
1de9e17
Merge branch 'master' into convert-masthead-logos-to-inline
rmccar Apr 14, 2021
099d4a7
final tweaks [test-visual]
rmccar Apr 14, 2021
dd19f13
Merge branch 'convert-masthead-logos-to-inline' of github.com:ONSdigi…
rmccar Apr 14, 2021
aee0f51
add colour variables
rmccar Apr 16, 2021
c4d050c
Merge branch 'master' into convert-masthead-logos-to-inline
rmccar Apr 16, 2021
5c1f247
adjust padding
rmccar Apr 16, 2021
e0f51af
rename class to differentiate from other logo
rmccar Apr 16, 2021
51c2051
tidy up css
rmccar Apr 16, 2021
c797897
update icons
rmccar Apr 16, 2021
b565108
fix diff with welsh and eng ons logo
rmccar Apr 20, 2021
e4a2b27
fix diff with stacked welsh and eng ons logo
rmccar Apr 20, 2021
78beaf2
Merge branch 'master' into convert-masthead-logos-to-inline
rmccar Apr 20, 2021
86b750a
add nisra colours
rmccar Apr 20, 2021
48846a6
Merge branch 'convert-masthead-logos-to-inline' of github.com:ONSdigi…
rmccar Apr 20, 2021
c307ad7
conform header height [test-visual]
rmccar Apr 20, 2021
846375b
remove comma [test-visual]
rmccar Apr 20, 2021
9c7b9de
remove margin top
rmccar Apr 21, 2021
3c9274d
css tweak
rmccar Apr 21, 2021
d6de3fc
fix nisra size
rmccar Apr 21, 2021
cf60e75
fix nisra size mobile
rmccar Apr 21, 2021
7c5d968
header logo tweaks
rmccar Apr 21, 2021
0e90c86
fix cy stacked logo
rmccar Apr 21, 2021
a4b9ccf
css tweaks
rmccar Apr 21, 2021
5a9d3e2
header tweaks [test-visual]
rmccar Apr 21, 2021
7652aa7
fix logo alignment
rmccar Apr 28, 2021
33dbc97
adjust ons logo
rmccar Apr 28, 2021
dd9af19
update titles and logo links
rmccar Apr 29, 2021
d95ab5f
fix logo highlighting
rmccar Apr 29, 2021
5877058
fix ons logo highlight differences
rmccar Apr 29, 2021
f000a62
fix ons logo differences between english and welsh
rmccar Apr 29, 2021
8de870f
Merge branch 'master' into convert-masthead-logos-to-inline [test-vis…
rmccar Apr 29, 2021
56edeb9
Merge branch 'master' into convert-masthead-logos-to-inline
jrbarnes9 Apr 30, 2021
467524b
Update src/components/header/examples/external-basic/index.njk
rmccar Apr 30, 2021
0e03a32
Update src/components/header/examples/external-lang/index.njk
rmccar Apr 30, 2021
c53d9d3
Update src/components/header/index.njk
rmccar Apr 30, 2021
edcb0c8
Update src/components/header/examples/external-hero/index.njk
rmccar Apr 30, 2021
826df1e
Update src/components/header/index.njk
rmccar Apr 30, 2021
a45e416
Update src/components/header/examples/external-welsh/index.njk
rmccar Apr 30, 2021
9135a15
Update src/components/header/examples/external-navigation/index.njk
rmccar Apr 30, 2021
dd55155
Update src/components/header/examples/external-hero/index.njk
rmccar Apr 30, 2021
903c396
Update src/components/header/examples/internal-basic/index.njk
rmccar Apr 30, 2021
319847d
Update src/components/header/examples/external-basic/index.njk
rmccar Apr 30, 2021
ac0d261
reorder paragraphs and examples
rmccar Apr 30, 2021
8e3bb2d
remove comma that causes error
rmccar Apr 30, 2021
d36654b
fix comma error
rmccar Apr 30, 2021
e1523ba
fix header link style
rmccar Apr 30, 2021
ddaabe8
fix header spacing
rmccar Apr 30, 2021
b06b3dc
fix stacked logos
rmccar Apr 30, 2021
46fa3ee
fix header text focus state size
rmccar Apr 30, 2021
8c8a127
fix button alignment [test-visual]
rmccar Apr 30, 2021
a66a42f
Merge branch 'master' into convert-masthead-logos-to-inline
rmccar May 10, 2021
e745830
fix vertical alignment in all but with menu button
rmccar May 10, 2021
fe80482
fix vertical alignment with signout button [test-visual]
rmccar May 10, 2021
c7befbd
adjust virtical alignment [test-visual]
rmccar May 10, 2021
232bdb7
Merge branch 'master' into convert-masthead-logos-to-inline
jrbarnes9 May 13, 2021
caa2224
Update src/components/header/index.njk
rmccar May 13, 2021
4a72a22
reorder paragraphs in docs [test-visual]
rmccar May 13, 2021
5980ad1
Merge branch 'master' into convert-masthead-logos-to-inline
rmccar May 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/components/button/examples/button-loader/index.njk
@@ -1,12 +1,12 @@
{% from "components/button/_macro.njk" import onsButton %}
<form onsubmit="return false;">
<div class="btn-group">
{{
onsButton({
"text": 'Submit',
"classes": 'btn-group__btn',
"submitType": "loader"
})
}}
{{
onsButton({
"text": 'Submit',
"classes": 'btn-group__btn',
"submitType": "loader"
})
}}
</div>
</form>
14 changes: 7 additions & 7 deletions src/components/button/examples/button-timer/index.njk
@@ -1,12 +1,12 @@
{% from "components/button/_macro.njk" import onsButton %}
<form onsubmit="return false;">
<div class="btn-group">
{{
onsButton({
"text": 'Submit',
"classes": 'btn-group__btn',
"submitType": "timer"
})
}}
{{
onsButton({
"text": 'Submit',
"classes": 'btn-group__btn',
"submitType": "timer"
})
}}
</div>
</form>
5 changes: 5 additions & 0 deletions src/components/footer/_footer.scss
Expand Up @@ -25,6 +25,11 @@
vertical-align: middle;
}

.ons-svg-logo,
.ons-svg-logo--acent {
fill: $color-black;
}

&__body {
background-color: $color-grey-5;
padding: 2rem 0 4rem;
Expand Down
140 changes: 108 additions & 32 deletions src/components/header/_header.scss
Expand Up @@ -5,7 +5,7 @@
-moz-osx-font-smoothing: grayscale;
margin: 0;
position: relative;
& &__svg-logo {
& &__title--svg-logo {
display: block;
fill: $color-white;

Expand Down Expand Up @@ -34,58 +34,59 @@
height: 76px;
}
}
&__logo {
&:focus {
background-color: $color-focus;
box-shadow: 0 -2px $color-focus, 0 4px $color-focus-text;
color: $color-focus-text;
outline: 3px solid transparent;
}
}

@include mq(xs) {
&__logo {
margin-bottom: 2px;
}
}
&__main {
background: $color-header;
padding: 0.56rem 0;

@include mq(m) {
height: 95px;
}
&--border {
border-bottom: 3px solid $color-header;
border-top: 3px solid $color-header;
padding: 0.934rem 0;
}
&--with-description {
height: auto;
}
}
&__title {
@extend .u-fs-r--b;
@extend .u-fs-xl\@xxs;

color: $color-white;
margin: 0;
&--with-description {
line-height: 1.7 !important;

@include mq(m) {
margin-top: 0.85rem;
}
&:not(&--with-description) {
line-height: 1.5 !important;

&--with-description,
&--with-button {
@include mq(m) {
line-height: 2.5 !important;
margin-top: 0.45rem;
}
}

@include mq(xs, m) {
line-height: 1.75 !important;
}

@include mq(xxs, xs) {
line-height: 1.7 !important;
//to allow for differences in size between welsh and english logos
jrbarnes9 marked this conversation as resolved.
Show resolved Hide resolved
&-census-logo-en {
@include mq(xxs) {
margin: 0.19rem 0 0.2rem;
padding: 0.25rem 0;
}
}
&-link {
display: block;
text-decoration: none;
&:hover {
color: $color-white;
text-decoration: underline;
}
&:focus {
.header__svg-logo {
fill: $color-black !important;
.header__title {
color: $color-black;
}
.header__title--svg-logo {
fill: $color-black;
}
}
}
Expand Down Expand Up @@ -117,9 +118,13 @@
}
&--internal & {
&__top {
background: $color-dark-blue;
a {
color: $color-white;
background: $color-header-internal;
.ons-svg-logo {
display: block;
fill: $color-white;
&--acent {
fill: $color-ons-icon-secondary;
}
}
}
&__logo-link:focus {
Expand All @@ -131,7 +136,78 @@
min-height: 36px;
}
}

.ons-svg-logo,
.ons-nisra-svg-logo {
display: block;
}

.ons-svg-logo {
fill: $color-ons-icon;
&--acent {
fill: $color-ons-icon-secondary;
}
}

.ons-nisra-svg-logo {
.st0 {
fill: $color-nisra-icon;
}
.st1 {
fill: $color-nisra-icon-secondary;
}
.st2 {
fill: $color-nisra-icon-tertiary;
}
}

&__logo-link:focus {
.ons-svg-logo {
fill: $color-black !important;
&--acent {
fill: $color-black !important;
}
}
.ons-nisra-svg-logo {
.st0 {
fill: $color-black !important;
}
.st1 {
fill: $color-black !important;
}
.st2 {
fill: $color-black !important;
}
}
}

.header__logo--large {
@include mq(xxs, 399px) {
display: none;
}
}

.header__logo--small {
@include mq(400px) {
display: none;
}
}

&__logo-link,
&__logo-link:hover {
text-decoration: none;
}

&__logo-link {
display: block;
}

&__bottom {
background: $color-header;
margin-top: -0.03rem;
}

.btn--exit {
margin-top: 0.55rem;
}
}
37 changes: 19 additions & 18 deletions src/components/header/_macro-options.md
@@ -1,21 +1,22 @@
| Name | Type | Required | Description |
| ------------- | ------------------------------------------------- | ------------------------------------ | --------------------------------------------------------------------------- |
| phase | `PhaseBanner` [_(ref)_](/components/phase-banner) | false | Settings for the Phase banner component |
| fullWidth | boolean | false | Set the header to be the full width of the viewport |
| logoHref | string | false | Path for the masthead logo link. Defaults to "/" |
| logo | string | false | Path for the masthead logo. Defaults to "ons-logo-pos" |
| mobileLogo | string | false | Path for the mobile version of the logo. Defaults to "ons-logo-stacked-pos" |
| language | `Language` [_(ref)_](/patterns/change-language) | false | Settings for the language selector component |
| serviceLinks | `Array<Navigation>` | false | An array to render the service links list |
| title | string | true | The title for the service |
| desc | string | false | Tagline/description for the service |
| button | `Button` [_(ref)_](/components/button) | false | Settings for save and sign out using the button component |
| navigation | `Array<Navigation>` | true (if `toggleButton` supplied) | An array of all navigation links |
| toggleButton | `Array<ToggleButton>` | true (if `navigation` supplied) | Configuration for the mobile navigation toggle button |
| titleAsH1 | boolean | false | Override to render the header title as a H1 |
| titleLogo | string | false | URL for image to use instead of a title string |
| titleLogoAlt | string | false (if `titleLogo` not specified) | Alt tag for the title logo |
| titleLogoHref | string | false | Will wrap the title logo in a link to the specified URL |
| Name | Type | Required | Description |
| ---------------- | ------------------------------------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------- |
| phase | `PhaseBanner` [_(ref)_](/components/phase-banner) | false | Settings for the Phase banner component |
| fullWidth | boolean | false | Set the header to be the full width of the viewport |
| logoHref | string | false | Path for the masthead logo link. Defaults to "/" |
| logo | string | false | Path for the masthead logo. Defaults to "ons-logo-pos" |
| mobileLogo | string | false | Path for the mobile version of the logo. Defaults to "ons-logo-stacked-pos" |
| language | `Language` [_(ref)_](/patterns/change-language) | false | Settings for the language selector component |
| serviceLinks | `Array<Navigation>` | false | An array to render the service links list |
| title | string | true | The title for the service |
| desc | string | false | Tagline/description for the service |
| button | `Button` [_(ref)_](/components/button) | false | Settings for save and sign out using the button component |
| navigation | `Array<Navigation>` | true (if `toggleButton` supplied) | An array of all navigation links |
| toggleButton | `Array<ToggleButton>` | true (if `navigation` supplied) | Configuration for the mobile navigation toggle button |
| titleAsH1 | boolean | false | Override to render the header title as a H1 |
| titleLogo | string | false | URL for image to use instead of a title string |
| titleLogoAlt | string | false (if `titleLogo` not specified) | Alt tag for the title logo |
| titleLogoHref | string | false | Will wrap the title logo in a link to the specified URL |
| customHeaderLogo | string | false | Set to 'nisra' if using the nisra logo. Makes the masthead taller to accomodate the logo |

## Navigation

Expand Down