@openeuropa/bcl-header 0.5.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/header.html.twig +71 -63
- package/package.json +5 -4
package/header.html.twig
CHANGED
|
@@ -1,78 +1,86 @@
|
|
|
1
1
|
{% spaceless %}
|
|
2
2
|
|
|
3
3
|
{# Parameters:
|
|
4
|
-
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
- link
|
|
17
|
-
- label
|
|
18
|
-
- href
|
|
19
|
-
- target
|
|
20
|
-
- modal
|
|
4
|
+
- navbar (Navbar object) (default: {})
|
|
5
|
+
- project_logo (object) (default: {})
|
|
6
|
+
format: {
|
|
7
|
+
path: "",
|
|
8
|
+
alt: "",
|
|
9
|
+
classes: ""
|
|
10
|
+
}
|
|
11
|
+
- site_name (string) (default: "")
|
|
12
|
+
- head (Navbar object) (default: {})
|
|
13
|
+
- breadcrumbs (Breadcrumbs object) (default: {})
|
|
14
|
+
- light (boolean) (default: false)
|
|
15
|
+
- modals (Array of modal objects) (default: [])
|
|
21
16
|
#}
|
|
22
17
|
|
|
23
|
-
{% set _logo = {
|
|
24
|
-
src: logo.src|default(''),
|
|
25
|
-
width: logo.width|default(100),
|
|
26
|
-
height: navbar.height|default(60)
|
|
27
|
-
} %}
|
|
28
18
|
{% set _navbar = navbar|default({}) %}
|
|
29
|
-
{% set
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
modal: login.modal|default({}),
|
|
36
|
-
} %}
|
|
37
|
-
{% set _language = {
|
|
38
|
-
link: {
|
|
39
|
-
label: language.link.label|default(''),
|
|
40
|
-
href: language.link.href|default('#'),
|
|
41
|
-
target: language.link.target|default(language.modal.id|default('')),
|
|
42
|
-
},
|
|
43
|
-
modal: language.modal|default({}),
|
|
44
|
-
} %}
|
|
19
|
+
{% set _project_logo = project_logo|default({}) %}
|
|
20
|
+
{% set _site_name = site_name|default('') %}
|
|
21
|
+
{% set _head = head|default({}) %}
|
|
22
|
+
{% set _breadcrumbs = breadcrumbs|default({}) %}
|
|
23
|
+
{% set _modals = modals|default([]) %}
|
|
24
|
+
{% set _light = light|default(false) %}
|
|
45
25
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
26
|
+
{% if attributes is empty %}
|
|
27
|
+
{% set attributes = create_attribute() %}
|
|
28
|
+
{% endif %}
|
|
29
|
+
|
|
30
|
+
{% set attributes = attributes.addClass("bcl-header") %}
|
|
31
|
+
|
|
32
|
+
{% set _project_classes = 'bcl-header__project' %}
|
|
33
|
+
{% if _light is not empty %}
|
|
34
|
+
{% set _project_classes = _project_classes ~ ' light' %}
|
|
35
|
+
{% endif %}
|
|
36
|
+
|
|
37
|
+
<header
|
|
38
|
+
{{ attributes }}
|
|
39
|
+
>
|
|
40
|
+
<!-- navbar_settings -->
|
|
41
|
+
{% if _head is not empty %}
|
|
42
|
+
{% include '@oe-bcl/bcl-navbar/navbar.html.twig' with _head only %}
|
|
43
|
+
{% endif %}
|
|
44
|
+
|
|
45
|
+
<!-- project name -->
|
|
46
|
+
{% if _project_logo is not empty or _site_name is not empty %}
|
|
47
|
+
<div class="{{ _project_classes }}">
|
|
48
|
+
<div class="container">
|
|
49
|
+
{% if _project_logo is not empty %}
|
|
50
|
+
<img
|
|
51
|
+
{% if _project_logo.path is not empty %}
|
|
52
|
+
src="{{ _project_logo.path }}"
|
|
53
|
+
{% endif %}
|
|
54
|
+
{% if _project_logo.alt is not empty %}
|
|
55
|
+
alt="{{ _project_logo.alt }}"
|
|
56
|
+
{% endif %}
|
|
57
|
+
{% if _project_logo.classes is not empty %}
|
|
58
|
+
class="{{ _project_logo.classes }}"
|
|
59
|
+
{% endif %}
|
|
60
|
+
/>
|
|
61
|
+
{% endif %}
|
|
62
|
+
{% if _site_name is not empty %}
|
|
63
|
+
<p>{{ _site_name }}</p>
|
|
64
|
+
{% endif %}
|
|
65
65
|
</div>
|
|
66
66
|
</div>
|
|
67
|
+
{% endif %}
|
|
67
68
|
|
|
68
69
|
<!-- navbar -->
|
|
69
|
-
{%
|
|
70
|
-
|
|
70
|
+
{% if _navbar is not empty %}
|
|
71
|
+
{% include '@oe-bcl/bcl-navbar/navbar.html.twig' with _navbar only %}
|
|
72
|
+
{% endif %}
|
|
71
73
|
|
|
72
|
-
<!--
|
|
73
|
-
{%
|
|
74
|
+
<!-- breadcrumbs -->
|
|
75
|
+
{% if _breadcrumbs is not empty %}
|
|
76
|
+
<div class="container">
|
|
77
|
+
{% include '@oe-bcl/bcl-breadcrumb/breadcrumb.html.twig' with _breadcrumbs only %}
|
|
78
|
+
</div>
|
|
79
|
+
{% endif %}
|
|
80
|
+
</header>
|
|
74
81
|
|
|
75
|
-
|
|
76
|
-
{% include '@oe-bcl/bcl-modal/modal.html.twig' with
|
|
82
|
+
{% for modal in _modals %}
|
|
83
|
+
{% include '@oe-bcl/bcl-modal/modal.html.twig' with modal only %}
|
|
84
|
+
{% endfor %}
|
|
77
85
|
|
|
78
86
|
{% endspaceless %}
|
package/package.json
CHANGED
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
"name": "@openeuropa/bcl-header",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.9.0",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
9
|
"description": "OE - BCL header",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@openeuropa/bcl-
|
|
12
|
-
"@openeuropa/bcl-
|
|
11
|
+
"@openeuropa/bcl-breadcrumb": "^0.9.0",
|
|
12
|
+
"@openeuropa/bcl-modal": "^0.9.0",
|
|
13
|
+
"@openeuropa/bcl-navbar": "^0.9.0"
|
|
13
14
|
},
|
|
14
15
|
"repository": {
|
|
15
16
|
"type": "git",
|
|
@@ -25,5 +26,5 @@
|
|
|
25
26
|
"design-system",
|
|
26
27
|
"twig"
|
|
27
28
|
],
|
|
28
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "dc021a9c36d22809e33a8485e42f59af602451c1"
|
|
29
30
|
}
|