-
Notifications
You must be signed in to change notification settings - Fork 35
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
refactor(page-header): update page header according to DT spec - INNO-441 #153
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
1c6d8fc
refactor(page-header): update page header according to DT spec
emeryro d3ebd01
refactor(page-header): add missing modifiers
emeryro f356e65
refactor(page-header): update page header according to DT spec
emeryro 072cf7e
refactor(page-header): add missing modifiers
emeryro dcfb581
refactor(page-header): fix paddings
emeryro b79756c
Merge branch 'refactor/page-header-INNO-441' of https://github.com/ec…
emeryro 167d185
Merge branch 'master' into refactor/page-header-INNO-441
yhuard a3a42dd
refactor(page-header): revert unwanted changes
emeryro b0afe45
Merge branch 'master' into refactor/page-header-INNO-441
yhuard cfe56f2
refactor(page-header): fix twig
emeryro 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
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
222 changes: 48 additions & 174 deletions
222
framework/components/ecl-page-headers/_page-headers.scss
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 |
---|---|---|
@@ -1,205 +1,79 @@ | ||
// External link specific adjustments. | ||
@mixin _page_header_external_link_mixin() { | ||
display: inline-block; | ||
padding-right: 1.1em; | ||
// ECL page header | ||
|
||
&::after { | ||
position: absolute; | ||
line-height: 2.2; | ||
} | ||
|
||
&.btn { | ||
padding-right: 2.1em; | ||
} | ||
} | ||
|
||
.page-header { | ||
margin: 0; | ||
padding: 0 0 1.5em; | ||
.ecl-page-header { | ||
background-color: $ecl-color-primary; | ||
color: #fff; | ||
border-bottom: none; | ||
|
||
h1 { | ||
margin: 0; | ||
line-height: 1.25; | ||
color: #fff; | ||
|
||
span { | ||
margin-top: 0.175em; | ||
line-height: 1.34; | ||
font-size: 0.75em; | ||
font-weight: 400; | ||
} | ||
|
||
.paragraph { | ||
margin-bottom: 0; | ||
} | ||
&__body { | ||
padding: map-get($ecl-spacing, 'xxs'); | ||
} | ||
|
||
p { | ||
max-width: 40em; | ||
margin: 0; | ||
line-height: 1.45; | ||
font-size: map-get($ecl-font-size, 'l'); | ||
color: #fff; | ||
&__meta { | ||
margin-top: map-get($ecl-spacing, 's'); | ||
} | ||
|
||
a { | ||
color: #fff; | ||
|
||
@include ecl-focus-outline-border(3px, map-get($ecl-colors, 'yellow-100'), 2px); | ||
|
||
&:hover:not(.breadcrumb__link, .btn) { | ||
color: map-get($ecl-colors, 'yellow-100'); | ||
} | ||
|
||
&#{"[" + $ecl-external-link-pattern + "]"}:not(.is-internal, .listing__title) { | ||
&:not(#{$ecl-ec-link-patterns}) { | ||
@include _page_header_external_link_mixin(); | ||
} | ||
} | ||
} | ||
|
||
.page-header__top, | ||
.page-header__main, | ||
.page-header__bottom { | ||
display: block; | ||
width: 100%; | ||
} | ||
|
||
.page-header__top { | ||
text-transform: uppercase; | ||
} | ||
|
||
.page-header__main { | ||
line-height: 1.15; | ||
&__title { | ||
margin-top: map-get($ecl-spacing, 'm'); | ||
} | ||
|
||
.page-header__bottom { | ||
font-size: 26px; | ||
&__identity { | ||
color: map-get($ecl-colors, 'blue-25'); | ||
font-size: map-get($ecl-font-size, 'l'); | ||
margin-bottom: map-get($ecl-spacing, 'xxs'); | ||
margin-top: map-get($ecl-spacing, 'xxs'); | ||
} | ||
|
||
.page-header__hero-title { | ||
padding-top: 2.39em; | ||
|
||
.meta--header { | ||
margin-bottom: 0; | ||
} | ||
&__intro { | ||
font-size: map-get($ecl-font-size, 'l'); | ||
line-height: 1.33; | ||
max-width: 40em; | ||
} | ||
} | ||
|
||
.page-header--large-intro { | ||
padding-bottom: 2.39em; | ||
|
||
p { | ||
font-size: map-get($ecl-font-size, 'xl'); | ||
line-height: 1.5; | ||
&__label { | ||
font-size: map-get($ecl-font-size, 'xs'); | ||
text-transform: uppercase; | ||
} | ||
} | ||
|
||
.page-header--image { | ||
background: transparent url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7) center/cover no-repeat; | ||
} | ||
|
||
// Drupal connect. | ||
.node-type-info-homepage .page-header { | ||
@extend .page-header--large-intro; | ||
.ecl-page-header--image { | ||
background-position: 50%; | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
} | ||
|
||
.page-header__eventinfo { | ||
float: left; | ||
font-size: map-get($ecl-font-size, 'xs'); | ||
|
||
.page-header__date--cancelled { | ||
text-decoration: line-through; | ||
} | ||
|
||
.ecl-icon { | ||
margin: 1em 2em 1em 0; | ||
.ecl-page-header--highlight { | ||
padding-bottom: map-get($ecl-spacing, 'm'); | ||
|
||
&::before { | ||
margin-right: 0.5em; | ||
} | ||
.ecl-page-header__body { | ||
background-color: map-get($ecl-colors, 'blue-120'); | ||
padding-bottom: map-get($ecl-spacing, 'xs'); | ||
} | ||
} | ||
|
||
.page-header--xlarge-intro { | ||
min-height: 150px; | ||
padding-bottom: 0; | ||
@media (min-width: map-get($ecl-grid-breakpoints, 'sm')) { | ||
.ecl-page-header--highlight { | ||
padding-bottom: 0; | ||
|
||
.page-header__hero-title { | ||
min-height: 75px; | ||
margin: 75px 0 0; | ||
padding: 16px; | ||
background-color: map-get($ecl-colors, 'blue-110'); | ||
.ecl-page-header__body { | ||
background-color: $ecl-color-primary; | ||
padding-bottom: map-get($ecl-spacing, 'xxl'); | ||
padding-top: map-get($ecl-spacing, 'xxl'); | ||
} | ||
} | ||
|
||
.field__label--above { | ||
padding: 0; | ||
color: #fff; | ||
font-size: map-get($ecl-font-size, 's'); | ||
font-weight: 400; | ||
text-transform: uppercase; | ||
.ecl-page-header__label { | ||
background-color: map-get($ecl-colors, 'blue-120'); | ||
display: inline-block; | ||
line-height: 2.4; | ||
padding-left: map-get($ecl-spacing, 'm'); | ||
padding-right: map-get($ecl-spacing, 'm'); | ||
} | ||
|
||
p { | ||
.ecl-page-header__highlight { | ||
background-color: #fff; | ||
color: $ecl-color-primary; | ||
font-size: map-get($ecl-font-size, 'l'); | ||
} | ||
} | ||
|
||
@include ecl-media-breakpoint-up(msm) { | ||
.page-header--xlarge-intro { | ||
height: 320px; | ||
|
||
.page-header__hero-title { | ||
margin: auto; | ||
padding-top: 5em; | ||
background-color: transparent; | ||
} | ||
|
||
.field__label--above { | ||
width: 146px; | ||
height: 34px; | ||
margin: 0; | ||
line-height: 34px; | ||
background-color: map-get($ecl-colors, 'blue-110'); | ||
text-align: center; | ||
} | ||
|
||
p { | ||
width: 550px; | ||
padding: 22px 5px 22px 33px; | ||
background-color: #fff; | ||
color: map-get($ecl-colors, 'blue-100'); | ||
} | ||
} | ||
} | ||
|
||
.node-info-homepage.view-mode-homepage_political { | ||
.page-header { | ||
@extend .page-header--xlarge-intro; | ||
|
||
.page-header__hero-title { | ||
a { | ||
text-decoration: none; | ||
|
||
&:hover { | ||
text-decoration: underline; | ||
} | ||
} | ||
} | ||
|
||
@include ecl-media-breakpoint-up(msm) { | ||
.page-header__hero-title { | ||
a { | ||
color: map-get($ecl-colors, 'blue-100'); | ||
|
||
&:hover { | ||
color: $ecl-color-shade; | ||
} | ||
} | ||
} | ||
} | ||
max-width: 22em; | ||
padding: map-get($ecl-spacing, 's') map-get($ecl-spacing, 'm'); | ||
} | ||
} |
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,9 @@ | ||
# Corporate page header | ||
|
||
Following element are mandatory: | ||
* Breadcrumb | ||
* Page title | ||
* Page introduction | ||
|
||
Following elements are optional: | ||
* Meta items |
31 changes: 31 additions & 0 deletions
31
framework/components/ecl-page-headers/corporate/corporate.config.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
framework/components/ecl-page-headers/corporate/corporate.twig
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,40 @@ | ||
<div class="ecl-page-header {{modifier_class}}" {{style}}> | ||
<!-- Breadcrumb (mandatory) --> | ||
<nav class="breadcrumb breadcrumb-processed breadcrumb--collapsible ecl-u-mh-xxs" role="navigation" aria-label="breadcrumbs"> | ||
<ol class="breadcrumb__segments-wrapper"> | ||
<li class="breadcrumb__segment breadcrumb__segment--first"> | ||
<a href="#" class="breadcrumb__link is-internal" rel="home"> | ||
<span class="breadcrumb__text">European Commission</span> | ||
</a> | ||
</li> | ||
<li class="breadcrumb__segment breadcrumb__segment--last"> | ||
<a href="#" class="breadcrumb__link"> | ||
<span class="breadcrumb__text">Announcements</span> | ||
</a> | ||
</li> | ||
</ol> | ||
</nav> | ||
|
||
<div class="ecl-page-header__body"> | ||
<!-- Meta items (optional) --> | ||
<div class="ecl-page-header__meta"> | ||
<div class="meta meta--header"> | ||
<span class="meta__item meta__item--type">News article</span> | ||
<span class="meta__item"> | ||
<span class="date-display-single" property="dc:date" datatype="xsd:dateTime" content="2015-07-06T17:44:28+02:00">6 July 2015</span> | ||
</span> | ||
<span class="meta__item">Brussels</span> | ||
</div> | ||
</div> | ||
|
||
<!-- Page title (mandatory) --> | ||
<div class="ecl-page-header__title"> | ||
<h1 class=" ecl-heading ecl-heading--h1 ecl-u-color-white">Business, Economy, Euro</h1> | ||
</div> | ||
|
||
<!-- Page introduction (mandatory) --> | ||
<div class="ecl-page-header__intro {{intro_class}}"> | ||
<p>EU economy, finance and the euro, and practical information for EU businesses and entrepreneurs on product safety, environmental regulations, trade with non-EU countries and competition rules.</p> | ||
</div> | ||
</div> | ||
</div> |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# Page header | ||
# Default page header | ||
|
||
Page header default component. | ||
Simple page header displaying page introduction. | ||
|
||
It can be displayed with a background image by using modifier **ecl-page-header--image**. |
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.
Any specific reason why removing this?
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 didn't have any reason to keep it, as it didn't change the display