Revision c5657fe8
Von Sven Schöling vor etwa 12 Jahren hinzugefügt
templates/webpages/menu/menu.html | ||
---|---|---|
2 | 2 |
<body class="menu"> |
3 | 3 |
|
4 | 4 |
<div id='html-menu'> |
5 |
[% INCLUDE sections %]
|
|
5 |
[% PROCESS sections %]
|
|
6 | 6 |
</div> |
7 | 7 |
<script type='text/javascript'> |
8 | 8 |
$(function(){ |
... | ... | |
19 | 19 |
</html> |
20 | 20 |
[%- BLOCK sections %] |
21 | 21 |
[%- FOREACH item IN sections %] |
22 |
<div class='menu-multiline'> |
|
23 |
[% SET menuouterloopcount = loop.count %] |
|
24 |
<div id='menuitem[% menulevel %]_[% menuouterloopcount %]' class='menuitem [% item.class %] hover'> |
|
25 |
[%- FOREACH chunk IN item.chunks %] |
|
26 |
<div class='menuitemchunk hover'>[% PROCESS item %]</div> |
|
27 |
[%- END %] |
|
28 |
</div> |
|
29 |
[%- IF item.subitems.size %] |
|
30 |
<div id='menuitem[% menulevel %]_[% loop.count %]_submenu' class='menu-submenu[% menulevel %]'> |
|
31 |
[% INCLUDE sections sections=item.subitems, menulevel= menulevel _ '_' _ loop.count %] |
|
32 |
</div> |
|
33 |
[%- END %] |
|
34 |
</div> |
|
35 |
[%- END %] |
|
36 |
[%- END %] |
|
37 |
[%- BLOCK item %] |
|
38 |
[% item.spacer %] |
|
22 |
<div id='menuitem[% menulevel %]_[% loop.count %]' class='menuitem menuitemchunk [% item.spacer %] [% item.class %] hover'> |
|
39 | 23 |
[%- IF item.href %] |
40 |
[% L.link(item.href, L.html_tag('span', L.img_tag(item.img), class='menu-spacer') _ chunk, class='menu-link', target=item.target) %]
|
|
24 |
<a href="[% item.href | html %]" class='menu-link' target='[% item.target %]'><span class="menuitemicon menu-spacer">[% L.img_tag(item.img) %]</span><span class='menuitemchunk hover'>[% item.label %]</span></a>
|
|
41 | 25 |
[%- ELSE %] |
42 |
[% L.html_tag('span', L.img_tag(item.img), class='menu-spacer') _ chunk %]
|
|
26 |
<span class="menuitemicon menu-spacer">[% L.img_tag(item.img) %]</span><span class='menuitemchunk hover'>[% item.label %]</span>
|
|
43 | 27 |
[%- END %] |
28 |
</div> |
|
29 |
[%- IF item.subitems.size %] |
|
30 |
<div id='menuitem[% menulevel %]_[% loop.count %]_submenu' class='menu-submenu[% menulevel %]'> |
|
31 |
[% INCLUDE sections sections=item.subitems, menulevel= menulevel _ '_' _ loop.count %] |
|
32 |
</div> |
|
33 |
[%- END %] |
|
44 | 34 |
[%- END %] |
35 |
[%- END %] |
Auch abrufbar als: Unified diff
dom objekte reduziert, spacer entfernt, rendering auf 150ms beschleunigt