mamweb/mamweb/templates/base.html

127 lines
5 KiB
HTML

{% load static %}
{% load sitetree %}
<!DOCTYPE html>
<html lang='cs'>
<head>
<meta charset="utf-8"> {# vynuť UTF-8. #}
<title>{% block title %}{% block nadpis1a %}🦊{% endblock %} | Korespondenční seminář M&amp;M{% endblock title %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="{% static 'images/MATFYZ_MM_barevne.svg' %}" type="image/x-icon">
{% block custom_css %}{% endblock %}
<link href="{% static 'bootstrap/css/bootstrap.css' %}?version=3" rel="stylesheet">
<link href="{% static 'css/constants.css' %}?version=3" rel="stylesheet">
<link href="{% static 'css/mamweb_legacy.css' %}?version=3" rel="stylesheet">
<link href="{% static 'css/base.css' %}?version=3" rel="stylesheet">
<link href="{% static 'css/layout.css' %}?version=3" rel="stylesheet">
<link href="{% static 'css/modules.css' %}?version=3" rel="stylesheet">
<script src="{% static 'js/jquery-1.11.1.js' %}"></script>
<script src="{% static 'js/jquery-3.4.1.js' %}"></script>
{# nastavení MathJaxu, aby nahrazoval i matiku obalenou jednoduchými $ #}
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$','$'], ['\\(','\\)']],
processEscapes: true
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
{# Případné skripty widgetů formulářů #}
{% if form %}
{{form.media}}
{% endif %}
{# script specifický pro stránku #}
{% block script %}{% endblock %}
</head>
<body class='{{ LOCAL_TEST_PROD }}web{% if user.is_staff %} org-logged-in{% endif %}'>
{% if user.is_staff %}
<div class="login-bar" >
{% if view.object %}
Objekt {{ view.object }}: {{ view.object }}
{% if view.object.admin_url %}<a class="LOGIN-ref-admin" href='{{ view.object.admin_url }}'>[admin]</a>{% endif %}
{% endif %}
{% if flatpage %}
<div class="login-bar-flatpage" id="hide-if-small"> Stránka <tt>{{ flatpage.url }}</tt> ({{ flatpage.title }})</div>
<a class="LOGIN-ref-admin" href='{% url 'admin:flatpages_flatpage_change' flatpage.id %}'>[admin]</a>
{% endif %}
<a class="LOGIN-ref-admin" href='/admin'>[admin mainpage]</a>
<span class="LOGIN_napis-webarum">Něco ti nejde/nefunguje/mate tě? <a class="LOGIN-ref-admin" href='mailto:web@mam.mff.cuni.cz'>Napiš webařům!</a></span>
</div>
{% endif %}
<div class="kontejner">{# ne container, aby se netlouklo s bootstrapem #}
<div class="kontent-wrapper">{# ne content, aby se netlouklo s bootstrapem #}
<a href='/'>
<div id="title" >M&M &ndash; korespondenční seminář a časopis MFF&nbspUK</div>
<div id="header">
<div class="no-mobile" style="background-image: url('{{ fotka }}')">
{# TODO style=… není fancy řešení, ale u <img> se bojím, že mi to rozbije vzhled #}
{% sitetree_menu from "main_menu" include "trunk" template "logo.html" %}
</div>
<img class="logo-mobile" src="{% static 'images/logo-mobile.svg' %}" />
</div>
</a>
{# ========= MENU ========== #}
{% sitetree_menu from "main_menu" include "trunk" template "menu.html" %}
{# ========= MENU MOBILE ========== #}
<!--Navbar-->
<nav class="nav-button">
<!-- Collapse button -->
<button class="navbar-button" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-content"
aria-controls="navbar-content" aria-expanded="false"><span>Menu</span></button>
<!-- Collapsible content -->
<div class="collapse navbar-collapse" id="navbar-content">
<!-- Links -->
{% sitetree_menu from "main_menu" include "trunk" template "menu_mobile.html" %}
<!-- Links -->
</div>
<!-- Collapsible content -->
</nav>
<!--/.Navbar-->
{# ========= END MENU ========== #}
<div class='kontent'>
{% block content %}
{% endblock content %}
</div>
</div> <!-- content-wrapper -->
<!-- Credit: https://www.freecodecamp.org/news/how-to-keep-your-footer-where-it-belongs-59c6aa05c59c/ -->
<div id="footer">
<p class="license">S obsahem webu M&amp;M je možné nakládat dle licence <a href="https://creativecommons.org/licenses/by/3.0/cz/">Creative Commons Attribution 3.0</a>.</p>
</div>
<p class="license-mobile">M&amp;M organizují převážně studenti <a href="https://www.mff.cuni.cz/">MFF UK</a>. Realizace projektu byla podpořena Ministerstvem školství, mládeže a tělovýchovy a <a href="https://jcmf.cz/">Jednotou českých matematiků a fyziků</a>. S obsahem webu M&amp;M je možné nakládat dle licence <a href="https://creativecommons.org/licenses/by/3.0/cz/">Creative Commons Attribution 3.0</a>.</p>
</div> <!-- container -->
<script src="{% static 'bootstrap/js/bootstrap.bundle.js' %}"></script>
{% include 'april.html' %}
{% block js %}{% endblock %}
</body>
</html>