2017-04-05 13:02:48 -04:00
|
|
|
<?php use Aviat\AnimeClient\API\Kitsu; ?>
|
|
|
|
<main class="details">
|
2017-03-08 13:46:50 -05:00
|
|
|
<section class="flex flex-no-wrap">
|
|
|
|
<div>
|
2017-04-05 13:02:48 -04:00
|
|
|
<img class="cover" width="284" src="<?= $data[0]['attributes']['image']['original'] ?>" alt="" />
|
2017-03-08 13:46:50 -05:00
|
|
|
</div>
|
|
|
|
<div>
|
2017-04-05 13:02:48 -04:00
|
|
|
<h2><?= $data[0]['attributes']['name'] ?></h2>
|
2017-03-08 13:46:50 -05:00
|
|
|
|
2017-04-05 13:02:48 -04:00
|
|
|
<p class="description"><?= $data[0]['attributes']['description'] ?></p>
|
2017-03-08 13:46:50 -05:00
|
|
|
</div>
|
|
|
|
</section>
|
2017-04-05 13:02:48 -04:00
|
|
|
|
|
|
|
<?php if (array_key_exists('anime', $data['included']) || array_key_exists('manga', $data['included'])): ?>
|
|
|
|
<h3>Media</h3>
|
|
|
|
<section class="flex flex-no-wrap">
|
|
|
|
<?php if (array_key_exists('anime', $data['included'])): ?>
|
|
|
|
<div>
|
|
|
|
<h4>Anime</h4>
|
|
|
|
<section class="align_left media-wrap">
|
|
|
|
<?php foreach($data['included']['anime'] as $anime): ?>
|
|
|
|
<article class="media">
|
|
|
|
<?php
|
|
|
|
$link = $url->generate('anime.details', ['id' => $anime['attributes']['slug']]);
|
|
|
|
$titles = Kitsu::filterTitles($anime['attributes']);
|
|
|
|
?>
|
|
|
|
<a href="<?= $link ?>">
|
|
|
|
<img src="<?= $anime['attributes']['posterImage']['small'] ?>" width="220" alt="" />
|
|
|
|
</a>
|
|
|
|
<div class="name">
|
|
|
|
<a href="<?= $link ?>">
|
|
|
|
<?= array_shift($titles) ?>
|
|
|
|
<?php foreach ($titles as $title): ?>
|
|
|
|
<br /><small><?= $title ?></small>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
|
|
|
<?php if (array_key_exists('manga', $data['included'])): ?>
|
|
|
|
<div>
|
|
|
|
<h4>Manga</h4>
|
|
|
|
<section class="align_left media-wrap">
|
|
|
|
|
|
|
|
<?php foreach($data['included']['manga'] as $manga): ?>
|
|
|
|
<article class="media">
|
|
|
|
<?php
|
|
|
|
$link = $url->generate('manga.details', ['id' => $manga['attributes']['slug']]);
|
|
|
|
$titles = Kitsu::filterTitles($manga['attributes']);
|
|
|
|
?>
|
|
|
|
<a href="<?= $link ?>">
|
|
|
|
<img src="<?= $manga['attributes']['posterImage']['small'] ?>" width="220" alt="" />
|
|
|
|
</a>
|
|
|
|
<div class="name">
|
|
|
|
<a href="<?= $link ?>">
|
|
|
|
<?= array_shift($titles) ?>
|
|
|
|
<?php foreach ($titles as $title): ?>
|
|
|
|
<br /><small><?= $title ?></small>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
<?php endforeach ?>
|
|
|
|
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
|
|
|
</section>
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
<section>
|
2017-04-06 21:27:03 -04:00
|
|
|
<?php if ($castCount > 0): ?>
|
2017-04-05 13:02:48 -04:00
|
|
|
<h3>Castings</h3>
|
|
|
|
<?php foreach($castings as $role => $entries): ?>
|
|
|
|
<h4><?= $role ?></h4>
|
|
|
|
<?php foreach($entries as $language => $casting): ?>
|
|
|
|
<h5><?= $language ?></h5>
|
|
|
|
<table class="min-table">
|
|
|
|
<tr>
|
|
|
|
<th>Cast Member</th>
|
|
|
|
<th>Series</th>
|
|
|
|
</tr>
|
|
|
|
<?php foreach($casting as $c):?>
|
|
|
|
<tr>
|
|
|
|
<td style="width:229px">
|
|
|
|
<article class="character">
|
|
|
|
<img src="<?= $c['person']['image'] ?>" alt="" />
|
|
|
|
<div class="name">
|
|
|
|
<?= $c['person']['name'] ?>
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<section class="align_left media-wrap">
|
|
|
|
<?php foreach($c['series'] as $series): ?>
|
|
|
|
<article class="media">
|
|
|
|
<?php
|
|
|
|
$link = $url->generate('anime.details', ['id' => $series['attributes']['slug']]);
|
|
|
|
$titles = Kitsu::filterTitles($series['attributes']);
|
|
|
|
?>
|
|
|
|
<a href="<?= $link ?>">
|
|
|
|
<img src="<?= $series['attributes']['posterImage']['small'] ?>" width="220" alt="" />
|
|
|
|
</a>
|
|
|
|
<div class="name">
|
|
|
|
<a href="<?= $link ?>">
|
|
|
|
<?= array_shift($titles) ?>
|
|
|
|
<?php foreach ($titles as $title): ?>
|
|
|
|
<br /><small><?= $title ?></small>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</section>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</table>
|
|
|
|
<?php endforeach ?>
|
|
|
|
<?php endforeach ?>
|
|
|
|
<?php endif ?>
|
|
|
|
</section>
|
2017-03-08 12:55:49 -05:00
|
|
|
</main>
|