summaryrefslogtreecommitdiff
path: root/resources/views/cinema_show.blade.php
diff options
context:
space:
mode:
authorDeveloper2026-06-27 04:12:21 +0200
committerDeveloper2026-06-27 04:12:21 +0200
commitdc3cbbfdd9455e419eaaf776c16544afdf95eadb (patch)
tree703bc352f7e3965afb6a8327f8854a0c430fedb5 /resources/views/cinema_show.blade.php
parent33b69f87babac5116db923b906512411488eb28a (diff)
downloadcurious-dc3cbbfdd9455e419eaaf776c16544afdf95eadb.tar.gz
feat: add Hacker News stories section to movie detail page
Links to every HN story referencing this movie, ordered by most recent. Each entry shows date, score (if > 0), and descendants (if > 0).
Diffstat (limited to 'resources/views/cinema_show.blade.php')
-rw-r--r--resources/views/cinema_show.blade.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/resources/views/cinema_show.blade.php b/resources/views/cinema_show.blade.php
index 5a3d262..c8b0935 100644
--- a/resources/views/cinema_show.blade.php
+++ b/resources/views/cinema_show.blade.php
@@ -128,6 +128,28 @@
</div>
@endif
+ @if ( ! empty($hnStories) )
+ <div class="mt-3">
+ <h4>Hacker News</h4>
+ <ul class="list-unstyled">
+ @foreach($hnStories as $story)
+ <li>
+ <a class="card-links" href="https://news.ycombinator.com/item?id={{ $story->story_id }}" target="_blank">
+ {{ $story->title ?: 'HN Story' }}
+ </a>
+ | {{ \Carbon\Carbon::createFromTimestamp($story->time)->format('Y-m-d') }}
+ @if ($story->score > 0)
+ | <span class="badge badge-pill badge-secondary">{{ $story->score }} Upvotes</span>
+ @endif
+ @if ($story->descendants > 0)
+ | <span class="badge badge-pill badge-secondary">{{ $story->descendants }} Comments</span>
+ @endif
+ </li>
+ @endforeach
+ </ul>
+ </div>
+ @endif
+
@if ( ! is_null($movie->imdb_id) )
<div class="mt-3">
<a class="btn btn-outline-primary btn-sm" href="https://www.imdb.com/title/{{ $movie->imdb_id }}" target="_blank">View on IMDb</a>