-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add new "grey" hero variant #3450
Open
precious-onyenaucheya-ons
wants to merge
56
commits into
main
Choose a base branch
from
feature/165/analysis-hero
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 55 commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
f4b1347
add inital changes
precious-onyenaucheya-ons 349573c
approve vr tests
precious-onyenaucheya-ons 52c7272
Merge branch 'main' into feature/189/add-horizontal-description-list
precious-onyenaucheya-ons 22c7b5f
update as per PR comments
precious-onyenaucheya-ons 79f772b
delete test example
precious-onyenaucheya-ons 3555877
fix failing test
precious-onyenaucheya-ons 2d3c0d0
Merge branch 'main' into feature/189/add-horizontal-description-list
precious-onyenaucheya-ons 6b953a8
address div issue
precious-onyenaucheya-ons c62a87d
approve visual tests
precious-onyenaucheya-ons 5dd8f0e
update breakpoints
precious-onyenaucheya-ons 56775f8
update css
precious-onyenaucheya-ons 0470ee4
fix typo
precious-onyenaucheya-ons f08e1b6
add initial changes
precious-onyenaucheya-ons 6cec1f9
add icon
precious-onyenaucheya-ons 321221d
update example
precious-onyenaucheya-ons 2040158
update variant
precious-onyenaucheya-ons db6f29d
update
precious-onyenaucheya-ons 224586e
Merge branch 'main' into feature/189/add-horizontal-description-list
precious-onyenaucheya-ons 83e02d7
add test
precious-onyenaucheya-ons 4fbc009
refactor to fit inline variant with figma design
precious-onyenaucheya-ons 2f21710
approve visual test
precious-onyenaucheya-ons 4ce8321
Merge branch 'main' into feature/189/add-horizontal-description-list
precious-onyenaucheya-ons f6ab261
fix accessibility issues
precious-onyenaucheya-ons 724349b
fix grid issues
precious-onyenaucheya-ons 0680abb
approve visual test
precious-onyenaucheya-ons 7bc83cd
Merge remote-tracking branch 'origin' into feature/165/analysis-hero
precious-onyenaucheya-ons eca78b6
Merge branch 'feature/189/add-horizontal-description-list' into featu…
precious-onyenaucheya-ons 1140c34
add minor changes and fix failing test
precious-onyenaucheya-ons 11e71bb
Update src/components/description-list/_description-list.scss
precious-onyenaucheya-ons 5938ce0
Update src/components/description-list/_macro.njk
precious-onyenaucheya-ons a42b1ce
Update src/components/description-list/_description-list.scss
precious-onyenaucheya-ons 27bd708
revert changes
precious-onyenaucheya-ons b23bbf1
update column width
precious-onyenaucheya-ons 035b326
update styling
precious-onyenaucheya-ons ff0de57
remove margin from item
precious-onyenaucheya-ons a5ba67b
Merge branch 'feature/189/add-horizontal-description-list' into featu…
precious-onyenaucheya-ons 4d43469
Merge branch 'main' into feature/165/analysis-hero
precious-onyenaucheya-ons d9b3d83
update
precious-onyenaucheya-ons ba37ef9
revert changes
precious-onyenaucheya-ons 65d5a14
update css and test
precious-onyenaucheya-ons 094b8c9
fix failing test
precious-onyenaucheya-ons 8031227
Merge branch 'main' into feature/165/analysis-hero
SriHV 407d259
Merge branch 'main' into feature/165/analysis-hero
precious-onyenaucheya-ons 12506cb
update as per PR comments
precious-onyenaucheya-ons 32b2240
fix failing test
precious-onyenaucheya-ons eca6592
update reference
precious-onyenaucheya-ons a782f5c
update docs
precious-onyenaucheya-ons f174579
update style and approve test
precious-onyenaucheya-ons fc29acb
remove magin bottom from topic
precious-onyenaucheya-ons fa3e2b8
changes as per comments
SriHV 4449d1b
changed grey color name
SriHV ba0682c
changed badge to officialStatisticsBadge in macro file
SriHV 69e3aeb
fixed macro tests
SriHV d313493
fixed visual tests
SriHV c134d76
changes as per comments
SriHV 1d2098e
Merge branch 'main' into feature/165/analysis-hero
SriHV File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
...eference/ds-vr-test__components_hero_example-hero-grey_0_document_0_desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...reference/ds-vr-test__components_hero_example-hero-grey_0_document_1_tablet.png
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...reference/ds-vr-test__components_hero_example-hero-grey_0_document_2_mobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,35 @@ | |
} | ||
} | ||
|
||
&--grey { | ||
background-color: var(--ons-color-grey-10); | ||
&::before { | ||
content: ''; | ||
background-color: var(--ons-color-banner-bg); | ||
border-radius: 0 0 50% 50%; | ||
inset: 0; | ||
left: -40%; | ||
position: absolute; | ||
width: 150%; | ||
@include mq(l) { | ||
border-radius: 0 0 300% 150%; | ||
left: 0; | ||
width: 100%; | ||
} | ||
} | ||
} | ||
&__badge { | ||
@include mq(xs, l) { | ||
margin-top: 2.5rem; | ||
margin-bottom: 1rem; | ||
} | ||
} | ||
|
||
&--topic { | ||
color: var(--ons-color-branded); | ||
@extend .ons-u-mb-no; | ||
} | ||
|
||
&__container { | ||
align-items: center; | ||
display: flex; | ||
|
@@ -43,10 +72,6 @@ | |
height: 100%; | ||
} | ||
|
||
&__text:has(+ .ons-btn) { | ||
margin-bottom: 2rem; | ||
} | ||
rmccar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
&__pre-title { | ||
margin-bottom: 0.5rem; | ||
|
||
|
@@ -62,6 +87,12 @@ | |
z-index: 5; | ||
} | ||
|
||
&--grey & { | ||
&__details { | ||
padding-top: 1rem; | ||
} | ||
} | ||
Comment on lines
+90
to
+94
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to be changed when breadcrumbs are used not when we use the grey variant |
||
|
||
&--dark & { | ||
&__details { | ||
color: var(--ons-color-text-inverse) !important; | ||
|
@@ -299,4 +330,16 @@ | |
} | ||
} | ||
} | ||
|
||
&__title-container { | ||
@include mq(l) { | ||
display: grid; | ||
align-items: start; | ||
justify-content: space-between; | ||
|
||
&.ons-hero__title-badge { | ||
grid-template-columns: 1fr auto; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rmccar marked this conversation as resolved.
Show resolved
Hide resolved
admilne marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- | ||
'fullWidth': true | ||
--- | ||
|
||
{% from "components/hero/_macro.njk" import onsHero %} | ||
{{ | ||
onsHero({ | ||
"variants": 'grey', | ||
"detailsColumns": '12', | ||
"officialStatisticsBadge": true, | ||
"topic": 'Statistical article', | ||
"title": 'Retail sales rise amid summer discounts and sporting events, according to a first estimate', | ||
"text": 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum id mattis ligula, nec sollicitudin arcu. Donec non tristique tellus. Donec eget malesuada lorem.', | ||
"breadcrumbs": { | ||
"ariaLabel": 'Breadcrumbs', | ||
"itemsList": [ | ||
{ | ||
"url": '/', | ||
"text": 'Home' | ||
}, | ||
{ | ||
"url": '/', | ||
"text": 'Business, industry and trade' | ||
}, | ||
{ | ||
"url": '/', | ||
"text": 'Retail industry' | ||
} | ||
] | ||
}, | ||
"descriptionList": { | ||
"termCol": "5", | ||
"descriptionCol": "7", | ||
"itemsList": [ | ||
{ | ||
"term": "Release date:", | ||
"descriptions": [ | ||
{ | ||
"description": "16 August 2024" | ||
} | ||
] | ||
}, | ||
{ | ||
"term": "Edition:", | ||
"descriptions": [ | ||
{ | ||
"description": "Latest" | ||
} | ||
] | ||
}, | ||
{ | ||
"term": "Contact:", | ||
"descriptions": [ | ||
{ | ||
"description": "Retail Sales team" | ||
} | ||
] | ||
}, | ||
{ | ||
"term": "Next release:", | ||
"descriptions": [ | ||
{ | ||
"description": "20 September 2024" | ||
} | ||
] | ||
}, | ||
{ | ||
"term": "Releases:", | ||
"descriptions": [ | ||
{ | ||
"description": "View previous releases" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}) | ||
}} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we may have a slight issue with the description list. One of the requirements is:
description list component added horizontally and it can include text or hyperlinks - https://jira.ons.gov.uk/browse/ONSDESYS-189
I don't think we can currently have links in here.