Browse Source

menu ve dvou řádcích

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

33
mamweb/static/css/mamweb.css

@ -267,6 +267,7 @@ img.decor { /*todo bug při zmenšování okna */
ul.row-menu {
background-color: green;
display: inline-block;
}
div.menu-item {
@ -274,20 +275,42 @@ div.menu-item {
background-color: yellow;
}
li.active {
div.menu-item li.active {
background-color: black;
}
ul.row-submenu {
background-color: green;
ul.row-menu li {
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 {
display: block;
ul.row-submenu {
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 */
#submenu {

4
mamweb/templates/menu.html

@ -4,11 +4,11 @@
<div class="menu-item">
<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 }}
</a>
<div class="submenu">
{% if item.has_children %}
{% if item.is_current or item.in_current_branch %}
<div class="submenu active">
{% sitetree_children of item for menu template "submenu.html" %}
</div>

2
mamweb/templates/submenu.html

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

Loading…
Cancel
Save