news.blade.php 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. @extends('layouts.frontend')
  2. @section('title')- {!! $news->meta_title != '' ? $news->meta_title : $news->title !!}@stop
  3. @section('meta')
  4. @if($news->meta_description != "")
  5. <meta name="description" content="{{$news->meta_description}}">
  6. @endif
  7. @if($news->meta_keywords != "")
  8. <meta name="keywords" content="{{$news->meta_keywords}}">
  9. @endif
  10. <meta property="og:url" content="{{url()->full()}}" />
  11. <meta property="og:type" content="website" />
  12. <meta property="og:title" content="{!! str_replace("''", '“', str_replace('"', '“', $news->title)) !!}" />
  13. <meta property="og:description" content="{{strip_tags($news->text)}}" />
  14. <meta property="og:image" content="{{env('APP_URL')}}/files/news/{{$news->image}}" />
  15. <meta property="og:image:secure_url" content="{{env('APP_URL')}}/files/news/{{$news->image}}" />
  16. @stop
  17. @section('banner_top')
  18. @if(isset($news->page))
  19. @include('partials.page_adv', ['advs' => $news->page->getAdvs(), 'position' => 'Sopra'])
  20. @endif
  21. @stop
  22. @section('content')
  23. <div class="container" style="min-height: 450px;margin-top:50px;">
  24. <div class="row single-news">
  25. <div class="col-sm-9 single-news">
  26. <div class="row">
  27. <img src="/files/news/{{$news->image}}" align="left" style="width:95%; margin-left:15px;">
  28. </div>
  29. <p>{{date("d/m/Y H:i", strtotime($news->date))}}</p>
  30. <h1 style="font-size:30px;margin-top:20px;">{{$news->title}}</h1>
  31. <h4>{!!$news->text_short!!}</h4>
  32. <p style="font-size:16px">{!!$news->text!!}</p>
  33. @if(sizeof($aImages) > 0)
  34. <br>
  35. <div class="title-section">
  36. <h1 style="width: 90%"><span>Galleria</span></h1>
  37. </div>
  38. @endif
  39. <div class="row gallery">
  40. @foreach($aImages as $idx => $img)
  41. <div class="col-sm-2 ">
  42. <a href="/files/news/{{$img}}"><img src="/files/news/{{$img}}" class="img-responsive"></a>
  43. </div>
  44. @endforeach
  45. </div>
  46. @if($news->video != '')
  47. <br>
  48. <div class="title-section">
  49. <h1 style="width: 90%"><span>Video</span></h1>
  50. </div>
  51. <div class="row" style="margin-top:30px; margin-left:0px;">
  52. {!! $news->video !!}
  53. </div>
  54. @endif
  55. @if($news->pdf != '')
  56. <br>
  57. <div class="title-section">
  58. <h1 style="width: 90%"><span>Documenti</span></h1>
  59. </div>
  60. <div class="center-button" style="float:left">
  61. <a href="/files/news/{{$news->pdf}}" target="_blank">VISUALIZZA</a>
  62. </div>
  63. @endif
  64. <div class="row" style="margin-top:30px;">
  65. <div class="col-md-2 col-xs-3">
  66. <div class="fb-share-button" data-href="{{url()->full()}}" data-layout="button_count"></div>
  67. </div>
  68. <div class="col-md-2 col-xs-6">
  69. <a class="twitter-share-button" href="https://twitter.com/intent/tweet">Tweet</a>
  70. </div>
  71. </div>
  72. </div>
  73. <div class="col-sm-3" >
  74. <div class="title-section">
  75. <h1><span class="no-border">ULTIME NEWS</span></h1>
  76. </div>
  77. <div class="item">
  78. <ul class="list-posts">
  79. @foreach($elements as $e)
  80. <li>
  81. <div class="row">
  82. <div class="post-content col-md-12">
  83. <a href="/{{$e->slug}}"><img src="/files/news/{{$e->image}}" alt=""></a>
  84. <ul class="post-tags">
  85. <li><i class="fa fa-clock-o"></i>{{date("d/m/Y", strtotime($e->date))}}</li>
  86. </ul>
  87. <h2><a href="/{{$e->slug}}">{{$e->title}}</a></h2>
  88. </div>
  89. </div>
  90. </li>
  91. @endforeach
  92. </ul>
  93. </div>
  94. <div class="center-button">
  95. @if(isset($news->section))
  96. <a href="/{{$news->section->slug}}">ARCHIVIO NEWS</a>
  97. @else
  98. @if(isset($news->region_1))
  99. <a href="/{{$news->region_1->slug}}">ARCHIVIO NEWS</a>
  100. @else
  101. @if(isset($news->region_2))
  102. <a href="/{{$news->region_2->slug}}">ARCHIVIO NEWS</a>
  103. @else
  104. @endif
  105. @endif
  106. @endif
  107. </div>
  108. <br><br>
  109. <div class="title-section">
  110. <h4><span class="no-border">SEGUI CALCIO A 5 ANTEPRIMA SU</span></h4>
  111. </div>
  112. <div class="row">
  113. <div class="col-md-2 col-xs-4 text-center">
  114. <a href="https://it-it.facebook.com/calcioa5anteprima/"><img src="/images/facebook.png"></a>
  115. </div>
  116. <div class="col-md-2 col-xs-4 text-center">
  117. <a href="https://twitter.com/ca5anteprima"><img src="/images/twitter.png"></a>
  118. </div>
  119. <div class="col-md-2 col-xs-4 text-center">
  120. <a href="#"><img src="/images/instagram.png"></a>
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. <br><br>
  127. @stop
  128. @section('banner_bottom')
  129. @if(isset($news->page))
  130. @include('partials.page_adv', ['advs' => $news->page->getAdvs(), 'position' => 'Sotto'])
  131. @endif
  132. @stop
  133. @section('extra_js')
  134. <script type="text/javascript">
  135. $(document).ready(function() {
  136. $('.gallery').magnificPopup({
  137. delegate: 'a',
  138. type: 'image',
  139. closeOnContentClick: false,
  140. closeBtnInside: false,
  141. mainClass: 'mfp-with-zoom mfp-img-mobile',
  142. image: {
  143. verticalFit: true
  144. },
  145. gallery: {
  146. enabled: true
  147. },
  148. zoom: {
  149. enabled: true,
  150. duration: 300, // don't foget to change the duration also in CSS
  151. opener: function(element) {
  152. return element.find('img');
  153. }
  154. }
  155. });
  156. });
  157. </script>
  158. @stop