diff --git a/mamweb/static/css/mamweb.css b/mamweb/static/css/mamweb.css index 41a63c40..a075228e 100644 --- a/mamweb/static/css/mamweb.css +++ b/mamweb/static/css/mamweb.css @@ -71,8 +71,8 @@ h2 { #header img.logo { position: absolute; - top: 20px; - left: 45px; + top: 40px; + left: 55px; } #header h1 { font-size: 130%; @@ -90,18 +90,24 @@ h2 { /* Menu */ -#menu { +div.menu.mobile { + display: none; +} +div.menu.desktop { + display: block; +} +div.menu { position: relative; top: -10px; z-index: 10; background: url("../images/menu-bg.png") no-repeat left top; height: 60px; } -#menu ul { +div.menu ul { padding: 0px; margin: 0px; } -#menu li { +div.menu li { display: inline-block; border-radius: 0px; @@ -116,19 +122,19 @@ h2 { border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; } -#menu a { +div.menu a { display: block; padding: 8px 10px; color: #006400; height: 48px; } -#menu a:hover { +div.menu a:hover { background: url("../images/menu-bg-selected.png") no-repeat left -7px; background-size: 100% 68px; text-decoration: none; color: #003c00; } -#menu li.selected a { +div.menu li.selected a { background: url("../images/menu-bg-selected.png") no-repeat left -7px; background-size: 100% 68px; text-decoration: none; @@ -234,11 +240,11 @@ div.zadani_azad_termin { background-size: 100% 100%; } #header img.logo { - top: 15px; - left: 25px; - height: 170px; + top: 27px; + left: 35px; + height: 140px; } - #menu li { + div.menu li { min-width: 120px; font-size: 130%; } @@ -274,3 +280,81 @@ div.zadani_azad_termin { float: left; } } + +@media (max-width: 767px) { + #header { + width: 100%; + height: 196px; + height: 0px; + background-size: 100%; + padding-bottom: 25%; + } + #header img.logo { + top: 0px; + left: 0px; + height: 100%; + } + div.menu { + height: auto; + } + div.menu li { + display: block; + width: 100%; + height: 35px; + font-size: 130%; + } + #submenu { + background: none; + height: auto; + margin-left: 90px; + margin-top: 15px; + } + #submenu ul { + font-size: 110%; + } + #submenu li { + display: inline-block; + margin: 5px 8px; + border-radius: 30px; + background: #ffd546; + height: auto; + } + #submenu li a:hover, #submenu li.selected { + background: #ffd546; + } + div.menu.mobile { + display: block; + position: absolute; + top: -1px; + background: none; + } + div.menu.mobile > div.dropdown > button { + font-size: 20px; + } + div.menu.mobile > div.dropdown > ul { + margin: 0px; + padding: 0px; + border-radius: 0px; + } + div.menu.mobile > div.dropdown > ul > li { + margin: 0px; + padding: 0px; + display: block; + font-size: 20px; + background: none; + font-variant: normal; + height: auto; + } + div.menu.mobile > div.dropdown > ul > li > a { + margin: 0px; + padding: 5px 30px; + height: auto; + } + div.menu.mobile > div.dropdown > ul > li > a:hover { + background: #ffa500; + } + + div.menu.desktop { + display: none; + } +} diff --git a/mamweb/static/images/logo.png b/mamweb/static/images/logo.png index f7cbcd1c..28b388bf 100644 Binary files a/mamweb/static/images/logo.png and b/mamweb/static/images/logo.png differ diff --git a/mamweb/templates/base.html b/mamweb/templates/base.html index 8817ddb7..eaa5a2b2 100644 --- a/mamweb/templates/base.html +++ b/mamweb/templates/base.html @@ -56,9 +56,24 @@
-
-
diff --git a/seminar/templates/seminar/titulnistrana.html b/seminar/templates/seminar/titulnistrana.html index e29fec4d..1e72ae00 100644 --- a/seminar/templates/seminar/titulnistrana.html +++ b/seminar/templates/seminar/titulnistrana.html @@ -4,7 +4,8 @@ {% block content %} - +
+
{# Uvitaci text #}

{% block nadpis1a %}{% block nadpis1b %} @@ -12,24 +13,28 @@ {% endblock %}{% endblock %}

+ {% if dead %}
{# TODO humanize #} Do konce odeslání řešení zbývá: - {{ted|timesince:dead}} - {{cas_do_konce_dni}} dní - {% if cas_do_konce_dni < 5 %} - {{cas_do_konce_hodin}} hodin - {% if cas_do_konce_hodin < 5 %} - {{cas_do_konce_minut}} minut - {% if cas_do_konce_minut < 5 %} - {{cas_do_konce_sekund}} - {% endif %} - {% endif %} - {% endif %} + +
+ {% endif %}

Co je na nás skvělé?

Zjistit víc!

diff --git a/seminar/views.py b/seminar/views.py index d7cdbfad..8762861b 100644 --- a/seminar/views.py +++ b/seminar/views.py @@ -48,14 +48,17 @@ class TitulniStranaView(generic.ListView): context = super(TitulniStranaView, self).get_context_data(**kwargs) nastaveni = get_object_or_404(Nastaveni) cas_deadline = nastaveni.aktualni_cislo.datum_deadline - rozdil_casu = datetime.combine(cas_deadline, datetime.max.time()) \ - - datetime.now() - context['cas_do_konce_dni'] = rozdil_casu.days - context['cas_do_konce_hodin'] = rozdil_casu.seconds / 3600 - context['cas_do_konce_minut'] = (rozdil_casu.seconds / 60) % 60 - context['cas_do_konce_sekund'] = rozdil_casu.seconds % 60 - context['dead'] = datetime.combine(cas_deadline, datetime.max.time()) - context['ted'] = datetime.now() + try: + rozdil_casu = datetime.combine(cas_deadline, datetime.max.time()) \ + - datetime.now() + context['cas_do_konce_dni'] = rozdil_casu.days + context['cas_do_konce_hodin'] = rozdil_casu.seconds / 3600 + context['cas_do_konce_minut'] = (rozdil_casu.seconds / 60) % 60 + context['cas_do_konce_sekund'] = rozdil_casu.seconds % 60 + context['dead'] = datetime.combine(cas_deadline, datetime.max.time()) + context['ted'] = datetime.now() + except: + context['dead'] = None return context class StareNovinkyView(generic.ListView):