-
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
feat(headers): rename and update doc --INNO-662 #234
Changes from all commits
a581892
2b64f27
cdece0b
d92668b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Page header | ||
|
||
## Why and how to use this component | ||
Users need a way to easily identify the branding, to search and change the language if needed. | ||
* the page title functions as the top level H1. | ||
* it is also used to construct the < title \> element (mandatory). | ||
* gives context and confidence to the user so they know they are looking at the right piece of content. | ||
* provides an H1 title for accessibility and SEO purposes. | ||
|
||
## Page header types | ||
|
||
| Default page header | Basic page header | | ||
|------------|------------| | ||
| Mandatory components | Mandatory components | | ||
| Breadcrumb | Breadcrumb | | ||
| Page title | - | | ||
| Optional components | Optional components | | ||
| Meta items | Meta items | | ||
| Site identification | Site identification | | ||
| Page introduction | - | | ||
|
||
## When to use this component | ||
|
||
| Default page header | Basic page header | | ||
| --------------- | ---------- | | ||
| detail pages and landing pages | detail pages and landing pages| | ||
| no corporate menu | corporate menu | | ||
| default implementation | page title and page introduction elements should be placed on the body of the page | |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{% if variant is defined and variant == "highlight" %} | ||
<div class="ecl-page-header ecl-page-header--highlight"> | ||
<div class="ecl-page-header__body"> | ||
<div class="ecl-page-header__label">{{ label }}</div> | ||
<div class="ecl-page-header__highlight"> | ||
{{ highlight }} | ||
</div> | ||
</div> | ||
</div> | ||
{% else %} | ||
<div class="ecl-page-header"> | ||
{% include '@ec-europa/ecl-breadcrumbs' with { 'extraClass':'ecl-u-mh-xxs','segments': [{'target':'#','title':'European Commission'},{'target':'#','title':'Announcements'}] } %} | ||
|
||
<div class="ecl-page-header__body"> | ||
|
||
{% if identity is defined %} | ||
<div class="ecl-page-header__identity"> | ||
{{ identity }} | ||
</div> | ||
{% endif %} | ||
|
||
{% if meta is defined %} | ||
<div class="ecl-page-header__meta"> | ||
<div class="ecl-meta ecl-meta--header"> | ||
<span class="ecl-meta__item ecl-u-f-up">{{ meta.type }}</span> | ||
<span class="ecl-meta__item"> | ||
<span class="date-display-single" property="dc:date" datatype="xsd:dateTime" content="{{ meta.timestamp }}">{{ meta.date }}</span> | ||
</span> | ||
<span class="ecl-meta__item">{{ meta.location }}</span> | ||
</div> | ||
</div> | ||
{% endif %} | ||
|
||
{% if title is defined %} | ||
<div class="ecl-page-header__title"> | ||
<h1 class=" ecl-heading ecl-heading--h1 ecl-u-color-white">{{ title }}</h1> | ||
</div> | ||
{% endif %} | ||
|
||
{% if introduction is defined %} | ||
<div class="ecl-page-header__intro"> | ||
<p class="{{paragraph_class}}">{{ introduction }}</p> | ||
</div> | ||
{% endif %} | ||
|
||
</div> | ||
</div> | ||
{% endif %} |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
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 can create a follow-up ticket to improve the
@ec-europa/ecl-meta
to be to use it here as:However, the component is not ready to have multiple
ecl-meta__item
and cannot accommodatedate-display-single
at the moment, which is definitely out of scope.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.
Follow-up ticket INNO-668