desy-html 7.1.1 → 7.2.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/docs/_global.foot.njk +9 -9
- package/docs/_global.head.njk +1 -1
- package/docs/_macro.example-render.njk +177 -147
- package/docs/_macro.render-caller.njk +1 -1
- package/docs/ds/_ds.example.border.njk +1 -1
- package/docs/ds/_ds.example.color-de-interaccion.njk +5 -5
- package/docs/ds/_ds.example.colores-cabecera.njk +7 -7
- package/docs/ds/_ds.example.colores-de-soporte.njk +72 -5
- package/docs/ds/_ds.example.colores-neutros.njk +12 -12
- package/docs/ds/_ds.example.layout.njk +2 -2
- package/docs/ds/_ds.example.typography.njk +1 -1
- package/docs/ds/_ds.macro.code-snippet.njk +28 -9
- package/docs/ds/_ds.section.color.njk +7 -65
- package/docs/ds/_ds.section.espaciado.njk +4 -295
- package/docs/ds/_ds.section.layout.njk +5 -5
- package/docs/ds/_ds.section.textos.njk +40 -50
- package/docs/ds/_ds.section.typography.njk +239 -236
- package/docs/index.html +12 -0
- package/package.json +1 -1
- package/src/css/component.text.css +11 -0
- package/src/js/aria/dataGrid.js +21 -6
- package/src/js/index.js +0 -7
- package/src/js/popper.min.js +6 -0
- package/src/js/prism/clipboard.min.js +7 -0
- package/src/js/prism/prism-copy-to-clipboard.min.js +1 -0
- package/src/js/prism/prism-normalize-whitespace.min.js +1 -0
- package/src/js/prism/prism-toolbar.min.js +1 -0
- package/src/js/prism/prism-twig.min.js +1 -0
- package/src/js/prism/prism-yaml.min.js +1 -0
- package/src/js/prism/prism.min.js +1 -0
- package/src/js/tippy-bundle.umd.min.js +2 -0
- package/src/templates/components/accordion/_template.accordion.njk +95 -84
- package/src/templates/components/accordion-history/_template.accordion-history.njk +134 -123
- package/src/templates/components/alert/_template.alert.njk +6 -6
- package/src/templates/components/breadcrumbs/_template.breadcrumbs.njk +15 -30
- package/src/templates/components/button/_template.button.njk +4 -0
- package/src/templates/components/button-loader/_template.button-loader.njk +11 -7
- package/src/templates/components/card/_examples.card.njk +76 -76
- package/src/templates/components/card/_template.card.njk +14 -14
- package/src/templates/components/character-count/_template.character-count.njk +3 -6
- package/src/templates/components/checkboxes/_examples.checkboxes.njk +49 -10
- package/src/templates/components/checkboxes/_template.checkboxes.njk +17 -11
- package/src/templates/components/collapsible/_template.collapsible.njk +4 -4
- package/src/templates/components/date-input/_template.date-input.njk +46 -40
- package/src/templates/components/dialog/_template.dialog.njk +2 -2
- package/src/templates/components/error-message/_template.error-message.njk +3 -3
- package/src/templates/components/error-summary/_template.error-summary.njk +18 -6
- package/src/templates/components/fieldset/_examples.fieldset.njk +32 -6
- package/src/templates/components/fieldset/_template.fieldset.njk +28 -16
- package/src/templates/components/footer/_examples.footer.njk +14 -9
- package/src/templates/components/footer/_template.footer.njk +62 -66
- package/src/templates/components/footer/params.footer.yaml +4 -26
- package/src/templates/components/header/_examples.header.njk +6 -4
- package/src/templates/components/header/_template.header.header__dropdown.njk +27 -22
- package/src/templates/components/header/_template.header.header__navigation.njk +4 -1
- package/src/templates/components/header/_template.header.header__offcanvas.njk +18 -16
- package/src/templates/components/header/_template.header.header__offcanvasButton.njk +2 -1
- package/src/templates/components/header/_template.header.header__subnav.njk +33 -29
- package/src/templates/components/header/_template.header.njk +70 -60
- package/src/templates/components/header-advanced/_examples.header-advanced.njk +46 -32
- package/src/templates/components/header-advanced/_template.header-advanced.njk +93 -90
- package/src/templates/components/header-mini/_examples.header-mini.njk +1 -1
- package/src/templates/components/hint/_examples.hint.njk +2 -2
- package/src/templates/components/hint/_template.hint.njk +1 -3
- package/src/templates/components/input-group/_template.input-group.njk +72 -68
- package/src/templates/components/item/_template.item.njk +23 -23
- package/src/templates/components/label/_template.label.njk +25 -14
- package/src/templates/components/links-list/_examples.links-list.njk +10 -12
- package/src/templates/components/links-list/_template.links-list.njk +35 -37
- package/src/templates/components/listbox/_template.listbox.njk +11 -11
- package/src/templates/components/menu-navigation/_template.menu-navigation.njk +62 -63
- package/src/templates/components/menu-vertical/_template.menu-vertical.njk +41 -41
- package/src/templates/components/menubar/_template.menubar.njk +91 -91
- package/src/templates/components/modal/_template.modal.njk +63 -53
- package/src/templates/components/nav/_template.nav.njk +13 -13
- package/src/templates/components/notification/_examples.notification.njk +0 -9
- package/src/templates/components/notification/_template.notification.njk +54 -44
- package/src/templates/components/pagination/_template.pagination.njk +37 -42
- package/src/templates/components/radios/_examples.radios.njk +49 -12
- package/src/templates/components/radios/_template.radios.njk +90 -84
- package/src/templates/components/searchbar/_template.searchbar.njk +6 -6
- package/src/templates/components/select/_template.select.njk +12 -12
- package/src/templates/components/status-item/_template.status-item.njk +23 -25
- package/src/templates/components/table/_template.table.njk +4 -4
- package/src/templates/components/table-advanced/_examples.table-advanced.njk +9 -9
- package/src/templates/components/table-advanced/_styles.table-advanced.css +3 -3
- package/src/templates/components/table-advanced/_template.table-advanced.njk +85 -83
- package/src/templates/components/tabs/_template.tabs.njk +39 -39
- package/src/templates/components/toggle/_template.toggle.njk +1 -2
- package/src/templates/components/tooltip/_template.tooltip.njk +19 -19
- package/src/templates/components/tree/_template.tree.njk +46 -42
|
@@ -6,27 +6,27 @@ text-neutral-dark {{ params.classes if params.classes }}"
|
|
|
6
6
|
{% if params.navigation | length %}
|
|
7
7
|
<div class="flex flex-col lg:flex-row flex-wrap gap-base">
|
|
8
8
|
{% for nav in params.navigation %}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
9
|
+
<div class="lg:flex-1">
|
|
10
|
+
<h3 class="c-h3 mb-base">{{ nav.title }}</h3>
|
|
11
|
+
{% if nav.items | length %}
|
|
12
|
+
{% set listClasses %}
|
|
13
|
+
{% if nav.columns %}
|
|
14
|
+
lg:grid-cols-{{ nav.columns }}
|
|
15
|
+
{% endif %}
|
|
16
|
+
{% endset %}
|
|
17
|
+
<ul class="grid grid-cols-1 gap-base {{ listClasses | trim }}">
|
|
18
|
+
{% for item in nav.items %}
|
|
19
|
+
{% if item.href and item.text %}
|
|
20
|
+
<li class="mb-xs">
|
|
21
|
+
<a class="c-link font-semibold" href="{{ item.href }}"{% for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
22
|
+
{{ item.text }}
|
|
23
|
+
</a>
|
|
24
|
+
</li>
|
|
25
|
+
{% endif %}
|
|
26
|
+
{% endfor %}
|
|
27
|
+
</ul>
|
|
28
|
+
{% endif %}
|
|
29
|
+
</div>
|
|
30
30
|
{% endfor %}
|
|
31
31
|
</div>
|
|
32
32
|
<hr class="my-base border-t border-neutral-base">
|
|
@@ -34,60 +34,56 @@ text-neutral-dark {{ params.classes if params.classes }}"
|
|
|
34
34
|
<div class="flex flex-wrap flex-col lg:flex-row justify-between">
|
|
35
35
|
<div class="mb-base">
|
|
36
36
|
{% if params.meta %}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
37
|
+
<h2 class="sr-only">{{ params.meta.visuallyHiddenTitle | default("Enlaces de pie de página") }}</h2>
|
|
38
|
+
{% if params.meta.items | length %}
|
|
39
|
+
<ul class="flex flex-col lg:flex-row lg:flex-wrap mb-base">
|
|
40
|
+
{% for item in params.meta.items %}
|
|
41
|
+
<li class="mb-sm mr-base">
|
|
42
|
+
<a class="c-link font-semibold" href="{{ item.href }}"{% for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
43
|
+
{{ item.text }}
|
|
44
|
+
</a>
|
|
45
|
+
</li>
|
|
46
|
+
{% endfor %}
|
|
47
|
+
</ul>
|
|
48
|
+
{% endif %}
|
|
49
|
+
{% if params.meta.text or params.meta.html %}
|
|
50
|
+
<div class="mb-sm">
|
|
51
|
+
<p>{{ params.meta.html | safe if params.meta.html else params.meta.text }}</p>
|
|
52
|
+
</div>
|
|
53
|
+
{% endif %}
|
|
54
54
|
{% endif %}
|
|
55
55
|
{% if params.description %}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
<h2 class="sr-only">{{ params.description.visuallyHiddenTitle | default("Acerca de") }}</h2>
|
|
57
|
+
{% if params.description.text or params.description.html %}
|
|
58
|
+
{{ params.description.html | safe if params.description.html else params.description.text }}
|
|
59
|
+
{% endif %}
|
|
60
60
|
{% else %}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
61
|
+
<div>
|
|
62
|
+
<p>
|
|
63
|
+
Todo el contenido bajo
|
|
64
|
+
<a
|
|
65
|
+
class="c-link c-link--neutral"
|
|
66
|
+
href="https://creativecommons.org/licenses/by/4.0/legalcode.es"
|
|
67
|
+
rel="license"
|
|
68
|
+
>licencia CC BY 4.0</a>
|
|
69
|
+
</p>
|
|
70
|
+
</div>
|
|
71
|
+
<div>
|
|
72
|
+
<p>
|
|
73
|
+
<a
|
|
74
|
+
class="c-link c-link--neutral"
|
|
75
|
+
href="https://www.aragon.es/"
|
|
76
|
+
>Gobierno de Aragón</a>. Edificio Pignatelli. <abbr title="Paseo">Pº</abbr> María Agustín, 36. 50004 - Zaragoza - <abbr title="Teléfono">Tel.</abbr> <a href="tel:+976714000" class="c-link c-link--neutral">976 714 000</a>
|
|
77
|
+
</p>
|
|
78
|
+
</div>
|
|
79
79
|
{% endif %}
|
|
80
80
|
</div>
|
|
81
81
|
<div class="mb-base lg:pl-base overflow-hidden">
|
|
82
82
|
{% if params.icon.html %}
|
|
83
|
-
|
|
83
|
+
{{ params.icon.html | safe }}
|
|
84
84
|
{% endif %}
|
|
85
85
|
{% if not params.noLogo %}
|
|
86
|
-
|
|
87
|
-
<a href="http://www.aragon.es/Fondos_Europeos" class="inline-block text-sm c-link no-underline -ml-sm" title="Más información sobre los Fondos Estructurales y de Inversión Europeos (Fondos EIE)">
|
|
88
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 575 96" width="288" height="48" class="w-auto h-12" role="img" aria-label="Logotipo Unión Europea. Fondo Europeo de Desarrollo Regional (FEDER). Construyendo Europa desde Aragón."><text transform="translate(126 33)" fill="#039" font-size="20" font-family="Arial, Tahoma, Verdana, Calibri, Garamond, Trebuchet, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, HelveticaNeue-Bold, Helvetica Neue, Helvetica, sans" font-weight="700"><tspan x="0" y="0">UNIÓN EUROPEA</tspan></text><text transform="translate(126 56)" fill="#039" font-size="20" font-family="Arial, Tahoma, Verdana, Calibri, Garamond, Trebuchet, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, HelveticaNeue-Bold, Helvetica Neue, Helvetica, sans"><tspan x="0" y="0">Fondo Europeo de Desarrollo Regional (FEDER)</tspan></text><text transform="translate(126 79)" fill="#039" font-size="20" font-family="Arial, Tahoma, Verdana, Calibri, Garamond, Trebuchet, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, HelveticaNeue-Bold, Helvetica Neue, Helvetica, sans"><tspan x="0" y="0">“Construyendo Europa desde Aragón”</tspan></text><path fill="#039" stroke="#fff" stroke-width="1%" d="M14.086 13.02h104.282v69.522H14.086z"/><g fill="#fc0"><path d="M64.004 28.167l2.2-1.606 2.2 1.606-.837-2.6 2.235-1.606h-2.755l-.843-2.628-.843 2.631h-2.753l2.233 1.606zM52.617 31.229l2.2-1.606 2.2 1.606-.836-2.6 2.233-1.606h-2.755l-.843-2.631-.843 2.634H51.22l2.234 1.606zM46.486 32.743l-.843 2.634H42.89l2.234 1.606-.837 2.6 2.2-1.606 2.2 1.606-.837-2.6 2.234-1.606h-2.752zM43.429 49.345l2.2 1.606-.836-2.6 2.234-1.606h-2.753l-.843-2.631-.843 2.637-2.755-.006 2.235 1.606-.837 2.6zM47.332 58.156l-.843-2.631-.843 2.634h-2.753l2.234 1.606-.837 2.6 2.2-1.609 2.2 1.609-.837-2.6 2.234-1.606zM55.677 66.504l-.843-2.628-.842 2.631h-2.755l2.234 1.606-.836 2.6 2.2-1.606 2.2 1.606-.836-2.6 2.234-1.606zM67.05 69.528l-.843-2.631-.842 2.634H62.61l2.234 1.606-.836 2.6 2.2-1.606 2.2 1.606-.837-2.6 2.235-1.606zM78.422 66.504l-.842-2.628-.845 2.631h-2.752l2.232 1.606-.836 2.6 2.2-1.606 2.2 1.606-.839-2.6 2.235-1.606zM86.774 58.156l-.845-2.631-.845 2.634h-2.752l2.235 1.606-.839 2.6 2.2-1.609 2.2 1.609-.839-2.6 2.235-1.606zM92.551 46.716h-2.755l-.845-2.631-.842 2.634h-2.755l2.235 1.606-.836 2.6 2.2-1.609 2.2 1.609-.836-2.6zM83.728 39.544l2.2-1.606 2.2 1.606-.839-2.6 2.235-1.6h-2.752l-.845-2.631-.845 2.634H82.33l2.235 1.6zM77.613 24.395l-.842 2.634-2.755-.006 2.232 1.609-.836 2.6 2.2-1.609 2.2 1.609-.836-2.6 2.235-1.609h-2.758z"/></g></svg>
|
|
89
|
-
</a>
|
|
90
|
-
</p>
|
|
86
|
+
<p><a href="{%- if params.urlFeder %} {{ params.urlFeder }} {%- else -%} https://www.europarl.europa.eu/factsheets/es/sheet/95/el-fondo-europeo-de-desarrollo-regional-feder- {% endif %}" class="inline-block text-sm c-link no-underline -ml-sm" title="Más información sobre los Fondos Estructurales y de Inversión Europeos (Fondos EIE)"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 575 96" width="288" height="48" class="w-auto h-12" role="img" aria-label="Logotipo Unión Europea. Fondo Europeo de Desarrollo Regional (FEDER). Construyendo Europa desde Aragón."><text transform="translate(126 33)" fill="#039" font-size="20" font-family="Arial, Tahoma, Verdana, Calibri, Garamond, Trebuchet, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, HelveticaNeue-Bold, Helvetica Neue, Helvetica, sans" font-weight="700"><tspan x="0" y="0">UNIÓN EUROPEA</tspan></text><text transform="translate(126 56)" fill="#039" font-size="20" font-family="Arial, Tahoma, Verdana, Calibri, Garamond, Trebuchet, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, HelveticaNeue-Bold, Helvetica Neue, Helvetica, sans"><tspan x="0" y="0">Fondo Europeo de Desarrollo Regional (FEDER)</tspan></text><text transform="translate(126 79)" fill="#039" font-size="20" font-family="Arial, Tahoma, Verdana, Calibri, Garamond, Trebuchet, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, HelveticaNeue-Bold, Helvetica Neue, Helvetica, sans"><tspan x="0" y="0">“Construyendo Europa desde Aragón”</tspan></text><path fill="#039" stroke="#fff" stroke-width="1%" d="M14.086 13.02h104.282v69.522H14.086z"/><g fill="#fc0"><path d="M64.004 28.167l2.2-1.606 2.2 1.606-.837-2.6 2.235-1.606h-2.755l-.843-2.628-.843 2.631h-2.753l2.233 1.606zM52.617 31.229l2.2-1.606 2.2 1.606-.836-2.6 2.233-1.606h-2.755l-.843-2.631-.843 2.634H51.22l2.234 1.606zM46.486 32.743l-.843 2.634H42.89l2.234 1.606-.837 2.6 2.2-1.606 2.2 1.606-.837-2.6 2.234-1.606h-2.752zM43.429 49.345l2.2 1.606-.836-2.6 2.234-1.606h-2.753l-.843-2.631-.843 2.637-2.755-.006 2.235 1.606-.837 2.6zM47.332 58.156l-.843-2.631-.843 2.634h-2.753l2.234 1.606-.837 2.6 2.2-1.609 2.2 1.609-.837-2.6 2.234-1.606zM55.677 66.504l-.843-2.628-.842 2.631h-2.755l2.234 1.606-.836 2.6 2.2-1.606 2.2 1.606-.836-2.6 2.234-1.606zM67.05 69.528l-.843-2.631-.842 2.634H62.61l2.234 1.606-.836 2.6 2.2-1.606 2.2 1.606-.837-2.6 2.235-1.606zM78.422 66.504l-.842-2.628-.845 2.631h-2.752l2.232 1.606-.836 2.6 2.2-1.606 2.2 1.606-.839-2.6 2.235-1.606zM86.774 58.156l-.845-2.631-.845 2.634h-2.752l2.235 1.606-.839 2.6 2.2-1.609 2.2 1.609-.839-2.6 2.235-1.606zM92.551 46.716h-2.755l-.845-2.631-.842 2.634h-2.755l2.235 1.606-.836 2.6 2.2-1.609 2.2 1.609-.836-2.6zM83.728 39.544l2.2-1.606 2.2 1.606-.839-2.6 2.235-1.6h-2.752l-.845-2.631-.845 2.634H82.33l2.235 1.6zM77.613 24.395l-.842 2.634-2.755-.006 2.232 1.609-.836 2.6 2.2-1.609 2.2 1.609-.836-2.6 2.235-1.609h-2.758z"/></g></svg></a></p>
|
|
91
87
|
{% endif %}
|
|
92
88
|
</div>
|
|
93
89
|
</div>
|
|
@@ -98,29 +98,7 @@ params:
|
|
|
98
98
|
type: object
|
|
99
99
|
required: false
|
|
100
100
|
description: HTML attributes (for example data attributes) to add to the footer component container.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
- have a text contrast ratio higher than 4.5:1 against the background colour to meet [WCAG AA](https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast)
|
|
106
|
-
|
|
107
|
-
Links in the Footer must:
|
|
108
|
-
- accept focus
|
|
109
|
-
- be focusable with a keyboard
|
|
110
|
-
- be usable with a keyboard
|
|
111
|
-
- indicate when they have focus
|
|
112
|
-
- change in appearance when touched (in the touch-down state)
|
|
113
|
-
- change in appearance when hovered
|
|
114
|
-
- have visible text
|
|
115
|
-
|
|
116
|
-
Images in the Footer must:
|
|
117
|
-
- be presentational when linked to from accompanying text (EU icon).
|
|
118
|
-
- have a meaningful accessible name if also a linked element (EU icon).
|
|
119
|
-
|
|
120
|
-
Landmarks and Roles in the Footer should:
|
|
121
|
-
- avoid navigation landmarks or roles
|
|
122
|
-
"The footer element alone is sufficient for such cases; while a nav element can be used in such cases, it is usually unnecessary." - (https://www.w3.org/TR/html52/sections.html#the-nav-element)
|
|
123
|
-
|
|
124
|
-
- have a role of `contentinfo` at the root of the component (<footer>) (https://www.w3.org/TR/wai-aria-1.1/#contentinfo)
|
|
125
|
-
The spec indicates that `contentinfo` is useful for "Examples of information included in this region of the page are copyrights and links to privacy statements.", which may indicate that it might be better placed around the 'meta' section of this component.
|
|
126
|
-
See also: http://www.brucelawson.co.uk/2013/why-does-html-take-rolecontentinfo
|
|
101
|
+
- name: urlFeder
|
|
102
|
+
type: string
|
|
103
|
+
required: false
|
|
104
|
+
description: Add a custom link to the FEDER logo. Defaults to: https://www.europarl.europa.eu/factsheets/es/sheet/95/el-fondo-europeo-de-desarrollo-regional-feder-
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
{% from "components/menu-navigation/_macro.menu-navigation.njk" import componentMenuNavigation %}
|
|
4
4
|
|
|
5
5
|
{% set navigationCustom %}
|
|
6
|
+
|
|
6
7
|
{{ componentMenuNavigation({
|
|
7
8
|
"idPrefix": "header-custom-nav",
|
|
8
9
|
"classes": "c-menu-navigation--last-right hidden lg:block w-full bg-neutral-lighter ",
|
|
@@ -109,10 +110,11 @@
|
|
|
109
110
|
"attributes": {
|
|
110
111
|
"aria-label": "Navegación principal"
|
|
111
112
|
}
|
|
112
|
-
}) }}
|
|
113
|
+
}) | indent(12) }}
|
|
113
114
|
{% endset %}
|
|
114
115
|
|
|
115
116
|
{% set exampleOffcanvas %}
|
|
117
|
+
|
|
116
118
|
<nav class="w-full p-2" aria-label="Menú móvil">
|
|
117
119
|
<h3 class="p-base text-base font-bold">Gestor de expedientes</h3>
|
|
118
120
|
{{ componentNav({
|
|
@@ -324,7 +326,7 @@
|
|
|
324
326
|
"textClose": "Cerrar menu",
|
|
325
327
|
"labelledId": "offcanvas-title"
|
|
326
328
|
},
|
|
327
|
-
"caller": exampleOffcanvas
|
|
329
|
+
"caller": exampleOffcanvas | indent(14)
|
|
328
330
|
}
|
|
329
331
|
},
|
|
330
332
|
{
|
|
@@ -346,7 +348,7 @@
|
|
|
346
348
|
"textClose": "Cerrar menu",
|
|
347
349
|
"labelledId": "offcanvas-title"
|
|
348
350
|
},
|
|
349
|
-
"caller": exampleOffcanvas
|
|
351
|
+
"caller": exampleOffcanvas | indent(14)
|
|
350
352
|
}
|
|
351
353
|
},
|
|
352
354
|
{
|
|
@@ -519,7 +521,7 @@
|
|
|
519
521
|
"text": "Menú",
|
|
520
522
|
"textClose": "Cerrar menu"
|
|
521
523
|
},
|
|
522
|
-
"caller": exampleOffcanvas
|
|
524
|
+
"caller": exampleOffcanvas | indent(14)
|
|
523
525
|
}
|
|
524
526
|
},
|
|
525
527
|
{
|
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
{% from "components/dropdown/_macro.dropdown.njk" import componentDropdown %}
|
|
2
|
+
<!-- header__dropdown -->
|
|
3
|
+
<div class="ml-4 flex items-center lg:ml-6">
|
|
4
|
+
<div class="ml-3 relative">
|
|
5
|
+
<div>
|
|
6
|
+
{% set dropdownContent %}
|
|
7
|
+
{% call componentDropdown({
|
|
8
|
+
"text": params.text,
|
|
9
|
+
"html": params.html,
|
|
10
|
+
"hiddenText": params.hiddenText,
|
|
11
|
+
"classesContainer": params.classesContainer,
|
|
12
|
+
"classesTooltip": params.classesTooltip,
|
|
13
|
+
"classes": params.classes,
|
|
14
|
+
"attributes": params.attributes
|
|
15
|
+
}) %}
|
|
16
|
+
{% if caller %}
|
|
17
|
+
{{ caller() }} {#- if statement allows usage of `call` to be optional -#}
|
|
18
|
+
{% elseif params.caller %}
|
|
19
|
+
{{ params.caller | safe }}
|
|
20
|
+
{% endif %}
|
|
21
|
+
{% endcall %}
|
|
22
|
+
{% endset %}
|
|
23
|
+
{{ dropdownContent | safe | indent(6) }}
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<!-- /header__dropdown -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{#- If an id 'prefix' is not passed, fall back to using a default one
|
|
2
2
|
instead -#}
|
|
3
3
|
{% set idPrefix = params.idPrefix if params.idPrefix else "header-nav-item" %}
|
|
4
|
-
|
|
4
|
+
<!-- header__navigation -->
|
|
5
5
|
<nav class="{{ params.classes if params.classes else 'hidden lg:block' }}" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
|
|
6
6
|
<ul class="ml-sm flex flex-wrap items-baseline">
|
|
7
7
|
{% for item in params.items %}
|
|
@@ -19,8 +19,10 @@
|
|
|
19
19
|
{% endif %}
|
|
20
20
|
{% endif %}
|
|
21
21
|
{% if item.active %}
|
|
22
|
+
|
|
22
23
|
<a {%- if id %} id="{{ id }}"{% endif %} href="{{ item.href }}" class="max-w-40 lg:max-w-xs px-3 py-4 font-bold text-sm text-black hover:underline truncate focus:outline-none focus:ring-4 focus:ring-inset focus:ring-black focus:bg-warning-base" aria-current="page" {%- if item.target %} target="{{ item.target }}"{% endif %}><strong class="font-bold">{{ item.html | safe if item.html else item.text }}</strong></a>
|
|
23
24
|
{% else %}
|
|
25
|
+
|
|
24
26
|
<a href="{{ item.href }}" class="max-w-40 lg:max-w-xs px-3 py-4 text-sm text-black hover:underline truncate focus:outline-none focus:ring-4 focus:ring-inset focus:ring-black focus:bg-warning-base {%- if item.disabled %} opacity-50 pointer-events-none{% endif -%}" {%- if item.disabled %} disabled="disabled" aria-disabled="true" tabindex="-1"{% endif -%} {%- if item.target %} target="{{ item.target }}"{% endif %}>{{ item.html | safe if item.html else item.text }}</a>
|
|
25
27
|
{% endif %}
|
|
26
28
|
</li>
|
|
@@ -28,3 +30,4 @@
|
|
|
28
30
|
{% endfor %}
|
|
29
31
|
</ul>
|
|
30
32
|
</nav>
|
|
33
|
+
<!-- /header__navigation -->
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{% if caller %}
|
|
11
|
-
{{ caller() }} {#- if statement allows usage of `call` to be optional -#}
|
|
12
|
-
{% elseif params.caller %}
|
|
13
|
-
{{ params.caller | safe }}
|
|
14
|
-
{% endif %}
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
1
|
+
<!-- header__offcanvas -->
|
|
2
|
+
<div id="header-offcanvas" class="hidden" role="dialog" aria-labelledby="header-offcanvas-button-text" aria-modal="true">
|
|
3
|
+
<div class="left-0 fixed top-0 h-screen w-offcanvas ml-offcanvas-negative">
|
|
4
|
+
<div class="h-full overflow-auto relative h-screen bg-white z-10">
|
|
5
|
+
<div class="text-right p-sm">
|
|
6
|
+
<button
|
|
7
|
+
onclick="closeDialog(this)"
|
|
8
|
+
id="header-offcanvas-button-close"
|
|
9
|
+
class="c-button c-button--sm c-button--transparent m-sm">{{ params.text }} <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="14" height="14" class="self-center ml-2" aria-hidden="true"><path fill="currentColor" d="M8.591 7.177a.25.25 0 010-.354l4.616-4.616A1 1 0 1011.793.793L7.177 5.409a.25.25 0 01-.354 0L2.207.793A1 1 0 00.793 2.207l4.616 4.616a.25.25 0 010 .354L.793 11.793a1 1 0 001.414 1.414l4.616-4.616a.25.25 0 01.354 0l4.616 4.616a1 1 0 001.414-1.414z"/></svg></button>
|
|
17
10
|
</div>
|
|
11
|
+
{% if caller %}
|
|
12
|
+
{{ caller() }} {#- if statement allows usage of `call` to be optional -#}
|
|
13
|
+
{% elseif params.caller %}
|
|
14
|
+
{{ params.caller | safe }}
|
|
15
|
+
{% endif %}
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
<!-- /header__offcanvas -->
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<!-- header__offcanvasButton -->
|
|
1
2
|
<div class="{{ params.classes if params.classes else '-mr-2 flex lg:hidden' }}">
|
|
2
3
|
<button id="header-offcanvas-button"
|
|
3
4
|
onclick="openDialog('header-offcanvas', this)"
|
|
@@ -6,4 +7,4 @@
|
|
|
6
7
|
<span id="header-offcanvas-button-text" class="inline-block align-middle text-right">{{ params.html | safe if params.html else params.text }}</span> <svg role="img" aria-label="Cerrado" class="inline-block align-middle" viewBox="0 0 96 96" fill="currentColor" width="1.5em" height="1.5em"><g><path d="M46.71 58.037a1.823 1.823 0 002.581 0L62.048 45.28a1.823 1.823 0 00-1.29-3.113H35.243a1.823 1.823 0 00-1.291 3.113z"/></g></svg>
|
|
7
8
|
</button>
|
|
8
9
|
</div>
|
|
9
|
-
|
|
10
|
+
<!-- /header__offcanvasButton -->
|
|
@@ -1,30 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
{% from "components/dropdown/_macro.dropdown.njk" import componentDropdown %}
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
3
|
+
<!-- header__subnav -->
|
|
4
|
+
{% if params.items %}
|
|
5
|
+
<div class="hidden lg:flex items-center">
|
|
6
|
+
<div class="py-2 relative border-r border-l border-neutral-base">
|
|
7
|
+
<p class="sr-only">Aplicación actual: </p>
|
|
8
|
+
{% set dropdownContent %}
|
|
9
|
+
{% call componentDropdown({
|
|
10
|
+
"text": params.text,
|
|
11
|
+
"html": params.html,
|
|
12
|
+
"hiddenText": params.hiddenText,
|
|
13
|
+
"classesContainer": params.classesContainer,
|
|
14
|
+
"classesTooltip": params.classesTooltip,
|
|
15
|
+
"classes": params.classes,
|
|
16
|
+
"attributes": params.attributes
|
|
17
|
+
}) %}
|
|
18
|
+
{% if caller %}
|
|
19
|
+
{{ caller() | indent(4) }} {#- if statement allows usage of `call` to be optional -#}
|
|
20
|
+
{% elseif params.caller %}
|
|
21
|
+
{{ params.caller | safe | indent(4) }}
|
|
22
|
+
{% endif %}
|
|
23
|
+
{% endcall %}
|
|
24
|
+
{% endset %}
|
|
25
|
+
{{ dropdownContent | trim | safe | indent(4) }}
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
{% else %}
|
|
29
|
+
<p class="hidden lg:inline-block align-middle px-3 py-4 border-r border-l border-neutral-base text-sm text-black">
|
|
30
|
+
<span class="sr-only">Aplicación actual: </span>
|
|
31
|
+
{{ params.html | safe if params.html else params.text }}
|
|
32
|
+
</p>
|
|
33
|
+
{% endif %}
|
|
34
|
+
<!-- /header__subnav -->
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
{% from "../skip-link/_macro.skip-link.njk" import componentSkipLink %}
|
|
2
|
+
{% from "./_macro.header.header__subnav.njk" import componentHeaderSubnav %}
|
|
3
|
+
{% from "../nav/_macro.nav.njk" import componentNav %}
|
|
4
|
+
{% from "./_macro.header.header__navigation.njk" import componentHeaderNavigation %}
|
|
5
|
+
{% from "./_macro.header.header__dropdown.njk" import componentHeaderDropdown %}
|
|
6
|
+
{% from "./_macro.header.header__offcanvasButton.njk" import componentHeaderOffcanvasButton %}
|
|
7
|
+
{% from "./_macro.header.header__offcanvas.njk" import componentOffcanvas %}
|
|
8
|
+
|
|
9
|
+
|
|
2
10
|
|
|
3
11
|
<!-- header -->
|
|
4
12
|
<header {%- if params.classes %} class="{{ params.classes }}"{% endif %} {%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
@@ -10,7 +18,7 @@
|
|
|
10
18
|
html: params.skipLink.html if params.skipLink.html,
|
|
11
19
|
text: params.skipLink.text if params.skipLink.text else "Saltar al contenido principal",
|
|
12
20
|
href: params.skipLink.href if params.skipLink.href else "#content"
|
|
13
|
-
}) }}
|
|
21
|
+
}) | indent(6) }}
|
|
14
22
|
</nav>
|
|
15
23
|
<div class="bg-neutral-lighter border-b border-neutral-base">
|
|
16
24
|
<div class="container mx-auto px-base">
|
|
@@ -25,7 +33,7 @@
|
|
|
25
33
|
{{ params.customLogoHtml | safe if params.customLogoHtml }}
|
|
26
34
|
</a>
|
|
27
35
|
{% if params.subnav %}
|
|
28
|
-
{%
|
|
36
|
+
{% set subnavContent %}
|
|
29
37
|
{% call componentHeaderSubnav({
|
|
30
38
|
"text": params.subnav.text,
|
|
31
39
|
"html": params.subnav.html,
|
|
@@ -37,32 +45,32 @@
|
|
|
37
45
|
"items": params.subnav.items
|
|
38
46
|
}) %}
|
|
39
47
|
{% if params.subnav.items %}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}) }}
|
|
48
|
+
{{ componentNav({
|
|
49
|
+
isMenu: true,
|
|
50
|
+
idPrefix: "header-subnav-nav-item",
|
|
51
|
+
items: params.subnav.items,
|
|
52
|
+
classes: "w-max max-w-64",
|
|
53
|
+
attributes: {
|
|
54
|
+
"id": "id-subnav-nav",
|
|
55
|
+
"aria-label": "Aplicaciones"
|
|
56
|
+
}
|
|
57
|
+
}) }}
|
|
51
58
|
{% endif %}
|
|
52
59
|
{% endcall %}
|
|
60
|
+
{% endset %}
|
|
61
|
+
{{ subnavContent | trim | safe | indent(14) }}
|
|
53
62
|
{% endif %}
|
|
54
63
|
{% if params.mobileTitle %}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
64
|
+
<div class="{{ params.mobileTitle.classes if params.mobileTitle.classes else 'inline-block lg:hidden max-w-full' }}" {%- for attribute, value in params.mobileTitle.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
|
|
65
|
+
{% if params.mobileTitle.html %}
|
|
66
|
+
{{ params.mobileTitle.html | safe }}
|
|
67
|
+
{% else %}
|
|
68
|
+
<p class="align-middle py-4 text-sm text-black overflow-hidden">{{ params.mobileTitle.text }}</p>
|
|
69
|
+
{% endif %}
|
|
70
|
+
</div>
|
|
62
71
|
{% endif %}
|
|
63
72
|
</div>
|
|
64
73
|
{% if params.navigation.items %}
|
|
65
|
-
{% from "./_macro.header.header__navigation.njk" import componentHeaderNavigation %}
|
|
66
74
|
{{ componentHeaderNavigation({
|
|
67
75
|
classes: params.navigation.classes,
|
|
68
76
|
idPrefix: "header-nav-item",
|
|
@@ -75,54 +83,56 @@
|
|
|
75
83
|
</div>
|
|
76
84
|
{{ params.customNavigationHtml | safe if params.customNavigationHtml }}
|
|
77
85
|
{% if params.dropdown.items or params.dropdown.contentHtml %}
|
|
78
|
-
{%
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
{%
|
|
103
|
-
{%
|
|
86
|
+
{% set headerDropdownContent %}
|
|
87
|
+
{% call componentHeaderDropdown({
|
|
88
|
+
"text": params.dropdown.text,
|
|
89
|
+
"html": params.dropdown.html,
|
|
90
|
+
"hiddenText": params.dropdown.hiddenText,
|
|
91
|
+
"classesContainer": params.dropdown.classesContainer if params.dropdown.classesContainer else "hidden lg:block",
|
|
92
|
+
"classesTooltip": params.dropdown.classesTooltip,
|
|
93
|
+
"classes": params.dropdown.classes if params.dropdown.classes else "c-dropdown--header",
|
|
94
|
+
"attributes": params.dropdown.attributes
|
|
95
|
+
}) %}
|
|
96
|
+
{% if params.dropdown.contentHtml %}
|
|
97
|
+
{{ params.dropdown.contentHtml | safe }}
|
|
98
|
+
{% else %}
|
|
99
|
+
{{ componentNav({
|
|
100
|
+
isMenu: true,
|
|
101
|
+
idPrefix: "header-dropdown-nav-item",
|
|
102
|
+
items: params.dropdown.items,
|
|
103
|
+
classes: "w-max max-w-64",
|
|
104
|
+
attributes: {
|
|
105
|
+
"id": "id-dropdown-nav",
|
|
106
|
+
"aria-label": "Menú de usuario"
|
|
107
|
+
}
|
|
108
|
+
}) | indent(4) }}
|
|
109
|
+
{% endif %}
|
|
110
|
+
{% endcall %}
|
|
111
|
+
{% endset %}
|
|
112
|
+
{{ headerDropdownContent | trim | safe | indent(10) }}
|
|
104
113
|
{% endif %}
|
|
105
114
|
{% if params.offcanvas %}
|
|
106
|
-
{% from "./_macro.header.header__offcanvasButton.njk" import componentHeaderOffcanvasButton %}
|
|
107
115
|
{{ componentHeaderOffcanvasButton({
|
|
108
116
|
text: params.offcanvas.text,
|
|
109
117
|
classes: params.offcanvas.classes
|
|
110
|
-
}) | indent(
|
|
118
|
+
}) | indent(10) }}
|
|
111
119
|
{% endif %}
|
|
112
120
|
</div>
|
|
113
121
|
</div>
|
|
114
122
|
{% if params.offcanvas %}
|
|
115
|
-
{%
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
{% set offcanvasContent %}
|
|
124
|
+
{% call componentOffcanvas({
|
|
125
|
+
text: params.offcanvas.textClose,
|
|
126
|
+
labelledId: params.offcanvas.labelledId
|
|
127
|
+
}) %}
|
|
128
|
+
{% if caller %}
|
|
129
|
+
{{ caller() }} {#- if statement allows usage of `call` to be optional -#}
|
|
130
|
+
{% elseif params.caller %}
|
|
131
|
+
{{ params.caller | safe }}
|
|
132
|
+
{% endif %}
|
|
133
|
+
{% endcall %}
|
|
134
|
+
{% endset %}
|
|
135
|
+
{{ offcanvasContent | safe | indent(6) }}
|
|
126
136
|
{% endif %}
|
|
127
137
|
</div>
|
|
128
138
|
</div>
|