2020-07-29 15:49:16 -04:00
|
|
|
<?php
|
2020-08-21 12:30:01 -04:00
|
|
|
|
2020-08-26 15:22:14 -04:00
|
|
|
use Aviat\AnimeClient\Kitsu;
|
2020-07-29 15:49:16 -04:00
|
|
|
use function Aviat\AnimeClient\getLocalImg;
|
2020-08-21 12:30:01 -04:00
|
|
|
|
2020-07-29 15:49:16 -04:00
|
|
|
?>
|
2017-03-31 13:37:53 -04:00
|
|
|
<main class="details fixed">
|
2020-08-21 12:30:01 -04:00
|
|
|
<section class="flex" unselectable>
|
2018-10-26 13:08:45 -04:00
|
|
|
<aside class="info">
|
2018-11-08 11:36:42 -05:00
|
|
|
<?= $helper->picture("images/anime/{$data['id']}-original.webp") ?>
|
2018-11-01 22:01:09 -04:00
|
|
|
|
2016-03-07 14:37:49 -05:00
|
|
|
<br />
|
2018-11-01 22:01:09 -04:00
|
|
|
|
2018-11-02 10:48:20 -04:00
|
|
|
<table class="media-details">
|
2017-01-05 22:24:45 -05:00
|
|
|
<tr>
|
2018-11-02 10:48:20 -04:00
|
|
|
<td class="align-right">Airing Status</td>
|
2018-11-08 11:36:42 -05:00
|
|
|
<td><?= $data['status'] ?></td>
|
2017-01-05 22:24:45 -05:00
|
|
|
</tr>
|
2020-07-29 15:49:16 -04:00
|
|
|
|
2021-10-08 19:31:40 -04:00
|
|
|
<?php if ( ! empty($data['airDate'])): ?>
|
|
|
|
<tr>
|
|
|
|
<td>Original Airing</td>
|
|
|
|
<td><?= $data['airDate'] ?></td>
|
|
|
|
</tr>
|
|
|
|
<?php endif ?>
|
|
|
|
|
2020-08-03 14:36:14 -04:00
|
|
|
<tr>
|
|
|
|
<td>Show Type</td>
|
|
|
|
<td><?= (strlen($data['show_type']) > 3) ? ucfirst(strtolower($data['show_type'])) : $data['show_type'] ?></td>
|
|
|
|
</tr>
|
|
|
|
|
2020-07-29 15:49:16 -04:00
|
|
|
<?php if ($data['episode_count'] !== 1): ?>
|
|
|
|
<tr>
|
|
|
|
<td>Episode Count</td>
|
|
|
|
<td><?= $data['episode_count'] ?? '-' ?></td>
|
|
|
|
</tr>
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
<?php if (( ! empty($data['episode_length'])) && $data['episode_count'] !== 1): ?>
|
2018-11-01 22:01:09 -04:00
|
|
|
<tr>
|
|
|
|
<td>Episode Length</td>
|
2020-07-29 15:49:16 -04:00
|
|
|
<td><?= Kitsu::friendlyTime($data['episode_length']) ?></td>
|
|
|
|
</tr>
|
|
|
|
<?php endif ?>
|
|
|
|
|
2020-09-09 10:24:55 -04:00
|
|
|
<?php if (isset($data['total_length'], $data['episode_count']) && $data['total_length'] > 0): ?>
|
2020-07-29 15:49:16 -04:00
|
|
|
<tr>
|
|
|
|
<td>Total Length</td>
|
|
|
|
<td><?= Kitsu::friendlyTime($data['total_length']) ?></td>
|
2018-11-01 22:01:09 -04:00
|
|
|
</tr>
|
2018-01-30 16:57:13 -05:00
|
|
|
<?php endif ?>
|
2020-07-29 15:49:16 -04:00
|
|
|
|
2018-11-08 11:36:42 -05:00
|
|
|
<?php if ( ! empty($data['age_rating'])): ?>
|
2018-11-01 22:01:09 -04:00
|
|
|
<tr>
|
|
|
|
<td>Age Rating</td>
|
2018-11-08 11:36:42 -05:00
|
|
|
<td><abbr title="<?= $data['age_rating_guide'] ?>"><?= $data['age_rating'] ?></abbr>
|
2018-11-01 22:01:09 -04:00
|
|
|
</td>
|
|
|
|
</tr>
|
2017-01-12 15:41:20 -05:00
|
|
|
<?php endif ?>
|
2020-08-24 15:20:07 -04:00
|
|
|
|
|
|
|
<?php if (count($data['links']) > 0): ?>
|
|
|
|
<tr>
|
|
|
|
<td>External Links</td>
|
|
|
|
<td>
|
|
|
|
<?php foreach ($data['links'] as $urlName => $externalUrl): ?>
|
|
|
|
<a rel='external' href="<?= $externalUrl ?>"><?= $urlName ?></a><br />
|
|
|
|
<?php endforeach ?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endif ?>
|
|
|
|
|
2016-03-07 14:37:49 -05:00
|
|
|
<tr>
|
|
|
|
<td>Genres</td>
|
|
|
|
<td>
|
2018-11-08 11:36:42 -05:00
|
|
|
<?= implode(', ', $data['genres']) ?>
|
2016-03-07 14:37:49 -05:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2018-11-08 12:15:30 -05:00
|
|
|
|
2020-08-24 15:20:07 -04:00
|
|
|
|
|
|
|
|
2018-11-08 12:15:30 -05:00
|
|
|
<br />
|
|
|
|
|
2018-10-26 13:08:45 -04:00
|
|
|
</aside>
|
|
|
|
<article class="text">
|
2020-08-24 15:20:07 -04:00
|
|
|
<h2 class="toph"><?= $data['title'] ?></h2>
|
2020-05-06 09:08:27 -04:00
|
|
|
<?php foreach ($data['titles_more'] as $title): ?>
|
2018-11-01 22:01:09 -04:00
|
|
|
<h3><?= $title ?></h3>
|
|
|
|
<?php endforeach ?>
|
2016-03-07 14:37:49 -05:00
|
|
|
<br />
|
2019-05-08 16:08:51 -04:00
|
|
|
<div class="description">
|
|
|
|
<p><?= str_replace("\n", '</p><p>', $data['synopsis']) ?></p>
|
|
|
|
</div>
|
2018-11-08 11:36:42 -05:00
|
|
|
<?php if (count($data['streaming_links']) > 0): ?>
|
2018-11-01 22:01:09 -04:00
|
|
|
<hr />
|
|
|
|
<h4>Streaming on:</h4>
|
2018-11-05 11:22:35 -05:00
|
|
|
<table class="full-width invisible streaming-links">
|
2018-11-01 22:01:09 -04:00
|
|
|
<thead>
|
2017-01-13 16:49:46 -05:00
|
|
|
<tr>
|
2018-11-02 10:48:20 -04:00
|
|
|
<th class="align-left">Service</th>
|
2017-01-13 16:49:46 -05:00
|
|
|
<th>Subtitles</th>
|
|
|
|
<th>Dubs</th>
|
|
|
|
</tr>
|
2018-11-01 22:01:09 -04:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
2018-11-08 11:36:42 -05:00
|
|
|
<?php foreach ($data['streaming_links'] as $link): ?>
|
2018-11-01 22:01:09 -04:00
|
|
|
<tr>
|
2018-11-02 10:48:20 -04:00
|
|
|
<td class="align-left">
|
2018-11-01 22:01:09 -04:00
|
|
|
<?php if ($link['meta']['link'] !== FALSE): ?>
|
|
|
|
<a
|
|
|
|
href="<?= $link['link'] ?>"
|
2018-11-08 11:36:42 -05:00
|
|
|
title="Stream '<?= $data['title'] ?>' on <?= $link['meta']['name'] ?>"
|
2018-11-01 22:01:09 -04:00
|
|
|
>
|
2020-04-08 10:08:56 -04:00
|
|
|
<?= $helper->img("/public/images/{$link['meta']['image']}", [
|
2018-11-05 09:56:38 -05:00
|
|
|
'class' => 'streaming-logo',
|
|
|
|
'width' => 50,
|
|
|
|
'height' => 50,
|
|
|
|
'alt' => "{$link['meta']['name']} logo",
|
2020-04-08 10:08:56 -04:00
|
|
|
]) ?>
|
2018-11-01 22:01:09 -04:00
|
|
|
<?= $link['meta']['name'] ?>
|
|
|
|
</a>
|
|
|
|
<?php else: ?>
|
2020-04-08 10:08:56 -04:00
|
|
|
<?= $helper->img("/public/images/{$link['meta']['image']}", [
|
2018-11-05 09:56:38 -05:00
|
|
|
'class' => 'streaming-logo',
|
|
|
|
'width' => 50,
|
|
|
|
'height' => 50,
|
|
|
|
'alt' => "{$link['meta']['name']} logo",
|
2020-04-08 10:08:56 -04:00
|
|
|
]) ?>
|
2018-11-01 22:01:09 -04:00
|
|
|
<?= $link['meta']['name'] ?>
|
|
|
|
<?php endif ?>
|
|
|
|
</td>
|
|
|
|
<td><?= implode(', ', $link['subs']) ?></td>
|
|
|
|
<td><?= implode(', ', $link['dubs']) ?></td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2017-01-13 16:49:46 -05:00
|
|
|
<?php endif ?>
|
2018-11-08 11:36:42 -05:00
|
|
|
<?php if ( ! empty($data['trailer_id'])): ?>
|
2018-11-05 09:56:38 -05:00
|
|
|
<div class="responsive-iframe">
|
2020-08-21 12:30:01 -04:00
|
|
|
<h4>Trailer</h4>
|
|
|
|
<iframe
|
|
|
|
width="560"
|
|
|
|
height="315"
|
|
|
|
role='img'
|
|
|
|
src="https://www.youtube.com/embed/<?= $data['trailer_id'] ?>"
|
|
|
|
allow="autoplay; encrypted-media"
|
|
|
|
allowfullscreen
|
|
|
|
tabindex='0'
|
|
|
|
title="<?= $data['title'] ?> trailer video"
|
|
|
|
></iframe>
|
2018-11-05 09:56:38 -05:00
|
|
|
</div>
|
2018-01-31 10:55:20 -05:00
|
|
|
<?php endif ?>
|
2018-10-26 13:08:45 -04:00
|
|
|
</article>
|
2016-03-07 14:37:49 -05:00
|
|
|
</section>
|
2017-03-31 16:36:22 -04:00
|
|
|
|
2018-11-08 11:36:42 -05:00
|
|
|
<?php if (count($data['characters']) > 0): ?>
|
2020-08-21 12:30:01 -04:00
|
|
|
<section>
|
|
|
|
<h2>Characters</h2>
|
|
|
|
|
|
|
|
<?= $component->tabs('character-types', $data['characters'], static function ($characterList, $role)
|
|
|
|
use ($component, $url, $helper) {
|
|
|
|
$rendered = [];
|
|
|
|
foreach ($characterList as $id => $character):
|
|
|
|
if (empty($character['image']['original']))
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
$rendered[] = $component->character(
|
|
|
|
$character['name'],
|
|
|
|
$url->generate('character', ['slug' => $character['slug']]),
|
|
|
|
$helper->picture("images/characters/{$id}.webp"),
|
|
|
|
(strtolower($role) !== 'main') ? 'small-character' : 'character'
|
|
|
|
);
|
|
|
|
endforeach;
|
|
|
|
|
|
|
|
return implode('', array_map('mb_trim', $rendered));
|
|
|
|
}) ?>
|
|
|
|
</section>
|
2018-10-29 14:43:06 -04:00
|
|
|
<?php endif ?>
|
|
|
|
|
2018-11-08 11:36:42 -05:00
|
|
|
<?php if (count($data['staff']) > 0): ?>
|
2020-08-21 12:30:01 -04:00
|
|
|
<section>
|
|
|
|
<h2>Staff</h2>
|
|
|
|
|
|
|
|
<?= $component->verticalTabs('staff-role', $data['staff'], static function ($staffList)
|
|
|
|
use ($component, $url, $helper) {
|
|
|
|
$rendered = [];
|
|
|
|
foreach ($staffList as $id => $person):
|
|
|
|
if (empty($person['image']['original']))
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
$rendered[] = $component->character(
|
|
|
|
$person['name'],
|
2020-08-27 15:01:00 -04:00
|
|
|
$url->generate('person', ['slug' => $person['slug']]),
|
2020-08-21 12:30:01 -04:00
|
|
|
$helper->picture(getLocalImg($person['image']['original'] ?? NULL)),
|
|
|
|
'character small-person',
|
|
|
|
);
|
|
|
|
endforeach;
|
|
|
|
|
|
|
|
return implode('', array_map('mb_trim', $rendered));
|
|
|
|
}) ?>
|
|
|
|
</section>
|
2017-03-31 16:36:22 -04:00
|
|
|
<?php endif ?>
|
2016-02-01 09:49:18 -05:00
|
|
|
</main>
|