Revision 7adc5519
Von Sven Schöling vor etwa 12 Jahren hinzugefügt
templates/webpages/menu/menu.html | ||
---|---|---|
7 | 7 |
#html-menu img { vertical-align: middle; visibility:hidden; border: 0; } |
8 | 8 |
#html-menu div.menuitem:first-child img { visibility:visible } |
9 | 9 |
#html-menu a { vertical-align: top } |
10 |
#html-menu .item span.menu-spacer { display: inline-block; width: 24px } |
|
11 |
#html-menu .menu span.menu-spacer { display: inline-block; width: 32px } |
|
10 | 12 |
</style> |
11 | 13 |
<body class="menu"> |
12 | 14 |
|
13 | 15 |
<div id='html-menu'> |
14 |
|
|
16 |
[% INCLUDE sections %] |
|
17 |
</div> |
|
18 |
</body> |
|
19 |
</html> |
|
20 |
[%- BLOCK sections %] |
|
15 | 21 |
[%- FOREACH item IN sections %] |
16 | 22 |
<div class='menu-multiline'> |
23 |
[% SET menuouterloopcount = loop.count %] |
|
17 | 24 |
[%- FOREACH chunk IN item.chunks %] |
18 |
<div class='menuitem [% item.class %] hover'>[% item.spacer %] |
|
19 |
[%- IF item.href %] |
|
20 |
[% L.link(item.href, L.html_tag('img', undef, item.img) _ chunk, target=item.target) %] |
|
21 |
[%- ELSE %] |
|
22 |
[% L.html_tag('img', undef, item.img) _ chunk %] |
|
23 |
[%- END %] |
|
24 |
</div> |
|
25 |
<div id='menuitem[% menulevel %]_[% menuouterloopcount %]' class='menuitem [% item.class %] hover'>[% PROCESS item %]</div> |
|
25 | 26 |
[%- END %] |
27 |
[%- IF item.subitems.size %] |
|
28 |
<div id='menuitem[% menulevel %]_[% loop.count %]_submenu'> |
|
29 |
[% INCLUDE sections sections=item.subitems, menulevel='_'+loop.count %] |
|
30 |
</div> |
|
31 |
[%- END %] |
|
26 | 32 |
</div> |
27 | 33 |
[%- END %] |
28 |
</div> |
|
34 |
[%- END %] |
|
35 |
[%- BLOCK item %] |
|
36 |
[% item.spacer %] |
|
37 |
[%- IF item.href %] |
|
38 |
[% L.link(item.href, L.html_tag('span', L.html_tag('img', undef, item.img), class='menu-spacer') _ chunk, target=item.target) %] |
|
39 |
[%- ELSE %] |
|
40 |
[% L.html_tag('img', undef, item.img) _ chunk %] |
|
41 |
[%- END %] |
|
42 |
[%- END %] |
|
43 |
|
|
29 | 44 |
</body> |
30 |
</html> |
|
45 |
|
|
46 |
<script type='text/javascript'> |
|
47 |
$(function(){ |
|
48 |
$('#html-menu div[id$=submenu]').hide(); |
|
49 |
$('#html-menu div.menu').each(function() { |
|
50 |
$(this).click(function(){ |
|
51 |
$('#' + $(this).attr('id') + '_submenu').toggle(); |
|
52 |
}); |
|
53 |
}); |
|
54 |
}); |
|
55 |
</script> |
Auch abrufbar als: Unified diff
auf volle anzeige und javascript umgestellt
bugs:
- ausklappen klappt nicht alles andere ein
- ausklappen klappt berichte und abwärts nicht mit aus
- interne nummerierung ist noch bogus