2018-08-21 17:09:42 -04:00
|
|
|
<article
|
|
|
|
class="media"
|
2020-08-26 17:26:42 -04:00
|
|
|
data-kitsu-id="<?= $item['id'] ?>"
|
2022-09-21 15:36:38 -04:00
|
|
|
data-anilist-id="<?= $item['anilist_id'] ?>"
|
2020-08-26 17:26:42 -04:00
|
|
|
data-mal-id="<?= $item['mal_id'] ?>"
|
2018-08-21 17:09:42 -04:00
|
|
|
>
|
|
|
|
<?php if ($auth->isAuthenticated()): ?>
|
2018-11-02 10:48:20 -04:00
|
|
|
<button title="Increment episode count" class="plus-one" hidden>+1 Episode</button>
|
2018-08-21 17:09:42 -04:00
|
|
|
<?php endif ?>
|
2022-01-17 08:37:00 -05:00
|
|
|
<?= $helper->img($item['anime']['cover_image'], ['width' => 220, 'loading' => 'lazy']) ?>
|
2018-10-05 21:32:15 -04:00
|
|
|
|
2018-08-21 17:09:42 -04:00
|
|
|
<div class="name">
|
2020-01-15 15:23:55 -05:00
|
|
|
<a href="<?= $url->generate('anime.details', ['id' => $item['anime']['slug']]) ?>">
|
2018-08-21 17:09:42 -04:00
|
|
|
<span class="canonical"><?= $item['anime']['title'] ?></span>
|
|
|
|
<?php foreach ($item['anime']['titles'] as $title): ?>
|
|
|
|
<br/>
|
|
|
|
<small><?= $title ?></small>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div class="table">
|
2021-02-03 09:45:18 -05:00
|
|
|
<?php if (isset($item['private']) || isset($item['rewatching'])): ?>
|
2018-08-21 17:09:42 -04:00
|
|
|
<div class="row">
|
|
|
|
<?php foreach (['private', 'rewatching'] as $attr): ?>
|
|
|
|
<?php if ($item[$attr]): ?>
|
|
|
|
<span class="item-<?= $attr ?>"><?= ucfirst($attr) ?></span>
|
|
|
|
<?php endif ?>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
<?php if ($item['rewatched'] > 0): ?>
|
|
|
|
<div class="row">
|
2020-05-04 16:46:27 -04:00
|
|
|
<?php if ($item['rewatched'] == 1): ?>
|
2020-08-26 17:26:42 -04:00
|
|
|
<div>Rewatched once</div>
|
2020-05-04 16:46:27 -04:00
|
|
|
<?php elseif ($item['rewatched'] == 2): ?>
|
2020-08-26 17:26:42 -04:00
|
|
|
<div>Rewatched twice</div>
|
2020-05-04 16:46:27 -04:00
|
|
|
<?php elseif ($item['rewatched'] == 3): ?>
|
2020-08-26 17:26:42 -04:00
|
|
|
<div>Rewatched thrice</div>
|
2020-05-04 16:46:27 -04:00
|
|
|
<?php else: ?>
|
2020-08-26 17:26:42 -04:00
|
|
|
<div>Rewatched <?= $item['rewatched'] ?> times</div>
|
2020-05-04 16:46:27 -04:00
|
|
|
<?php endif ?>
|
2018-08-21 17:09:42 -04:00
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
<?php if (count($item['anime']['streaming_links']) > 0): ?>
|
|
|
|
<div class="row">
|
|
|
|
<?php foreach ($item['anime']['streaming_links'] as $link): ?>
|
2018-11-02 10:48:20 -04:00
|
|
|
<div class="cover-streaming-link">
|
2018-08-21 17:09:42 -04:00
|
|
|
<?php if ($link['meta']['link']): ?>
|
|
|
|
<a href="<?= $link['link'] ?>"
|
|
|
|
title="Stream '<?= $item['anime']['title'] ?>' on <?= $link['meta']['name'] ?>">
|
2020-04-08 10:08:56 -04:00
|
|
|
<?= $helper->img("/public/images/{$link['meta']['image']}", [
|
2018-11-05 09:56:38 -05:00
|
|
|
'class' => 'streaming-logo',
|
|
|
|
'width' => 20,
|
|
|
|
'height' => 20,
|
|
|
|
'alt' => "{$link['meta']['name']} logo",
|
|
|
|
]); ?>
|
2018-08-21 17:09:42 -04:00
|
|
|
</a>
|
|
|
|
<?php else: ?>
|
2020-04-08 10:08:56 -04:00
|
|
|
<?= $helper->img("/public/images/{$link['meta']['image']}", [
|
2018-11-05 09:56:38 -05:00
|
|
|
'class' => 'streaming-logo',
|
|
|
|
'width' => 20,
|
|
|
|
'height' => 20,
|
|
|
|
'alt' => "{$link['meta']['name']} logo",
|
|
|
|
]); ?>
|
2018-08-21 17:09:42 -04:00
|
|
|
<?php endif ?>
|
|
|
|
</div>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
<?php if ($auth->isAuthenticated()): ?>
|
|
|
|
<div class="row">
|
|
|
|
<span class="edit">
|
|
|
|
<a class="bracketed" title="Edit information about this anime" href="<?=
|
|
|
|
$url->generate('edit', [
|
|
|
|
'controller' => 'anime',
|
|
|
|
'id' => $item['id'],
|
|
|
|
'status' => $item['watching_status']
|
|
|
|
]);
|
|
|
|
?>">Edit</a>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
<div class="row">
|
2018-11-02 10:48:20 -04:00
|
|
|
<div class="user-rating">Rating: <?= $item['user_rating'] ?> / 10</div>
|
2018-08-21 17:09:42 -04:00
|
|
|
<div class="completion">Episodes:
|
|
|
|
<span class="completed_number"><?= $item['episodes']['watched'] ?></span> /
|
|
|
|
<span class="total_number"><?= $item['episodes']['total'] ?></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="media_type"><?= $escape->html($item['anime']['show_type']) ?></div>
|
2018-11-02 10:48:20 -04:00
|
|
|
<div class="airing-status"><?= $escape->html($item['airing']['status']) ?></div>
|
|
|
|
<div class="age-rating"><?= $escape->html($item['anime']['age_rating']) ?></div>
|
2018-08-21 17:09:42 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</article>
|