196 lines
6.9 KiB
HTML
196 lines
6.9 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&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-theme.css' %}" rel="stylesheet">
|
|
<link href="{% static 'bootstrap/css/bootstrap.css' %}" rel="stylesheet">
|
|
<link href="{% static 'css/constants.css' %}?version=1" rel="stylesheet">
|
|
<link href="{% static 'css/base.css' %}?version=1" rel="stylesheet">
|
|
<link href="{% static 'css/layout.css' %}?version=1" rel="stylesheet">
|
|
<link href="{% static 'css/modules.css' %}?version=1" rel="stylesheet">
|
|
<link href="{% static 'prettyPhoto/css/prettyPhoto.css' %}" rel="stylesheet" type="text/css" media="screen" charset="utf-8" />
|
|
<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="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="container">
|
|
<div class="content-wrapper">
|
|
|
|
<a href='/'>
|
|
<div id="title" >M&M – korespondenční seminář a časopis MFF UK</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-toggle="collapse" data-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='content'>
|
|
|
|
{% 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&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&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&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.js' %}"></script>
|
|
<script src="{% static 'js/jquery.jcarousel-core.js' %}" type="text/javascript"></script>
|
|
<script src="{% static 'prettyPhoto/js/jquery.prettyPhoto.js' %}" type="text/javascript" charset="utf-8"></script>
|
|
<script type="text/javascript" charset="utf-8">
|
|
var prettyparams = {
|
|
animation_speed: 'fast',
|
|
theme: 'dark_rounded',
|
|
}
|
|
$(document).ready(function(){
|
|
$("a[rel^='gallery-image']").prettyPhoto(prettyparams);
|
|
});
|
|
</script>
|
|
{% if april == 2021 %}
|
|
<script type="text/javascript" charset="utf-8">
|
|
function rotace(vektor, uhel_deg) {
|
|
var uhel = uhel_deg *(Math.PI / 180);
|
|
var x = vektor[0];
|
|
var y = vektor[1];
|
|
return [x*Math.cos(uhel) - y*Math.sin(uhel), x*Math.sin(uhel) + y*Math.cos(uhel)];
|
|
}
|
|
|
|
function rotace_a_posun(obj, uhel) {
|
|
var ow = obj.width();
|
|
var oh = obj.height();
|
|
|
|
var rohy = [[0,0], [0,oh], [ow, 0], [ow, oh]];
|
|
var minx = 0;
|
|
var miny = 0;
|
|
for (var roh of rohy) {
|
|
var otoceny = rotace(roh, uhel);
|
|
if (otoceny[0] < minx) {
|
|
minx = otoceny[0];
|
|
}
|
|
if (otoceny[1] < miny) {
|
|
miny = otoceny[1];
|
|
}
|
|
}
|
|
|
|
miny *= -1;
|
|
minx *= -1;
|
|
|
|
var transf_str = "translateX("+minx+"px) translateY("+miny+"px) rotate("+uhel+"deg)";
|
|
obj.css('transform-origin', 'top left');
|
|
obj.css('transform', transf_str);
|
|
}
|
|
|
|
function randomUhel() {
|
|
return Math.floor(360*Math.random());
|
|
}
|
|
|
|
$('.container').css('margin', 0);
|
|
rotace_a_posun($('.container'), randomUhel());
|
|
</script>
|
|
{% endif %}
|
|
{% if april == 2023 %}
|
|
<script>
|
|
{# By https://stackoverflow.com/a/34559316 #}
|
|
function walkText(node) {
|
|
if (node.nodeType == 3) {
|
|
node.data = node.data.replace(/M&M/g, "M💘M");
|
|
}
|
|
if (node.nodeType == 1 && node.nodeName != "SCRIPT") {
|
|
for (var i = 0; i < node.childNodes.length; i++) {
|
|
walkText(node.childNodes[i]);
|
|
}
|
|
}
|
|
}
|
|
walkText(document.body);
|
|
</script>
|
|
{% endif %}
|
|
{% block js %}{% endblock %}
|
|
</body>
|
|
</html>
|