Web M&M
https://mam.matfyz.cz
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.1 KiB
29 lines
1.1 KiB
{% load sitetree %}
|
|
{% spaceless %}
|
|
{% autoescape off %}
|
|
<ul class="menu">
|
|
{% for item in sitetree_items %}
|
|
<li class="dropdown {% if item.is_current or item.in_current_branch %}active{% endif %}"
|
|
style="{% if item.title == "HIDDEN" %}display:none{% endif %}"
|
|
>
|
|
<a href="{% sitetree_url for item %}" >
|
|
{{ item.title_resolved }}
|
|
</a>
|
|
<div class="submenu">
|
|
{% if item.is_current or item.in_current_branch %}
|
|
{% sitetree_children of item for menu template "submenu.html" %}
|
|
{% endif %}
|
|
</div>
|
|
</li>
|
|
{% endfor %}
|
|
{# Jelikož položka hlavního menu a první položka submenu ukazují na totéž, může se stát, že bude aktivní je položka hlavního menu. Ale chceme zvíraznit i tu první submenu. for + if = any() #}
|
|
<div {% for item in sitetree_items %}{% if item.is_current %}class="parentactive"{% endif %}{% endfor %}>
|
|
<div class="submenu-newline">
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$( ".submenu" ).prependTo( ".submenu-newline" ); {# api.jquery.com/prependTo #}
|
|
</script>
|
|
</ul>
|
|
{% endautoescape %}
|
|
{% endspaceless %}
|
|
|