HummingBirdAnimeClient/app/views/manga/details.php

120 lines
3.5 KiB
PHP
Raw Normal View History

2017-03-31 13:37:53 -04:00
<main class="details fixed">
2016-04-14 17:51:00 -04:00
<section class="flex flex-no-wrap">
<aside class="info">
2018-11-01 22:01:09 -04:00
<?= $helper->picture("images/manga/{$data['id']}-original.webp", 'jpg', ['class' => 'cover']) ?>
2016-04-14 17:51:00 -04:00
<br />
2018-11-01 22:01:09 -04:00
<table class="media-details">
2016-04-14 17:51:00 -04:00
<tr>
<td class="align-right">Publishing Status</td>
<td><?= $data['status'] ?></td>
</tr>
<tr>
2016-04-14 17:51:00 -04:00
<td>Manga Type</td>
<td><?= ucfirst(strtolower($data['manga_type'])) ?></td>
2016-04-14 17:51:00 -04:00
</tr>
<?php if ( ! empty($data['volume_count'])): ?>
2016-04-14 17:51:00 -04:00
<tr>
<td>Volume Count</td>
<td><?= $data['volume_count'] ?></td>
</tr>
<?php endif ?>
<?php if ( ! empty($data['chapter_count'])): ?>
2016-04-14 17:51:00 -04:00
<tr>
<td>Chapter Count</td>
<td><?= $data['chapter_count'] ?></td>
</tr>
<?php endif ?>
<?php if ( ! empty($data['age_rating'])): ?>
<tr>
<td>Age Rating</td>
<td><abbr title="<?= $data['age_rating_guide'] ?>"><?= $data['age_rating'] ?></abbr>
</td>
</tr>
<?php endif ?>
2016-04-14 17:51:00 -04:00
<tr>
<td>Genres</td>
<td>
<?= implode(', ', $data['genres']); ?>
</td>
</tr>
</table>
<br />
</aside>
<article class="text">
2018-11-01 22:01:09 -04:00
<h2 class="toph"><a rel="external" href="<?= $data['url'] ?>"><?= $data['title'] ?></a></h2>
<?php foreach ($data['titles_more'] as $title): ?>
<h3><?= $title ?></h3>
<?php endforeach ?>
2016-04-14 17:51:00 -04:00
<br />
<div class="description">
<p><?= str_replace("\n", '</p><p>', $data['synopsis']) ?></p>
</div>
</article>
2016-04-14 17:51:00 -04:00
</section>
<?php if (count($data['characters']) > 0): ?>
<h2>Characters</h2>
2018-11-01 22:01:09 -04:00
<div class="tabs">
<?php $i = 0 ?>
<?php foreach ($data['characters'] as $role => $list): ?>
2018-11-01 22:01:09 -04:00
<input
type="radio" name="character-role-tabs"
id="character-tabs<?= $i ?>" <?= $i === 0 ? 'checked' : '' ?> />
<label for="character-tabs<?= $i ?>"><?= ucfirst($role) ?></label>
<section class="content media-wrap flex flex-wrap flex-justify-start">
<?php foreach ($list as $id => $char): ?>
<?php if ( ! empty($char['image']['original'])): ?>
<article class="<?= $role === 'supporting' ? 'small-' : '' ?>character">
2018-11-01 22:01:09 -04:00
<?php $link = $url->generate('character', ['slug' => $char['slug']]) ?>
<div class="name">
<?= $helper->a($link, $char['name']); ?>
</div>
<a href="<?= $link ?>">
<?= $helper->picture("images/characters/{$id}.webp") ?>
</a>
</article>
<?php endif ?>
<?php endforeach ?>
</section>
<?php $i++ ?>
<?php endforeach ?>
</div>
<?php endif ?>
<?php if (count($data['staff']) > 0): ?>
<h2>Staff</h2>
2018-11-01 22:01:09 -04:00
<div class="vertical-tabs">
<?php $i = 0 ?>
<?php foreach ($data['staff'] as $role => $people): ?>
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>
<section class='content media-wrap flex flex-wrap flex-justify-start'>
<?php foreach ($people as $person): ?>
2018-11-01 22:01:09 -04:00
<article class='character person'>
<?php $link = $url->generate('person', ['id' => $person['id'], 'slug' => $person['slug']]) ?>
2018-11-01 22:01:09 -04:00
<div class="name">
<a href="<?= $link ?>">
<?= $person['name'] ?>
</a>
</div>
<a href="<?= $link ?>">
<?= $helper->picture("images/people/{$person['id']}.webp") ?>
2018-11-01 22:01:09 -04:00
</a>
</article>
<?php endforeach ?>
</section>
</div>
<?php $i++ ?>
<?php endforeach ?>
</div>
<?php endif ?>
2016-04-14 17:51:00 -04:00
</main>