templates/pages/object.html.twig line 1

Open in your IDE?
  1. {# @var pageinfo \App\Controller\PageInfo #}
  2. {# @var objectinfo \App\Controller\Objects\ObjectInfo #}
  3. {% extends 'base.html.twig' %}
  4.  {% block description %}
  5.      <meta name="description" content="{{ objectinfo.subtitle }}">
  6.  {% endblock %}
  7.  {% block theme %}
  8.      {% if objectinfo.objectClass == 'info' %}
  9.         <link rel="stylesheet" href="/assets/css/style.light-blue-700.min.css">
  10.      {% elseif objectinfo.objectClass == 'success' %}
  11.          <link rel="stylesheet" href="/assets/css/style.light-green-700.min.css">
  12.      {% else %}
  13.          <link rel="stylesheet" href="/assets/css/style.red-custom.min.css">
  14.      {% endif %}
  15.  {% endblock %}
  16. {% block customcss %}
  17.     {{ parent() }}
  18.     <link rel="stylesheet" type="text/css" href="/assets/custom/css/program.min.{{ app.request.server.get('APP_PREVCACHE') }}.css" />
  19.     <link rel="stylesheet" type="text/css" href="/assets/custom/css/media.min.{{ app.request.server.get('APP_PREVCACHE') }}.css" />
  20.     <link rel="stylesheet" href="/assets/custom/pannellum/pannellum.css">
  21. {% endblock %}
  22.  {% block og %}
  23.      <meta property="og:url"         content="{{ app.request.server.get('APP_URL') }}/{{ objectinfo.link }}" />
  24.      <meta property="og:type"        content="website" />
  25.      <meta property="og:title"       content="{{ objectinfo.title }}" />
  26.      <meta property="og:description" content="{{ objectinfo.subtitle }}" />
  27.      <meta property="og:image"       content="{{ objectinfo.picture.small }}" />
  28.  {% endblock %}
  29. {% block body %}
  30.     <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 }}');">
  31.         {% if pageinfo.info != '' %}
  32.             <div class="container" style="position: relative; top: -80px">
  33.             <div id="id-header-news">
  34.                 <i class="fa fa-info-circle"></i>
  35.                 <div class="marquee">
  36.                     <div class="marquee-content">{{ pageinfo.info|raw }}</div>
  37.                 </div>
  38.             </div>
  39.             </div>
  40.         {% endif %}
  41.         <div class="text-center color-white mt-6 mb-6 index-1">
  42.             <h1>{{ objectinfo.title }}</h1>
  43.             <p class="lead lead-lg mb-4">{{ objectinfo.subtitle }}</p>
  44.             {% if objectinfo.buttons|length == 1 %}
  45.                 {% set button = objectinfo.buttons[0] %}
  46.                 {# @var button \App\Controller\Objects\Link #}
  47.                 {% if button.title=='ROZPIS LEDU' or button.title=='ROZPIS DRAH' %}
  48.                     <a href="{{ button.link|replace({'.pdf':'.'~random(50, 100)~'.pdf'}) }}" target="_blank" class="btn btn-object">{{ button.title }}</a>
  49.                 {% else %}
  50.                     <a href="{{ button.link }}" class="btn btn-object">{{ button.title }}</a>
  51.                 {% endif %}
  52.             {% elseif objectinfo.buttons|length > 0 %}
  53.                 {% set b = 1 %}
  54.                 {% set btn_d_class = '' %}
  55.                 {% for button in objectinfo.buttons %}
  56.                     {# @var button \App\Controller\Objects\Link #}
  57.                     {% if b > 1 %}
  58.                         {% set btn_d_class = 'd-none d-sm-inline-block' %}
  59.                     {% endif %}
  60.                     {% if button.title=='ROZPIS LEDU' or button.title=='ROZPIS DRAH' %}
  61.                         <a href="{{ button.link|replace({'.pdf':'.'~random(50, 100)~'.pdf'}) }}" target="_blank" class="btn btn-object {{ btn_d_class }}">{{ button.title }}</a>
  62.                     {% else %}
  63.                         <a href="{{ button.link }}" class="btn btn-object {{ btn_d_class }}">{{ button.title }}</a>
  64.                     {% endif %}
  65.                     {% if b < objectinfo.buttons|length %}
  66.                     <img src="/assets/custom/img/kascv_logo_white_50_notext.png" class="btn-separator d-none d-sm-inline-block">
  67.                     {% endif %}
  68.                     {% set b = b + 1 %}
  69.                 {% endfor %}
  70.             {% endif %}
  71.         </div>
  72.     </div>
  73. <article class="container" style="margin-top: -110px">
  74.     <div class="row">
  75.         <div class="col-lg-8">
  76.             {% if objectinfo.alert != '' %}
  77.             <div class="alert alert-warning alert-light wow zoomInRight animation-delay-1" role="alert">
  78.                 <strong><i class="zmdi zmdi-alert-triangle"></i> Upozornění!</strong><br>{{ objectinfo.alert|raw }}
  79.             </div>
  80.             {% endif %}
  81.             {% if pageinfo.mobile %}
  82.                 <div class="card card-primary animated fadeInUp animation-delay-7 ">
  83.                     <div class="card-header">
  84.                         {% if objectinfo.virtualTourLink != '' %}
  85.                             <h3 class="card-title"><i class="fa fa-video-camera" aria-hidden="true"></i> Virtuální prohlídka</h3>
  86.                         {% else %}
  87.                             <h3 class="card-title"><i class="fa fa-video-camera" aria-hidden="true"></i> Panorama náhled</h3>
  88.                         {% endif %}
  89.                     </div>
  90.                     {% if objectinfo.virtualTourLink != '' %}
  91.                         <iframe src="{{ objectinfo.virtualTourLink }}" style="width: 100%;height: 250px;"></iframe>
  92.                     {% elseif objectinfo.title == 'Rocknet Aréna - Zimní stadion' and 1==0 %}
  93.                         <video controls style="width: 100%">
  94.                             <source src="/assets/media/zimni_stadion.mp4" type="video/mp4">
  95.                             Your browser does not support the video tag.
  96.                         </video>
  97.                     {% else %}
  98.                         <div id="panorama-360-view"></div>
  99.                     {% endif %}
  100.                 </div>
  101.             {% endif %}
  102.             {% if objectinfo.stat1.icon != '' or objectinfo.stat2.icon != '' or objectinfo.stat3.icon != '' %}
  103.             <div class="row">
  104.                 <div class="col-md-4">
  105.                     {% if objectinfo.stat1.icon != '' %}
  106.                     <div class="card card-primary text-center">
  107.                         <div class="card-body card-stat1">
  108.                             {% if objectinfo.stat1.icon[0:3] == 'fa-' %}
  109.                                 <span class="ms-icon ms-icon-circle ms-icon-xlg">
  110.                                     <i class="fa {{ objectinfo.stat1.icon }}"></i>
  111.                                 </span>
  112.                             {% elseif objectinfo.stat1.icon|length == 1 %}
  113.                                 <span class="ms-icon ms-icon-circle ms-icon-xlg">
  114.                                     <h2 class="no-margin" style="margin-top: 12px">{{ objectinfo.stat1.icon }}</h2>
  115.                                 </span>
  116.                             {% else %}
  117.                                 <h3 style="margin: 36px 0px">{{ objectinfo.stat1.icon }}</h3>
  118.                             {% endif %}
  119.                             <h2 class="color-primary"><span class="{% if objectinfo.stat1.value matches '/^\\d+$/' %}counter{% endif %}">{{ objectinfo.stat1.value }}</span></h2>
  120.                             <h4 class="color-primary">{{ objectinfo.stat1.text1 }}</h4>
  121.                             <p>{{ objectinfo.stat1.text2 }}</p>
  122.                         </div>
  123.                     </div>
  124.                     {% endif %}
  125.                 </div>
  126.                 <div class="col-md-4">
  127.                     {% if objectinfo.stat2.icon != '' %}
  128.                     <div class="card card-primary-inverse text-center">
  129.                         <div class="card-body card-stat2">
  130.                             {% if objectinfo.stat2.icon[0:3] == 'fa-' %}
  131.                                 <span class="ms-icon ms-icon-white ms-icon-circle ms-icon-xlg">
  132.                                     <i class="fa {{ objectinfo.stat2.icon }}"></i>
  133.                                 </span>
  134.                             {% elseif objectinfo.stat2.icon|length == 1 %}
  135.                                 <span class="ms-icon ms-icon-white ms-icon-circle ms-icon-xlg">
  136.                                     <h2 class="no-margin" style="margin-top: 12px">{{ objectinfo.stat2.icon }}</h2>
  137.                                 </span>
  138.                             {% else %}
  139.                                 <h3 style="margin: 36px 0px">{{ objectinfo.stat2.icon }}</h3>
  140.                             {% endif %}
  141.                             <h2 class=""><span class="{% if objectinfo.stat2.value matches '/^\\d+$/' %}counter{% endif %}">{{ objectinfo.stat2.value }}</span></h2>
  142.                             <h4 class="">{{ objectinfo.stat2.text1 }}</h4>
  143.                             <p>{{ objectinfo.stat2.text2 }}</p>
  144.                         </div>
  145.                     </div>
  146.                     {% endif %}
  147.                 </div>
  148.                 <div class="col-md-4">
  149.                     {% if objectinfo.stat1.icon != '' %}
  150.                         <div class="card card-primary text-center">
  151.                             <div class="card-body card-stat3">
  152.                                 {% if objectinfo.stat3.icon[0:3] == 'fa-' %}
  153.                                     <span class="ms-icon ms-icon-circle ms-icon-xlg">
  154.                                     <i class="fa {{ objectinfo.stat3.icon }}"></i>
  155.                                 </span>
  156.                                 {% elseif objectinfo.stat3.icon|length == 1 %}
  157.                                     <span class="ms-icon ms-icon-circle ms-icon-xlg">
  158.                                     <h2 class="no-margin" style="margin-top: 12px">{{ objectinfo.stat3.icon }}</h2>
  159.                                 </span>
  160.                                 {% else %}
  161.                                     <h3 style="margin: 36px 0px">{{ objectinfo.stat3.icon }}</h3>
  162.                                 {% endif %}
  163.                                 <h2 class="color-primary"><span class="{% if objectinfo.stat3.value matches '/^\\d+$/' %}counter{% endif %}">{{ objectinfo.stat3.value }}</span></h2>
  164.                                 <h4 class="color-primary">{{ objectinfo.stat3.text1 }}</h4>
  165.                                 <p>{{ objectinfo.stat3.text2 }}</p>
  166.                             </div>
  167.                         </div>
  168.                     {% endif %}
  169.                 </div>
  170.             </div>
  171.             {% endif %}
  172.             {{ html|raw }}
  173.             {{ html2|raw }}
  174.         </div>
  175.         <div class="col-lg-4">
  176.             {% if not pageinfo.mobile %}
  177.                 <div class="card card-primary animated fadeInUp animation-delay-7 ">
  178.                     <div class="card-header">
  179.                         {% if objectinfo.virtualTourLink != '' %}
  180.                         <h3 class="card-title"><i class="fa fa-video-camera" aria-hidden="true"></i> Virtuální prohlídka
  181.                             <a href="{{ objectinfo.virtualTourLink }}" target="_blank" class="pull-right"><i class="fa fa-arrows-alt color-white" aria-hidden="true"></i></a></h3>
  182.                         {% else %}
  183.                             <h3 class="card-title"><i class="fa fa-video-camera" aria-hidden="true"></i> Panorama náhled</h3>
  184.                         {% endif %}
  185.                     </div>
  186.                     {% if objectinfo.virtualTourLink != '' %}
  187.                         <iframe src="{{ objectinfo.virtualTourLink }}" style="width: 100%;height: 250px;"></iframe>
  188.                     {% elseif objectinfo.title == 'Rocknet Aréna - Zimní stadion' and 1==0 %}
  189.                         <video controls style="width: 100%">
  190.                             <source src="/assets/media/zimni_stadion.mp4" type="video/mp4">
  191.                             Your browser does not support the video tag.
  192.                         </video>
  193.                     {% else %}
  194.                         <div id="panorama-360-view"></div>
  195.                     {% endif %}
  196.                 </div>
  197.             {% endif %}
  198.             {% if objectinfo.opening|length > 0 %}
  199.             <div class="card card-primary animated fadeInUp animation-delay-7">
  200.                 <div class="card-header">
  201.                     <h3 class="card-title"><i class="zmdi zmdi-widgets"></i> Otevírací doba</h3>
  202.                 </div>
  203.                 <div class="card-body overflow-hidden">
  204.                     <table class="table">
  205.                         <tbody>
  206.                         {% for oh in objectinfo.opening %}
  207.                         {# @var oh \App\Controller\Objects\OpeningHours #}
  208.                             {% if oh.days != '' %}
  209.                                 <tr><td>{{ oh.name }}</td><td>{{ oh.days }}</td><td>{{ oh.hours }}</td></tr>
  210.                             {% endif %}
  211.                         {% endfor %}
  212.                         </tbody></table>
  213.                 </div>
  214.             </div>
  215.             {% endif %}
  216.             {% if objectinfo.contacts|length > 0 %}
  217.             <div class="card card-primary animated fadeInUp animation-delay-7">
  218.                 <div class="card-header">
  219.                     <h3 class="card-title"><i class="zmdi zmdi-phone"></i> Kontakty</h3>
  220.                 </div>
  221.                 <div class="tab-content">
  222.                     <div role="tabpanel" class="tab-pane fade active show" id="favorite">
  223.                         <div class="card-body overflow-hidden">
  224.                             <div class="ms-media-list">
  225.                                 {% for contact in objectinfo.contacts %}
  226.                                     {# @var contact \App\Controller\Objects\Contact #}
  227.                                 <div class="media mb-2">
  228.                                     <a class="mr-3" href="javascript:void(0);">
  229.                                         <img class="media-object mr-2 img-contact" src="{{ contact.picture.small }}">
  230.                                     </a>
  231.                                     <div class="media-body">
  232.                                         <h4 class="mt-0 mb-0">{{ contact.fullname }}</h4>
  233.                                         <small class="mt-0 mb-0">{{ contact.title|lower }}</small>
  234.                                         {% if contact.mobile != '-' %}
  235.                                             <p class="mb-0">{{ contact.mobile }}</p>
  236.                                         {% else  %}
  237.                                             <p class="mb-0">{{ contact.phone }}</p>
  238.                                         {% endif %}
  239.                                         <a href="mailto:{{ contact.email }}?subject=feedback">{{ contact.email }}</a>
  240.                                     </div>
  241.                                 </div>
  242.                                 {% endfor %}
  243.                             </div>
  244.                         </div>
  245.                     </div>
  246.                 </div>
  247.             </div>
  248.             {% endif %}
  249.             {% if objectinfo.files|length > 0 %}
  250.             <div class="card card-primary animated fadeInUp animation-delay-7">
  251.                 <div class="card-header">
  252.                     <h3 class="card-title"><i class="zmdi zmdi-download"></i> Soubory ke stažení</h3>
  253.                 </div>
  254.                 <div class="card-body overflow-hidden">
  255.                     <table class="table table-hover">
  256.                         <tbody>
  257.                         {% for file in objectinfo.files %}
  258.                         {# @var file \App\Controller\Objects\File #}
  259.                         <tr>
  260.                             <td style="width: 30px">{{ file.icon|raw }}</td>
  261.                             <td>{{ file.name }}</td>
  262.                             <td style="width: 40px"><a href="/soubor-{{ file.id64 }}?{{ random(5) }}"><i class="fa fa-download"></i></a></td>
  263.                         </tr>
  264.                         {% endfor %}
  265.                         </tbody></table>
  266.                 </div>
  267.             </div>
  268.             {% endif %}
  269.             {% if objectinfo.pictures|length > 0 %}
  270.             <div class="card card-primary animated fadeInUp animation-delay-7">
  271.                 <div class="card-header">
  272.                     <h3 class="card-title"><i class="zmdi zmdi-image"></i> Fotogalerie</h3>
  273.                 </div>
  274.                 <div class="card-body overflow-hidden">
  275.                     <div class="row">
  276.                         {% set picount = objectinfo.pictures|length %}
  277.                         {% set maxprev = 4 %}
  278.                         {% for picture in objectinfo.pictures %}
  279.                         {# @var picture \App\Controller\Objects\Picture #}
  280.                             {% if maxprev > 0 %}
  281.                                 {% set maxprev = maxprev - 1 %}
  282.                                 {% set picount = picount - 1 %}
  283.                                 <div class="col-6">
  284.                                     <div class="card wow zoomIn" style="visibility: visible; animation-name: zoomIn;">
  285.                                         <div class="ms-thumbnail card-body p-05 ">
  286.                                             <div class="withripple zoom-img">
  287.                                                 <a href="{{ picture.large }}" data-lightbox="gallery" data-title="{{ objectinfo.title }}">
  288.                                                     <img src="{{ picture.small }}" alt="" class="img-fluid">
  289.                                                 </a>
  290.                                                 <div class="ripple-container"></div></div>
  291.                                         </div>
  292.                                     </div>
  293.                                 </div>
  294.                             {% endif %}
  295.                         {% endfor %}
  296.                         {% if picount > 0 and picount < 5 %}
  297.                             <p>+ {{ picount }} další fotografie</p>
  298.                         {% elseif picount > 4 %}
  299.                             <p>+ {{ picount }} dalších fotografií</p>
  300.                         {% endif %}
  301.                         <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>
  302.                     </div>
  303.                 </div>
  304.             </div>
  305.             {% endif %}
  306.         </div>
  307.     </div>
  308.     {% if objectinfo.pricelists|length > 0 %}
  309.         <a name="cenik" style="position: relative; top: -200px"></a>
  310.         <div class="container mb-4">
  311.             <div class="text-center mb-4">
  312.                 <h2 class="uppercase color-dark animated fadeInUp animation-delay-7">CENÍK</h2>
  313.                 {% if objectinfo.pricelistinfo != '' %}
  314.                 <div class="alert alert-default alert-light alert-dismissible animated fadeInUp animation-delay-7" role="alert">
  315.                     <strong><i class="zmdi zmdi-info"></i></strong> {{ objectinfo.pricelistinfo }}
  316.                 </div>
  317.                 {% endif %}
  318.             </div>
  319.             <div class="row no-gutters">
  320.                 {% set i = 0 %}
  321.                 {% for pricelist in objectinfo.pricelists %}
  322.                     {# @var pricelist \App\Controller\Objects\Pricelist #}
  323.                     {% set i = i+1 %}
  324.                     <div class="col-lg-4">
  325.                         <div class="price-table price-table-default {% if i == 2 %}prominent{% endif %} wow zoomInDown animation-delay-2" style="visibility: visible; animation-name: zoomInDown;">
  326.                             <header class="price-table-header">
  327.                                 <span class="price-table-category">{{ pricelist.name }}</span>
  328.                                 <h3><sup>od</sup>{{ pricelist.from }} Kč <sub>/1 hodinu</sub></h3>
  329.                             </header>
  330.                             <div class="price-table-body">
  331.                                 <table class="table">
  332.                                     <tbody>
  333.                                     {% for row in pricelist.data %}
  334.                                         {% if row != '' %}
  335.                                             {% set arr = row|split('=') %}
  336.                                             <tr><td>{{ arr[0] }}</td><td class="text-right">{{ arr[1] }}</td></tr>
  337.                                         {% endif %}
  338.                                     {% endfor %}
  339.                                     </tbody>
  340.                                 </table>
  341.                                 {% if pricelist.link != '' %}
  342.                                 <div class="text-center">
  343.                                     <a href="{{ pricelist.link }}" class="btn btn-default btn-raised"><i class="zmdi zmdi-download"></i> Kompletní ceník</a>
  344.                                 </div>
  345.                                 {% endif %}
  346.                             </div>
  347.                         </div>
  348.                     </div>
  349.                 {% endfor %}
  350.             </div>
  351.         </div>
  352.     {% endif %}
  353.     {% if objectinfo.showProgram != '' %}
  354.             <div class="row">
  355.                 <div class="col-lg-12">
  356.                     <article class="card card-primary wow zoomInRight animation-delay-1 mb-4" style="visibility: visible; animation-name: zoomInRight;">
  357.                         <div class="card-body overflow-hidden card-body-big">
  358.                         <h2 class="text-center">PROGRAM</h2>
  359.                         <div id="id-program" class="fc fc-unthemed fc-ltr">
  360.                         </div>
  361.                         </div>
  362.                     </article>
  363.                 </div>
  364.             </div>
  365.     {% endif %}
  366. </article>
  367. {% endblock %}
  368. {% block map %}
  369.     <iframe style="width: 100%; height: 300px" id="id-gmap-embed" src="{{ objectinfo.mapLink }}"></iframe>
  370. {% endblock %}
  371. {% block address %}
  372.     <h3 class="ms-footbar-title mb-2 ms-footer-text">
  373.     {% if objectinfo.title == 'Aquasvět'  %}
  374.         Oddychové a relaxační centrum Aquasvět
  375.     {% else %}
  376.         {{ objectinfo.title }}
  377.     {% endif %}
  378.     </h3>
  379.     <div class="ms-footbar-title" style="display: none">
  380.         <img src="/assets/custom/img/kascv_logo_white_50_notext.png">
  381.         <h3 class="no-m ms-site-title"><span>KULTURA</span>A<span>SPORT</span>CHOMUTOV</h3>
  382.     </div>
  383.     <address class="no-mb">
  384.         <address class="no-mb">
  385.             <p><i class="zmdi zmdi-pin mr-1"></i> {{ objectinfo.addressStreet }}</p>
  386.             <p><i class="zmdi zmdi-map mr-1"></i> {{ objectinfo.addressCity }} {{ objectinfo.addressPostal }}</p>
  387.             {% if objectinfo.contactPhone != '' %}
  388.             <p><i class="zmdi zmdi-email mr-1"></i> <a href="mailto:{{ objectinfo.contactPhone }}">{{ objectinfo.contactPhone }}</a></p>
  389.             {% endif %}
  390.             {% if objectinfo.contactMail != '' %}
  391.             <p><i class="fa fa-fax mr-1"></i>{{ objectinfo.contactMail }}</p>
  392.             {% endif %}
  393.         </address>
  394.         <p><i class="color-danger-light zmdi zmdi-phone mr-1"></i> <a href="/kontakty">Kontakty</a></p>
  395.     </address>
  396. {% endblock %}
  397. {% block javascripts %}
  398.     {{ parent() }}
  399.     <script src="/assets/custom/pannellum/pannellum.js"></script>
  400.     <script src="/assets/js/component-carousels.js"></script>
  401.     <script>
  402.         $(document).ready(function() {
  403.             {% if objectinfo.showProgram != '' %}
  404.             LoadProgram();
  405.             {% endif %}
  406.             {% if objectinfo.link != 'mestske-divadlo' %}
  407.             pannellum.viewer('panorama-360-view', {
  408.                 "type": "equirectangular",
  409.                 "preview": "/assets/custom/img/panorama/{{ objectinfo.link }}_thumb.jpg",
  410.                 "panorama": "/assets/custom/img/panorama/{{ objectinfo.link }}.jpg?v2",
  411.                 "haov ": 270,
  412.                 "vaov": 90,
  413.                 {% if objectinfo.link == 'aquasvet' %}
  414.                 "yaw": 25,
  415.                 {% elseif objectinfo.link == 'fotbalovy-stadion' %}
  416.                 "yaw": -60,
  417.                 {% elseif objectinfo.link == 'kino-svet' %}
  418.                 "yaw": -50,
  419.                 {% elseif objectinfo.link == 'letni-kino' %}
  420.                 "yaw": -40,
  421.                 {% elseif objectinfo.link == 'atleticky-stadion' %}
  422.                 "yaw": -70,
  423.                 {% elseif objectinfo.link == 'in-line-draha' %}
  424.                 "yaw": 100,
  425.                 {% elseif objectinfo.link == 'sportovni-areal-tomase-ze-stitneho' %}
  426.                 "yaw": -100,
  427.                 {% elseif objectinfo.link == 'zimni-stadion-treninkova-hala' %}
  428.                 "yaw": -75,
  429.                 {% elseif objectinfo.link == 'zimni-stadion-rocknet-arena' %}
  430.                 "yaw": -30,
  431.                 {% elseif objectinfo.link == 'mestska-sportovni-hala' %}
  432.                 "yaw": -20,
  433.                 {% endif %}
  434.                 "minYaw": -170,
  435.                 "maxYaw": 170,
  436.                 "minPitch": -45,
  437.                 "maxPitch": 45,
  438.                 "autoLoad": false,
  439.                 {% if pageinfo.mobile %}
  440.                 "showFullscreenCtrl": false
  441.                 {% endif %}
  442.             });
  443.             $('.pnlm-load-button').html('<p>klikněte pro načtení</p>');
  444.             {% endif %}
  445.             InfoPanels(1, 'h2 span', {{ objectinfo.stat1.valueArr|json_encode|raw }});
  446.             InfoPanels(1, 'h4', {{ objectinfo.stat1.text1Arr|json_encode|raw }});
  447.             InfoPanels(1, 'p', {{ objectinfo.stat1.text2Arr|json_encode|raw }});
  448.             InfoPanels(2, 'h2 span', {{ objectinfo.stat2.valueArr|json_encode|raw }});
  449.             InfoPanels(2, 'h4', {{ objectinfo.stat2.text1Arr|json_encode|raw }});
  450.             InfoPanels(2, 'p', {{ objectinfo.stat2.text2Arr|json_encode|raw }});
  451.             InfoPanels(3, 'h2 span', {{ objectinfo.stat3.valueArr|json_encode|raw }});
  452.             InfoPanels(3, 'h4', {{ objectinfo.stat3.text1Arr|json_encode|raw }});
  453.             InfoPanels(3, 'p', {{ objectinfo.stat3.text2Arr|json_encode|raw }});
  454.         });
  455.         function InfoPanels(panelindex, selector, arr) {
  456.             if (arr.length>0) {
  457.                 let i = 0;
  458.                 let m = arr.length;
  459.                 let d = arr;
  460.                 let v = '';
  461.                 if (m>1) {
  462.                     setInterval(function() {
  463.                         if (i>=m) i = 0;
  464.                         v = d[i];
  465.                         $('.card-stat'+panelindex+' '+selector).html(v);
  466.                         i++;
  467.                     }, 8000 / m);
  468.                 }
  469.             }
  470.         }
  471.         function LoadProgram() {
  472.             {% if objectinfo.showProgram == 'default' %}
  473.             $( '#id-program' ).load( "/program-html-{{ objectinfo.id }}/week", function() {ScrollToProgram();});
  474.             {% endif %}
  475.             {% if objectinfo.showProgram == 'kino' %}
  476.             $( '#id-program' ).load( "/program-kino-html-{{ objectinfo.id }}/week", function() {ScrollToProgram();});
  477.             {% endif %}
  478.             {% if objectinfo.showProgram == 'divadlo' %}
  479.             $( '#id-program' ).load( "/program-divadlo-html-{{ objectinfo.id }}/week", function() {ScrollToProgram();});
  480.             {% endif %}
  481.         }
  482.         function ScrollToProgram() {
  483.             let hash = $(location).attr('hash');
  484.             if (hash!='') {
  485.                 setTimeout(function () {
  486.                     $('html, body').animate({
  487.                         scrollTop: $('#id-'+hash.replace('#', '')).offset().top-200
  488.                     }, 2000);
  489.                 }, 1500);
  490.             }
  491.         }
  492.     </script>
  493.     {% if objectinfo.link == 'aquasvet' %}
  494.         <script>
  495.             $(document).ready(function () {
  496.                 aquaCnt();
  497.                 setInterval(function () {
  498.                     aquaCnt();
  499.                 }, 10000);
  500.             });
  501.             function aquaCnt() {
  502.                 var aquacnt = httpGet("{{ app.request.server.get('APP_VBAZENU') }}?" + rand(10));
  503.                 /*console.log(aquacnt);*/
  504.                 if ($('div.card-primary-inverse span.counter').length) {
  505.                     $('div.card-primary-inverse span.counter').html(aquacnt);
  506.                 }
  507.             }
  508.             function httpGet(theUrl) {
  509.                 var xmlHttp = new XMLHttpRequest();
  510.                 xmlHttp.open("GET", theUrl, false);
  511.                 xmlHttp.send(null);
  512.                 return xmlHttp.responseText;
  513.             }
  514.             function rand(len) {
  515.                 charSet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
  516.                 var randomString = '';
  517.                 for (var i = 0; i < len; i++) {
  518.                     var randomPoz = Math.floor(Math.random() * charSet.length);
  519.                     randomString += charSet.substring(randomPoz,randomPoz+1);
  520.                 }
  521.                 return randomString;
  522.             }
  523.         </script>
  524.     {% endif %}
  525. {% endblock %}