@extends('layouts.app') @section('styles') @include ('layouts.footer-style') html { height: 100%; } .movie-grid { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 20px; } .movie-card { flex: 1 1 0; } .movie-card .poster { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; background-color: #333; border-radius: 4px 4px 0 0; } .movie-card .year { color: #868e96; font-size: 0.85rem; } .movie-card .rating { font-size: 0.9rem; color: #868e96; } .movie-card .synopsis { font-size: 0.875rem; color: #6c757d; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; } .movie-card h1 { font-size: 1rem; padding: 10px 12px 4px; margin: 0; } .movie-card h1 a { color: inherit; text-decoration: none; } .movie-card h1 a:hover { text-decoration: underline; } .movie-card .card-body { padding: 0 12px 12px; } .no-poster { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 2 / 3; background-color: #495057; color: #adb5bd; font-size: 3rem; border-radius: 4px 4px 0 0; } .permalink:hover { text-decoration: none; } @endsection @section('content')

@if ( isset($search_query) && $search_query != '' ) Movies matching "{{ $search_query }}" @if ( "1" != $movies->currentPage() ) (Page {{ $movies->currentPage() }}) @endif @else Movies @if ( "1" != $movies->currentPage() ) (Page {{ $movies->currentPage() }}) @endif @endif

@if ( isset($search_query) && $search_query != '' ) Found {{ $count }} movies matching "{{ $search_query }}". @else Browse {{ number_format($count) }} movies from the database, mentioned on Hacker News, ranked by rating or popularity. @endif

Sort by: @foreach ([ ['ref_count', 'Hacker News Mentions'], ['score', 'Rating'], ['num_votes', 'Number of Votes'], ['num_accolades', 'Accolades'], ['start_year', 'Release Date'], ] as [$key, $label]) @if ( (isset($order) ? $order : 'ref_count') == $key ) @if ( (isset($direction) ? $direction : 'desc') == 'desc' ) {{ $label }} ▲ @else {{ $label }} ▼ @endif @else {{ $label }} @endif @endforeach
@if ( 0 != $movies->count() )
@foreach( $movies as $movie)
@if ( ! empty($movie->poster_url) ) {{ $movie->primary_title }} poster @else
🎬
@endif

{{ $movie->primary_title }}

@if ( ! is_null($movie->start_year) ) {{ $movie->start_year }} @endif @if ( ! is_null($movie->runtime_minutes) ) @if ( ! is_null($movie->start_year) ) · @endif {{ $movie->runtime_minutes }} min @endif
@if ( ! is_null($movie->average_rating) ) ⭐ {{ number_format($movie->average_rating, 1) }} @if ( ! is_null($movie->num_votes) ) ({{ number_format($movie->num_votes) }} votes) @endif @endif
@if ( ! empty($movie->synopsis) )

{{ strip_tags($movie->synopsis) }}

@endif
@endforeach
{{ $movies->appends(Request::input())->links() }} @endif
@endsection @section('footer') @include ('layouts.footer') @endsection