Browse Source

lépe fungující dvouřádkové menu - zalomený Aktuální ročník

export_seznamu_prednasek
Kateřina Čížková 5 years ago
parent
commit
e10df898df
  1. 22
      mamweb/static/css/mamweb.css
  2. 16
      mamweb/static/images/logo.svg
  3. 10598
      mamweb/static/js/jquery-3.4.1.js
  4. 8
      mamweb/templates/base.html
  5. 20
      mamweb/templates/menu.html

22
mamweb/static/css/mamweb.css

@ -184,14 +184,6 @@ h1 {
display: none;
}
#header img.header {
margin: -25px 20px 0px 0px;
height: 145px;
float: right;
visibility: hidden;
}
/* Menu */
div.menu.mobile {
@ -217,8 +209,7 @@ img.decor { /*todo bug při zmenšování okna */
ul.menu {
width: 100%;
padding: 0px;
margin: 20px 0px 0px 0px;
padding: 6px 0px 0px 0px;
margin-top: -2px; /* posune celé menu nahoru (pak potřeba zvětšit mezeru mezi menu a submenu) */
font-variant: small-caps;
}
@ -232,21 +223,20 @@ ul.menu li>a:active {
}
ul.menu li {
margin: 0px;
display: inline-block;
width: 16.3%;
min-width: 140px;
width: 16.666667%;
text-align: center;
font-size: 140%;
font-weight: 400;
}
}
ul.submenu {
background-color: #e84e10;
margin: 10px 0px 10px 0px;
margin-top: 10px; /* mezera mezi hlavním menu a submenu */
margin-bottom: 10px;
padding-top: 10px;
padding-bottom: 5px;
filter: drop-shadow(0px 5px 5px rgba(0, 0, 0, 0.4));

16
mamweb/static/images/logo.svg

@ -33,9 +33,9 @@
inkscape:window-height="1025"
id="namedview4"
showgrid="true"
inkscape:zoom="19.0297"
inkscape:cx="64.63195"
inkscape:cy="117.6539"
inkscape:zoom="9.51485"
inkscape:cx="566.94"
inkscape:cy="61.208154"
inkscape:window-x="67"
inkscape:window-y="27"
inkscape:window-maximized="1"
@ -106,21 +106,21 @@
id="path42-2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" /><path
d="M 2792.0033,2993.0545 H 1454.1407 v 687.8333 l 1337.8626,-211.9864 z"
d="m 2782.5001,2992.5001 -1320.0001,7.5 0,675 1320.0001,142.5 z"
style="fill:#f7cb87;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.53136837"
id="path42-2-8"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" /><path
d="M 4156.0985,2993.0545 H 2844.4684 v 468.9454 l 1009.9552,-123.1246 301.6749,123.1246 z"
d="m 4230.0001,3000.0001 -1385.5317,-6.9456 -1.9683,836.0955 682.5,70.8501 705,-135 z"
style="fill:#f7cb87;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.53136837"
id="path42-2-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccc" /><path
d="M 5572.6587,2993.0545 H 4208.5636 v 496.3063 l 996.8387,396.7346 367.2564,-369.3736 z"
d="m 5572.6587,2993.0545 -1275.1586,6.9456 0,750 c 447.4577,-91.9242 831.2767,-184.4136 1275,-292.5 z"
style="fill:#f9d59e;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.53136837"
id="path42-2-9"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccc" /><path
sodipodi:nodetypes="ccccc" /><path
d="M 6962.9865,3460.9062 V 2999.9859 H 5625.1239 v 460.9203 h 1337.8626"
style="fill:#f9d59e;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.53136837"
id="path42-2-6"
@ -156,7 +156,7 @@
id="path14-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" /><path
d="m 6018.6128,4022.9004 -419.7215,-465.137 -354.14,355.693 432.8377,437.776 z"
d="m 6018.6128,4022.9004 -448.7048,-497.9003 -596.039,138.7541 703.72,687.4782 z"
style="fill:#fbe1b8;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.5409205"
id="path42-2-6-9"
inkscape:connector-curvature="0"

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

10598
mamweb/static/js/jquery-3.4.1.js

File diff suppressed because it is too large

8
mamweb/templates/base.html

@ -60,7 +60,6 @@
<div id="header" class="{% if noc %}NOC{% endif %}{% block header %}{% endblock %}">
<img class="logo" src="{% static 'images/logo.svg' %}" />
<img class="logo-mobile" src="{% static 'images/logo-mobile.svg' %}" />
<!--<h1>{% block nadpis1b %}Nadpis 1. úrovně{% endblock %}</h1>-->
</div>
</a>
</div>
@ -69,14 +68,11 @@
<div class='col-md-12'>
{# ========= MENU ========== #}
{% sitetree_menu from "main_menu" include "trunk" template "menu.html" %}
{% sitetree_menu from "main_menu" include "trunk" template "menu.html" %}
<div class='row content'>
<div class='col-md-12'>
<div class='col-md-12'>
{% block content %}
{% endblock content %}
</div>

20
mamweb/templates/menu.html

@ -1,34 +1,24 @@
{% load sitetree %}
{% spaceless %}
{% autoescape off %}
<ul class="menu">
{% for item in sitetree_items %}
<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="{% 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 %}
<div class="submenu-newline">
</div>
<script>
$( ".submenu" ).prependTo( ".submenu-newline" ); {# api.jquery.com/prependTo #}
</script>
</ul>
{% endautoescape %}
{% endspaceless %}

Loading…
Cancel
Save