Vyčištění submenu, headerů a base v templatech

This commit is contained in:
Jonas Havelka 2020-09-20 12:41:56 +02:00
parent 4bb974f1c1
commit 671c29c88f
37 changed files with 25 additions and 265 deletions

View file

@ -1,6 +0,0 @@
{% extends "base.html" %}
{# TODO predelat pres context processor #}
{% block header %}soustredeni{% endblock %}
{% block menu_soustredeni %}selected{% endblock %}
{% block submenu %}{% include 'seminar/soustredeni/submenu.html' %}{% endblock %}

View file

@ -1,4 +1,4 @@
{% extends "galerie/Base.html" %}
{% extends "base.html" %}
{% block nadpis1a %}

View file

@ -1,4 +1,4 @@
{% extends "galerie/Base.html" %}
{% extends "base.html" %}
{% block nadpis1a %}
Galerie {{galerie.nazev}}

View file

@ -1,4 +1,4 @@
{% extends "galerie/Base.html" %}
{% extends "base.html" %}
{% block title %}{% block nadpis1a %}
Vytvářím novou galerii

View file

@ -1,13 +0,0 @@
{% extends "base.html" %}
{% block submenu %}
{% include "korektury/submenu.html" %}
{% endblock %}
{% block content %}
{# blok do kterého se nacita text, v pripade jinyhc templatu obalit vlastnim blokem #}
{% endblock %}
{% block title %}
{# blok pro titulek stranky #}
{% endblock %}

View file

@ -1,10 +1,4 @@
{% extends "korektury/base.html" %}
{% block submenu %}
{% with "help" as selected %}
{% include "korektury/submenu.html" %}
{% endwith %}
{% endblock %}
{% extends "base.html" %}
{% load staticfiles %}

View file

@ -1,10 +1,6 @@
{% extends "korektury/base.html" %}
{% extends "base.html" %}
{% load staticfiles %}
{% block submenu %}
{% include "korektury/submenu.html" %}
{% endblock %}
{% block script%}
<link rel="stylesheet" type="text/css" media="screen, projection" href="{% static "korektury/opraf-list.css" %}" />
{% endblock %}

View file

@ -1,13 +0,0 @@
{% with "/korektury" as cesta %}
<div id='submenu'>
<ul>
<li class="{% if selected == "aktualni" %}selected{% endif %}"><a href="{{cesta}}/">Aktuální</a>
<li class="{% if selected == "zastarale" %}selected{% endif %}"><a href="{{cesta}}/zastarale/">Zastaralé</a>
<li class="{% if selected == "help" %}selected{% endif %}"><a href="{{cesta}}/help/">Nápověda</a>
</ul>
</div>
{% endwith %}

View file

@ -8,106 +8,4 @@
<div>
{{ flatpage.content }}
</div>
{% endblock content %}
{# nahraj spravne submenu #}
{% block submenu %}
{# co-je-MaM #}
{% if "/co-je-MaM/" in flatpage.url %}
{% if "/uvod/" in flatpage.url %}
{% with "uvod" as selected %}
{% include "seminar/cojemam/submenu.html" %}
{% endwith %}
{% elif "jak-resit" in flatpage.url %}
{% with "jak-resit" as selected %}
{% include "seminar/cojemam/submenu.html" %}
{% endwith %}
{% elif "odmeny" in flatpage.url %}
{% with "odmeny" as selected %}
{% include "seminar/cojemam/submenu.html" %}
{% endwith %}
{% elif "FAQ" in flatpage.url %}
{% with "FAQ" as selected %}
{% include "seminar/cojemam/submenu.html" %}
{% endwith %}
{% elif "kontakt" in flatpage.url %}
{% else %}
{% include "seminar/cojemam/submenu.html" %}
{% endif %}
{% endif %}
{# soustredeni #}
{% if "/soustredeni/" in flatpage.url %}
{% if "/pripravujeme/" in flatpage.url %}
{% with "pripravujeme" as selected %}
{% include "seminar/soustredeni/submenu.html" %}
{% endwith %}
{% else %}
{% with "uvod" as selected %}
{% include "seminar/soustredeni/submenu.html" %}
{% endwith %}
{% endif %}
{% endif %}
{# zadani #}
{% if "/zadani/" in flatpage.url %}
{% if "/aktualni-cislo/" in flatpage.url %}
{% with "aktualni-cislo" as selected %}
{% include "seminar/zadani/submenu.html" %}
{% endwith %}
{% elif "/vysledkova-listina/" in flatpage.url %}
{% with "vysledkova-listina" as selected %}
{% include "seminar/zadani/submenu.html" %}
{% endwith %}
{% else %}
{% include "seminar/zadani/submenu.html" %}
{% endif %}
{% endif %}
{# clanky #}
{% if "/clanky/" in flatpage.url %}
{% if "/uvod/" in flatpage.url %}
{% with "uvod" as selected %}
{% include "seminar/clanky/submenu.html" %}
{% endwith %}
{% elif "/org/" in flatpage.url %}
{% with "org" as selected %}
{% include "seminar/clanky/submenu.html" %}
{% endwith %}
{% elif "/resitel/" in flatpage.url %}
{% with "resitel" as selected %}
{% include "seminar/clanky/submenu.html" %}
{% endwith %}
{% elif "/jak-psat-vedecky-clanek/" in flatpage.url %}
{% with "jak-psat-vedecky-clanek" as selected %}
{% include "seminar/clanky/submenu.html" %}
{% endwith %}
{% else %}
{% include "seminar/clanky/submenu.html" %}
{% endif %}
{% endif %}
{# archiv #}
{% if "/archiv/" in flatpage.url %}
{% if "/ulohy/" in flatpage.url %}
{% with "ulohy" as selected %}
{% include "seminar/archiv/submenu.html" %}
{% endwith %}
{% elif "/vysledky/" in flatpage.url %}
{% with "vysledky" as selected %}
{% include "seminar/archiv/submenu.html" %}
{% endwith %}
{% else %}
{% include "seminar/archiv/submenu.html" %}
{% endif %}
{% endif %}
{% endblock %}
{# zvirazneni menu #}
{% block menu_uvod %}{% if not "/kontakt/" in flatpage.url %}{% if "/co-je-MaM/" in flatpage.url %}selected{% endif %}{% endif %}{% endblock %}
{% block menu_soustredeni %}{% if "/soustredeni/" in flatpage.url %}selected{% endif %}{% endblock %}
{% block menu_zadani %}{% if "/zadani/" in flatpage.url %}selected{% endif %}{% endblock %}
{% block menu_clanky %}{% if "/clanky/" in flatpage.url %}selected{% endif %}{% endblock %}
{% block menu_archiv %}{% if "/archiv/" in flatpage.url %}selected{% endif %}{% endblock %}
{% block menu_odevzdat %}{% if "/kontakt/" in flatpage.url %}selected{% endif %}{% endblock %}
{# zmena titulniho obrazku #}
{% block header %}{% if "/co-je-MaM/" in flatpage.url %}cojemam{% elif "/soustredeni/" in flatpage.url %}soustredeni{% elif "/zadani/" in flatpage.url %}zadani{% elif "/clanky/" in flatpage.url %}clanky{% elif "/archiv/" in flatpage.url %}archiv{% else %}odeslat{% endif %}{% endblock header %}
{# TODO zvirazneni submenu #}
{% endblock content %}

View file

@ -1,9 +1,5 @@
{% extends "prednasky/base.html" %}
{% block header %}hlasovani{% endblock %}
{% block content %}
<h1>{% block nadpis1a %}{% block nadpis1b %}Hlasování o přednáškách{% endblock %}{% endblock %}</h1>
{# Projdi vsechny seznamy #}

View file

@ -1,9 +1,5 @@
{% extends "prednasky/base.html" %}
{% block header %}seznam_prednasek{% endblock %}
{% block content %}
<h1>{% block nadpis1a %}Průběžné výsledky hlasování{% endblock %}</h1>
<div class="mam-org-only">

View file

@ -1,6 +0,0 @@
{% extends "base.html" %}
{% block menu_archiv %}selected{% endblock %}
{# zmena fotky #}{% block header %}archiv{% endblock %}

View file

@ -1,4 +1,4 @@
{% extends "seminar/archiv/base.html" %}
{% extends "base.html" %}
{% block content %}
<div>

View file

@ -1,4 +1,4 @@
{% extends "seminar/archiv/base.html" %}
{% extends "base.html" %}
{% block content %}
<div>

View file

@ -1,4 +1,4 @@
{% extends "seminar/archiv/base.html" %}
{% extends "base.html" %}
{% block content %}
<h1>

View file

@ -1,4 +1,4 @@
{% extends "seminar/archiv/base.html" %}
{% extends "base.html" %}
{% block title %}
{{prispevek.nazev}}

View file

@ -1,4 +1,4 @@
{% extends "seminar/archiv/base.html" %}
{% extends "base.html" %}
{% load comments %}

View file

@ -1,4 +1,4 @@
{% extends "seminar/archiv/base.html" %}
{% extends "base.html" %}
{% block content %}
<div>

View file

@ -1,4 +1,4 @@
{% extends "seminar/archiv/base.html" %}
{% extends "base.html" %}
{% block content %}
<h1>

View file

@ -1,10 +0,0 @@
{% extends "base.html" %}
{% block menu_clanky %}selected{% endblock %}
{# zmena fotky #}{% block header %}clanky{% endblock %}
{% block submenu %}
{% include "seminar/clanky/submenu.html" %}
{% endblock %}

View file

@ -1,11 +1,5 @@
{% extends 'seminar/clanky/resitelske_clanky.html' %}
{% block submenu %}
{% with "org" as selected %}
{% include "seminar/clanky/submenu.html" %}
{% endwith %}
{% endblock submenu %}
{% block nadpis1a %}{% block nadpis1b %}
Organizátorské články
{% endblock %}{% endblock %}

View file

@ -1,13 +1,5 @@
{% extends 'base.html' %}
{% block menu_clanky %}selected{% endblock %}
{% block submenu %}
{% with "resitel" as selected %}
{% include "seminar/clanky/submenu.html" %}
{% endwith %}
{% endblock submenu %}
{% block content %}
<h1>

View file

@ -1,6 +0,0 @@
{% extends "base.html" %}
{% block submenu %}
{% include "seminar/cojemam/submenu.html" %}
{% endblock %}

View file

@ -1,4 +1,4 @@
{% extends "seminar/cojemam/base.html" %}
{% extends "base.html" %}
{% block nadpis1a %}{% block nadpis1b %}
{% if aktivni %}
Organizátoři
@ -7,15 +7,6 @@
{% endif %}
{% endblock%}{% endblock%}
{# podbarveni menu a submenu #}
{% block menu_uvod %}selected{% endblock %}
{% block submenu %}
{% with "org" as selected %}
{% include "seminar/cojemam/submenu.html" %}
{% endwith %}
{% endblock %}
{# zmena fotky #}{% block header %}cojemam{% endblock %}
{% block content %}

View file

@ -1,4 +1,4 @@
{% extends "seminar/zadani/base.html" %}
{% extends "base.html" %}
{% load staticfiles %}
{% block script %}

View file

@ -1,4 +1,4 @@
{% extends "seminar/zadani/base.html" %}
{% extends "base.html" %}
{% load staticfiles %}

View file

@ -1,4 +1,4 @@
{% extends "seminar/zadani/base.html" %}
{% extends "base.html" %}
{% load staticfiles %}

View file

@ -1,4 +1,4 @@
{% extends "seminar/zadani/base.html" %}
{% extends "base.html" %}
{% load staticfiles %}
{% block script %}
<!--script type="text/javascript" src="{% static 'admin/js/vendor/jquery/jquery.js' %}"></script!-->

View file

@ -1,4 +1,4 @@
{% extends "seminar/zadani/base.html" %}
{% extends "base.html" %}
{% load staticfiles %}
{% block script %}

View file

@ -1,4 +1,4 @@
{% extends "seminar/zadani/base.html" %}
{% extends "base.html" %}
{% load staticfiles %}

View file

@ -1,6 +0,0 @@
{% extends "base.html" %}
{% block submenu %}
{% include "seminar/soustredeni/submenu.html" %}
{% endblock %}

View file

@ -1,11 +1,4 @@
{% extends "seminar/soustredeni/base.html" %}
{% block menu_soustredeni %}selected{% endblock %}
{% block submenu %}
{% with "probehlo" as selected %}
{% include "seminar/soustredeni/submenu.html" %}
{% endwith %}
{% endblock submenu %}
{% extends "base.html" %}
{# zmena fotky #}{% block header %}soustredeni{% endblock %}

View file

@ -1,4 +1,4 @@
{% extends "seminar/archiv/base.html" %}
{% extends "base.html" %}
{% load comments %}

View file

@ -1,11 +1,4 @@
{% extends "seminar/zadani/base.html" %}
{% block submenu %}
{% with "vysledkova-listina" as selected %}
{% include 'seminar/zadani/submenu.html' %}
{% endwith %}
{% endblock submenu %}
{% extends "base.html" %}
{% block content %}
{% with nastaveni.aktualni_rocnik as rocnik %}

View file

@ -1,10 +1,4 @@
{% extends "seminar/zadani/base.html" %}
{% block submenu %}
{% with "aktualni" as selected %}
{% include 'seminar/zadani/submenu.html' %}
{% endwith %}
{% endblock submenu %}
{% extends "base.html" %}
{% block nadpis1a %}{% block nadpis1b %}
Aktuální zadání

View file

@ -1,11 +1,4 @@
{% extends "seminar/zadani/base.html" %}
{% block submenu %}
{% with "temata" as selected %}
{% include 'seminar/zadani/submenu.html' %}
{% endwith %}
{% endblock submenu %}
{% extends "base.html" %}
{% block content %}
{% with nastaveni.aktualni_rocnik as ar %}

View file

@ -1,10 +0,0 @@
{% extends "base.html" %}
{% block menu_zadani %}selected{% endblock %}
{# zmena fotky #}{% block header %}zadani{% endblock %}
{% block submenu %}
{% include 'seminar/zadani/submenu.html' %}
{% endblock submenu %}