@openeuropa/bcl-navbar 0.19.0 → 0.22.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.
Files changed (2) hide show
  1. package/navbar.html.twig +39 -28
  2. package/package.json +4 -4
package/navbar.html.twig CHANGED
@@ -18,6 +18,11 @@
18
18
  - color_set (string) (default: 'light')
19
19
  options ['light', 'dark']
20
20
  - disable_collapse (boolean) (default: false)
21
+
22
+ Blocks
23
+ - branding
24
+ - navigation
25
+ - right
21
26
  #}
22
27
  {% set _collapse_id = collapse_id|default('') %}
23
28
  {% set _background = background|default('') %}
@@ -45,26 +50,28 @@
45
50
  {{ attributes }}
46
51
  >
47
52
  <div class='container'>
48
- {% if _brand is not empty %}
49
- <a class='navbar-brand' href='{{ _brand.link }}'>
50
- {% for logo in _brand.logos %}
51
- <img
52
- src='{{ logo.src }}'
53
- {% if logo.alt is not empty %}
54
- alt='{{ logo.alt }}'
55
- {% endif %}
56
- {% if logo.class is not empty %}
57
- class='{{ logo.class }}'
58
- {% endif %}
59
- />
60
- {% endfor %}
61
- {%- if _brand.label is defined -%}
62
- <div class="h5 ms-4-5 d-none d-lg-inline-block">
63
- {{- _brand.label -}}
64
- </div>
65
- {% endif %}
66
- </a>
67
- {% endif %}
53
+ {% block branding %}
54
+ {% if _brand is not empty %}
55
+ <a class='navbar-brand' href='{{ _brand.link }}'>
56
+ {% for logo in _brand.logos %}
57
+ <img
58
+ src='{{ logo.src }}'
59
+ {% if logo.alt is not empty %}
60
+ alt='{{ logo.alt }}'
61
+ {% endif %}
62
+ {% if logo.class is not empty %}
63
+ class='{{ logo.class }}'
64
+ {% endif %}
65
+ />
66
+ {% endfor %}
67
+ {%- if _brand.label is defined -%}
68
+ <div class="h5 ms-4-5 d-none d-lg-inline-block">
69
+ {{- _brand.label -}}
70
+ </div>
71
+ {% endif %}
72
+ </a>
73
+ {% endif %}
74
+ {% endblock %}
68
75
 
69
76
  {% if not _disable_collapse %}
70
77
  <button
@@ -79,16 +86,20 @@
79
86
  <span class='navbar-toggler-icon'></span>
80
87
  </button>
81
88
  <div class='collapse navbar-collapse' id='{{ _collapse_id }}'>
89
+ {% endif %}
90
+ {% block navigation %}
91
+ {% if _navigation is not empty %}
92
+ {% include '@oe-bcl/bcl-navigation/navigation.html.twig' with _navigation only %}
82
93
  {% endif %}
83
- {% if _navigation is not empty %}
84
- {% include '@oe-bcl/bcl-navigation/navigation.html.twig' with _navigation only %}
85
- {% endif %}
86
- {% if _form is not empty %}
87
- {% include '@oe-bcl/bcl-form/form.html.twig' with _form only %}
88
- {% endif %}
89
- {% if not _disable_collapse %}
90
- </div>
94
+ {% endblock %}
95
+ {% block right %}
96
+ {% if _form is not empty %}
97
+ {% include '@oe-bcl/bcl-form/form.html.twig' with _form only %}
91
98
  {% endif %}
99
+ {% endblock %}
100
+ {% if not _disable_collapse %}
101
+ </div>
102
+ {% endif %}
92
103
  </div>
93
104
  </nav>
94
105
 
package/package.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "name": "@openeuropa/bcl-navbar",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "0.19.0",
5
+ "version": "0.22.0",
6
6
  "dependencies": {
7
- "@openeuropa/bcl-form": "^0.19.0",
8
- "@openeuropa/bcl-navigation": "^0.19.0"
7
+ "@openeuropa/bcl-form": "^0.22.0",
8
+ "@openeuropa/bcl-navigation": "^0.22.0"
9
9
  },
10
10
  "publishConfig": {
11
11
  "access": "public"
@@ -25,5 +25,5 @@
25
25
  "design-system",
26
26
  "twig"
27
27
  ],
28
- "gitHead": "8bfce06400c8829a46578797f0126b4e9c02e725"
28
+ "gitHead": "57304ad94ae3c234f2f2b904208ce540a7a53f23"
29
29
  }