2018-11-01 22:01:09 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Aviat\AnimeClient\API\Kitsu;
|
|
|
|
|
|
|
|
?>
|
|
|
|
<main class="details fixed">
|
|
|
|
<section class="flex flex-no-wrap">
|
|
|
|
<div>
|
|
|
|
<?= $helper->picture("images/people/{$data['id']}-original.webp", 'jpg', ['class' => 'cover' ]) ?>
|
|
|
|
</div>
|
|
|
|
<div>
|
2018-11-08 11:36:42 -05:00
|
|
|
<h2 class="toph"><?= $data['name'] ?></h2>
|
2018-11-01 22:01:09 -04:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
|
2018-11-08 11:36:42 -05:00
|
|
|
<?php if ( ! empty($data['staff'])): ?>
|
2018-11-01 22:01:09 -04:00
|
|
|
<section>
|
|
|
|
<h3>Castings</h3>
|
|
|
|
<div class="vertical-tabs">
|
|
|
|
<?php $i = 0 ?>
|
2018-11-08 11:36:42 -05:00
|
|
|
<?php foreach ($data['staff'] as $role => $entries): ?>
|
2018-11-01 22:01:09 -04:00
|
|
|
<div class="tab">
|
|
|
|
<input
|
|
|
|
type="radio" name="staff-roles" id="staff-role<?= $i ?>" <?= $i === 0 ? 'checked' : '' ?> />
|
|
|
|
<label for="staff-role<?= $i ?>"><?= $role ?></label>
|
|
|
|
<?php foreach ($entries as $type => $casting): ?>
|
|
|
|
<?php if ($type === 'characters') continue; ?>
|
|
|
|
<?php if ( ! (empty($entries['manga']) || empty($entries['anime']))): ?>
|
|
|
|
<h4><?= ucfirst($type) ?></h4>
|
|
|
|
<?php endif ?>
|
|
|
|
<section class="content">
|
|
|
|
<?php foreach ($casting as $sid => $series): ?>
|
|
|
|
<article class="media">
|
|
|
|
<?php
|
2019-05-08 08:55:58 -04:00
|
|
|
$mediaType = in_array($type, ['anime', 'manga'], TRUE) ? $type : 'anime';
|
2018-11-01 22:01:09 -04:00
|
|
|
$link = $url->generate("{$mediaType}.details", ['id' => $series['slug']]);
|
|
|
|
$titles = Kitsu::filterTitles($series);
|
|
|
|
?>
|
|
|
|
<a href="<?= $link ?>">
|
|
|
|
<?= $helper->picture("images/{$type}/{$sid}.webp") ?>
|
|
|
|
</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>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</div>
|
|
|
|
<?php $i++ ?>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<?php endif ?>
|
|
|
|
|
2018-11-08 11:36:42 -05:00
|
|
|
<?php if ( ! (empty($data['characters']['main']) || empty($data['characters']['supporting']))): ?>
|
2018-11-01 22:01:09 -04:00
|
|
|
<section>
|
|
|
|
<?php include 'character-mapping.php' ?>
|
|
|
|
</section>
|
|
|
|
<?php endif ?>
|
|
|
|
</main>
|