templates/base.html.twig line 1

Open in your IDE?
  1. <!doctype html>
  2. <html lang="{{ app.request.locale }}">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport"
  6.           content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  7.     <meta http-equiv="X-UA-Compatible" content="ie=edge">
  8.     {% set companyObj = app.request.get('companyInner') %}
  9.     {% set isMobile = isMobile(companyObj) %}
  10.     {% set companyStyles = companyStyles(app.request.get('companyInner')) %}
  11.     {% if companyStyles.favicon is defined and companyStyles.favicon is not empty %}
  12.         <link rel="icon" type="{{ companyStyles.favicon.contentType }}" href="{{ sonata_path(companyStyles.favicon, 'reference') }}">
  13.     {% else %}
  14.         <link rel="icon" type="image/png" href="{{ app.request.getSchemeAndHttpHost() }}/build/images/favicon-96x96.png">
  15.     {% endif %}
  16.     {% if page is defined and page is not empty %}
  17.         {% set metaInfo = getMeta(page) %}
  18.     {% endif %}
  19.     {% if metaInfo is defined and metaInfo is not empty %}
  20.         {% block meta %}
  21.             {% include '/components/meta/meta.twig' %}
  22.         {% endblock %}
  23.     {% else %}
  24.         <title>{% block pageTitle %}Index Page{% endblock %}</title>
  25.     {% endif %}
  26.     {% set companyObj = app.request.get('companyInner') %}
  27.     {% if companyObj.slug is defined and companyObj.slug == 'e-sim' %}
  28.         <!-- Google Tag Manager -->
  29.         <script>(function (w, d, s, l, i) {
  30.             w[l] = w[l] || [];
  31.             w[l].push({
  32.               'gtm.start':
  33.                   new Date().getTime(), event: 'gtm.js'
  34.             });
  35.             var f = d.getElementsByTagName(s)[0],
  36.                 j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
  37.             j.async = true;
  38.             j.src =
  39.                 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
  40.             f.parentNode.insertBefore(j, f);
  41.           })(window, document, 'script', 'dataLayer', 'GTM-MKLD3JHN');</script>
  42.         <!-- End Google Tag Manager -->
  43.     {% endif %}
  44.     {% if companyObj.slug is defined and companyObj.slug == 'pl' %}
  45.         <!-- Google Tag Manager -->
  46.         <script>(function (w, d, s, l, i) {
  47.             w[l] = w[l] || [];
  48.             w[l].push(
  49.                 {'gtm.start': new Date().getTime(), event: 'gtm.js'}
  50.             );
  51.             var f = d.getElementsByTagName(s)[0],
  52.                 j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
  53.             j.async = true;
  54.             j.src =
  55.                 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
  56.             f.parentNode.insertBefore(j, f);
  57.           })(window, document, 'script', 'dataLayer', 'GTM-56R88XPR');</script>
  58.         <!-- End Google Tag Manager -->
  59.     {% endif %}
  60.     {% if companyObj.slug is defined and companyObj.slug == 'cz' %}
  61.         <!-- Google Tag Manager -->
  62.         <script>(function (w, d, s, l, i) {
  63.             w[l] = w[l] || [];
  64.             w[l].push(
  65.                 {'gtm.start': new Date().getTime(), event: 'gtm.js'}
  66.             );
  67.             var f = d.getElementsByTagName(s)[0],
  68.                 j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
  69.             j.async = true;
  70.             j.src =
  71.                 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
  72.             f.parentNode.insertBefore(j, f);
  73.           })(window, document, 'script', 'dataLayer', 'GTM-N5JBGRSW');</script>
  74.         <!-- End Google Tag Manager -->
  75.     {% endif %}
  76.     {% if companyObj.slug is defined and companyObj.slug == 'buy' %}
  77.         <!-- Google Tag Manager -->
  78.         <script>(function (w, d, s, l, i) {
  79.             w[l] = w[l] || [];
  80.             w[l].push(
  81.                 {'gtm.start': new Date().getTime(), event: 'gtm.js'}
  82.             );
  83.             var f = d.getElementsByTagName(s)[0],
  84.                 j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
  85.             j.async = true;
  86.             j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
  87.             f.parentNode.insertBefore(j, f);
  88.           })(window, document, 'script', 'dataLayer', 'GTM-M4P5JKNJ');</script>
  89.         <!-- End Google Tag Manager -->
  90.     {% endif %}
  91.     {% block stylesheets %}
  92.         {{ encore_entry_link_tags('app') }}
  93.     {% endblock %}
  94.     {% set referer = getReferer(app.request) %}
  95.     {#         {{dump(referer)}} #}
  96.     {#            {{ sonata_media(companyStyles.mainImage, 'reference') }} #}
  97.     {#            <input type="hidden" name="_token" value="{{ csrf_token('registration') }}"> #}
  98.     {#            <input type="hidden" name="_token" value="{{ csrf_token('email-verification') }}"> #}
  99.     {#            <input type="hidden" name="_token" value="{{ csrf_token('code-resend') }}"> #}
  100.     {#            <input type="hidden" name="_token" value="{{ csrf_token('password-reset') }}"> #}
  101.     {#    <script src="https://www.google.com/recaptcha/api.js?render={{ recaptcha_key }}"></script> #}
  102.     {% if companyStyles.fonts is defined and companyStyles.fonts is not empty %}
  103.         {{ companyStyles.fonts|raw }}
  104.     {% endif %}
  105.     {% if companyStyles.fontFamily is defined and companyStyles.fontFamily is not empty %}
  106.         <style>
  107.             * {
  108.                 font-family: {{ companyStyles.fontFamily|raw }};
  109.             }
  110.         </style>
  111.     {% endif %}
  112.     {% if not isMobile %}
  113.         <style>
  114.             /* width */
  115.             ::-webkit-scrollbar {
  116.                 width: 4px;
  117.                 padding-left: 18px;
  118.             }
  119.             /* Track */
  120.             ::-webkit-scrollbar-track {
  121.                 box-shadow: inset 0 0 5px grey;
  122.                 border-radius: 500px;
  123.                 margin-right: 10px;
  124.             }
  125.             /* Handle */
  126.             ::-webkit-scrollbar-thumb {
  127.                 background: {{ companyStyles.buttonColor }};
  128.                 border-radius: 500px;
  129.             }
  130.             /* Handle on hover */
  131.             ::-webkit-scrollbar-thumb:hover {
  132.                 background: {{ companyStyles.buttonColor }};
  133.             }
  134.             .stepper-wrapper {
  135.                 margin-top: 50px;
  136.                 display: flex;
  137.                 justify-content: space-between;
  138.                 margin-bottom: 20px;
  139.                 gap: 5px;
  140.             }
  141.             .stepper-item {
  142.                 position: relative;
  143.                 display: flex;
  144.                 flex-direction: column;
  145.                 align-items: center;
  146.                 flex: 1;
  147.                 text-align: center;
  148.                 @media (max-width: 500px) {
  149.                     font-size: 10px;
  150.                 }
  151.                 @media (min-width: 501px) and (max-width: 768px) {
  152.                     font-size: 12px;
  153.                 }
  154.             }
  155.             .stepper-item::before {
  156.                 position: absolute;
  157.                 content: "";
  158.                 border-bottom: 2px solid #F7F7FA;
  159.                 width: 100%;
  160.                 top: 20px;
  161.                 left: -50%;
  162.                 z-index: 2;
  163.                 @media (max-width: 768px) {
  164.                     top: 15px;
  165.                 }
  166.             }
  167.             .stepper-item::after {
  168.                 position: absolute;
  169.                 content: "";
  170.                 border-bottom: 2px solid #F7F7FA;
  171.                 width: 100%;
  172.                 top: 20px;
  173.                 left: 50%;
  174.                 z-index: 2;
  175.                 @media (max-width: 768px) {
  176.                     top: 15px;
  177.                 }
  178.             }
  179.             .stepper-item .step-counter {
  180.                 position: relative;
  181.                 z-index: 5;
  182.                 display: flex;
  183.                 justify-content: center;
  184.                 align-items: center;
  185.                 width: 40px;
  186.                 height: 40px;
  187.                 border-radius: 50%;
  188.                 background: #F7F7FA;
  189.                 margin-bottom: 6px;
  190.                 border: 2px solid #E2E2E9;
  191.                 @media (max-width: 768px) {
  192.                     width: 30px;
  193.                     height: 30px;
  194.                 }
  195.             }
  196.             .stepper-item.active {
  197.                 font-weight: 500;
  198.             }
  199.             .stepper-item.active .step-counter {
  200.                 background-color: {{ companyStyles.buttonColor }};
  201.                 color: white;
  202.                 border-color: {{ companyStyles.buttonColor }};
  203.             }
  204.             .stepper-item.active .step-name {
  205.                 color: {{ companyStyles.buttonColor }};
  206.             }
  207.             .stepper-item.completed .step-counter {
  208.                 background-color: {{ companyStyles.buttonColor }};
  209.                 border-color: {{ companyStyles.buttonColor }};
  210.             }
  211.             .stepper-item.completed::after {
  212.                 position: absolute;
  213.                 content: "";
  214.                 border-bottom: 2px solid{{ companyStyles.buttonColor }};
  215.                 width: 100%;
  216.                 top: 20px;
  217.                 left: 50%;
  218.                 z-index: 3;
  219.             }
  220.             .stepper-item:first-child::before {
  221.                 content: none;
  222.             }
  223.             .stepper-item:last-child::after {
  224.                 content: none;
  225.             }
  226.             .rating {
  227.                 display: inline-flex;
  228.                 flex-direction: row; /* Естественный порядок слева направо */
  229.                 font-size: 24px;
  230.                 line-height: 1;
  231.             }
  232.             .rating input {
  233.                 display: none; /* Скрываем радиокнопки */
  234.             }
  235.             .rating label {
  236.                 cursor: default;
  237.                 color: #ccc; /* Цвет пустой звезды */
  238.                 padding: 0 2px;
  239.             }
  240.             /* Подсветка звезд в зависимости от data-rating */
  241.             .rating[data-rating="1"] label:nth-of-type(-n+1),
  242.             .rating[data-rating="2"] label:nth-of-type(-n+2),
  243.             .rating[data-rating="3"] label:nth-of-type(-n+3),
  244.             .rating[data-rating="4"] label:nth-of-type(-n+4),
  245.             .rating[data-rating="5"] label:nth-of-type(-n+5) {
  246.                 color: {{ companyStyles.buttonColor }}; /* Цвет заполненной звезды */
  247.             }
  248.             /* Убираем интерактивность */
  249.             .rating label:hover,
  250.             .rating label:hover ~ label {
  251.                 color: #ccc; /* Отключаем hover-эффект */
  252.             }
  253.             .splide__pagination {
  254.                 bottom: -24px;
  255.                 gap: 4px;
  256.             }
  257.             .splide__pagination__page.is-active {
  258.                 background-color: {{ companyStyles.buttonColor }};
  259.                 opacity: 1;
  260.                 width: 48px;
  261.                 border-radius: 500px;
  262.                 transform: none;
  263.             }
  264.             .splide__pagination__page {
  265.                 background-color: #F7F7FA;
  266.                 background: #F7F7FA;
  267.                 opacity: 1;
  268.                 width: 16px;
  269.                 height: 8px;
  270.                 border-radius: 500px;
  271.             }
  272.             .banner {
  273.                 @media (max-width: 768px) {
  274.                     background-image: none !important;
  275.                 }
  276.             }
  277.         </style>
  278.     {% endif %}
  279.     {% block additional_stylesheets %}
  280.     {% endblock %}
  281.     {% if companyStyles.linkTextColor is defined %}
  282.         <style>
  283.             .prose :where(ul > li):not(:where([class~="not-prose"],[class~="not-prose"] *))::marker {
  284.                 color: {{ companyStyles.linkTextColor }};
  285.             }
  286.             .prose :where(a):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
  287.                 color: {{ companyStyles.linkTextColor }};
  288.             }
  289.         </style>
  290.     {% endif %}
  291. </head>
  292. <body style="{% if isMobile %}{{ inlineStyles(app.request.get('companyInner'), constant('App\\Constants\\SettingConstants::BODY_STYLES')) }}{% else %}#FFF{% endif %}"
  293.       {% if recaptcha_enabled %}data-recaptcha_key="{{ recaptcha_key }}"{% endif %}>
  294. {% if companyObj.slug is defined and companyObj.slug == 'e-sim' %}
  295.     <!-- Google Tag Manager (noscript) -->
  296.     <noscript>
  297.         <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MKLD3JHN"
  298.                 height="0" width="0" style="display:none;visibility:hidden">
  299.         </iframe>
  300.     </noscript>
  301.     <!-- End Google Tag Manager (noscript) -->
  302. {% endif %}
  303. {% if companyObj.slug is defined and companyObj.slug == 'pl' %}
  304.     <!-- Google Tag Manager (noscript) -->
  305.     <noscript>
  306.         <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-56R88XPR"
  307.                 height="0" width="0" style="display:none;visibility:hidden"></iframe>
  308.     </noscript>
  309.     <!-- End Google Tag Manager (noscript) -->
  310. {% endif %}
  311. {% if companyObj.slug is defined and companyObj.slug == 'cz' %}
  312.     <!-- Google Tag Manager (noscript) -->
  313.     <noscript>
  314.         <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-N5JBGRSW"
  315.                 height="0" width="0" style="display:none;visibility:hidden"></iframe>
  316.     </noscript>
  317.     <!-- End Google Tag Manager (noscript) -->
  318. {% endif %}
  319. {% if companyObj.slug is defined and companyObj.slug == 'buy' %}
  320.     <!-- Google Tag Manager (noscript) -->
  321.     <noscript>
  322.         <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M4P5JKNJ"
  323.                 height="0" width="0" style="display:none;visibility:hidden"></iframe>
  324.     </noscript>
  325.     <!-- End Google Tag Manager (noscript) -->
  326. {% endif %}
  327. {% if page is defined and page is not empty %}
  328.     {% if operator is defined %}
  329.         {% set faqOperator = operator %}
  330.     {% else %}
  331.         {% set faqOperator = null %}
  332.     {% endif %}
  333.     {% set faqs = getFaq(app.request.get('companyInner'), page, faqOperator) %}
  334.     {% include '@App/shared/ui/modal/modalFaqs.html.twig' with {
  335.         faqItems: faqs
  336.     } %}
  337. {% endif %}
  338. <!-- break-words -->
  339. {#            #todo стилизовать и может по другому хотите выводить #}
  340. {% for message in app.flashes('error') %}
  341.     <div class="p-4 mb-4 text-sm text-red-800 rounded-lg bg-red-50" role="alert">
  342.         <span class="font-medium">{{ message }}</span>
  343.     </div>
  344. {% endfor %}
  345. {% block content %}
  346. {% endblock %}
  347. {% include '@App/shared/ui/loader/loader.html.twig' %}
  348. <div class="modal-window__backdrop hidden fixed top-0 left-0 w-full h-full bg-black opacity-60 z-[6]"
  349.      id="modal-backdrop"></div>
  350. {% block footer %}
  351.     {% if not isMobile and (companyObj.footerVisible is not defined or companyObj.footerVisible) %}
  352.         {% include '@App/shared/ui/footer/footer.html.twig' %}
  353.     {% endif %}
  354. {% endblock %}
  355. {% block javascripts %}
  356.     {{ encore_entry_script_tags('app') }}
  357. {% endblock %}
  358. <!--Start of Tawk.to Script-->
  359. <script type="text/javascript">
  360.   var Tawk_API = Tawk_API || {}, Tawk_LoadStart = new Date();
  361.   (function () {
  362.     var s1 = document.createElement("script"), s0 = document.getElementsByTagName("script")[0];
  363.     s1.async = true;
  364.     s1.src = 'https://embed.tawk.to/65c0de458d261e1b5f5c87ac/1hlsm8gm2';
  365.     s1.charset = 'UTF-8';
  366.     s1.setAttribute('crossorigin', '*');
  367.     s0.parentNode.insertBefore(s1, s0);
  368.   })();
  369. </script>
  370. <!--End of Tawk.to Script-->
  371. {% if companyObj is not empty and companyObj.customScripts is not empty %}
  372.     {{ companyObj.customScripts | raw }}
  373. {% endif %}
  374. </body>
  375. </html>