templates/web/default/brands.html.twig line 139

Open in your IDE?
  1. {% extends 'web/base.html.twig' %}
  2. {% block title %}{{'brands.title'| trans}}{% endblock %}
  3. {% block keywords %}{{ 'brands.keywords' | trans }}{% endblock %}
  4. {% block description %}{{ 'brands.metaDescription' | trans }}{% endblock %}
  5. {% trans_default_domain 'web' %}
  6. {% block javascripts %}
  7. <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  8. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.isotope/3.0.6/isotope.pkgd.min.js"></script>
  9. {#<script>
  10. // JavaScript pro posunutí stránky na daný blok s odpovídajícím písmenem
  11. const alphabetNavLinks = document.querySelectorAll('.alphabet-nav a');
  12. alphabetNavLinks.forEach(link => {
  13. link.addEventListener('click', (e) => {
  14. e.preventDefault();
  15. const targetId = link.getAttribute('href');
  16. const targetBlock = document.querySelector(targetId);
  17. const targetBlockTop = targetBlock.getBoundingClientRect().top;
  18. const offset = window.pageYOffset;
  19. const screenHeight = window.innerHeight;
  20. const targetOffset = targetBlockTop + offset - (screenHeight / 5) + (targetBlock.clientHeight / 5);
  21. window.scrollTo({
  22. top: targetOffset,
  23. behavior: 'smooth'
  24. });
  25. });
  26. });
  27. </script>#}
  28. <script>
  29. const alphabetNavLinks = document.querySelectorAll('.alphabet-nav a');
  30. alphabetNavLinks.forEach(link => {
  31. link.addEventListener('click', (e) => {
  32. e.preventDefault();
  33. const targetId = link.getAttribute('href');
  34. const targetBlock = document.querySelector(targetId);
  35. const targetBlockTop = targetBlock.getBoundingClientRect().top;
  36. const offset = window.pageYOffset;
  37. const headerHeight = document.querySelector('.qodef-page-header').clientHeight;
  38. const targetOffset = targetBlockTop + offset - headerHeight - 20;
  39. window.scrollTo({
  40. top: targetOffset,
  41. behavior: 'smooth'
  42. });
  43. });
  44. });
  45. </script>
  46. {% endblock %}
  47. {% block body %}
  48. <style>
  49. .alphabet-block {
  50. display: block; /* Změna display na block */
  51. margin-bottom: 60px; /* Odstup mezi bloky */
  52. }
  53. h2 {
  54. font-size: 36px;
  55. text-transform: uppercase;
  56. }
  57. ul {
  58. list-style: none;
  59. margin: 0;
  60. padding: 0;
  61. flex-wrap: wrap;
  62. }
  63. li {
  64. margin-right: 20px;
  65. margin-bottom: 10px;
  66. }
  67. </style>
  68. {{ include('web/core/header.html.twig') }}
  69. <div class="qodef-content">
  70. <div class="qodef-content-inner">
  71. <div class="qodef-full-width">
  72. <div class="qodef-full-width-inner">
  73. <div class="qodef-grid-row">
  74. <div class="qodef-page-content-holder qodef-grid-col-12">
  75. <div class="qodef-row-grid-section-wrapper ">
  76. <div class="qodef-row-grid-section">
  77. <div class="vc_row wpb_row vc_row-fluid vc_custom_1567069896783">
  78. <div class="wpb_column vc_column_container vc_col-sm-12">
  79. <div class="vc_column-inner">
  80. <div class="wpb_wrapper">
  81. <div class="qodef-title-holder qodef-breadcrumbs-type qodef-title-full-width qodef-title-va-header-bottom breadcrumb">
  82. <div itemprop="breadcrumb" class="qodef-breadcrumbs">
  83. <a itemprop="url" href="{{ path('app_web_homepage') }}">Home</a>
  84. <span class="qodef-delimiter">&nbsp; / &nbsp</span>
  85. <a itemprop="url" href="{{ path('app_web_brands') }}">{{ 'brands.title'|trans }}</a>
  86. </div>
  87. <div class="qodef-section-title-holder" style="text-align: center; padding-bottom: 50px;">
  88. <div class="qodef-st-inner">
  89. <h1 class="qodef-st-title">{{ 'brands.title'|trans }}</h1>
  90. </div>
  91. </div>
  92. </div>
  93. {#Navigation to scroll#}
  94. <div class="alphabet-nav">
  95. {% for k,v in brands %}
  96. <a href="#{{ k }}">{{ k }}</a>
  97. {% endfor %}
  98. </div>
  99. <div class="col-sm-12" style="padding-top: 30px">
  100. {% for k,v in brands %}
  101. <div class="alphabet-block">
  102. <div class="alphabet-title" id="{{ k }}">{{ k }}</div>
  103. <div class="alphabet-list">
  104. <ul>
  105. {% for b in v %}
  106. <li><a href="{{ path('app_web_shop_detail',{'slug':b.stores[0].getSlug}) }}">{{ b.name }}</a></li>
  107. {% endfor %}
  108. </ul>
  109. </div>
  110. </div>
  111. {% endfor %}
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. {{ include('web/core/gift-card.html.twig') }}
  124. </div>
  125. </div>
  126. {{ include('web/core/footer.html.twig') }}
  127. {% endblock %}