2018-10-26 13:08:45 -04:00
|
|
|
<?php
|
|
|
|
use function Aviat\AnimeClient\getLocalImg;
|
|
|
|
use Aviat\AnimeClient\API\Kitsu;
|
|
|
|
?>
|
2018-11-01 22:01:09 -04:00
|
|
|
<h3>Voice Acting Roles</h3>
|
|
|
|
<div class="tabs">
|
|
|
|
<?php $i = 0; ?>
|
2018-11-08 11:36:42 -05:00
|
|
|
<?php foreach($data['characters'] as $role => $characterList): ?>
|
2018-11-01 22:01:09 -04:00
|
|
|
<input <?= $i === 0 ? 'checked="checked"' : '' ?> type="radio" name="character-type-tabs" id="character-type-<?= $i ?>" />
|
|
|
|
<label for="character-type-<?= $i ?>"><h5><?= ucfirst($role) ?></h5></label>
|
|
|
|
<section class="content">
|
|
|
|
<table class="borderless max-table">
|
2018-10-26 13:08:45 -04:00
|
|
|
<tr>
|
2018-11-01 22:01:09 -04:00
|
|
|
<th>Character</th>
|
|
|
|
<th>Series</th>
|
|
|
|
</tr>
|
|
|
|
<?php foreach ($characterList as $cid => $character): ?>
|
|
|
|
<tr>
|
2018-11-08 14:18:24 -05:00
|
|
|
<td>
|
2018-11-01 22:01:09 -04:00
|
|
|
<article class="character">
|
|
|
|
<?php
|
|
|
|
$link = $url->generate('character', ['slug' => $character['character']['slug']]);
|
2018-10-26 13:08:45 -04:00
|
|
|
?>
|
2018-11-01 22:01:09 -04:00
|
|
|
<a href="<?= $link ?>">
|
|
|
|
<?php $imgPath = ($character['character']['image'] === NULL)
|
|
|
|
? 'images/characters/empty.png'
|
|
|
|
: getLocalImg($character['character']['image']['original']);
|
2018-11-02 10:48:20 -04:00
|
|
|
|
2018-11-01 22:01:09 -04:00
|
|
|
echo $helper->picture($imgPath);
|
2018-10-26 13:08:45 -04:00
|
|
|
?>
|
|
|
|
<div class="name">
|
2018-11-01 22:01:09 -04:00
|
|
|
<?= $character['character']['canonicalName'] ?>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</article>
|
|
|
|
</td>
|
|
|
|
<td>
|
2018-11-02 10:48:20 -04:00
|
|
|
<section class="align-left media-wrap">
|
2018-11-01 22:01:09 -04:00
|
|
|
<?php foreach ($character['media'] as $sid => $series): ?>
|
|
|
|
<article class="media">
|
|
|
|
<?php
|
|
|
|
$link = $url->generate('anime.details', ['id' => $series['slug']]);
|
|
|
|
$titles = Kitsu::filterTitles($series);
|
|
|
|
?>
|
2018-10-26 13:08:45 -04:00
|
|
|
<a href="<?= $link ?>">
|
2018-11-01 22:01:09 -04:00
|
|
|
<?= $helper->picture("images/anime/{$sid}.webp") ?>
|
2018-10-26 13:08:45 -04:00
|
|
|
</a>
|
2018-11-01 22:01:09 -04:00
|
|
|
<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>
|
|
|
|
</section>
|
|
|
|
<?php $i++ ?>
|
2018-10-26 13:08:45 -04:00
|
|
|
<?php endforeach ?>
|
2018-11-01 22:01:09 -04:00
|
|
|
</div>
|