178 lines
		
	
	
	
		
			6.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			178 lines
		
	
	
	
		
			6.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| {% load staticfiles sekizai_tags %}
 | ||
| {% load sitetree %}
 | ||
| <!DOCTYPE html>
 | ||
| <html lang='cs'>
 | ||
|   <head>
 | ||
|     <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">
 | ||
|     {% render_block css %}
 | ||
|     {% block custom_css %}{% endblock %}
 | ||
|     <link href="{% static 'css/bootstrap-theme.css' %}" rel="stylesheet">
 | ||
|     <link href="{% static 'css/bootstrap.css' %}" rel="stylesheet">
 | ||
|     <link href="{% static 'css/mamweb.css' %}" rel="stylesheet">
 | ||
|     <link href="{% static '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>
 | ||
| 
 | ||
|     <link rel="stylesheet" type="text/css" href="{% static 'fluent_comments/css/ajaxcomments.css' %}" />
 | ||
|     <script type="text/javascript" src="{% static 'fluent_comments/js/ajaxcomments.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='{% 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>
 | ||
|       </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">Korespondenční seminář M&M organizují převážně studenti <a href="https://www.mff.cuni.cz/">MFF UK</a>. Organizaci semináře a vydávání časopisu podporuje <a href="https://jcmf.cz/">Jednota č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 'js/bootstrap.js' %}"></script>
 | ||
|     <script src="{% static 'js/jquery.jcarousel-core.js' %}" type="text/javascript"></script>
 | ||
|     <script src="{% static '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 %}
 | ||
|     {% render_block "js" %}
 | ||
|   </body>
 | ||
| </html>
 | 
