HummingBirdAnimeClient/app/views/anime/details.php

100 lines
3.1 KiB
PHP
Raw Normal View History

2017-03-31 13:37:53 -04:00
<main class="details fixed">
<section class="flex flex-no-wrap">
<div>
<img class="cover" width="402" height="284" src="<?= $urlGenerator->assetUrl("images/anime/{$data['id']}.jpg") ?>" alt="" />
<br />
<br />
2017-01-13 16:49:46 -05:00
<table class="media_details">
<tr>
<td class="align_right">Airing Status</td>
<td><?= $data['status'] ?></td>
</tr>
<tr>
<td>Show Type</td>
<td><?= $data['show_type'] ?></td>
</tr>
<tr>
<td>Episode Count</td>
2017-01-12 15:41:20 -05:00
<td><?= $data['episode_count'] ?? '-' ?></td>
</tr>
<tr>
<td>Episode Length</td>
<td><?= $data['episode_length'] ?> minutes</td>
</tr>
2017-01-12 15:41:20 -05:00
<?php if ( ! empty($data['age_rating'])): ?>
<tr>
<td>Age Rating</td>
<td><abbr title="<?= $data['age_rating_guide'] ?>"><?= $data['age_rating'] ?></abbr></td>
</tr>
2017-01-12 15:41:20 -05:00
<?php endif ?>
<tr>
<td>Genres</td>
<td>
<?= implode(', ', $data['genres']) ?>
</td>
</tr>
</table>
</div>
<div>
<h2><a rel="external" href="<?= $data['url'] ?>"><?= array_shift($data['titles']) ?></a></h2>
<?php foreach ($data['titles'] as $title): ?>
<h3><?= $title ?></h3>
<?php endforeach ?>
<br />
<p><?= nl2br($data['synopsis']) ?></p>
2017-01-13 16:49:46 -05:00
<?php if (count($data['streaming_links']) > 0): ?>
<hr />
<h4>Streaming on:</h4>
<table class="full_width invisible">
<thead>
<tr>
<th class="align_left">Service</th>
<th>Subtitles</th>
<th>Dubs</th>
</tr>
</thead>
<tbody>
<?php foreach($data['streaming_links'] as $link): ?>
2017-01-13 16:49:46 -05:00
<tr>
<td class="align_left">
<?php if ($link['meta']['link'] !== FALSE): ?>
<a href="<?= $link['link'] ?>" title="Stream '<?= $data['title'] ?>' on <?= $link['meta']['name'] ?>">
<img class="streaming-logo" width="50" height="50" src="<?= $urlGenerator->assetUrl('images', $link['meta']['image']) ?>" alt="<?= $link['meta']['name'] ?> logo" />
&nbsp;&nbsp;<?= $link['meta']['name'] ?>
2017-01-13 16:49:46 -05:00
</a>
<?php else: ?>
<img class="streaming-logo" width="50" height="50" src="<?= $urlGenerator->assetUrl('images', $link['meta']['image']) ?>" alt="<?= $link['meta']['name'] ?> logo" />
&nbsp;&nbsp;<?= $link['meta']['name'] ?>
2017-01-13 16:49:46 -05:00
<?php endif ?>
</td>
<td><?= implode(', ', $link['subs']) ?></td>
<td><?= implode(', ', $link['dubs']) ?></td>
2017-01-13 16:49:46 -05:00
</tr>
<?php endforeach ?>
</tbody>
</table>
<?php endif ?>
</div>
</section>
2017-03-20 13:14:01 -04:00
<?php if (count($characters) > 0): ?>
<h2>Characters</h2>
2017-04-05 13:02:48 -04:00
<section class="align_left media-wrap">
<?php foreach($characters as $id => $char): ?>
2017-03-20 19:08:33 -04:00
<?php if ( ! empty($char['image']['original'])): ?>
<article class="character">
2017-03-20 13:14:01 -04:00
<?php $link = $url->generate('character', ['slug' => $char['slug']]) ?>
<div class="name">
<?= $helper->a($link, $char['name']); ?>
</div>
2017-03-20 13:14:01 -04:00
<a href="<?= $link ?>">
<?= $helper->img($urlGenerator->assetUrl("images/characters/{$id}.jpg"), [
2017-03-20 13:14:01 -04:00
'width' => '225'
]) ?>
</a>
</article>
2017-03-20 13:14:01 -04:00
<?php endif ?>
<?php endforeach ?>
</section>
<?php endif ?>
2016-02-01 09:49:18 -05:00
</main>