From 7d1d61757a39e7f949e65e0d9f8b6555f5010b90 Mon Sep 17 00:00:00 2001 From: dev Date: Sat, 27 Jun 2026 07:01:54 +0200 Subject: feat: split movie synopsis into separate paragraphs Synopsis now splits on \n\n into individual

tags instead of one big text blob. Already implemented, confirmed working with latest DB data. --- resources/views/cinema_show.blade.php | 206 ++++++++++++++++++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 resources/views/cinema_show.blade.php (limited to 'resources/views/cinema_show.blade.php') diff --git a/resources/views/cinema_show.blade.php b/resources/views/cinema_show.blade.php new file mode 100644 index 0000000..49c5977 --- /dev/null +++ b/resources/views/cinema_show.blade.php @@ -0,0 +1,206 @@ +@extends('layouts.app') + +@section('styles') +@include ('layouts.footer-style') + +.poster-detail { + width: 100%; + max-width: 350px; + border-radius: 4px; +} + +.year { + color: #868e96; +} + +.rating { + color: #868e96; + font-size: 0.9rem; +} + +.movie-credits { + columns: 2; + column-gap: 20px; +} + +.hn-comment { + font-size: 0.875rem; + color: #868e96; + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; +} + +@media (max-width: 768px) { + .movie-credits { + columns: 1; + } + .poster-detail { + max-width: 200px; + margin: 0 auto; + } +} + +@endsection + +@section('content') +

+
+ + @if ( ! is_null($movie) ) +
+

+ ← All Movies +

+
+
+
+ @if ( ! empty($movie->poster_url) ) + {{ $movie->primary_title }} poster + @else +
🎬
+ @endif +
+
+

+ @if ( ! is_null($movie->wiki_article) ) + + {{ $movie->primary_title }} + + @else + {{ $movie->primary_title }} + @endif + @if ( ! is_null($movie->original_title) && $movie->original_title != $movie->primary_title ) + ({{ $movie->original_title }}) + @endif +

+
+ @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->title_type) ) + @if ( ! is_null($movie->start_year) || ! is_null($movie->runtime_minutes) ) + · + @endif + {{ $movie->title_type }} + @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($genres) ) +
+ @foreach( $genres as $genre ) + {{ $genre }} + @endforeach +
+ @endif + + @if ( ! empty($movie->synopsis) ) + @php + $paragraphs = preg_split('/\\n\\s*\\n/', strip_tags($movie->synopsis)); + @endphp + @foreach($paragraphs as $i => $para) + @if ( trim($para) !== '' ) +

+ {{ trim($para) }} +

+ @endif + @endforeach + @endif + + @if ( ! empty($directors) ) +
+

Directed by

+
+ @foreach( $directors as $person ) +
{{ $person->name }}
+ @endforeach +
+
+ @endif + + @if ( ! empty($actors) ) +
+

Starring

+
+ @foreach( $actors as $person ) +
{{ $person->name }}
+ @endforeach +
+
+ @endif + + @if ( ! is_null($movie->imdb_id) || ! is_null($movie->wiki_article) ) +
+ @if ( ! is_null($movie->wiki_article) ) + View on Wikipedia + @endif + @if ( ! is_null($movie->imdb_id) ) + View on IMDb + @endif +
+ @endif + + @if ( ! empty($hnStories) ) +
+

Mentions on Hacker News

+ +
+ @endif +
+
+
+
+ @else +
+

Movie Not Found

+
+

The requested movie could not be found.

+ Back to Movies +
+
+ @endif + +
+
+@endsection + +@section('footer') + @include ('layouts.footer') +@endsection -- cgit v1.2.3