{# @var pageinfo \App\Controller\PageInfo #}
{# @var objectinfo \App\Controller\Objects\ObjectInfo #}
{% extends 'base.html.twig' %}
{% block theme %}
{% if objectinfo.objectClass == 'info' %}
<link rel="stylesheet" href="/assets/css/style.light-blue-700.min.css">
{% elseif objectinfo.objectClass == 'success' %}
<link rel="stylesheet" href="/assets/css/style.light-green-700.min.css">
{% else %}
<link rel="stylesheet" href="/assets/css/style.red-custom.min.css">
{% endif %}
{% endblock %}
{% block body %}
<div class="ms-hero-page ms-hero-bg-info mb-6" style="background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('{{ objectinfo.background.small }}');">
{% if pageinfo.info != '' %}
<div class="container" style="position: relative; top: -80px">
<div id="id-header-news">
<i class="fa fa-info-circle"></i>
<div class="marquee">
<div class="marquee-content">{{ pageinfo.info|raw }}</div>
</div>
</div>
</div>
{% endif %}
<div class="text-center color-white mt-6 mb-6 index-1">
<h1>{{ objectinfo.title }}</h1>
<p class="lead lead-lg mb-4">{{ objectinfo.subtitle }}</p>
{% if objectinfo.buttons|length == 1 %}
{% set button = objectinfo.buttons[0] %}
{# @var button \App\Controller\Objects\Link #}
<a href="{{ button.link }}" class="btn btn-object">{{ button.title }}</a>
{% elseif objectinfo.buttons|length > 0 %}
{% set b = 1 %}
{% for button in objectinfo.buttons %}
{# @var button \App\Controller\Objects\Link #}
<a href="{{ button.link }}" class="btn btn-object">{{ button.title }}</a>
{% if b < objectinfo.buttons|length %}
<img src="/assets/custom/img/kascv_logo_white_50_notext.png" class="btn-separator">
{% endif %}
{% set b = b + 1 %}
{% endfor %}
{% endif %}
</div>
</div>
<div class="container" style="margin-top: -110px">
<div class="row">
<div class="col-lg-9">
{% if objectinfo.alert != '' %}
<div class="alert alert-warning alert-light wow zoomInRight animation-delay-1" role="alert">
<strong><i class="zmdi zmdi-alert-triangle"></i> Upozornění!</strong><br>{{ objectinfo.alert }}
</div>
{% endif %}
<article class="card card-primary wow zoomInRight animation-delay-1 mb-4" style="visibility: visible; animation-name: zoomInRight;">
{{ html|raw }}
</article>
</div>
{% include 'partials/sidecol.html.twig' %}
</div>
</div>
{% endblock %}
{% block map %}
<iframe style="width: 100%; height: 300px" id="id-gmap-embed" src="{{ objectinfo.mapLink }}"></iframe>
{% endblock %}
{% block address %}
<h3 class="ms-footbar-title mb-2 ms-footer-text">{{ objectinfo.title }}</h3>
<div class="ms-footbar-title">
<img src="/assets/custom/img/kascv_logo_white_50_notext.png">
<h3 class="no-m ms-site-title"><span>KULTURA</span>A<span>SPORT</span>CHOMUTOV</h3>
</div>
<address class="no-mb">
<p><i class="zmdi zmdi-pin mr-1"></i> {{ objectinfo.addressStreet }}</p>
<p><i class="zmdi zmdi-map mr-1"></i> {{ objectinfo.addressCity }}, {{ objectinfo.addressPostal }}</p>
{% if objectinfo.contactPhone != '' %}
<p><i class="zmdi zmdi-email mr-1"></i> <a href="mailto:{{ objectinfo.contactPhone }}">{{ objectinfo.contactPhone }}</a></p>
{% endif %}
{% if objectinfo.contactMail != '' %}
<p><i class="fa fa-fax mr-1"></i>{{ objectinfo.contactMail }}</p>
{% endif %}
<p><i class="color-danger-light zmdi zmdi-phone mr-1"></i> <a href="/kontakty">Kontakty</a></p>
</address>
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script src="/assets/js/component-carousels-1.js"></script>
<script type="text/javascript">
$(function() {
ShowTab();
window.addEventListener('hashchange', function() {
ShowTab();
});
$('#id-course-select').change(function() {
setTimeout(function() {
let id = $('#id-course-select').val();
window.history.replaceState('', '', '#kurz'+id);
ShowTab();
}, 200);
});
});
function ShowTab() {
let id = '';
let href = '';
let hash = $(location).attr('hash');
if (hash!='') {
/* content */
$( ".tab-pane" ).each(function( index ) {
id = '#'+$(this).attr('id');
$(this).removeClass('active');
$(this).removeClass('show');
if (id==hash) {
$(this).addClass('active');
$(this).addClass('show');
}
});
$('.selectpicker').selectpicker('val', hash.replace('#kurz', ''));
}
}
</script>
{% endblock %}