Browse Source

menu ve dvou řádcích

export_seznamu_prednasek
Kateřina Čížková 5 years ago
parent
commit
14304132db
  1. 35
      mamweb/static/css/mamweb.css
  2. 4
      mamweb/templates/menu.html
  3. 2
      mamweb/templates/submenu.html

35
mamweb/static/css/mamweb.css

@ -267,6 +267,7 @@ img.decor { /*todo bug při zmenšování okna */
ul.row-menu { ul.row-menu {
background-color: green; background-color: green;
display: inline-block;
} }
div.menu-item { div.menu-item {
@ -274,19 +275,41 @@ div.menu-item {
background-color: yellow; background-color: yellow;
} }
li.active {
div.menu-item li.active {
background-color: black; background-color: black;
} }
ul.row-submenu { ul.row-menu li {
background-color: green;
display: inline-block; display: inline-block;
} border-radius: 0px;
padding: 6px 0px 0px 0px;
width: 16.66%;
min-width: 140px;
text-align: center;
font-size: 140%;
font-weight: 400;
font-variant: small-caps;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
}
div.submenu.active { ul.row-submenu {
display: block; position: absolute;
left: -400px;
} }
ul.row-submenu li {
background-color: red;
padding: 0px;
min-width: 100px;
font-size:80%;
display: inline-block;
}
/* konec testování nového menu */ /* konec testování nového menu */

4
mamweb/templates/menu.html

@ -4,11 +4,11 @@
<div class="menu-item"> <div class="menu-item">
<li class="{% if item.has_children %}dropdown{% endif %} {% if item.is_current or item.in_current_branch %}active{% endif %}" > <li class="{% if item.has_children %}dropdown{% endif %} {% if item.is_current or item.in_current_branch %}active{% endif %}" >
<a href="{% if item.has_children %}#{% else %}{% sitetree_url for item %}{% endif %}" {% if item.has_children %} class="dropdown-toggle" data-toggle="dropdown" {% endif %}> <a href="{% sitetree_url for item %}" >
{{ item.title_resolved }} {{ item.title_resolved }}
</a> </a>
<div class="submenu"> <div class="submenu">
{% if item.has_children %} {% if item.is_current or item.in_current_branch %}
<div class="submenu active"> <div class="submenu active">
{% sitetree_children of item for menu template "submenu.html" %} {% sitetree_children of item for menu template "submenu.html" %}
</div> </div>

2
mamweb/templates/submenu.html

@ -1,4 +1,5 @@
{% load sitetree %} {% load sitetree %}
<div class="submenu">
<ul class="row-submenu"> <ul class="row-submenu">
{% for item in sitetree_items %} {% for item in sitetree_items %}
<li {% if item.is_current or item.in_current_branch %}class="active"{% endif %}> <li {% if item.is_current or item.in_current_branch %}class="active"{% endif %}>
@ -6,3 +7,4 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</div>

Loading…
Cancel
Save