templates/includes/nav.html.twig line 1

Open in your IDE?
  1. <div class="container">
  2.     <nav class="navigation">
  3.         <div class="site_logo">
  4.             <a href="{{ sulu_content_root_path() }}" class="">
  5.                 <img src="{{ asset('uploads/media/logo.png') }}" alt="cora.pl" class="site_log" />
  6.             </a>
  7.         </div>
  8.         <form action="{{ path('sulu_search.website_search') }}" method="GET" class="search_bar">
  9.             <input class="bar" name="q" type="text" placeholder="" />
  10.             <input type="submit" value="" class="search_ico" />
  11.         </form>
  12.         <ol class="nav-list">
  13.             {% for item in sulu_navigation_root_tree('main', 2) %}
  14.                 <div class="svg-wrapper">
  15.                     {% if item.title == "O nas" %}
  16.                         <svg height="30" width="{{ item.title | length + 70 }}" xmlns="http://www.w3.org/2000/svg">
  17.                            
  18.                             <li class="text">
  19.                                 <a href="{{ sulu_content_path(item.url, item.webspaceKey) }}" title="{{ item.title }}">
  20.                                     {{ item.title }}
  21.                                 </a>
  22.                             </li>
  23.                         </svg>
  24.                     {% else %}
  25.                         {% if item.title == "Do pobrania" %}
  26.                             <svg height="30" width="{{ item.title | length + 110 }}" xmlns="http://www.w3.org/2000/svg">
  27.                                 
  28.                                 <li class="text">
  29.                                     <a href="{{ sulu_content_path(item.url, item.webspaceKey) }}" title="{{ item.title }}">
  30.                                         {{ item.title }}
  31.                                     </a>
  32.                                 </li>
  33.                             </svg>
  34.                         {% else %}
  35.                             <svg height="30" width="{{ item.title | length + 90 }}" xmlns="http://www.w3.org/2000/svg">
  36.                               
  37.                                 <li class="text drop">
  38.                                     {# {% if item.title == "Produkty" %} #}
  39.                                     <a class="desktop" href="{{ sulu_content_path(item.url, item.webspaceKey) }}" title="{{ item.title }}">
  40.                                         {{ item.title }}
  41.                                     </a>
  42.                                     {# <a class="mobile" href="{{ sulu_content_path(item.url, item.webspaceKey) }}" class="{{item.title}}" title="{{ item.title }}">{{ item.title }}</a>
  43.                                                                         {% else %} #}
  44.                                     {# <a href="{{ sulu_content_path(item.url, item.webspaceKey) }}" title="{{ item.title }}">{{ item.title }}</a>
  45.                                                                         {% endif %} #}
  46.                                     {% if item.children|length > 0 %}
  47.                                         <ul class="dropdown">
  48.                                             {% for child in item.children %}
  49.                                                 <li class="child">
  50.                                                     <a href="{{ sulu_content_path(child.url) }}/produkty" title="{{ child.title }}">
  51.                                                         {{ child.title }}
  52.                                                     </a>
  53.                                                 </li>
  54.                                             {% endfor %}
  55.                                         </ul>
  56.                                     {% endif %}
  57.                                 </li>
  58.                             </svg>
  59.                         {% endif %}
  60.                     {% endif %}
  61.                 </div>
  62.             {% endfor %}
  63.             <div class="svg-wrapper">
  64.                 <svg height="30" width="130" xmlns="http://www.w3.org/2000/svg">
  65.                   
  66.                     <li class="text">
  67.                         <div>
  68.                             <a href="https://www.linkedin.com/company/coraclf/">
  69.                                 <img src="/img/linkedin.png" />
  70.                             </a>
  71.                         </div>
  72.                     </li>
  73.                 </svg>
  74.             </div>
  75.             
  76.              <div class="svg-wrapper">
  77.                 <svg height="30" width="130" xmlns="http://www.w3.org/2000/svg">
  78.                   
  79.                     <li class="text">
  80.                         <div>
  81.                             <a href="https://cora.pl/dotacje">
  82.                                 <img style="width:40px;" src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/Flag_of_Europe.svg/1200px-Flag_of_Europe.svg.png" alt="Flag of Europe.svg">
  83.                             </a>
  84.                         </div>
  85.                     </li>
  86.                 </svg>
  87.             </div>
  88.             <select onchange="doGTranslate(this);" style="width: 50px; height:30px; margin-top:18px;">
  89.                 <option value="">
  90.                     PL
  91.                 </option>
  92.                 <option value="pl|af">
  93.                     Afrikaans
  94.                 </option>
  95.                 <option value="pl|sq">
  96.                     Albanian
  97.                 </option>
  98.                 <option value="pl|ar">
  99.                     Arabic
  100.                 </option>
  101.                 <option value="pl|hy">
  102.                     Armenian
  103.                 </option>
  104.                 <option value="pl|az">
  105.                     Azerbaijani
  106.                 </option>
  107.                 <option value="pl|eu">
  108.                     Basque
  109.                 </option>
  110.                 <option value="pl|be">
  111.                     Belarusian
  112.                 </option>
  113.                 <option value="pl|bg">
  114.                     Bulgarian
  115.                 </option>
  116.                 <option value="pl|ca">
  117.                     Catalan
  118.                 </option>
  119.                 <option value="pl|zh-CN">
  120.                     Chinese (Simplified)
  121.                 </option>
  122.                 <option value="pl|zh-TW">
  123.                     Chinese (Traditional)
  124.                 </option>
  125.                 <option value="pl|hr">
  126.                     Croatian
  127.                 </option>
  128.                 <option value="pl|cs">
  129.                     Czech
  130.                 </option>
  131.                 <option value="pl|da">
  132.                     Danish
  133.                 </option>
  134.                 <option value="pl|nl">
  135.                     Dutch
  136.                 </option>
  137.                 <option value="pl|en">
  138.                     English
  139.                 </option>
  140.                 <option value="pl|et">
  141.                     Estonian
  142.                 </option>
  143.                 <option value="pl|tl">
  144.                     Filipino
  145.                 </option>
  146.                 <option value="pl|fi">
  147.                     Finnish
  148.                 </option>
  149.                 <option value="pl|fr">
  150.                     French
  151.                 </option>
  152.                 <option value="pl|gl">
  153.                     Galician
  154.                 </option>
  155.                 <option value="pl|ka">
  156.                     Georgian
  157.                 </option>
  158.                 <option value="pl|de">
  159.                     German
  160.                 </option>
  161.                 <option value="pl|el">
  162.                     Greek
  163.                 </option>
  164.                 <option value="pl|ht">
  165.                     Haitian Creole
  166.                 </option>
  167.                 <option value="pl|iw">
  168.                     Hebrew
  169.                 </option>
  170.                 <option value="pl|hi">
  171.                     Hindi
  172.                 </option>
  173.                 <option value="pl|hu">
  174.                     Hungarian
  175.                 </option>
  176.                 <option value="pl|is">
  177.                     Icelandic
  178.                 </option>
  179.                 <option value="pl|id">
  180.                     Indonesian
  181.                 </option>
  182.                 <option value="pl|ga">
  183.                     Irish
  184.                 </option>
  185.                 <option value="pl|it">
  186.                     Italian
  187.                 </option>
  188.                 <option value="pl|ja">
  189.                     Japanese
  190.                 </option>
  191.                 <option value="pl|ko">
  192.                     Korean
  193.                 </option>
  194.                 <option value="pl|lv">
  195.                     Latvian
  196.                 </option>
  197.                 <option value="pl|lt">
  198.                     Lithuanian
  199.                 </option>
  200.                 <option value="pl|mk">
  201.                     Macedonian
  202.                 </option>
  203.                 <option value="pl|ms">
  204.                     Malay
  205.                 </option>
  206.                 <option value="pl|mt">
  207.                     Maltese
  208.                 </option>
  209.                 <option value="pl|no">
  210.                     Norwegian
  211.                 </option>
  212.                 <option value="pl|fa">
  213.                     Persian
  214.                 </option>
  215.                 <option value="pl|pl">
  216.                     Polish
  217.                 </option>
  218.                 <option value="pl|pt">
  219.                     Portuguese
  220.                 </option>
  221.                 <option value="pl|ro">
  222.                     Romanian
  223.                 </option>
  224.                 <option value="pl|ru">
  225.                     Russian
  226.                 </option>
  227.                 <option value="pl|sr">
  228.                     Serbian
  229.                 </option>
  230.                 <option value="pl|sk">
  231.                     Slovak
  232.                 </option>
  233.                 <option value="pl|sl">
  234.                     Slovenian
  235.                 </option>
  236.                 <option value="pl|es">
  237.                     Spanish
  238.                 </option>
  239.                 <option value="pl|sw">
  240.                     Swahili
  241.                 </option>
  242.                 <option value="pl|sv">
  243.                     Swedish
  244.                 </option>
  245.                 <option value="pl|th">
  246.                     Thai
  247.                 </option>
  248.                 <option value="pl|tr">
  249.                     Turkish
  250.                 </option>
  251.                 <option value="pl|uk">
  252.                     Ukrainian
  253.                 </option>
  254.                 <option value="pl|ur">
  255.                     Urdu
  256.                 </option>
  257.                 <option value="pl|vi">
  258.                     Vietnamese
  259.                 </option>
  260.                 <option value="pl|cy">
  261.                     Welsh
  262.                 </option>
  263.                 <option value="pl|yi">
  264.                     Yiddish
  265.                 </option>
  266.             </select>
  267.             <div id="google_translate_element2"></div>
  268.             <div class="svg-wrapper">
  269.                 <li class="text koszyk">
  270.                     <a href="/checkBasket" class="addToBasket">
  271.                         <i class="fa fa-shopping-basket" style="font-size:24px"></i>
  272.                     <div class="qty"></div>
  273.                     </a>
  274.                 </li>
  275.             </div>
  276.             <!-- GTranslate: https://gtranslate.io/ -->
  277.            
  278.         </ol>
  279.         <a href="#toggle" class="burger">
  280.             <div class="bun top"></div>
  281.             <div class="meat"></div>
  282.             <div class="bun bottom"></div>
  283.         </a>
  284.         <script>
  285.             const mobileNav = document.querySelector('.nav-list');
  286. const burgerIcon = document.querySelector('.burger');
  287. burgerIcon.addEventListener('click', function () {
  288. mobileNav.classList.toggle('active');
  289. burgerIcon.classList.toggle('active');
  290. $(this).toggleClass('no-burger');
  291. })
  292.         </script>
  293.     </nav>
  294. </div>
  295. {% block javascripts %}
  296. <style type="text/css">
  297.         
  298. a.gflag {vertical-align:middle;font-size:16px;padding:1px 0;background-repeat:no-repeat;background-image:url(//gtranslate.net/flags/16.png);}
  299. a.gflag img {border:0;}
  300. a.gflag:hover {background-image:url(//gtranslate.net/flags/16a.png);}
  301. #goog-gt-tt {display:none !important;}
  302. .goog-te-banner-frame {display:none !important;}
  303. .goog-te-menu-value:hover {text-decoration:none !important;}
  304. body {top:0 !important;}
  305. #google_translate_element2 {display:none!important;}
  306. select {border:none !important;}
  307. </style>
  308.     <script type="text/javascript">
  309. function googleTranslateElementInit2() {new google.translate.TranslateElement({pageLanguage: 'pl',autoDisplay: false}, 'google_translate_element2');}
  310. </script>
  311.     <script type="text/javascript" src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit2"></script>
  312.     <script type="text/javascript">
  313. /* <![CDATA[ */
  314. eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('6 7(a,b){n{4(2.9){3 c=2.9("o");c.p(b,f,f);a.q(c)}g{3 c=2.r();a.s(\'t\'+b,c) }}u(e){ }}6 h(a){4(a.8)a=a.8;4(a==\'\')v;3 b=a.w(\'|\')[1];3 c;3 d=2.x(\'y\');z(3 i=0;i<d.5;i++)4(d[i].A==\'B-C-D\')c=d[i];4(2.j(\'k\')==E||2.j(\'k\').l.5==0||c.5==0||c.l.5==0){F(6(){h(a)},G)}g{c.8=b;7(c,\'m\');7(c,\'m\') }}',43,43,'||document|var|if|length|function|GTranslateFireEvent|value|createEvent||||||true|else|doGTranslate||getElementById|google_translate_element2|innerHTML|change|try|HTMLEvents|initEvent|dispatchEvent|createEventObject|fireEvent|on|catch|return|split|getElementsByTagName|select|for|className|goog|te|combo|null|setTimeout|500'.split('|'),0,{}))
  315. /* ]]> */
  316. </script>
  317. <script>
  318. //zmiana licznika na wejsciu
  319. $(function() {
  320.     $.ajax({
  321.             url:'{{ (path('ajaxTest')) }}',
  322.             type: "POST",
  323.             dataType: "json",
  324.             data: {
  325.                 "some_var_name": "some_var_value"
  326.             },
  327.             async: true,
  328.             success: function (data)
  329.             {
  330.                 
  331.                 var headerBasket = $('.addToBasket');
  332.                 var qty = headerBasket.find('.qty');
  333.                 var counter = data;
  334.                 qty.html(counter);
  335.             }
  336.         });
  337.         return false;
  338.  })
  339. </script>
  340. {% endblock %}