diff options
| author | Developer | 2026-06-27 04:12:21 +0200 |
|---|---|---|
| committer | Developer | 2026-06-27 04:12:21 +0200 |
| commit | dc3cbbfdd9455e419eaaf776c16544afdf95eadb (patch) | |
| tree | 703bc352f7e3965afb6a8327f8854a0c430fedb5 /resources | |
| parent | 33b69f87babac5116db923b906512411488eb28a (diff) | |
| download | curious-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')
| -rw-r--r-- | resources/views/cinema_show.blade.php | 22 | ||||
| -rw-r--r-- | resources/views/layouts/app.blade.php | 2 |
2 files changed, 23 insertions, 1 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> diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 5de9a70..e3fe561 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -158,7 +158,7 @@ <span class="nav-link" style="pointer-events: none;">|</span> </li> <li class="nav-item"> - <a class="nav-link" href="{{ route('cinema.index') }}">{{ __('Cinema') }}</a> + <a class="nav-link" href="{{ route('cinema.index') }}">{{ __('Movies') }}</a> </li> <li class="nav-item"> <a class="nav-link" href="{{ route('cinema.genres') }}">{{ __('Genres') }}</a> |
