templates/themes/ismart/base.html.twig line 11

Open in your IDE?
  1. <!doctype html>
  2. <html lang="{{ app.request.locale }}">
  3. <head>
  4.     <meta charset="utf-8"/>
  5.     <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  6.     <meta name="viewport" content="width=device-width,initial-scale=1"/>
  7.     <meta name="author" content=""/>
  8.     <link rel="icon" type="image/png" href="{{ asset('themes/ismart') }}/img/favicon.png"/>
  9.     <link rel="apple-touch-icon" href="{{ asset('themes/ismart') }}/img/favicon.png"/>
  10.     {{ include('themes/ismart/part/social.html.twig') }}
  11.     <link rel="stylesheet" href="{{ asset('themes/ismart') }}/css/style.min.css">
  12.     <link rel="stylesheet" href="{{ asset('themes/ismart') }}/css/homepage.css?v=1.0">
  13.     {#    TODO: font, icon #}
  14.     {% if not isMobile() %}
  15.         <link rel="stylesheet" href="{{ asset('themes/ismart') }}/css/homepage-desktop.css?v=1.0" media="(min-width: 992px)">
  16.         <link rel="preconnect" href="https://fonts.googleapis.com"/>
  17.         <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/>
  18.         <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800;900&display=swap" rel="stylesheet" />
  19.         <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/material-design-iconic-font/2.2.0/css/material-design-iconic-font.min.css"/>
  20.         {% set googleTagManagerId = getSettingValueByKey('google-tag-manager-id') %}
  21.         <script>(function (w, d, s, l, i) {
  22.                 w[l] = w[l] || [];
  23.                 w[l].push({
  24.                     'gtm.start':
  25.                         new Date().getTime(), event: 'gtm.js'
  26.                 });
  27.                 var f = d.getElementsByTagName(s)[0],
  28.                     j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
  29.                 j.async = true;
  30.                 j.src =
  31.                     'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
  32.                 f.parentNode.insertBefore(j, f);
  33.             })(window, document, 'script', 'dataLayer', '{{ googleTagManagerId }}');</script>
  34.         <script>if (!window.HTMLPictureElement) {
  35.                 document.createElement('picture');
  36.             }</script>
  37.     {% else %}
  38.         <link rel="stylesheet" href="{{ asset('themes/ismart') }}/css/homepage-mobile.css?v=1.0" media="(max-width: 991px)">
  39.     {% endif %}
  40.     {% block customStyle %}{% endblock %}
  41. </head>
  42. <body>
  43. {% set textScripting = getSettingValueByKey('script-setting') %}
  44. {{ textScripting | raw }}
  45. {# TODO:fb script#}
  46. {% if not isMobile() %}
  47.      <div id="fb-root"></div>
  48.      <script async defer crossorigin="anonymous" src="https://connect.facebook.net/vi_VN/sdk.js#xfbml=1&version=v17.0&appId=308313886501712&autoLogAppEvents=1" nonce="4ijSUNkO"></script>
  49. {% endif %}
  50. {% block header %}
  51.     {{ include('themes/ismart/part/header.html.twig') }}
  52. {% endblock %}
  53. {% block body %}
  54. {% endblock %}
  55. <div class="modal fade success" id="success" tabindex="-1" aria-labelledby="success" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
  56.     <div class="modal-dialog modal-dialog-centered modal-md">
  57.         <div class="modal-content">
  58.             <div class="modal-body">
  59.                 <p class="text-center">Xin chúc mừng <bạn></bạn> đã đăng ký thành công!<strong>iSMART</strong>sẽ nhanh chóng liên hệ trong vòng 24h tới và gửi đến bạn những ưu đãi hấp dẫn. Xin cảm ơn!</p>
  60.                 <img loading="lazy" class="icon" srcset="{{ asset('themes/ismart') }}/img/mascot-ic-2.webp" src="{{ asset('themes/ismart') }}/img/mascot-ic-2_small.webp" alt="">
  61.             </div>
  62.             <div class="modal-footer">
  63.                 <a class="button red" data-bs-dismiss="modal"><span>Đóng</span></a>
  64.             </div>
  65.         </div>
  66.     </div>
  67. </div>
  68. {% block floating %}
  69. <div class="floating">
  70.     <a id="scrollTop" class="icon top d-none">
  71.         <img loading="lazy"
  72.              srcset="{{ asset('themes/ismart') }}/img/top.webp"
  73.              src="{{ asset('themes/ismart') }}/img/top_small.webp" alt=""/></a>
  74.     {% set hotline = getSettingValueByKey('hotline') %}
  75.     <div class="list"><a class="icon call" href="tel:{{ hotline | replace({" ":""}) }}">
  76.             
  77.                 <img
  78.                     data-src="{{ asset('themes/ismart') }}/img/call.webp"
  79.                     src="{{ asset('themes/ismart') }}/img/call_small.webp"
  80.                     alt=""/>
  81.             <span>HOTLINE</span> </a><a class="icon form">
  82.                 <img loading="lazy"
  83.                      data-src="{{ asset('themes/ismart') }}/img/form.webp"
  84.                      src="{{ asset('themes/ismart') }}/img/form_small.webp"
  85.                      alt=""/>
  86.             <span>ĐĂNG KÝ<br/>TƯ VẤN</span></a>
  87.     </div>
  88. </div>
  89. {% set messenger = getSettingValueByKey('facebook-messenger') %}
  90. {%  if not isMobile() %}
  91.     <div class="floating-mascot">
  92.         <a href="{{ messenger }}" target="_blank">
  93.             <picture id="transparencyImg">
  94.                 <source type="image/webp" srcset="{{ asset('themes/ismart') }}/img/mascot-ic_thumb.webp" media="(min-width:992px)">
  95.                 <source type="image/gif" srcset="{{ asset('themes/ismart') }}/img/mascot-2.gif" media="(min-width:992px)">
  96.                 <img loading="lazy" src="{{ asset('themes/ismart') }}/img/mascot-2.gif" alt=""/>
  97.             </picture>
  98.         </a>
  99.     </div>
  100.     </picture>
  101.         </a>
  102.     </div>
  103.     <script>
  104.         var mascotRendered = false;
  105.         document.addEventListener("DOMContentLoaded", function() {
  106.             function renderMascot() {
  107.                 var video = document.createElement('video');
  108.                 video.className = 'd-none';
  109.                 video.id = 'transparencyVideo';
  110.                 video.loop = true;
  111.                 video.muted = true;
  112.                 video.autoplay = true;
  113.                 video.playsInline = true;
  114.                 video.poster = "{{ asset('themes/ismart') }}/img/mascot-ic_thumb.webp";
  115.                 if (!mascotRendered && window.scrollY > 0) {
  116.                     var source = document.createElement('source');
  117.                     source.src = "{{ asset('themes/ismart') }}/img/mascot-2.webm";
  118.                     source.type = 'video/webm';
  119.                     source.media = '(min-width:992px)';
  120.                     video.appendChild(source);
  121.                     document.querySelector('.floating-mascot a').appendChild(video);
  122.                     mascotRendered = true;
  123.                     // Ensure the video plays automatically
  124.                     video.classList.remove('d-none');
  125.                     video.play().catch(function(error) {
  126.                         console.error('Error playing video:', error);
  127.                     });
  128.                 }
  129.             }
  130.             window.addEventListener('scroll', renderMascot);
  131.         });
  132.     </script>
  133. {% endif %}
  134. <div class="overlay hide">
  135.     <div class="spinner-border text-warning" role="status"><span class="visually-hidden">Loading...</span></div>
  136. </div>
  137. <div class="floating-form"><a class="close"><i class="zmdi zmdi-close-circle"></i></a>
  138.     {{ include('themes/ismart/part/contact-form.html.twig') }}
  139. </div>
  140. {% endblock %}
  141. {% block footer %}
  142. {{ include('themes/ismart/part/footer.html.twig') }}
  143. {% endblock %}
  144. <script src="{{ asset('themes/ismart') }}/js/jquery.min.js" defer></script>
  145. <script src="{{ asset('themes/ismart') }}/js/parsley.min.js" defer></script>
  146. <script src="{{ asset('themes/ismart') }}/js/homepage.min.js?v=1.0" defer></script>
  147. {% if not isMobile() %}
  148.     <link rel="stylesheet" href="{{ asset('themes/ismart') }}/vendors/normalize-css/normalize.min.css" defer/>
  149.     {{ include('themes/ismart/part/script-desktop.html.twig') }}
  150. {% else %}
  151.     <div class="modal-backdrop fade"></div>
  152.     {{ include('themes/ismart/part/script-mobile.html.twig') }}
  153. {% endif %}
  154. <script src="{{ asset('plugins/jQueryForm/jquery.form.min.js') }}" defer></script>
  155. </body>
  156. </html>