vorschlag.blade.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <x-app-layout>
  2. <x-slot name="header">
  3. <div class="float-right flex space-x-2">
  4. <a href="https://themoviedb.org/movie/{{ $tmdb->getId() }}"><img src="/img/tmdb.svg" class="max-h-7 w-8"></a>
  5. <a href="https://imdb.com/title/{{ $tmdb->getImdbId() }}"><img src="/img/IMDb_Logo_Square.svg" class="max-h-7"></a>
  6. </div>
  7. <h2 class="font-semibold text-xl text-burnt leading-tight">
  8. {{ $tmdb->getTitle() }}
  9. </h2>
  10. <div class="text-burnt italic mt-2 text-lg">{{ $tmdb->getTagline() }}</div>
  11. </x-slot>
  12. <div class="py-12">
  13. <div class="max-w-7xl mx-auto sm:px-6 lg:px-8 text-crayola" x-data="{ tab: 'fact' }">
  14. <!-- Session Status -->
  15. <x-auth-session-status class="mb-4 border border-burnt p-2 rounded-lg bg-coal mx-auto max-w-xs" :status="session('status')" />
  16. <div class="flex flex-wrap content-start">
  17. @if(count($previous["suggested"]) < 1)
  18. <div
  19. class="border p-2 rounded-lg flex mb-6 bg-coal max-w-xs mr-2 ml-2 sm:ml-0 cursor-pointer hover:text-coal border-burnt"
  20. :class="confseen ? 'bg-burnt text-coal hover:bg-crayola' : 'hover:bg-burnt'"
  21. @click="confseen ? location.href='/vorschlag/{{ $tmdb->getId() }}/vorschlagen' : confseen = true"
  22. @click.outside="confseen = false"
  23. x-data="{confseen:false}"
  24. >
  25. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="h-6 w-6 mr-1" fill="currentColor"><!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M200 344V280H136C122.7 280 112 269.3 112 256C112 242.7 122.7 232 136 232H200V168C200 154.7 210.7 144 224 144C237.3 144 248 154.7 248 168V232H312C325.3 232 336 242.7 336 256C336 269.3 325.3 280 312 280H248V344C248 357.3 237.3 368 224 368C210.7 368 200 357.3 200 344zM0 96C0 60.65 28.65 32 64 32H384C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96zM48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80H64C55.16 80 48 87.16 48 96z"/></svg>
  26. <span x-text="confseen ? 'Wirklich vorschlagen?' : 'Vorschlagen'"></span>
  27. </div>
  28. @endif
  29. @foreach ($previous["suggested"] as $film)
  30. <a id="gesehen" class="border border-burnt p-2 rounded-lg flex mb-6 mr-2 bg-coal max-w-xs sm:ml-0" href="/film/{{$film["id"]}}">
  31. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="h-6 w-6 mr-1" fill="currentColor"><!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M200 344V280H136C122.7 280 112 269.3 112 256C112 242.7 122.7 232 136 232H200V168C200 154.7 210.7 144 224 144C237.3 144 248 154.7 248 168V232H312C325.3 232 336 242.7 336 256C336 269.3 325.3 280 312 280H248V344C248 357.3 237.3 368 224 368C210.7 368 200 357.3 200 344zM0 96C0 60.65 28.65 32 64 32H384C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96zM48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80H64C55.16 80 48 87.16 48 96z"/></svg>
  32. Vorgeschlagen am {{ \Carbon\Carbon::parse($film["date"])->format('d.m.Y') }}
  33. </a>
  34. @endforeach
  35. @foreach ($previous["seen"] as $film)
  36. <a id="gesehen" class="border border-burnt p-2 rounded-lg flex mb-6 mr-2 bg-coal max-w-xs sm:ml-0" href="/film/{{$film["id"]}}">
  37. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="h-6 w-6 mr-1" fill="currentColor"><!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M0 96C0 60.7 28.7 32 64 32H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM48 368v32c0 8.8 7.2 16 16 16H96c8.8 0 16-7.2 16-16V368c0-8.8-7.2-16-16-16H64c-8.8 0-16 7.2-16 16zm368-16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V368c0-8.8-7.2-16-16-16H416zM48 240v32c0 8.8 7.2 16 16 16H96c8.8 0 16-7.2 16-16V240c0-8.8-7.2-16-16-16H64c-8.8 0-16 7.2-16 16zm368-16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V240c0-8.8-7.2-16-16-16H416zM48 112v32c0 8.8 7.2 16 16 16H96c8.8 0 16-7.2 16-16V112c0-8.8-7.2-16-16-16H64c-8.8 0-16 7.2-16 16zM416 96c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V112c0-8.8-7.2-16-16-16H416zM160 128v64c0 17.7 14.3 32 32 32H320c17.7 0 32-14.3 32-32V128c0-17.7-14.3-32-32-32H192c-17.7 0-32 14.3-32 32zm32 160c-17.7 0-32 14.3-32 32v64c0 17.7 14.3 32 32 32H320c17.7 0 32-14.3 32-32V320c0-17.7-14.3-32-32-32H192z"/></svg>
  38. Gesehen am {{ \Carbon\Carbon::parse($film["date"])->format('d.m.Y') }}
  39. </a>
  40. @endforeach
  41. @foreach ($previous["rejected"] as $film)
  42. <a id="gesehen" class="border border-burnt p-2 rounded-lg flex mb-6 mr-2 bg-coal max-w-xs sm:ml-0" href="/film/{{$film["id"]}}">
  43. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="h-6 w-6 mr-1" fill="currentColor"><!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"/></svg>
  44. Abgelehnt am {{ \Carbon\Carbon::parse($film["date"])->format('d.m.Y') }}
  45. </a>
  46. @endforeach
  47. </div>
  48. <img src="{{ $image->getUrl($tmdb->getPosterImage(), 'w342') }}" alt="{{ $tmdb->getTitle() }} Poster" class="rounded-lg mx-auto mb-6 lg:float-right lg:mx-0 lg:ml-6 shadow-md shadow-burnt">
  49. <div class="sm:rounded-lg bg-coal flex mb-6 px-4">
  50. <a class="p-6 hover:text-yelmax cursor-pointer" x-bind:class="tab == 'fact' ? 'border-b-2 border-yelmax' : ''" @@click="tab = 'fact'">Allgemein</a>
  51. <a class="p-6 hover:text-yelmax cursor-pointer" x-bind:class="tab == 'cast' ? 'border-b-2 border-yelmax' : ''" @@click="tab = 'cast'">Schauspieler</a>
  52. <a class="p-6 hover:text-yelmax cursor-pointer" x-bind:class="tab == 'vids' ? 'border-b-2 border-yelmax' : ''" @@click="tab = 'vids'">Trailer</a>
  53. </div>
  54. <div id="#allgemein" class="px-4 grid grid-cols-2 gap-2" x-show="tab == 'fact'" x-transition>
  55. <div class="font-bold">Originaltitel</div>
  56. <div>„{{ $tmdb->getOriginalTitle() }}“ ({{ $tmdb->getOriginalLanguage() }})</div>
  57. <div class="font-bold">Laufzeit</div>
  58. <div>{{ $tmdb->getRuntime() }} Minuten</div>
  59. <div class="font-bold">Erschienen</div>
  60. <div>{{ $tmdb->getReleaseDate()->format('d.m.Y') }} -
  61. @foreach ($tmdb->getProductionCountries() as $co)
  62. <abbr title="{{$co->getName()}}">{{$co->getIso31661()}}</abbr>
  63. @endforeach
  64. </div>
  65. <div class="font-bold">Genre</div>
  66. <div class="flex flex-wrap space-x-1">
  67. @foreach ($tmdb->getGenres() as $genre)
  68. <div class="bg-coal rounded-lg p-1">{{ $genre->getName() }}</div>
  69. @endforeach
  70. </div>
  71. <div class="font-bold">TMDB Bewertung</div>
  72. <div class="">{{ $tmdb->getVoteAverage() }} von 10</div>
  73. <div class="font-bold">Flatrate Stream</div>
  74. <div class="flex flex-wrap space-x-1">
  75. @forelse($tmdb->getWatchProviders()->filter(
  76. function($key, $value) {
  77. return $value->getIso31661() == 'DE' && count($value->getFlatrate()) > 0;
  78. }
  79. ) as $wp)
  80. @foreach($wp->getFlatrate() as $p)
  81. <img src="{{ $image->getUrl($p->getLogoPath(), 'w45') }}" title="{{ $p->getName() }}" class="rounded-lg max-h-8">
  82. @endforeach
  83. @empty
  84. <div class="italic">Keine</div>
  85. @endforelse
  86. </div>
  87. <div class="font-bold">Kaufen / Leihen</div>
  88. <div class="flex flex-wrap space-x-1">
  89. @foreach($tmdb->getWatchProviders()->filter(
  90. function($key, $value) {
  91. return $value->getIso31661() == 'DE' && (count($value->getRent()) > 0 || count($value->getBuy()) > 0);
  92. }
  93. ) as $wp)
  94. @foreach($wp->getRent() as $p)
  95. <img src="{{ $image->getUrl($p->getLogoPath(), 'w45') }}" title="{{ $p->getName() }}" class="rounded-lg max-h-8">
  96. @endforeach
  97. @endforeach
  98. </div>
  99. <div class="col-span-2 font-bold">Handlung</div>
  100. <div class="col-span-2 font-serif border-l-4 border-burnt pl-6">{{ $tmdb->getOverview() }}</div>
  101. </div>
  102. <div id="#schauspieler" class="px-4 grid grid-cols-4 gap-2" x-show="tab == 'cast'" x-transition>
  103. @foreach($tmdb->getCredits()->getCast() as $role)
  104. @if ($loop->index > 11)
  105. @break
  106. @endif
  107. <div class="pb-2">
  108. @if ($role->getProfileImage() != "")
  109. <img src="{{ $image->getUrl($role->getProfileImage() , "w185") }}" class="rounded-lg mb-1">
  110. @else
  111. <img src="/img/no-portrait.png" class="rounded-lg mb-1">
  112. @endif
  113. <div class="font-bold">{{ $role->getName() }}</div>
  114. <div class="text-burnt">{{ $role->getCharacter() }}</div>
  115. </div>
  116. @endforeach
  117. </div>
  118. <div id="trailer" class="px-4" x-show="tab == 'vids'" x-transition>
  119. @foreach ($tmdb->getVideos()->filter(
  120. function($key, $value) {
  121. return $value->getType() == "Trailer";
  122. }
  123. ) as $vid)
  124. <div class="font-bold">{{ $vid->getName() }}</div>
  125. <div class="relative overflow-hidden w-full sm:w-[calc(100%-384px)] after:block after:pt-[56.25%]">
  126. <iframe class="absolute top-0 left-0 w-full h-full" src="//www.youtube.com/embed/{{ $vid->getKey() }}" frameborder="0" allowfullscreen></iframe>
  127. </div>
  128. @endforeach
  129. </div>
  130. </div>
  131. </div>
  132. </x-app-layout>