{# @var pageinfo \App\Controller\PageInfo #}
{# @var objectinfo \App\Controller\Objects\ObjectInfo #}
{% extends 'base.html.twig' %}
{% block description %}
<meta name="description" content="{{ objectinfo.subtitle }}">
{% endblock %}
{% 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 customcss %}
{{ parent() }}
<link rel="stylesheet" type="text/css" href="/assets/custom/css/program.min.{{ app.request.server.get('APP_PREVCACHE') }}.css" />
<link rel="stylesheet" type="text/css" href="/assets/custom/css/media.min.{{ app.request.server.get('APP_PREVCACHE') }}.css" />
<link rel="stylesheet" href="/assets/custom/pannellum/pannellum.css">
{% endblock %}
{% block og %}
<meta property="og:url" content="{{ app.request.server.get('APP_URL') }}/{{ objectinfo.link }}" />
<meta property="og:type" content="website" />
<meta property="og:title" content="{{ objectinfo.title }}" />
<meta property="og:description" content="{{ objectinfo.subtitle }}" />
<meta property="og:image" content="{{ objectinfo.picture.small }}" />
{% 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 #}
{% if button.title=='ROZPIS LEDU' or button.title=='ROZPIS DRAH' %}
<a href="{{ button.link|replace({'.pdf':'.'~random(50, 100)~'.pdf'}) }}" target="_blank" class="btn btn-object">{{ button.title }}</a>
{% else %}
<a href="{{ button.link }}" class="btn btn-object">{{ button.title }}</a>
{% endif %}
{% elseif objectinfo.buttons|length > 0 %}
{% set b = 1 %}
{% set btn_d_class = '' %}
{% for button in objectinfo.buttons %}
{# @var button \App\Controller\Objects\Link #}
{% if b > 1 %}
{% set btn_d_class = 'd-none d-sm-inline-block' %}
{% endif %}
{% if button.title=='ROZPIS LEDU' or button.title=='ROZPIS DRAH' %}
<a href="{{ button.link|replace({'.pdf':'.'~random(50, 100)~'.pdf'}) }}" target="_blank" class="btn btn-object {{ btn_d_class }}">{{ button.title }}</a>
{% else %}
<a href="{{ button.link }}" class="btn btn-object {{ btn_d_class }}">{{ button.title }}</a>
{% endif %}
{% if b < objectinfo.buttons|length %}
<img src="/assets/custom/img/kascv_logo_white_50_notext.png" class="btn-separator d-none d-sm-inline-block">
{% endif %}
{% set b = b + 1 %}
{% endfor %}
{% endif %}
</div>
</div>
<article class="container" style="margin-top: -110px">
<div class="row">
<div class="col-lg-8">
{% 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|raw }}
</div>
{% endif %}
{% if pageinfo.mobile %}
<div class="card card-primary animated fadeInUp animation-delay-7 ">
<div class="card-header">
{% if objectinfo.virtualTourLink != '' %}
<h3 class="card-title"><i class="fa fa-video-camera" aria-hidden="true"></i> Virtuální prohlídka</h3>
{% else %}
<h3 class="card-title"><i class="fa fa-video-camera" aria-hidden="true"></i> Panorama náhled</h3>
{% endif %}
</div>
{% if objectinfo.virtualTourLink != '' %}
<iframe src="{{ objectinfo.virtualTourLink }}" style="width: 100%;height: 250px;"></iframe>
{% elseif objectinfo.title == 'Rocknet Aréna - Zimní stadion' and 1==0 %}
<video controls style="width: 100%">
<source src="/assets/media/zimni_stadion.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
{% else %}
<div id="panorama-360-view"></div>
{% endif %}
</div>
{% endif %}
{% if objectinfo.stat1.icon != '' or objectinfo.stat2.icon != '' or objectinfo.stat3.icon != '' %}
<div class="row">
<div class="col-md-4">
{% if objectinfo.stat1.icon != '' %}
<div class="card card-primary text-center">
<div class="card-body card-stat1">
{% if objectinfo.stat1.icon[0:3] == 'fa-' %}
<span class="ms-icon ms-icon-circle ms-icon-xlg">
<i class="fa {{ objectinfo.stat1.icon }}"></i>
</span>
{% elseif objectinfo.stat1.icon|length == 1 %}
<span class="ms-icon ms-icon-circle ms-icon-xlg">
<h2 class="no-margin" style="margin-top: 12px">{{ objectinfo.stat1.icon }}</h2>
</span>
{% else %}
<h3 style="margin: 36px 0px">{{ objectinfo.stat1.icon }}</h3>
{% endif %}
<h2 class="color-primary"><span class="{% if objectinfo.stat1.value matches '/^\\d+$/' %}counter{% endif %}">{{ objectinfo.stat1.value }}</span></h2>
<h4 class="color-primary">{{ objectinfo.stat1.text1 }}</h4>
<p>{{ objectinfo.stat1.text2 }}</p>
</div>
</div>
{% endif %}
</div>
<div class="col-md-4">
{% if objectinfo.stat2.icon != '' %}
<div class="card card-primary-inverse text-center">
<div class="card-body card-stat2">
{% if objectinfo.stat2.icon[0:3] == 'fa-' %}
<span class="ms-icon ms-icon-white ms-icon-circle ms-icon-xlg">
<i class="fa {{ objectinfo.stat2.icon }}"></i>
</span>
{% elseif objectinfo.stat2.icon|length == 1 %}
<span class="ms-icon ms-icon-white ms-icon-circle ms-icon-xlg">
<h2 class="no-margin" style="margin-top: 12px">{{ objectinfo.stat2.icon }}</h2>
</span>
{% else %}
<h3 style="margin: 36px 0px">{{ objectinfo.stat2.icon }}</h3>
{% endif %}
<h2 class=""><span class="{% if objectinfo.stat2.value matches '/^\\d+$/' %}counter{% endif %}">{{ objectinfo.stat2.value }}</span></h2>
<h4 class="">{{ objectinfo.stat2.text1 }}</h4>
<p>{{ objectinfo.stat2.text2 }}</p>
</div>
</div>
{% endif %}
</div>
<div class="col-md-4">
{% if objectinfo.stat1.icon != '' %}
<div class="card card-primary text-center">
<div class="card-body card-stat3">
{% if objectinfo.stat3.icon[0:3] == 'fa-' %}
<span class="ms-icon ms-icon-circle ms-icon-xlg">
<i class="fa {{ objectinfo.stat3.icon }}"></i>
</span>
{% elseif objectinfo.stat3.icon|length == 1 %}
<span class="ms-icon ms-icon-circle ms-icon-xlg">
<h2 class="no-margin" style="margin-top: 12px">{{ objectinfo.stat3.icon }}</h2>
</span>
{% else %}
<h3 style="margin: 36px 0px">{{ objectinfo.stat3.icon }}</h3>
{% endif %}
<h2 class="color-primary"><span class="{% if objectinfo.stat3.value matches '/^\\d+$/' %}counter{% endif %}">{{ objectinfo.stat3.value }}</span></h2>
<h4 class="color-primary">{{ objectinfo.stat3.text1 }}</h4>
<p>{{ objectinfo.stat3.text2 }}</p>
</div>
</div>
{% endif %}
</div>
</div>
{% endif %}
{{ html|raw }}
{{ html2|raw }}
</div>
<div class="col-lg-4">
{% if not pageinfo.mobile %}
<div class="card card-primary animated fadeInUp animation-delay-7 ">
<div class="card-header">
{% if objectinfo.virtualTourLink != '' %}
<h3 class="card-title"><i class="fa fa-video-camera" aria-hidden="true"></i> Virtuální prohlídka
<a href="{{ objectinfo.virtualTourLink }}" target="_blank" class="pull-right"><i class="fa fa-arrows-alt color-white" aria-hidden="true"></i></a></h3>
{% else %}
<h3 class="card-title"><i class="fa fa-video-camera" aria-hidden="true"></i> Panorama náhled</h3>
{% endif %}
</div>
{% if objectinfo.virtualTourLink != '' %}
<iframe src="{{ objectinfo.virtualTourLink }}" style="width: 100%;height: 250px;"></iframe>
{% elseif objectinfo.title == 'Rocknet Aréna - Zimní stadion' and 1==0 %}
<video controls style="width: 100%">
<source src="/assets/media/zimni_stadion.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
{% else %}
<div id="panorama-360-view"></div>
{% endif %}
</div>
{% endif %}
{% if objectinfo.opening|length > 0 %}
<div class="card card-primary animated fadeInUp animation-delay-7">
<div class="card-header">
<h3 class="card-title"><i class="zmdi zmdi-widgets"></i> Otevírací doba</h3>
</div>
<div class="card-body overflow-hidden">
<table class="table">
<tbody>
{% for oh in objectinfo.opening %}
{# @var oh \App\Controller\Objects\OpeningHours #}
{% if oh.days != '' %}
<tr><td>{{ oh.name }}</td><td>{{ oh.days }}</td><td>{{ oh.hours }}</td></tr>
{% endif %}
{% endfor %}
</tbody></table>
</div>
</div>
{% endif %}
{% if objectinfo.contacts|length > 0 %}
<div class="card card-primary animated fadeInUp animation-delay-7">
<div class="card-header">
<h3 class="card-title"><i class="zmdi zmdi-phone"></i> Kontakty</h3>
</div>
<div class="tab-content">
<div role="tabpanel" class="tab-pane fade active show" id="favorite">
<div class="card-body overflow-hidden">
<div class="ms-media-list">
{% for contact in objectinfo.contacts %}
{# @var contact \App\Controller\Objects\Contact #}
<div class="media mb-2">
<a class="mr-3" href="javascript:void(0);">
<img class="media-object mr-2 img-contact" src="{{ contact.picture.small }}">
</a>
<div class="media-body">
<h4 class="mt-0 mb-0">{{ contact.fullname }}</h4>
<small class="mt-0 mb-0">{{ contact.title|lower }}</small>
{% if contact.mobile != '-' %}
<p class="mb-0">{{ contact.mobile }}</p>
{% else %}
<p class="mb-0">{{ contact.phone }}</p>
{% endif %}
<a href="mailto:{{ contact.email }}?subject=feedback">{{ contact.email }}</a>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
{% endif %}
{% if objectinfo.files|length > 0 %}
<div class="card card-primary animated fadeInUp animation-delay-7">
<div class="card-header">
<h3 class="card-title"><i class="zmdi zmdi-download"></i> Soubory ke stažení</h3>
</div>
<div class="card-body overflow-hidden">
<table class="table table-hover">
<tbody>
{% for file in objectinfo.files %}
{# @var file \App\Controller\Objects\File #}
<tr>
<td style="width: 30px">{{ file.icon|raw }}</td>
<td>{{ file.name }}</td>
<td style="width: 40px"><a href="/soubor-{{ file.id64 }}?{{ random(5) }}"><i class="fa fa-download"></i></a></td>
</tr>
{% endfor %}
</tbody></table>
</div>
</div>
{% endif %}
{% if objectinfo.pictures|length > 0 %}
<div class="card card-primary animated fadeInUp animation-delay-7">
<div class="card-header">
<h3 class="card-title"><i class="zmdi zmdi-image"></i> Fotogalerie</h3>
</div>
<div class="card-body overflow-hidden">
<div class="row">
{% set picount = objectinfo.pictures|length %}
{% set maxprev = 4 %}
{% for picture in objectinfo.pictures %}
{# @var picture \App\Controller\Objects\Picture #}
{% if maxprev > 0 %}
{% set maxprev = maxprev - 1 %}
{% set picount = picount - 1 %}
<div class="col-6">
<div class="card wow zoomIn" style="visibility: visible; animation-name: zoomIn;">
<div class="ms-thumbnail card-body p-05 ">
<div class="withripple zoom-img">
<a href="{{ picture.large }}" data-lightbox="gallery" data-title="{{ objectinfo.title }}">
<img src="{{ picture.small }}" alt="" class="img-fluid">
</a>
<div class="ripple-container"></div></div>
</div>
</div>
</div>
{% endif %}
{% endfor %}
{% if picount > 0 and picount < 5 %}
<p>+ {{ picount }} další fotografie</p>
{% elseif picount > 4 %}
<p>+ {{ picount }} dalších fotografií</p>
{% endif %}
<a href="/{{ objectinfo.link }}/fotogalerie" class="btn btn-primary btn-raised btn-block animate-icon pull-right">Přejít do galerie <i class="ml-1 no-mr zmdi zmdi-long-arrow-right"></i><div class="ripple-container"></div></a>
</div>
</div>
</div>
{% endif %}
</div>
</div>
{% if objectinfo.pricelists|length > 0 %}
<a name="cenik" style="position: relative; top: -200px"></a>
<div class="container mb-4">
<div class="text-center mb-4">
<h2 class="uppercase color-dark animated fadeInUp animation-delay-7">CENÍK</h2>
{% if objectinfo.pricelistinfo != '' %}
<div class="alert alert-default alert-light alert-dismissible animated fadeInUp animation-delay-7" role="alert">
<strong><i class="zmdi zmdi-info"></i></strong> {{ objectinfo.pricelistinfo }}
</div>
{% endif %}
</div>
<div class="row no-gutters">
{% set i = 0 %}
{% for pricelist in objectinfo.pricelists %}
{# @var pricelist \App\Controller\Objects\Pricelist #}
{% set i = i+1 %}
<div class="col-lg-4">
<div class="price-table price-table-default {% if i == 2 %}prominent{% endif %} wow zoomInDown animation-delay-2" style="visibility: visible; animation-name: zoomInDown;">
<header class="price-table-header">
<span class="price-table-category">{{ pricelist.name }}</span>
<h3><sup>od</sup>{{ pricelist.from }} Kč <sub>/1 hodinu</sub></h3>
</header>
<div class="price-table-body">
<table class="table">
<tbody>
{% for row in pricelist.data %}
{% if row != '' %}
{% set arr = row|split('=') %}
<tr><td>{{ arr[0] }}</td><td class="text-right">{{ arr[1] }}</td></tr>
{% endif %}
{% endfor %}
</tbody>
</table>
{% if pricelist.link != '' %}
<div class="text-center">
<a href="{{ pricelist.link }}" class="btn btn-default btn-raised"><i class="zmdi zmdi-download"></i> Kompletní ceník</a>
</div>
{% endif %}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% if objectinfo.showProgram != '' %}
<div class="row">
<div class="col-lg-12">
<article class="card card-primary wow zoomInRight animation-delay-1 mb-4" style="visibility: visible; animation-name: zoomInRight;">
<div class="card-body overflow-hidden card-body-big">
<h2 class="text-center">PROGRAM</h2>
<div id="id-program" class="fc fc-unthemed fc-ltr">
</div>
</div>
</article>
</div>
</div>
{% endif %}
</article>
{% 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">
{% if objectinfo.title == 'Aquasvět' %}
Oddychové a relaxační centrum Aquasvět
{% else %}
{{ objectinfo.title }}
{% endif %}
</h3>
<div class="ms-footbar-title" style="display: none">
<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">
<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 %}
</address>
<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/custom/pannellum/pannellum.js"></script>
<script src="/assets/js/component-carousels.js"></script>
<script>
$(document).ready(function() {
{% if objectinfo.showProgram != '' %}
LoadProgram();
{% endif %}
{% if objectinfo.link != 'mestske-divadlo' %}
pannellum.viewer('panorama-360-view', {
"type": "equirectangular",
"preview": "/assets/custom/img/panorama/{{ objectinfo.link }}_thumb.jpg",
"panorama": "/assets/custom/img/panorama/{{ objectinfo.link }}.jpg?v2",
"haov ": 270,
"vaov": 90,
{% if objectinfo.link == 'aquasvet' %}
"yaw": 25,
{% elseif objectinfo.link == 'fotbalovy-stadion' %}
"yaw": -60,
{% elseif objectinfo.link == 'kino-svet' %}
"yaw": -50,
{% elseif objectinfo.link == 'letni-kino' %}
"yaw": -40,
{% elseif objectinfo.link == 'atleticky-stadion' %}
"yaw": -70,
{% elseif objectinfo.link == 'in-line-draha' %}
"yaw": 100,
{% elseif objectinfo.link == 'sportovni-areal-tomase-ze-stitneho' %}
"yaw": -100,
{% elseif objectinfo.link == 'zimni-stadion-treninkova-hala' %}
"yaw": -75,
{% elseif objectinfo.link == 'zimni-stadion-rocknet-arena' %}
"yaw": -30,
{% elseif objectinfo.link == 'mestska-sportovni-hala' %}
"yaw": -20,
{% endif %}
"minYaw": -170,
"maxYaw": 170,
"minPitch": -45,
"maxPitch": 45,
"autoLoad": false,
{% if pageinfo.mobile %}
"showFullscreenCtrl": false
{% endif %}
});
$('.pnlm-load-button').html('<p>klikněte pro načtení</p>');
{% endif %}
InfoPanels(1, 'h2 span', {{ objectinfo.stat1.valueArr|json_encode|raw }});
InfoPanels(1, 'h4', {{ objectinfo.stat1.text1Arr|json_encode|raw }});
InfoPanels(1, 'p', {{ objectinfo.stat1.text2Arr|json_encode|raw }});
InfoPanels(2, 'h2 span', {{ objectinfo.stat2.valueArr|json_encode|raw }});
InfoPanels(2, 'h4', {{ objectinfo.stat2.text1Arr|json_encode|raw }});
InfoPanels(2, 'p', {{ objectinfo.stat2.text2Arr|json_encode|raw }});
InfoPanels(3, 'h2 span', {{ objectinfo.stat3.valueArr|json_encode|raw }});
InfoPanels(3, 'h4', {{ objectinfo.stat3.text1Arr|json_encode|raw }});
InfoPanels(3, 'p', {{ objectinfo.stat3.text2Arr|json_encode|raw }});
});
function InfoPanels(panelindex, selector, arr) {
if (arr.length>0) {
let i = 0;
let m = arr.length;
let d = arr;
let v = '';
if (m>1) {
setInterval(function() {
if (i>=m) i = 0;
v = d[i];
$('.card-stat'+panelindex+' '+selector).html(v);
i++;
}, 8000 / m);
}
}
}
function LoadProgram() {
{% if objectinfo.showProgram == 'default' %}
$( '#id-program' ).load( "/program-html-{{ objectinfo.id }}/week", function() {ScrollToProgram();});
{% endif %}
{% if objectinfo.showProgram == 'kino' %}
$( '#id-program' ).load( "/program-kino-html-{{ objectinfo.id }}/week", function() {ScrollToProgram();});
{% endif %}
{% if objectinfo.showProgram == 'divadlo' %}
$( '#id-program' ).load( "/program-divadlo-html-{{ objectinfo.id }}/week", function() {ScrollToProgram();});
{% endif %}
}
function ScrollToProgram() {
let hash = $(location).attr('hash');
if (hash!='') {
setTimeout(function () {
$('html, body').animate({
scrollTop: $('#id-'+hash.replace('#', '')).offset().top-200
}, 2000);
}, 1500);
}
}
</script>
{% if objectinfo.link == 'aquasvet' %}
<script>
$(document).ready(function () {
aquaCnt();
setInterval(function () {
aquaCnt();
}, 10000);
});
function aquaCnt() {
var aquacnt = httpGet("{{ app.request.server.get('APP_VBAZENU') }}?" + rand(10));
/*console.log(aquacnt);*/
if ($('div.card-primary-inverse span.counter').length) {
$('div.card-primary-inverse span.counter').html(aquacnt);
}
}
function httpGet(theUrl) {
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", theUrl, false);
xmlHttp.send(null);
return xmlHttp.responseText;
}
function rand(len) {
charSet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
var randomString = '';
for (var i = 0; i < len; i++) {
var randomPoz = Math.floor(Math.random() * charSet.length);
randomString += charSet.substring(randomPoz,randomPoz+1);
}
return randomString;
}
</script>
{% endif %}
{% endblock %}