templates/bundles/BitBagSyliusCmsPlugin/Shop/Page/show.html.twig line 1

Open in your IDE?
  1. {% extends '@templates/Front/Shop/layout.html.twig' %}
  2. {% block head %}
  3.     <head>
  4.         <meta charset="utf-8">
  5.         <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6.         <meta http-equiv="Content-Language" content="ro">
  7.         <meta name="google-site-verification" content="BEtIqk-choaMawpOxG98NtbWKAZK5MuTxV_2-pSHGFQ">
  8.         <title>{% block title %}
  9.                 {% if page.title is not empty %}
  10.                     {{ page.title }}
  11.                 {% else %}
  12.                     {{ parent() }}
  13.                 {% endif %}
  14.             {% endblock %}</title>
  15.         <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  16.         {% block metatags %}
  17.             {% if page.metaKeywords is not empty %}
  18.                 <meta name="keywords" content="{{ page.metaKeywords }}"/>
  19.             {% endif %}
  20.             {% if page.metaDescription is not empty %}
  21.                 <meta name="description" content="{{ page.metaDescription }}"/>
  22.             {% endif %}
  23.         {% endblock %}
  24.         {% block stylesheets %}
  25.             <script src="{{ asset('assets/shop/js/sentry-bundle.min.js') }}"></script>
  26.             <script>
  27.                  if (typeof Sentry !== 'undefined') {
  28.                     Sentry.init({
  29.                         dsn: "{{ sentry_dsn }}",
  30.                         integrations: [new Sentry.Integrations.TryCatch({
  31.                             eventTarget: false,
  32.                         })]
  33.                     });
  34.                 }
  35.             </script>
  36.             <link rel="stylesheet" href="{{ asset('/assets/shop/css/homepage.css') }}">
  37.             <link rel="stylesheet" href="{{ asset('/assets/shop/css/bootstrap.min.css') }}">
  38.             <link rel="stylesheet" href="{{ asset('/assets/shop/css/leftmenu.v1.css') }}">
  39.             {{ encore_entry_link_tags('bootstrap-fix', null, 'bootstrapTheme') }}
  40.             {% set urlPath = app.request.uri %}
  41.             {% if urlPath is not null %}
  42.                 <link rel="canonical" href="{{ urlPath }}"/>
  43.                 {% set currentLocale = app.request.locale %}
  44.                 {% if currentLocale is not null %}
  45.                     {% for locale in locales.allLocales %}
  46.                         {% if locale != currentLocale %}
  47.                             {% set currentLocaleTemp = currentLocale ~ '/' %}
  48.                             {% set newUrl = urlPath|replace({currentLocaleTemp:locale ~ '/'}) %}
  49.                             <link rel="alternate" hreflang="{{ locale }}"
  50.                                   href="{{ newUrl }}"/>
  51.                         {% endif %}
  52.                     {% endfor %}
  53.                 {% endif %}
  54.             {% endif %}
  55.         {% endblock %}
  56.         {% block javascripts %}
  57.             <script src="{{ asset('assets/shop/js/jquery.min.js') }}"></script>
  58.             <script src="{{ asset('assets/shop/js/popper.min.js') }}"></script>
  59.             <script src="{{ asset('assets/shop/js/bootstrap.min.js') }}"></script>
  60.             <script src="{{ asset('assets/shop/js/leftmenu.js') }}"></script>
  61.             <script src="{{ asset('/bundles/fosjsrouting/js/router.js') }}"></script>
  62.             <script src="{{ path('fos_js_routing_js', { callback: 'fos.Router.setData' }) }}"></script>
  63.             <script>
  64.                 $(document).ready(function () {
  65.                     function checkIfRedirectExists()
  66.                     {
  67.                         let redirectElement = $('[class^="redirect"]');
  68.                         if (redirectElement.length > 0) {
  69.                             if (redirectElement.hasClass("scala")) {
  70.                                 window.location.href = "https://taxeauto.ro" + window.location.pathname;
  71.                             } else if (redirectElement.hasClass("roviniete")) {
  72.                                 window.location.href = "https://roviniete.ro" + window.location.pathname;
  73.                             }
  74.                         }
  75.                     }
  76.                     checkIfRedirectExists();
  77.                     $(window).on('load', function () {
  78.                         checkIfRedirectExists();
  79.                     });
  80.                 });
  81.                 dataLayer = [];
  82.             </script>
  83.             <!-- Google Tag Manager -->
  84.             <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  85.                         new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  86.                     j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
  87.                     'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
  88.                 })(window,document,'script','dataLayer','{{ gtm_code }}');</script>
  89.             <!-- End Google Tag Manager -->
  90.         {% endblock %}
  91.     </head>
  92. {% endblock %}
  93. {% block header %}
  94.     <!-- Google Tag Manager (noscript) -->
  95.     <noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ gtm_code }}"
  96.                       height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  97.     <!-- End Google Tag Manager (noscript) -->
  98.     <div class="custom-container mb-2">
  99.         <div class="custom-container bg-white">
  100.             <div class="bg-white">
  101.                 <header>
  102.                     {% include '@templates/Front/Shop/v2/_header.html.twig' %}
  103.                     {{ sonata_block_render_event('sylius.shop.layout.after_header') }}
  104.                 </header>
  105.             </div>
  106.         </div>
  107.     </div>
  108. {% endblock %}
  109. {% block content %}
  110.     <div class="info-banner custom-container bg-white my-2" onclick="location.href='{{ path('app_shop_vignette') }}'" style="cursor: pointer">
  111.         <div class="d-flex justify-content-center align-items-center" style="height: 170px">
  112.             <div class="info-banner-container">
  113.                 <h1 class="calculator-viniete-text">{{ 'app.ui.buy_vignette_online'|trans }} - <br class="new-line"/> {{ 'app.ui.romania_vignette_calculator'|trans }}</h1>
  114.                 <div class="d-flex justify-content-center align-items-center">
  115.                     <a class="text-center">{{ 'app.ui.select_car_type'|trans }}:</a>
  116.                 </div>
  117.                 <div class="d-flex justify-content-center align-items-center banner-images">
  118.                     <img src="{{ asset('assets/shop/images/icons/ic_rovinieta_categ_a.png') }}"
  119.                          title="{{'app.ui.category_rovignette_a_name'|trans}}" class="mx-2"
  120.                          alt="{{'app.ui.category_rovignette_a_name'|trans}}" />
  121.                     <img src="{{ asset('assets/shop/images/icons/ic_rovinieta_categ_b.png') }}"
  122.                          title="{{'app.ui.category_rovignette_b_name'|trans}}" class="mx-2"
  123.                          alt="{{'app.ui.category_rovignette_b_name'|trans}}" />
  124.                     <img src="{{ asset('assets/shop/images/icons/ic_rovinieta_categ_c.png') }}"
  125.                          title="{{'app.ui.category_rovignette_c_name'|trans}}" class="mx-2"
  126.                          alt="{{'app.ui.category_rovignette_c_name'|trans}}" />
  127.                     <img src="{{ asset('assets/shop/images/icons/ic_rovinieta_categ_d.png') }}"
  128.                          title="{{'app.ui.category_rovignette_d_name'|trans}}" class="mx-2"
  129.                          alt="{{'app.ui.category_rovignette_d_name'|trans}}" />
  130.                     <img src="{{ asset('assets/shop/images/icons/ic_rovinieta_categ_e.png') }}"
  131.                          title="{{'app.ui.category_rovignette_e_name'|trans}}" class="mx-2"
  132.                          alt="{{'app.ui.category_rovignette_e_name'|trans}}" />
  133.                     <img src="{{ asset('assets/shop/images/icons/ic_rovinieta_categ_f.png') }}"
  134.                          title="{{'app.ui.category_rovignette_f_name'|trans}}" class="mx-2"
  135.                          alt="{{'app.ui.category_rovignette_f_name'|trans}}" />
  136.                     <img src="{{ asset('assets/shop/images/icons/ic_rovinieta_categ_g.png') }}"
  137.                          title="{{'app.ui.category_rovignette_g_name'|trans}}" class="mx-2"
  138.                          alt="{{'app.ui.category_rovignette_g_name'|trans}}" />
  139.                     <img src="{{ asset('assets/shop/images/icons/ic_rovinieta_categ_h.png') }}"
  140.                          title="{{'app.ui.category_rovignette_h_name'|trans}}" class="mx-2"
  141.                          alt="{{'app.ui.category_rovignette_h_name'|trans}}" />
  142.                 </div>
  143.                 <div class="d-flex justify-content-center align-items-center">
  144.                     <button class="btn btn-lg btn-primary w-50">{{ 'app.ui.continue'|trans }}</button>
  145.                 </div>
  146.             </div>
  147.         </div>
  148.     </div>
  149.     <div class="card">
  150.         <div class="card-header">
  151.             {% if page.name is not empty %}
  152.                 <h1 class="ui dividing header bitbag-page-name">{{ page.name|raw }}</h1>
  153.             {% endif %}
  154.         </div>
  155.         <div class="card-body">
  156.             <div class="row justify-content-center align-items-center">
  157.                 <div class="col-8">
  158.                     {% if page.image %}
  159.                         {% set path = preview is defined and preview == true ? page.image.path : '/media/image/'~page.image.path %}
  160.                         <img class="page-image ui fluid image" src="{{ path }}" alt="">
  161.                     {% endif %}
  162.                 </div>
  163.             </div>
  164.             <div class="ui hidden divider"></div>
  165.             <div class="bitbag-page-content">{{ bitbag_cms_render_content(page) }}</div>
  166.             {% if page.title is not empty %}
  167.                 <div class="ui dividing header"></div>
  168.             {% else %}
  169.                 <div class="ui hidden divider"></div>
  170.             {% endif %}
  171.         </div>
  172.     </div>
  173.     {% if page.products|length > 0 %}
  174.         <h2>
  175.             {{ 'bitbag_sylius_cms_plugin.ui.page_related_products'|trans }}
  176.         </h2>
  177.         <div class="bitbag-page-products">
  178.             {% include '@SyliusShop/Product/_horizontalList.html.twig' with {'products': page.products} %}
  179.         </div>
  180.     {% endif %}
  181.     <style>
  182.         .banner-images img {
  183.             width: 50px;
  184.         }
  185.         .calculator-viniete-text {
  186.             font-family: Calibri, Tahoma, Arial, serif;
  187.             font-size: 26px;
  188.             font-weight: normal;
  189.             color: #EA6031;
  190.             line-height: 20px;
  191.             letter-spacing: -1px;
  192.             text-shadow: 0.02em 0.02em 0.02em #d96642;
  193.             display: block;
  194.             height: 40px;
  195.             padding: 10px 30px 0 0
  196.         }
  197.         .new-line {
  198.             display: none;
  199.         }
  200.         @media only screen and (max-width: 600px) {
  201.             .info-banner {
  202.                 max-width: 400px;
  203.             }
  204.             .info-banner-container {
  205.                 max-width: 400px;
  206.                 text-align: center;
  207.             }
  208.             .banner-images img {
  209.                 width: 30px;
  210.             }
  211.             .calculator-viniete-text {
  212.                 height: 58px;
  213.                 line-height: 26px;
  214.                 font-size: 20px;
  215.             }
  216.             .new-line {
  217.                 display: block;
  218.             }
  219.         }
  220.     </style>
  221. {% endblock %}