templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.     <head>
  4.         <meta charset="UTF-8" />
  5.         <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
  6.         
  7.         <link rel="icon" type="image/png" href="/assets/icons/little-logo.svg">
  8.         <title>{% block title %} FlashBet {% endblock %}</title>
  9.         <meta name="csrf-token" content="{{ csrf_token('general') }}">
  10.         
  11.         <link rel="stylesheet" href="style.css?v={{ "now"|date("U") }}" />
  12.         <link rel="stylesheet" href="toastr/toastr.min.css" />
  13.         <link rel="stylesheet" href="fonts/fonts.css" />
  14.         
  15.         <link
  16.               rel="stylesheet"
  17.               href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css"
  18.               />
  19.         <link
  20.               rel="stylesheet"
  21.               href="https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.1/css/ion.rangeSlider.min.css"
  22.             />
  23.         
  24.         <script src="https://www.google.com/recaptcha/api.js" async defer></script>
  25.         
  26.         <script src="/assets/butterup/butterup.min.js"></script>
  27.         <link rel="stylesheet" href="/assets/butterup/butterup.min.css?v={{ "now"|date("U") }}">
  28.         
  29.         <script src="https://cdn.socket.io/socket.io-1.4.5.js"></script>
  30.         
  31.         {% block stylesheets %}{% endblock %}
  32.     </head>
  33.     <body>
  34.         <div data-barba="wrapper">
  35.             {% include 'components/header.html.twig' %}
  36.             {% include 'components/sidebar.html.twig' %}
  37.             {% include 'components/chat.html.twig' %}
  38.             {% include 'components/mobile/mobile.html.twig' %}
  39.             
  40.             <!-- Мейн контент -->
  41.             <main class="chat-open" data-barba="container" data-barba-namespace="{{ app.request.attributes.get('_route') }}">
  42.                 {% block body %}{% endblock %}
  43.             </main>
  44.             {% include 'components/modals/modals.html.twig' %}
  45.         </div>
  46.         
  47.         <div id="loader" class="loader">
  48.             <img src="./assets/icons/lightning-logo.svg" alt="" />
  49.         </div>
  50.     </body>
  51.     
  52.     <script src="https://unpkg.com/@barba/core"></script>
  53.     <script src="https://unpkg.com/gsap@3/dist/gsap.min.js"></script>
  54.     <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  55.     <script src="https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.1/js/ion.rangeSlider.min.js"></script>
  56.     <script src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js"></script>
  57.     <script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
  58.     <script src="toastr/toastr.min.js"></script>
  59.     <script src="/assets/js/countup.js"></script>
  60.     <script type="module">
  61.     
  62.     import {
  63.         initSwipers,
  64.         destroySwipers
  65.     } from '/assets/js/swipers.js?v={{ "now"|date("U") }}';
  66.     import {
  67.         initDice,
  68.         destroyDice
  69.     } from '/assets/js/pages/games/dice.js?v={{ "now"|date("U") }}';
  70.     import {
  71.         initMines,
  72.         destroyMines
  73.     } from '/assets/js/pages/games/mines.js?v={{ "now"|date("U") }}';
  74.     import {
  75.         initFaqToggle,
  76.         destroyFaqToggle
  77.     } from '/assets/js/pages/faq.js?v={{ "now"|date("U") }}';
  78.     import {
  79.         initRef,
  80.         destroyRef
  81.     } from '/assets/js/pages/referral.js?v={{ "now"|date("U") }}';
  82.     import {
  83.         initProfile,
  84.         destroyProfile
  85.     } from '/assets/js/pages/profile.js?v={{ "now"|date("U") }}';
  86.     import {
  87.         initBonus,
  88.     } from '/assets/js/pages/bonus.js?v={{ "now"|date("U") }}';
  89.     import {
  90.         initTournamentPage,
  91.     } from '/assets/js/pages/tournament.js?v={{ "now"|date("U") }}';
  92.     import {
  93.         initSlots,
  94.     } from '/assets/js/pages/games/slots.js?v={{ "now"|date("U") }}';
  95.     barba.init({
  96.         sync: true,
  97.         
  98.         views: [
  99.             {
  100.                 namespace: 'main_page',
  101.                 afterEnter({
  102.                     next
  103.                 }) {
  104.                     initSwipers(next.container);
  105.                     initSlots(next.container, true);
  106.                 },
  107.                 beforeLeave() {
  108.                     destroySwipers();
  109.                     destroySlots();
  110.                 },
  111.             },
  112.             {
  113.                 namespace: 'dice_page',
  114.                 afterEnter({
  115.                     next
  116.                 }) {
  117.                     initDice();
  118.                 },
  119.                 beforeLeave() {
  120.                     destroyDice();
  121.                 },
  122.             },
  123.             {
  124.                 namespace: 'mines_page',
  125.                 afterEnter({
  126.                     next
  127.                 }) {
  128.                     initMines();
  129.                 },
  130.                 beforeLeave() {
  131.                     destroyMines();
  132.                 },
  133.             },
  134.             {
  135.                 namespace: 'faq_page',
  136.                 afterEnter({
  137.                     next
  138.                 }) {
  139.                     initFaqToggle();
  140.                 },
  141.                 beforeLeave() {
  142.                     destroyFaqToggle();
  143.                 },
  144.             },
  145.             {
  146.                 namespace: 'referral_page',
  147.                 afterEnter({
  148.                     next
  149.                 }) {
  150.                     initRef();
  151.                 }
  152.             },
  153.             {
  154.                 namespace: 'bonus_page',
  155.                 afterEnter({
  156.                     next
  157.                 }) {
  158.                     initBonus();
  159.                 }
  160.             },
  161.             {
  162.                 namespace: 'tours_page',
  163.                 afterEnter({
  164.                     next
  165.                 }) {
  166.                     initTournamentPage();
  167.                 }
  168.             },
  169.             {
  170.                 namespace: 'lobby_page',
  171.                 afterEnter({
  172.                     next
  173.                 }) {
  174.                     initSlots(next.container, false);
  175.                 },
  176.                 beforeLeave() {
  177.                     destroySlots();
  178.                 },
  179.             },
  180.             {
  181.                 namespace: 'profile_page',
  182.                 afterEnter({
  183.                     next
  184.                 }) {
  185.                     initProfile();
  186.                 },
  187.                 beforeLeave() {
  188.                     destroyProfile();
  189.                 },
  190.             },
  191.         ],
  192.         transitions: [{
  193.             name: 'fade',
  194.             async leave({
  195.                 current
  196.             }) {
  197.                 await gsap.to(current.container, {
  198.                     opacity: 0,
  199.                     duration: 0.3
  200.                 });
  201.             },
  202.             enter({
  203.                 next
  204.             }) {
  205.                 gsap.from(next.container, {
  206.                     opacity: 0,
  207.                     duration: 0.3
  208.                 });
  209.             }
  210.         }]
  211.     });
  212.     
  213.     barba.hooks.beforeEnter(() => {
  214.         document.querySelectorAll('img[src$=".svg"]').forEach(img => {
  215.             img.style.opacity = '0';
  216.             img.style.transition = 'opacity 0.3s';
  217.         });
  218.     });
  219.         
  220.     barba.hooks.afterEnter(() => {
  221.         updateSidebarActive();
  222.         $('html, body').animate({
  223.             scrollTop: 0
  224.         }, 0);  
  225.         
  226.         document.querySelectorAll('img[src$=".svg"]').forEach(img => {
  227.             const oldSrc = img.getAttribute('src');
  228.             if (oldSrc) {
  229.                 img.setAttribute('src', oldSrc.split('?')[0] + '?reload=' + new Date().getTime());
  230.                 img.onload = () => {
  231.                     img.style.opacity = '1';
  232.                 };
  233.             }
  234.         });
  235.     });
  236.     
  237.     function updateSidebarActive() {
  238.         document
  239.             .querySelectorAll('.sidebar-link')
  240.             .forEach(el => {
  241.                 const href = el.getAttribute('href');
  242.                 el.classList.toggle('active', window.location.pathname.startsWith(href));
  243.             });
  244.         
  245.         document
  246.             .querySelectorAll('.mobile-link')
  247.             .forEach(el => {
  248.                 const href = el.getAttribute('href');
  249.                 el.classList.toggle('active', window.location.pathname.startsWith(href));
  250.             });
  251.     }
  252.     
  253.     var globalrole = 0;
  254.         
  255.     </script>
  256.     
  257.     {% if user %} 
  258.     <script> 
  259.         globalrole = {{ user.admin }};
  260.     </script>
  261.     {% endif %}
  262.     <script src="assets/js/auth.js?v={{ "now"|date("U") }}"></script>
  263.     <script src="script.js?v={{ "now"|date("U") }}"></script>
  264.     {% block javascripts %}{% endblock %}
  265. </html>