Tweak anime list view a bit
timw4mail/HummingBirdAnimeClient/pipeline/head This commit looks good
Details
timw4mail/HummingBirdAnimeClient/pipeline/head This commit looks good
Details
This commit is contained in:
parent
a80284a4ee
commit
7373cf93b7
|
@ -1,3 +1,4 @@
|
||||||
|
<?php use function Aviat\AnimeClient\col_not_empty; ?>
|
||||||
<main class="media-list">
|
<main class="media-list">
|
||||||
<?php if ($auth->isAuthenticated()): ?>
|
<?php if ($auth->isAuthenticated()): ?>
|
||||||
<a class="bracketed" href="<?= $url->generate('anime.add.get') ?>">Add Item</a>
|
<a class="bracketed" href="<?= $url->generate('anime.add.get') ?>">Add Item</a>
|
||||||
|
@ -13,6 +14,9 @@
|
||||||
<?php if (empty($items)): ?>
|
<?php if (empty($items)): ?>
|
||||||
<h3>There's nothing here!</h3>
|
<h3>There's nothing here!</h3>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
|
<?php
|
||||||
|
$hasNotes = col_not_empty($items, 'notes');
|
||||||
|
?>
|
||||||
<table class='media-wrap'>
|
<table class='media-wrap'>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -25,8 +29,8 @@
|
||||||
<th>Type</th>
|
<th>Type</th>
|
||||||
<th>Progress</th>
|
<th>Progress</th>
|
||||||
<th>Rated</th>
|
<th>Rated</th>
|
||||||
<th colspan="2">Attributes</th>
|
<th>Attributes</th>
|
||||||
<th>Notes</th>
|
<?php if($hasNotes): ?><th>Notes</th><?php endif ?>
|
||||||
<th>Genres</th>
|
<th>Genres</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -47,9 +51,8 @@
|
||||||
<a href="<?= $url->generate('anime.details', ['id' => $item['anime']['slug']]) ?>">
|
<a href="<?= $url->generate('anime.details', ['id' => $item['anime']['slug']]) ?>">
|
||||||
<?= $item['anime']['title'] ?>
|
<?= $item['anime']['title'] ?>
|
||||||
</a>
|
</a>
|
||||||
<?php foreach ($item['anime']['titles'] as $title): ?>
|
<br />
|
||||||
<br/><?= $title ?>
|
<?= implode('<br />', $item['anime']['titles']) ?>
|
||||||
<?php endforeach ?>
|
|
||||||
</td>
|
</td>
|
||||||
<td><?= $item['airing']['status'] ?></td>
|
<td><?= $item['airing']['status'] ?></td>
|
||||||
<td><?= $item['user_rating'] ?> / 10 </td>
|
<td><?= $item['user_rating'] ?> / 10 </td>
|
||||||
|
@ -60,41 +63,36 @@
|
||||||
</td>
|
</td>
|
||||||
<td><?= $item['anime']['age_rating'] ?></td>
|
<td><?= $item['anime']['age_rating'] ?></td>
|
||||||
<td>
|
<td>
|
||||||
<ul>
|
|
||||||
<?php if ($item['rewatched'] > 0): ?>
|
|
||||||
<li>Rewatched <?= $item['rewatched'] ?> time(s)</li>
|
|
||||||
<?php endif ?>
|
|
||||||
<?php foreach(['private','rewatching'] as $attr): ?>
|
|
||||||
<?php if($item[$attr]): ?>
|
|
||||||
<li><?= ucfirst($attr); ?></li>
|
|
||||||
<?php endif ?>
|
|
||||||
<?php endforeach ?>
|
|
||||||
</ul>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<?php foreach($item['anime']['streaming_links'] as $link): ?>
|
<?php foreach($item['anime']['streaming_links'] as $link): ?>
|
||||||
<?php if ($link['meta']['link'] !== FALSE): ?>
|
<?php if ($link['meta']['link'] !== FALSE): ?>
|
||||||
<a href="<?= $link['link'] ?>" title="Stream '<?= $item['anime']['title'] ?>' on <?= $link['meta']['name'] ?>">
|
<a href="<?= $link['link'] ?>" title="Stream '<?= $item['anime']['title'] ?>' on <?= $link['meta']['name'] ?>">
|
||||||
<?= $helper->img("/public/images/{$link['meta']['image']}", [
|
<?= $helper->img("/public/images/{$link['meta']['image']}", [
|
||||||
'class' => 'streaming-logo',
|
'class' => 'small-streaming-logo',
|
||||||
'width' => 50,
|
'width' => 25,
|
||||||
'height' => 50,
|
'height' => 25,
|
||||||
'alt' => "{$link['meta']['name']} logo",
|
'alt' => "{$link['meta']['name']} logo",
|
||||||
]) ?>
|
]) ?>
|
||||||
</a>
|
</a>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?= $helper->img("/public/images/{$link['meta']['image']}", [
|
<?= $helper->img("/public/images/{$link['meta']['image']}", [
|
||||||
'class' => 'streaming-logo',
|
'class' => 'small-streaming-logo',
|
||||||
'width' => 50,
|
'width' => 25,
|
||||||
'height' => 50,
|
'height' => 25,
|
||||||
'alt' => "{$link['meta']['name']} logo",
|
'alt' => "{$link['meta']['name']} logo",
|
||||||
]) ?>
|
]) ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<?php if ($item['rewatched'] > 0): ?>li>Rewatched <?= $item['rewatched'] ?> time(s)</li><?php endif ?>
|
||||||
|
<?php foreach(['private','rewatching'] as $attr): ?>
|
||||||
|
<?php if($item[$attr]): ?><li><?= ucfirst($attr); ?></li><?php endif ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<?php if ($hasNotes): ?><td><p><?= $escape->html($item['notes']) ?></p></td><?php endif ?>
|
||||||
<p><?= $escape->html($item['notes']) ?></p>
|
|
||||||
</td>
|
|
||||||
<td class="align-left">
|
<td class="align-left">
|
||||||
<?php sort($item['anime']->genres) ?>
|
<?php sort($item['anime']->genres) ?>
|
||||||
<?= implode(', ', $item['anime']->genres) ?>
|
<?= implode(', ', $item['anime']->genres) ?>
|
||||||
|
|
|
@ -87,10 +87,6 @@ tbody > tr:nth-child(odd) {
|
||||||
background: #ddd;
|
background: #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
select[multiple] {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover, a:active {
|
a:hover, a:active {
|
||||||
color: var(--link-hover-color)
|
color: var(--link-hover-color)
|
||||||
}
|
}
|
||||||
|
@ -877,6 +873,12 @@ aside picture, aside img {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.small-streaming-logo {
|
||||||
|
width: 25px;
|
||||||
|
height: 25px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
.cover-streaming-link {
|
.cover-streaming-link {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue