header.blade.php 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  1. <style>
  2. .second-level,
  3. .third-level {
  4. position: absolute !important;
  5. left: 182px !important;
  6. top: -2px !important;
  7. }
  8. </style>
  9. <header class="clearfix second-style">
  10. <!-- Bootstrap navbar -->
  11. <nav class="navbar navbar-default navbar-static-top" role="navigation">
  12. <div class="logo-advertisement">
  13. <div class="container">
  14. <!-- Brand and toggle get grouped for better mobile display -->
  15. <div class="navbar-header">
  16. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
  17. <span class="sr-only">Toggle navigation</span>
  18. <span class="icon-bar"></span>
  19. <span class="icon-bar"></span>
  20. <span class="icon-bar"></span>
  21. </button>
  22. <a class="navbar-brand" href="/"><img src="/images/logo.jpg" alt=""></a>
  23. </div>
  24. <div class="advertisement carousel slide" data-ride="carousel">
  25. <div class="desktop-advert carousel-inner">
  26. @if($home->banner_top_google != '')
  27. <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
  28. <ins class="adsbygoogle"
  29. style="display:block"
  30. data-ad-client="ca-pub-0209495346002620"
  31. data-ad-slot="{{$home->banner_top_google}}"
  32. data-ad-format="auto"
  33. data-full-width-responsive="true"></ins>
  34. <script>
  35. (adsbygoogle = window.adsbygoogle || []).push({});
  36. </script>
  37. @else
  38. @php
  39. $found = false;
  40. $count = 0;
  41. @endphp
  42. @if(isset($home->banner_top) && $home->banner_top != '')
  43. <div class="item {{$count == 0 ? 'active' : ''}}">
  44. <a href="{{$home->banner_top_url}}"><img src="/files/{{$home->banner_top}}" width="728" alt="" style="border:1px solid gray;"></a>
  45. </div>
  46. @php
  47. $count += 1;
  48. $found = true;
  49. @endphp
  50. @endif
  51. @if(isset($home->banner_top_2) && $home->banner_top_2 != '')
  52. <div class="item {{$count == 0 ? 'active' : ''}}">
  53. <a href="{{$home->banner_top_url_2}}"><img src="/files/{{$home->banner_top_2}}" width="728" alt="" style="border:1px solid gray;"></a>
  54. </div>
  55. @php
  56. $found = true;
  57. @endphp
  58. @endif
  59. @if(isset($home->banner_top_3) && $home->banner_top_3 != '')
  60. <div class="item {{$count == 0 ? 'active' : ''}}">
  61. <a href="{{$home->banner_top_url_3}}"><img src="/files/{{$home->banner_top_3}}" width="728" alt="" style="border:1px solid gray;"></a>
  62. </div>
  63. @php
  64. $found = true;
  65. @endphp
  66. @endif
  67. @if(isset($home->banner_top_4) && $home->banner_top_4 != '')
  68. <div class="item {{$count == 0 ? 'active' : ''}}">
  69. <a href="{{$home->banner_top_url_4}}"><img src="/files/{{$home->banner_top_4}}" width="728" alt="" style="border:1px solid gray;"></a>
  70. </div>
  71. @php
  72. $found = true;
  73. @endphp
  74. @endif
  75. @if(isset($home->banner_top_5) && $home->banner_top_5 != '')
  76. <div class="item {{$count == 0 ? 'active' : ''}}">
  77. <a href="{{$home->banner_top_url_5}}"><img src="/files/{{$home->banner_top_5}}" width="728" alt="" style="border:1px solid gray;"></a>
  78. </div>
  79. @php
  80. $found = true;
  81. @endphp
  82. @endif
  83. @if(!$found)
  84. <div class="widget" style="width:728px;height:90px;border:1px solid gray;">
  85. @endif
  86. @endif
  87. </div>
  88. <div class="tablet-advert carousel-inner">
  89. @if($home->banner_top_google != '')
  90. <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
  91. <ins class="adsbygoogle"
  92. style="display:block"
  93. data-ad-client="ca-pub-0209495346002620"
  94. data-ad-slot="{{$home->banner_top_google}}"
  95. data-ad-format="auto"
  96. data-full-width-responsive="true"></ins>
  97. <script>
  98. (adsbygoogle = window.adsbygoogle || []).push({});
  99. </script>
  100. @else
  101. @php
  102. $found = false;
  103. $count = 0;
  104. @endphp
  105. @if(isset($home->banner_top) && $home->banner_top != '')
  106. <div class="item {{$count == 0 ? 'active' : ''}}">
  107. <a href="{{$home->banner_top_url}}"><img src="/files/{{$home->banner_top}}" width="728" alt="" style="border:1px solid gray;"></a>
  108. </div>
  109. @php
  110. $count += 1;
  111. $found = true;
  112. @endphp
  113. @endif
  114. @if(isset($home->banner_top_2) && $home->banner_top_2 != '')
  115. <div class="item {{$count == 0 ? 'active' : ''}}">
  116. <a href="{{$home->banner_top_url_2}}"><img src="/files/{{$home->banner_top_2}}" width="728" alt="" style="border:1px solid gray;"></a>
  117. </div>
  118. @php
  119. $found = true;
  120. @endphp
  121. @endif
  122. @if(isset($home->banner_top_3) && $home->banner_top_3 != '')
  123. <div class="item {{$count == 0 ? 'active' : ''}}">
  124. <a href="{{$home->banner_top_url_3}}"><img src="/files/{{$home->banner_top_3}}" width="728" alt="" style="border:1px solid gray;"></a>
  125. </div>
  126. @php
  127. $found = true;
  128. @endphp
  129. @endif
  130. @if(isset($home->banner_top_4) && $home->banner_top_4 != '')
  131. <div class="item {{$count == 0 ? 'active' : ''}}">
  132. <a href="{{$home->banner_top_url_4}}"><img src="/files/{{$home->banner_top_4}}" width="728" alt="" style="border:1px solid gray;"></a>
  133. </div>
  134. @php
  135. $found = true;
  136. @endphp
  137. @endif
  138. @if(isset($home->banner_top_5) && $home->banner_top_5 != '')
  139. <div class="item {{$count == 0 ? 'active' : ''}}">
  140. <a href="{{$home->banner_top_url_5}}"><img src="/files/{{$home->banner_top_5}}" width="728" alt="" style="border:1px solid gray;"></a>
  141. </div>
  142. @php
  143. $found = true;
  144. @endphp
  145. @endif
  146. @if(!$found)
  147. <div class="widget" style="width:728px;height:90px;border:1px solid gray;">
  148. @endif
  149. @endif
  150. </div>
  151. <div class="mobile-advert carousel-inner">
  152. @if($home->banner_top_google != '')
  153. <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
  154. <ins class="adsbygoogle"
  155. style="display:block"
  156. data-ad-client="ca-pub-0209495346002620"
  157. data-ad-slot="{{$home->banner_top_google}}"
  158. data-ad-format="auto"
  159. data-full-width-responsive="true"></ins>
  160. <script>
  161. (adsbygoogle = window.adsbygoogle || []).push({});
  162. </script>
  163. @else
  164. @php
  165. $found = false;
  166. $count = 0;
  167. @endphp
  168. @if(isset($home->banner_top) && $home->banner_top != '')
  169. <div class="item {{$count == 0 ? 'active' : ''}}">
  170. <a href="{{$home->banner_top_url}}"><img src="/files/{{$home->banner_top}}" width="728" alt="" style="border:1px solid gray;"></a>
  171. </div>
  172. @php
  173. $count += 1;
  174. $found = true;
  175. @endphp
  176. @endif
  177. @if(isset($home->banner_top_2) && $home->banner_top_2 != '')
  178. <div class="item {{$count == 0 ? 'active' : ''}}">
  179. <a href="{{$home->banner_top_url_2}}"><img src="/files/{{$home->banner_top_2}}" width="728" alt="" style="border:1px solid gray;"></a>
  180. </div>
  181. @php
  182. $found = true;
  183. @endphp
  184. @endif
  185. @if(isset($home->banner_top_3) && $home->banner_top_3 != '')
  186. <div class="item {{$count == 0 ? 'active' : ''}}">
  187. <a href="{{$home->banner_top_url_3}}"><img src="/files/{{$home->banner_top_3}}" width="728" alt="" style="border:1px solid gray;"></a>
  188. </div>
  189. @php
  190. $found = true;
  191. @endphp
  192. @endif
  193. @if(isset($home->banner_top_4) && $home->banner_top_4 != '')
  194. <div class="item {{$count == 0 ? 'active' : ''}}">
  195. <a href="{{$home->banner_top_url_4}}"><img src="/files/{{$home->banner_top_4}}" width="728" alt="" style="border:1px solid gray;"></a>
  196. </div>
  197. @php
  198. $found = true;
  199. @endphp
  200. @endif
  201. @if(isset($home->banner_top_5) && $home->banner_top_5 != '')
  202. <div class="item {{$count == 0 ? 'active' : ''}}">
  203. <a href="{{$home->banner_top_url_5}}"><img src="/files/{{$home->banner_top_5}}" width="728" alt="" style="border:1px solid gray;"></a>
  204. </div>
  205. @php
  206. $found = true;
  207. @endphp
  208. @endif
  209. @if(!$found)
  210. <div class="widget" style="width:728px;height:90px;border:1px solid gray;">
  211. @endif
  212. @endif
  213. </div>
  214. </div>
  215. </div>
  216. </div>
  217. <!-- End Logo & advertisement -->
  218. <!-- navbar list container -->
  219. <div class="nav-list-container">
  220. <div class="container">
  221. <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
  222. <ul class="nav navbar-nav navbar-left">
  223. <form class="hide-search-on-large navbar-form form-inline2" role="search" autocomplete="off" action="/ricerca" method="POST" style="border-color:white; margin-left:5px">
  224. {{ csrf_field() }}
  225. <div style="position: relative; display: inline-block; width: 75%;">
  226. <input type="text" id="search" name="search" placeholder="Cerca qui"
  227. style="width: 100%; border-radius: 20px; padding: 5px 35px 5px 10px; border: 1px solid #ccc;">
  228. <i class="fa fa-search" style="position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: gray;"></i>
  229. </div>
  230. </form>
  231. {{-- <li><a href="/">Home</a></li> --}}
  232. <li class="dropdown-item pagine-web-mobile" style="display:none">
  233. <a class="dropdown-toggle" href="#" style="color:red!important;">Pagine WEB<span class="caret"></span></a>
  234. <ul class="dropdown-menu">
  235. @foreach($pages as $page)
  236. <li class="single-paginaweb"><a href="/{{$page->slug}}">{{$page->title}}</a></li>
  237. @endforeach
  238. </ul>
  239. </li>
  240. <!--
  241. <li class="search-top"><a><i class="fa fa-search" aria-hidden="true"></i></a></li>
  242. -->
  243. @php $insertedAreaRosa = false; @endphp
  244. @foreach($sections_menu as $section)
  245. @if($section->slug != 'europei-2022' && strpos($section->name, "/F") === false)
  246. <li>
  247. @if($section->layout != '')
  248. <a class="home-scroll-section" href="#" onclick="scroll_to('{{$section->slug}}')">{{$section->name}}</a>
  249. @else
  250. <a href="/{{$section->slug}}">{{$section->name}}</a>
  251. @endif
  252. </li>
  253. @endif
  254. @if(!$insertedAreaRosa && strtolower($section->name) === 'serie c2')
  255. <li class="drop"><a class="home" href="#">Area rosa</a>
  256. <ul class="dropdown">
  257. @foreach($sections_menu as $rosaSection)
  258. @if(strpos($rosaSection->name, "/F") > 0)
  259. <li>
  260. @if($rosaSection->layout != '')
  261. <a class="home-scroll-section" href="#" onclick="scroll_to('{{$rosaSection->slug}}')">{{$rosaSection->name}}</a>
  262. @else
  263. <a class="home-scroll-section" href="/{{$rosaSection->slug}}">{{$rosaSection->name}}</a>
  264. @endif
  265. </li>
  266. @endif
  267. @endforeach
  268. </ul>
  269. </li>
  270. @php $insertedAreaRosa = true; @endphp
  271. @endif
  272. @endforeach
  273. <li>
  274. <a class="home-scroll-section" href="/eventi">EVENTI</a>
  275. </li>
  276. <li class="dropdown open" id="calendarMobile">
  277. <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="true">Risultati <span class="caret"></span></a>
  278. <ul class="dropdown-menu">
  279. @foreach($calendars as $type => $categories)
  280. @foreach($categories as $category => $groups)
  281. @if(sizeof($groups) > 1)
  282. <li class="drop">
  283. <a href="#" style="padding-top: 5px !important;font-weight:bold;">{{$category}}</a>
  284. <ul class="dropdown " style="overflow-y:scroll;">
  285. @foreach($groups as $group => $cal)
  286. <li><a style="margin-left:20px !important;" href="/calendario/{{Str::slug($category)}}-{{Str::slug($group)}}/{{$cal}}">{{$group}}</a></li>
  287. @endforeach
  288. </ul>
  289. </li>
  290. @else
  291. <li>
  292. <a href="/calendario/{{Str::slug($category)}}/{{reset($groups)}}" style="padding-top: 5px !important;font-weight:bold;">{{$category}}</a>
  293. </li>
  294. @endif
  295. @endforeach
  296. @endforeach
  297. </ul>
  298. </li>
  299. @if(false)
  300. <li class="drop" id="calendar"><a class="home" href="#">Risultati</a>
  301. <ul class="dropdown">
  302. @foreach($calendars as $type => $categories)
  303. <li class="drop">
  304. <a href="#">{{$type}}</a>
  305. <ul class="dropdown second-level">
  306. @foreach($categories as $category => $groups)
  307. @if(is_array($groups))
  308. <li class="drop">
  309. <a href="#">{{$category}}</a>
  310. <ul class="dropdown third-level">
  311. @foreach($groups as $group => $cal)
  312. <li><a href="/calendario/{{Str::slug($category)}}-{{Str::slug($group)}}/{{$cal}}">{{$group}}</a></li>
  313. @endforeach
  314. </ul>
  315. </li>
  316. @else
  317. <li>
  318. <a href="/calendario/{{Str::slug($category)}}/{{$groups}}">{{$category}}</a>
  319. </li>
  320. @endif
  321. @endforeach
  322. </ul>
  323. </li>
  324. @endforeach
  325. </ul>
  326. </li>
  327. @if(false)
  328. @foreach($calendars as $type => $categories)
  329. <li class="dropdown">
  330. <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{$type}} </a>
  331. <ul class="dropdown-submenu">
  332. @foreach($categories as $category => $groups)
  333. @if(is_array($groups))
  334. <li class="dropdown">
  335. <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{$category}} </a>
  336. <ul class="dropdown-submenu">
  337. @foreach($groups as $group => $cal)
  338. <li><a href="/calendario/{{Str::slug($category)}}-{{Str::slug($group)}}/{{$cal}}">{{$group}}</a></li>
  339. @endforeach
  340. </ul>
  341. </li>
  342. @else
  343. <li>
  344. <a href="/calendario/{{Str::slug($category)}}/{{$groups}}">{{$category}}</a>
  345. </li>
  346. @endif
  347. @endforeach
  348. </ul>
  349. </li>
  350. @endforeach
  351. @endif
  352. <li class="drop"><a class="home" href="#">Eventi</a>
  353. <ul class="dropdown">
  354. @foreach($events as $event)
  355. <li><a href="/eventi/{{$event->slug}}">{{$event->title}}</a></li>
  356. @endforeach
  357. </ul>
  358. </li>
  359. @endif
  360. <!--
  361. <li class="drop"><a class="home" href="#">Pagine WEB</a>
  362. <ul class="dropdown pagineweb columns">
  363. @foreach($pages as $page)
  364. <li><a href="/{{$page->slug}}">{{$page->title}}</a></li>
  365. @endforeach
  366. </ul>
  367. </li>
  368. -->
  369. </ul>
  370. </div>
  371. <!-- /.navbar-collapse -->
  372. </div>
  373. <div class="container">
  374. <div class="col-sm-2 no-padding">
  375. <div class="center-button-reg blu-box pagine-regionali" style="text-align:left;">
  376. Pagine regionali
  377. </div>
  378. </div>
  379. <div class="col-sm-10">
  380. <nav id="menu-container" class="arrow">
  381. <div id="btn-nav-previous">
  382. <img src="/images/prev.png" width="25">
  383. </div>
  384. <div id="btn-nav-next">
  385. <img src="/images/next.png" width="25">
  386. </div>
  387. <div class="menu-inner-box">
  388. <div class="menu center-button-reg">
  389. @foreach($regions as $region)
  390. @if($region->layout != '')
  391. <a class="menu-item region" href="#" onclick="scroll_to('{{$region->slug}}')">{{$region->name}}</a>
  392. @else
  393. <a class="menu-item region" href="/{{$region->slug}}">{{$region->name}}</a>
  394. @endif
  395. @endforeach
  396. </div>
  397. </div>
  398. </nav>
  399. </div>
  400. <div class="container" id="calendar">
  401. <div class="col-sm-2 no-padding" style=" margin-left:-15px">
  402. <div class="center-button-reg blu-box" style="text-align:left;">
  403. Risultati
  404. </div>
  405. </div>
  406. <div class="col-sm-8">
  407. <ul class="dropdown nav navbar-nav navbar-left">
  408. @foreach($calendars as $type => $categories)
  409. @foreach($categories as $category => $groups)
  410. @if(sizeof($groups) > 1)
  411. <li class="drop">
  412. <a href="#" style="padding-top: 5px !important;">{{$category}}</a>
  413. <ul class="dropdown" style="overflow-y:scroll;max-height: 350px !important;">
  414. @foreach($groups as $group => $cal)
  415. <li><a href="/calendario/{{Str::slug($category)}}-{{Str::slug($group)}}/{{$cal}}">{{$group}}</a></li>
  416. @endforeach
  417. </ul>
  418. </li>
  419. @else
  420. <li>
  421. <a href="/calendario/{{Str::slug($category)}}/{{reset($groups)}}" style="padding-top: 5px !important;">{{$category}}</a>
  422. </li>
  423. @endif
  424. @endforeach
  425. @endforeach
  426. </ul>
  427. </div>
  428. <!-- Pagine WEB menu -->
  429. <div class="col-sm-2">
  430. <ul class="nav navbar-nav lg-pagine-web" style="margin-left:30px!important">
  431. <li class="drop pagine-position">
  432. <a class="home" style="color: #2040ff!important;" href="#">Pagine WEB</a>
  433. <ul class="dropdown columns pagineweb-dropdown">
  434. @foreach($pages as $page)
  435. <li class="single-paginaweb"><a href="/{{$page->slug}}">{{$page->title}}</a></li>
  436. @endforeach
  437. </ul>
  438. </li>
  439. </ul>
  440. </div>
  441. </div>
  442. </div>
  443. <!-- End navbar list container -->
  444. </nav>
  445. <!-- End Bootstrap navbar -->
  446. </header>
  447. <script>
  448. document.addEventListener('DOMContentLoaded', function() {
  449. const dropdownToggle = document.querySelector('.pagine-web-mobile .dropdown-toggle');
  450. if (dropdownToggle) {
  451. dropdownToggle.addEventListener('click', function(e) {
  452. e.preventDefault();
  453. const parentLi = this.closest('.dropdown-item');
  454. parentLi.classList.toggle('open');
  455. });
  456. }
  457. });
  458. </script>