|
1 | 1 | <!DOCTYPE html> |
2 | 2 | <html> |
3 | | - <head> |
4 | | - <meta charset="UTF-8"> |
5 | | - <meta name="viewport" content="width=device-width, initial-scale=1"> |
6 | | - <title>{% block title '' %}</title> |
7 | | - {% block stylesheets %}{% endblock %} |
8 | | - </head> |
9 | | - <body> |
10 | | - {% block body %} |
11 | | - {% block header %} |
12 | | - <header class="header"> |
13 | | - {% block logo_link %} |
14 | | - <a href="/" class="logo">{% block logo 'LOGO' %}</a> |
15 | | - {% endblock %} |
16 | | - {% block nav_primary %} |
17 | | - <nav class="primary-nav"> |
18 | | - <ul> |
19 | | - {% set item_class = 'primary-nav__item' %} |
20 | | - {% set item_active_class = 'primary-nav__item--active' %} |
21 | | - {% for item in menu_primary|default([]) %} |
22 | | - {% block menu_item %} |
23 | | - <li class="{{ item_class|default('') }} {{ item is active ? item_active_class|default('') : '' }}"> |
24 | | - {% block menu_item_link %} |
25 | | - <a href="{{ menu_path(item) }}" class="{{ link_class|default('') }}"> |
26 | | - {% if item.icon|default(false) %} |
27 | | - <i class="icon icon--{{ item.icon }}" aria-hidden="true"></i> |
28 | | - {% endif %} |
29 | | - {{ item.label }} |
30 | | - </a> |
31 | | - {% endblock %} |
| 3 | +<head> |
| 4 | + <meta charset="UTF-8"> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 6 | + <title>{% block title '' %}</title> |
| 7 | + {% block stylesheets %}{% endblock %} |
| 8 | +</head> |
| 9 | +<body> |
| 10 | + {% block body %} |
| 11 | + {% block header %} |
| 12 | + <header class="header"> |
| 13 | + {% block logo_link %} |
| 14 | + <a href="/" class="logo">{% block logo 'LOGO' %}</a> |
| 15 | + {% endblock %} |
| 16 | + {% block nav_primary %} |
| 17 | + <nav class="primary-nav"> |
| 18 | + <ul> |
| 19 | + {% set item_class = 'primary-nav__item' %} |
| 20 | + {% set item_active_class = 'primary-nav__item--active' %} |
| 21 | + {% for item in menu_primary|default([]) %} |
| 22 | + {% block menu_item %} |
| 23 | + <li class="{{ item_class|default('') }} {{ item is active ? item_active_class|default('') : '' }}"> |
| 24 | + {% block menu_item_link %} |
| 25 | + <a href="{{ menu_path(item) }}" class="{{ link_class|default('') }}"> |
| 26 | + {% if item.icon|default(false) %} |
| 27 | + <i class="icon icon--{{ item.icon }}" aria-hidden="true"></i> |
| 28 | + {% endif %} |
| 29 | + {{ item.label }} |
| 30 | + </a> |
| 31 | + {% endblock %} |
| 32 | + </li> |
| 33 | + {% endblock %} |
| 34 | + {% endfor %} |
| 35 | + </ul> |
| 36 | + </nav> |
| 37 | + {% endblock %} |
| 38 | + {% block nav_user %} |
| 39 | + {% if app.user %} |
| 40 | + {% block nav_user_authenticated %} |
| 41 | + <div class="user-menu drop drop--down"> |
| 42 | + <button class="user-menu__button drop__button"> |
| 43 | + {% block user_menu_label app.user|default('Jane doe') %} |
| 44 | + </button> |
| 45 | + <ul class="user-menu__content drop__menu"> |
| 46 | + {% for item in menu_user|default([]) %} |
| 47 | + {{ block('menu_item') }} |
| 48 | + {% endfor %} |
| 49 | + </ul> |
| 50 | + </div> |
| 51 | + {% endblock %} |
| 52 | + {% else %} |
| 53 | + {% block nav_user_anonymous %} |
| 54 | + <ul class="user-menu"> |
| 55 | + {% set item_class = 'user-menu__button' %} |
| 56 | + {% set item_active_class = 'user-menu__button--active' %} |
| 57 | + {% for item in menu_anonymous|default([]) %} |
| 58 | + {{ block('menu_item') }} |
| 59 | + {% endfor %} |
| 60 | + </ul> |
| 61 | + {% endblock %} |
| 62 | + {% endif %} |
| 63 | + {% endblock %} |
| 64 | + <button class="menu-button"></button> |
| 65 | + </header> |
| 66 | + {% endblock %} |
| 67 | + {% block nav_mobile %} |
| 68 | + <div class="mobile-nav"> |
| 69 | + <ul class="tree"> |
| 70 | + {% for item in menu_mobile|default([]) %} |
| 71 | + <li class="mobile-nav__item mobile-nav__item--primary tree-item {{ item is active ? 'mobile-nav__item--active' : '' }}"> |
| 72 | + <a class="{{ item.children|default(false) ? 'tree-item__trigger' : '' }}" href="{{ menu_path(item) }}"> |
| 73 | + {% if item.icon|default(false) %} |
| 74 | + <i class="icon icon--{{ item.icon }}" aria-hidden="true"></i> |
| 75 | + {% endif %} |
| 76 | + {{ item.label }} |
| 77 | + </a> |
| 78 | + {% if item.children|default(false) %} |
| 79 | + <ul class="tree-item__content tree"> |
| 80 | + {% for secondary_item in item.children %} |
| 81 | + <li class="mobile-nav__item tree-item mobile-nav__item--secondary {{ secondary_item is active ? 'mobile-nav__item--active' : '' }}"> |
| 82 | + <a href="{{ menu_path(secondary_item) }}" class="{{ secondary_item.children|default(false) ? 'tree-item__trigger' : '' }}"> |
| 83 | + {% if secondary_item.icon|default(false) %} |
| 84 | + <i class="icon icon--{{ secondary_item.icon }}" aria-hidden="true"></i> |
| 85 | + {% endif %} |
| 86 | + {{ secondary_item.label }} |
| 87 | + </a> |
| 88 | + {% if secondary_item.children|default(false) %} |
| 89 | + <ul class="tree-item__content"> |
| 90 | + {% for tertiary_item in secondary_item.children %} |
| 91 | + <li class="mobile-nav__item mobile-nav__item--tertiary {{ tertiary_item is active ? 'mobile-nav__item--active' : '' }}"> |
| 92 | + <a href="{{ menu_path(tertiary_item) }}"> |
| 93 | + {% if tertiary_item.icon|default(false) %} |
| 94 | + <i class="icon icon--{{ tertiary_item.icon }}" aria-hidden="true"></i> |
| 95 | + {% endif %} |
| 96 | + {{ tertiary_item.label }} |
| 97 | + </a> |
| 98 | + </li> |
| 99 | + {% endfor %} |
| 100 | + </ul> |
| 101 | + {% endif %} |
32 | 102 | </li> |
33 | | - {% endblock %} |
| 103 | + {% endfor %} |
| 104 | + </ul> |
| 105 | + {% endif %} |
| 106 | + </li> |
| 107 | + {% endfor %} |
| 108 | + </ul> |
| 109 | + </div> |
| 110 | + {% endblock %} |
| 111 | + {% block main %} |
| 112 | + <main> |
| 113 | + {% block nav_secondary %} |
| 114 | + {% if menu_secondary is defined %} |
| 115 | + <nav class="secondary-nav"> |
| 116 | + <ul> |
| 117 | + {% set item_class = 'secondary-nav__item' %} |
| 118 | + {% set item_active_class = 'secondary-nav__item--active' %} |
| 119 | + {% for item in menu_secondary %} |
| 120 | + {{ block('menu_item') }} |
34 | 121 | {% endfor %} |
35 | 122 | </ul> |
36 | 123 | </nav> |
37 | | - {% endblock %} |
38 | | - {% block nav_user %} |
39 | | - {% if app.user %} |
40 | | - {% block nav_user_authenticated %} |
41 | | - <div class="user-menu drop drop--down"> |
42 | | - <button class="user-menu__button drop__button"> |
43 | | - {% block user_menu_label app.user|default('Jane doe') %} |
44 | | - </button> |
45 | | - <ul class="user-menu__content drop__menu"> |
46 | | - {#% set item_class = '' %#} |
47 | | - {#% set item_active_class = '' %#} |
48 | | - {% for item in menu_user|default([]) %} |
| 124 | + {% endif %} |
| 125 | + {% endblock %} |
| 126 | + {% block content %} |
| 127 | + <div class="content"> |
| 128 | + {% block flash include('@ElaoAdminTheme/components/flash.html.twig') %} |
| 129 | + {% block nav_tertiary %} |
| 130 | + {% if menu_tertiary is defined %} |
| 131 | + <nav class="tertiary-nav"> |
| 132 | + <ul> |
| 133 | + {% set item_class = 'tertiary-nav__item' %} |
| 134 | + {% set item_active_class = 'tertiary-nav__item--active' %} |
| 135 | + {% for item in menu_tertiary %} |
49 | 136 | {{ block('menu_item') }} |
50 | 137 | {% endfor %} |
51 | 138 | </ul> |
52 | | - </div> |
53 | | - {% endblock %} |
54 | | - {% else %} |
55 | | - {% block nav_user_anonymous %} |
56 | | - <ul class="user-menu"> |
57 | | - {% set item_class = 'user-menu__button' %} |
58 | | - {% set item_active_class = 'user-menu__button--active' %} |
59 | | - {% for item in menu_anonymous|default([]) %} |
60 | | - {{ block('menu_item') }} |
61 | | - {% endfor %} |
62 | | - </ul> |
63 | | - {% endblock %} |
64 | | - {% endif %} |
65 | | - {% endblock %} |
66 | | - <button class="menu-button"></button> |
67 | | - </header> |
68 | | - {% endblock %} |
69 | | - {% block nav_mobile %} |
70 | | - <div class="mobile-nav"> |
71 | | - <ul class="tree"> |
72 | | - {% for item in menu_mobile|default([]) %} |
73 | | - <li class="mobile-nav__item mobile-nav__item--primary tree-item {{ item is active ? 'mobile-nav__item--active' : '' }}"> |
74 | | - <a class="{{ item.children|default(false) ? 'tree-item__trigger' : '' }}" href="{{ menu_path(item) }}"> |
75 | | - {% if item.icon|default(false) %} |
76 | | - <i class="icon icon--{{ item.icon }}" aria-hidden="true"></i> |
77 | | - {% endif %} |
78 | | - {{ item.label }} |
79 | | - </a> |
80 | | - {% if item.children|default(false) %} |
81 | | - <ul class="tree-item__content tree"> |
82 | | - {% for secondary_item in item.children %} |
83 | | - <li class="mobile-nav__item tree-item mobile-nav__item--secondary {{ secondary_item is active ? 'mobile-nav__item--active' : '' }}"> |
84 | | - <a href="{{ menu_path(secondary_item) }}" class="{{ secondary_item.children|default(false) ? 'tree-item__trigger' : '' }}"> |
85 | | - {% if secondary_item.icon|default(false) %} |
86 | | - <i class="icon icon--{{ secondary_item.icon }}" aria-hidden="true"></i> |
87 | | - {% endif %} |
88 | | - {{ secondary_item.label }} |
89 | | - </a> |
90 | | - {% if secondary_item.children|default(false) %} |
91 | | - <ul class="tree-item__content"> |
92 | | - {% for tertiary_item in secondary_item.children %} |
93 | | - <li class="mobile-nav__item mobile-nav__item--tertiary {{ tertiary_item is active ? 'mobile-nav__item--active' : '' }}"> |
94 | | - <a href="{{ menu_path(tertiary_item) }}"> |
95 | | - {% if tertiary_item.icon|default(false) %} |
96 | | - <i class="icon icon--{{ tertiary_item.icon }}" aria-hidden="true"></i> |
97 | | - {% endif %} |
98 | | - {{ tertiary_item.label }} |
99 | | - </a> |
100 | | - </li> |
101 | | - {% endfor %} |
102 | | - </ul> |
103 | | - {% endif %} |
104 | | - </li> |
105 | | - {% endfor %} |
106 | | - </ul> |
107 | | - {% endif %} |
108 | | - </li> |
109 | | - {% endfor %} |
110 | | - </ul> |
111 | | - </div> |
112 | | - {% endblock %} |
113 | | - {% block main %} |
114 | | - <main> |
115 | | - {% block nav_secondary %} |
116 | | - {% if menu_secondary is defined %} |
117 | | - <nav class="secondary-nav"> |
118 | | - <ul> |
119 | | - {% set item_class = 'secondary-nav__item' %} |
120 | | - {% set item_active_class = 'secondary-nav__item--active' %} |
121 | | - {% for item in menu_secondary %} |
122 | | - {{ block('menu_item') }} |
123 | | - {% endfor %} |
124 | | - </ul> |
125 | | - </nav> |
126 | | - {% endif %} |
127 | | - {% endblock %} |
128 | | - {% block content_container %} |
129 | | - <div class="content"> |
130 | | - {% block nav_tertiary %} |
131 | | - {% if menu_tertiary is defined %} |
132 | | - <nav class="tertiary-nav"> |
133 | | - <ul> |
134 | | - {% set item_class = 'tertiary-nav__item' %} |
135 | | - {% set item_active_class = 'tertiary-nav__item--active' %} |
136 | | - {% for item in menu_tertiary %} |
137 | | - {{ block('menu_item') }} |
138 | | - {% endfor %} |
139 | | - </ul> |
140 | | - </nav> |
141 | | - {% endif %} |
142 | | - {% endblock %} |
143 | | - <div class="container {% block content_class '' %}"> |
144 | | - {% block content '' %} |
| 139 | + </nav> |
| 140 | + {% endif %} |
| 141 | + {% endblock %} |
| 142 | + {% block page_content %} |
| 143 | + <div class="container"> |
| 144 | + |
145 | 145 | </div> |
146 | | - </div> |
147 | | - {% endblock %} |
148 | | - </main> |
149 | | - {% endblock %} |
| 146 | + {% endblock %} |
| 147 | + </div> |
| 148 | + {% endblock %} |
| 149 | + </main> |
150 | 150 | {% endblock %} |
151 | | - {% block javascripts %}{% endblock %} |
152 | | - </body> |
| 151 | + {% endblock %} |
| 152 | + {% block javascripts %}{% endblock %} |
| 153 | +</body> |
153 | 154 | </html> |
0 commit comments