ghiwar

artikel-image.blade.php

May 12th, 2020
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. @extends('layout')
  2.  
  3. @section('head')
  4. <title>{{ collect(['📚', '📖', '📘', '☑️', '✔️', '✅', '🗸', '🗹', '🔴', '🔵'])->random() }} {{ ucwords($keyword) }} - {{ collect(['Terbaru', 'Gratis', 'Lengkap'])->random() }}</title>
  5. @endsection
  6. @php
  7. $images = collect($images)->shuffle()->take(12)->toArray();
  8. @endphp
  9. @section('bg')
  10. {{ collect($images)->random()['url'] }}
  11. @endsection
  12.  
  13. @section('header')
  14. <h1>{{ ucwords($keyword) }}</h1>
  15.  
  16. @php
  17. shuffle($sentences);
  18. @endphp
  19.  
  20. <div class="navi text-left">
  21. @if(!empty($sentences))
  22. <p>{{ @array_pop($sentences) }} {{ @array_pop($sentences) }} {{ @array_pop($sentences) }} <br>
  23. @foreach($related as $r)
  24. @if(data_exists($r))
  25. <a class="badge badge-{{ collect(['primary', 'secondary', 'success', 'info', 'danger', 'warning', 'light', 'dark'])->random() }}" href="{{ image_url($r) }}">{{ $r }}</a>
  26. @endif
  27. @endforeach
  28. </p>
  29. @endif
  30. </div>
  31. <p class="text-center"><!--ads/responsive.txt--></p>
  32. @endsection
  33.  
  34. @section('content')
  35.  
  36.  
  37. @foreach(collect($images)->shuffle()->chunk(4) as $chunked)
  38.  
  39. @if($loop->iteration == 2)
  40. <div class="posts-images">
  41. <div class="text-left">
  42. <h3>{{ @array_pop($sentences) }}</h3>
  43. <p class="text-left"><img src="{{ str_replace(array('https://' , 'http://') , 'https://i0.wp.com/', collect($images)->first()['url']) }}" width="34%" align="left" style="margin-right: 8px;margin-bottom: 8px;" onerror="this.src='https://files.libgen.live/img/pdf.jpg'"></p>
  44.  
  45. @foreach(collect($sentences)->chunk(4) as $chunked_sentences)
  46. <p>
  47. @if($loop->first)
  48. <strong>{{ ucfirst($keyword) }}</strong>.
  49. @endif
  50.  
  51. @foreach($chunked_sentences as $chunked_sentence)
  52. {{ $chunked_sentence }}
  53. @endforeach
  54. </p>
  55. @endforeach
  56.  
  57. </div>
  58. </div>
  59. @endif
  60.  
  61. @endforeach
  62. <p></p>
  63. <p class="text-center"><!--ads/responsive.txt--></p>
  64. @foreach(collect($images)->shuffle()->chunk(4) as $chunked)
  65. <div class="row mt-3">
  66. @foreach($chunked as $image)
  67. <div class="col-md-3">
  68. <img class="img-fluid" src="{{ str_replace(array('https://' , 'http://') , 'https://i0.wp.com/', $image['url'] )}}" style="width:100%" onerror="this.src='https://files.libgen.live/img/pdf.jpg'">
  69. <p class="text-center">{{ $image['title'] }}</p>
  70. </div>
  71. @endforeach
  72. </div>
  73. @endforeach
  74.  
  75. @endsection
Add Comment
Please, Sign In to add comment