summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Http/Controllers/CinemaController.php2
-rw-r--r--resources/views/cinema_show.blade.php23
2 files changed, 17 insertions, 8 deletions
diff --git a/app/Http/Controllers/CinemaController.php b/app/Http/Controllers/CinemaController.php
index d8adefa..75c93aa 100644
--- a/app/Http/Controllers/CinemaController.php
+++ b/app/Http/Controllers/CinemaController.php
@@ -100,6 +100,8 @@ class CinemaController extends Controller
->select(
'story.story_id',
'story.title',
+ 'story.type',
+ 'story.text',
'story.score',
'story.descendants',
'story.time'
diff --git a/resources/views/cinema_show.blade.php b/resources/views/cinema_show.blade.php
index c8b0935..bac06e2 100644
--- a/resources/views/cinema_show.blade.php
+++ b/resources/views/cinema_show.blade.php
@@ -23,6 +23,16 @@
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;
@@ -124,18 +134,15 @@
@foreach( $actors as $person )
<div>{{ $person->name }}</div>
@endforeach
- </div>
- </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' }}
+ @if ($story->type === 'comment' && ! empty($story->text))
+ <span class="hn-comment">Comment: {{ strip_tags($story->text) }}</span>
+ @else
+ {{ $story->title ?: 'HN Story' }}
+ @endif
</a>
| {{ \Carbon\Carbon::createFromTimestamp($story->time)->format('Y-m-d') }}
@if ($story->score > 0)