Show images directly for anime detail pages, so cover images are pulled correctly
This commit is contained in:
parent
2d6058a6b3
commit
7baa5bfe91
app/views/anime
src/AnimeClient
@ -7,7 +7,7 @@ use function Aviat\AnimeClient\getLocalImg;
|
||||
<main class="details fixed">
|
||||
<section class="flex" unselectable>
|
||||
<aside class="info">
|
||||
<?= $helper->picture("images/anime/{$data['id']}-original.webp") ?>
|
||||
<?= $helper->picture($data['cover_image'], '.jpg', ['width' => '390'], ['width' => '390']) ?>
|
||||
|
||||
<br />
|
||||
|
||||
|
@ -96,7 +96,9 @@ final class AnimeListTransformer extends AbstractTransformer {
|
||||
'titles' => $titles,
|
||||
'slug' => $anime['slug'],
|
||||
'show_type' => (string)StringType::from($anime['subtype'])->upperCaseFirst(),
|
||||
'cover_image' => $anime['posterImage']['views'][1]['url'] ?? '/public/images/placeholder.png',
|
||||
'cover_image' => $anime['posterImage']['views'][1]['url']
|
||||
?? $anime['posterImage']['original']['url']
|
||||
?? '/public/images/placeholder.png',
|
||||
'genres' => $genres,
|
||||
'streaming_links' => $streamingLinks,
|
||||
],
|
||||
|
@ -125,7 +125,7 @@ final class AnimeTransformer extends AbstractTransformer {
|
||||
'age_rating' => $base['ageRating'],
|
||||
'age_rating_guide' => $base['ageRatingGuide'],
|
||||
'characters' => $characters,
|
||||
'cover_image' => $base['posterImage']['views'][1]['url'],
|
||||
'cover_image' => $base['posterImage']['original']['url'] ?? '/public/images/placeholder.png',
|
||||
'episode_count' => $base['episodeCount'],
|
||||
'episode_length' => $base['episodeLength'],
|
||||
'genres' => $genres,
|
||||
|
@ -239,7 +239,7 @@ class Controller {
|
||||
protected function renderFullPage(HtmlView $view, string $template, array $data): HtmlView
|
||||
{
|
||||
$csp = [
|
||||
"default-src 'self'",
|
||||
"default-src 'self' media.kitsu.io",
|
||||
"object-src 'none'",
|
||||
"child-src 'self' *.youtube.com polyfill.io",
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user