fix show duplicates on person
This commit is contained in:
parent
5557234907
commit
1a476123a7
5 changed files with 22 additions and 3 deletions
|
@ -281,7 +281,11 @@ public static function filterTmdbPersonData(array $data):array
|
||||||
return [
|
return [
|
||||||
'id' => $data['id'],
|
'id' => $data['id'],
|
||||||
'name' => $data['name'],
|
'name' => $data['name'],
|
||||||
'titles' => $movies->merge($shows)->whereNotNull('poster_path')->sortByDesc('date')->values()->all(),
|
'titles' => $movies->merge($shows)
|
||||||
|
->whereNotNull('poster_path')
|
||||||
|
->sortByDesc('date')
|
||||||
|
->unique(fn($item) => $item['type'].$item['id'])
|
||||||
|
->values()->all(),
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -36,7 +36,7 @@
|
||||||
"isEntry": true
|
"isEntry": true
|
||||||
},
|
},
|
||||||
"resources/scss/app.scss": {
|
"resources/scss/app.scss": {
|
||||||
"file": "assets/app-3UVNBeu9.css",
|
"file": "assets/app-BUXj9UVo.css",
|
||||||
"src": "resources/scss/app.scss",
|
"src": "resources/scss/app.scss",
|
||||||
"isEntry": true
|
"isEntry": true
|
||||||
},
|
},
|
||||||
|
|
|
@ -27,6 +27,20 @@
|
||||||
|
|
||||||
.movie-card__thumb {
|
.movie-card__thumb {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
.card-title {
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
padding: 4px 10px;
|
||||||
|
color: #fff;
|
||||||
|
background-color: rgba($secondary, 0.9);
|
||||||
|
font-size: 14px;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.movie-card__thumb img {
|
.movie-card__thumb img {
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
<div class="movie-card" @isset($data_text) data-text="{{ $data_text }}"@else data-text="{{ ucfirst($item['route'] ?? $item['type']) }}" @endisset>
|
<div class="movie-card" @isset($data_text) data-text="{{ $data_text }}"@else data-text="{{ ucfirst($item['route'] ?? $item['type']) }}" @endisset>
|
||||||
<div class="movie-card__thumb thumb__2">
|
<div class="movie-card__thumb thumb__2">
|
||||||
<img @if($item['image'])class="lazy"@endif width="300" height="450" src="data:image/svg+xml,%3Csvg width='300' height='450' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='300' height='450' x='0' y='0' fill='%231B1B3F' /%3E%3C/svg%3E" @if($item['image']) data-src="{{$item['image'] }}" @endif alt="{{ str($item['title'])->apa() }}">
|
<img @if($item['image'])class="lazy"@endif width="300" height="450" src="data:image/svg+xml,%3Csvg width='300' height='450' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='300' height='450' x='0' y='0' fill='%231B1B3F' /%3E%3C/svg%3E" @if($item['image']) data-src="{{$item['image'] }}" @endif alt="{{ str($item['title'])->apa() }}">
|
||||||
|
<span class="card-title text-center">{{ str($item['title'])->apa() }}</span>
|
||||||
<a href="{{ route($item['route'] ?? $item['type'], ['id' => $item['id'], 'slug' => $item['slug']]) }}" title="{{ str($item['title'])->apa() }}" class="icon"><i class="fas fa-play"></i></a>
|
<a href="{{ route($item['route'] ?? $item['type'], ['id' => $item['id'], 'slug' => $item['slug']]) }}" title="{{ str($item['title'])->apa() }}" class="icon"><i class="fas fa-play"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue