Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

Commit

Permalink
fix(site-headers): Add arrow icon to login link - TWIG-183 (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
papegaill authored and planctus committed Dec 18, 2019
1 parent 2a7fc58 commit f8343a4
Show file tree
Hide file tree
Showing 12 changed files with 183 additions and 118 deletions.
23 changes: 12 additions & 11 deletions src/ec/.storybook/preview-head.html
@@ -1,25 +1,26 @@
<link
rel="stylesheet"
href="https://cdn1.fpfis.tech.ec.europa.eu/ecl/v2.18.0/ec-preset-legacy-website/styles/ecl-ec-preset-legacy-website.css"
integrity="sha256-M8QkxM0cOcTtR2rJz0FisZ+h2VcNOq94RRkdUy2L1PU=
sha384-oNfpOC4fBTE0LKjMa0fYfBS/H0DwuxX7Le3ccSug2NEpX0J7mvl33yDPzWuXbexF
sha512-z3zt8Y1anogS+LDI3xgSkF1RvgiMI/Zx4ps5ViY4DLd6pU7vPc9EUu7POqxDrqQqxePIko5Bqx6hMY/r4wX0ew=="
href="https://cdn1.fpfis.tech.ec.europa.eu/ecl/v2.19.0/ec-preset-legacy-website/styles/ecl-ec-preset-legacy-website.css"
integrity="sha256-7xFVySXU4jHemYxqlXskxDVZCRh496Ro2jB/bH+NKsM=
sha384-Tm98Wqq/OPwfX5ZRq70yKi6Z8bkMMivs+GrGzML7/m8j0WGP8fwmaCwBxITsmtJX
sha512-P8SCGlp0oZUWH7oq/ig8HkY1SW+lL4ova0o+3LfuOAblbVI/cc1QYer73TrPMK52fZgudIyLjI9oIlY88Zu0Tg=="
crossorigin="anonymous"
media="screen"
/>
<link
rel="stylesheet"
href="https://cdn1.fpfis.tech.ec.europa.eu/ecl/v2.18.0/ec-preset-legacy-website/styles/ecl-ec-preset-legacy-website-print.css"
integrity="sha256-5RxVOf2+vbJs8qpSPoy1s+SPGxNx73s+en7uAUONgTM= sha384-2PEuso8GKtO5OiBExExUL+BwFwLeSdWcQmi0ZqK2UpMV+JXo1A7nKIXKDMSwNty/
sha512-kxI7L/CEEn0wkdT4EcPqeBwrxE6P2JHSyUGFWIPOa08DepgxQF4phBOGkq//yvZp5X8Uo6UbLAH0kq1oBXlBKA=="
href="https://cdn1.fpfis.tech.ec.europa.eu/ecl/v2.19.0/ec-preset-legacy-website/styles/ecl-ec-preset-legacy-website-print.css"
integrity="sha256-sxozpGW/Pph3xHC0krYHNikfeIEXUi7oq83pPDkHPcY=
sha384-Um+X2RSB2LRCCrRAwNo70F/I8JLRNd4y2BBLmSHsJW+o0xpdGnkYLZV6wOhnegcD
sha512-W/ZwcxBTW3MWHxecnAo+dYHFii3tqy+t7vKxdKCfC7BRAePFuP2YjwN0MKELml2MQygGXs5EHvTl6lcxv2A/LQ=="
crossorigin="anonymous"
media="print"
/>
<script
src="https://cdn1.fpfis.tech.ec.europa.eu/ecl/v2.18.0/ec-preset-legacy-website/scripts/ecl-ec-preset-legacy-website.js"
integrity="sha256-tFoGwiJ6Ot4A+KqMvG1p/sbhuUu55hSf6oY6voZxNDc=
sha384-YbX88RWTt34cIaDiAB4WVvatoN7AQQp+9GSZBNXU9oYOpP5rHji1LoFMWvcAnggE
sha512-djHZSFPig+rrCx4nU7cZhOomfVWYkg/0iYNeO7yagdlqktPaMCBWkssMhFVzbTCKR2bPl1c1fZM+CxbjdfroEA=="
src="https://cdn1.fpfis.tech.ec.europa.eu/ecl/v2.19.0/ec-preset-legacy-website/scripts/ecl-ec-preset-legacy-website.js"
integrity="sha256-yY3/+W5rvzNqUy7kJTR4vLOr/PCoAxBGrntYG2G/5LE=
sha384-P7RZC4NjjrZ8UIuy4WqJKOH4apMwAFxV9/kqgpfv/a7NA+CBZVgffgfqZcxga7XK
sha512-zpmABANZmMIxr6m/9ujNEbZqTvk8NSL7kqRBPLzHqSjhGp0TAJUtID7SIeN5yFIgan8PzFfBLBK75LvK1N5+IA=="
crossorigin="anonymous"
></script>
<script src="https://unpkg.com/svg4everybody@2.1.9/dist/svg4everybody.min.js"></script>
Expand Down
Expand Up @@ -35,7 +35,7 @@ exports[`EC - Site Header Core Default renders correctly 1`] = `
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-core__icon"
focusable="false"
>
<use
Expand All @@ -57,7 +57,7 @@ exports[`EC - Site Header Core Default renders correctly 1`] = `
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-core__icon"
focusable="false"
>
<use
Expand Down Expand Up @@ -580,14 +580,23 @@ exports[`EC - Site Header Core Default renders correctly when logged in 1`] = `
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-core__icon"
focusable="false"
>
<use
xlink:href="/icons.svg#general--logged-in"
/>
</svg>
Logged in
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--xs ecl-site-header-core__login-arrow"
focusable="false"
>
<use
xlink:href="/icons.svg#ui--corner-arrow"
/>
</svg>
</a>
<div
class="ecl-site-header-core__login-box"
Expand Down Expand Up @@ -630,7 +639,7 @@ exports[`EC - Site Header Core Default renders correctly when logged in 1`] = `
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-core__icon"
focusable="false"
>
<use
Expand Down Expand Up @@ -1153,7 +1162,7 @@ exports[`EC - Site Header Core Default renders correctly with extra attributes 1
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-core__icon"
focusable="false"
>
<use
Expand All @@ -1175,7 +1184,7 @@ exports[`EC - Site Header Core Default renders correctly with extra attributes 1
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-core__icon"
focusable="false"
>
<use
Expand Down Expand Up @@ -1696,7 +1705,7 @@ exports[`EC - Site Header Core Default renders correctly with extra class names
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-core__icon"
focusable="false"
>
<use
Expand All @@ -1718,7 +1727,7 @@ exports[`EC - Site Header Core Default renders correctly with extra class names
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-core__icon"
focusable="false"
>
<use
Expand Down Expand Up @@ -2239,7 +2248,7 @@ exports[`EC - Site Header Core Translated renders correctly 1`] = `
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-core__icon"
focusable="false"
>
<use
Expand All @@ -2261,7 +2270,7 @@ exports[`EC - Site Header Core Translated renders correctly 1`] = `
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-core__icon"
focusable="false"
>
<use
Expand Down Expand Up @@ -2784,7 +2793,7 @@ exports[`EC - Site Header Core Translated renders correctly with extra attribute
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-core__icon"
focusable="false"
>
<use
Expand All @@ -2806,7 +2815,7 @@ exports[`EC - Site Header Core Translated renders correctly with extra attribute
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-core__icon"
focusable="false"
>
<use
Expand Down Expand Up @@ -3327,7 +3336,7 @@ exports[`EC - Site Header Core Translated renders correctly with extra class nam
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-core__icon"
focusable="false"
>
<use
Expand All @@ -3349,7 +3358,7 @@ exports[`EC - Site Header Core Translated renders correctly with extra class nam
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-core__icon"
focusable="false"
>
<use
Expand Down
Expand Up @@ -174,10 +174,20 @@
path: _icon_file_path,
type: 'general',
name: 'logged-in',
size: 's'
}
size: 'm'
},
extra_classes: 'ecl-site-header-core__icon'
} only %}
{{- login_toggle.label_logged -}}
{% include '@ecl-twig/ec-component-icon/ecl-icon.html.twig' with {
icon: {
path: _icon_file_path,
type: 'ui',
name: 'corner-arrow',
size: 'xs'
},
extra_classes: 'ecl-site-header-core__login-arrow'
} only %}
</a>
<div
id="{{ _login_box.id }}"
Expand Down Expand Up @@ -206,8 +216,9 @@
path: _icon_file_path,
type: 'general',
name: 'log-in',
size: 's'
}
size: 'm'
},
extra_classes: 'ecl-site-header-core__icon'
} only %}
{{- login_toggle.label_not_logged -}}
</a>
Expand All @@ -229,8 +240,9 @@
path: _icon_file_path,
type: 'general',
name: 'language',
size: 's'
}
size: 'm'
},
extra_classes: 'ecl-site-header-core__icon'
} only %}
<span class="ecl-site-header-core__language-code">{{ _language_selector.code }}</span>
</span>
Expand Down
10 changes: 5 additions & 5 deletions src/ec/packages/ec-component-site-header-core/package.json
Expand Up @@ -2,7 +2,7 @@
"name": "@ecl-twig/ec-component-site-header-core",
"author": "European Commission",
"license": "EUPL-1.1",
"version": "2.18.0",
"version": "2.19.0",
"description": "ECL Twig - EC Site Header Core",
"publishConfig": {
"access": "public"
Expand All @@ -13,10 +13,10 @@
"@ecl-twig/ec-component-search-form": "2.18.0"
},
"devDependencies": {
"@ecl/ec-component-site-header-core": "2.18.0",
"@ecl/ec-resources-icons": "2.18.0",
"@ecl/ec-resources-logo": "2.18.0",
"@ecl/ec-specs-site-header-core": "2.18.0"
"@ecl/ec-component-site-header-core": "2.19.0",
"@ecl/ec-resources-icons": "2.19.0",
"@ecl/ec-resources-logo": "2.19.0",
"@ecl/ec-specs-site-header-core": "2.19.0"
},
"repository": {
"type": "git",
Expand Down
Expand Up @@ -35,7 +35,7 @@ exports[`EC - Site Header Harmonised Group 1 renders correctly 1`] = `
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-harmonised__icon"
focusable="false"
>
<use
Expand All @@ -57,7 +57,7 @@ exports[`EC - Site Header Harmonised Group 1 renders correctly 1`] = `
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-harmonised__icon"
focusable="false"
>
<use
Expand Down Expand Up @@ -2029,7 +2029,7 @@ exports[`EC - Site Header Harmonised Group 1 renders correctly with extra attrib
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-harmonised__icon"
focusable="false"
>
<use
Expand All @@ -2051,7 +2051,7 @@ exports[`EC - Site Header Harmonised Group 1 renders correctly with extra attrib
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-harmonised__icon"
focusable="false"
>
<use
Expand Down Expand Up @@ -4021,7 +4021,7 @@ exports[`EC - Site Header Harmonised Group 1 renders correctly with extra class
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-harmonised__icon"
focusable="false"
>
<use
Expand All @@ -4043,7 +4043,7 @@ exports[`EC - Site Header Harmonised Group 1 renders correctly with extra class
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-harmonised__icon"
focusable="false"
>
<use
Expand Down Expand Up @@ -6016,7 +6016,7 @@ exports[`EC - Site Header Harmonised Group 2 renders correctly 1`] = `
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-harmonised__icon"
focusable="false"
>
<use
Expand Down Expand Up @@ -7980,7 +7980,7 @@ exports[`EC - Site Header Harmonised Group 2 renders correctly with extra attrib
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-harmonised__icon"
focusable="false"
>
<use
Expand Down Expand Up @@ -9942,7 +9942,7 @@ exports[`EC - Site Header Harmonised Group 2 renders correctly with extra class
>
<svg
aria-hidden="true"
class="ecl-icon ecl-icon--s"
class="ecl-icon ecl-icon--m ecl-site-header-harmonised__icon"
focusable="false"
>
<use
Expand Down
Expand Up @@ -187,10 +187,20 @@
path: _icon_file_path,
type: 'general',
name: 'logged-in',
size: 's'
}
size: 'm'
},
extra_classes: 'ecl-site-header-harmonised__icon'
} only %}
{{- login_toggle.label_logged -}}
{% include '@ecl-twig/ec-component-icon/ecl-icon.html.twig' with {
icon: {
path: _icon_file_path,
type: 'ui',
name: 'corner-arrow',
size: 'xs'
},
extra_classes: 'ecl-site-header-harmonised__login-arrow'
} only %}
</a>
<div
id="{{ _login_box.id }}"
Expand Down Expand Up @@ -219,8 +229,9 @@
path: _icon_file_path,
type: 'general',
name: 'log-in',
size: 's'
}
size: 'm'
},
extra_classes: 'ecl-site-header-harmonised__icon'
} only %}
{{- login_toggle.label_not_logged -}}
</a>
Expand All @@ -243,8 +254,9 @@
path: _icon_file_path,
type: 'general',
name: 'language',
size: 's'
}
size: 'm'
},
extra_classes: 'ecl-site-header-harmonised__icon'
} only %}
<span class="ecl-site-header-harmonised__language-code">{{ _language_selector.code }}</span>
</span>
Expand Down

0 comments on commit f8343a4

Please sign in to comment.