Update some styles

This commit is contained in:
Timothy Warren 2018-08-10 20:09:28 -04:00
parent e9888c762e
commit dd46e292c4
15 changed files with 574 additions and 420 deletions

View File

@ -1,4 +1,4 @@
<main> <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>
<?php endif ?> <?php endif ?>
@ -24,27 +24,13 @@
<img src="<?= $urlGenerator->assetUrl("images/anime/{$item['anime']['id']}.jpg") ?>" alt="" /> <img src="<?= $urlGenerator->assetUrl("images/anime/{$item['anime']['id']}.jpg") ?>" alt="" />
<div class="name"> <div class="name">
<a href="<?= $url->generate('anime.details', ['id' => $item['anime']['slug']]); ?>"> <a href="<?= $url->generate('anime.details', ['id' => $item['anime']['slug']]); ?>">
<?= $item['anime']['title'] ?> <span class="canonical"><?= $item['anime']['title'] ?></span>
<?php foreach ($item['anime']['titles'] as $title): ?> <?php foreach ($item['anime']['titles'] as $title): ?>
<br /><small><?= $title ?></small> <br /><small><?= $title ?></small>
<?php endforeach ?> <?php endforeach ?>
</a> </a>
</div> </div>
<div class="table"> <div class="table">
<?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 ?>
<?php if ($item['private'] || $item['rewatching']): ?> <?php if ($item['private'] || $item['rewatching']): ?>
<div class="row"> <div class="row">
<?php foreach(['private', 'rewatching'] as $attr): ?> <?php foreach(['private', 'rewatching'] as $attr): ?>
@ -77,6 +63,20 @@
</div> </div>
<?php endif ?> <?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"> <div class="row">
<div class="user_rating">Rating: <?= $item['user_rating'] ?> / 10</div> <div class="user_rating">Rating: <?= $item['user_rating'] ?> / 10</div>
<div class="completion">Episodes: <div class="completion">Episodes:

View File

@ -1,4 +1,4 @@
<main> <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>
<?php endif ?> <?php endif ?>

View File

@ -0,0 +1,27 @@
<article class="media" id="a-<?= $item['hummingbird_id'] ?>">
<img src="<?= $urlGenerator->assetUrl("images/anime/{$item['hummingbird_id']}.jpg") ?>"
alt="<?= $item['title'] ?> cover image"/>
<div class="name">
<a href="<?= $url->generate('anime.details', ['id' => $item['slug']]) ?>">
<?= $item['title'] ?>
<?= ($item['alternate_title'] != "") ? "<small><br />{$item['alternate_title']}</small>" : ""; ?>
</a>
</div>
<div class="table">
<?php if ($auth->isAuthenticated()): ?>
<div class="row">
<span class="edit">
<a class="bracketed"
href="<?= $url->generate($collection_type . '.collection.edit.get', [
'id' => $item['hummingbird_id']
]) ?>">Edit</a>
</span>
</div>
<?php endif ?>
<div class="row">
<div class="completion">Episodes: <?= $item['episode_count'] ?></div>
<div class="media_type"><?= $item['show_type'] ?></div>
<div class="age_rating"><?= $item['age_rating'] ?></div>
</div>
</div>
</article>

View File

@ -1,4 +1,4 @@
<main> <main class="media-list">
<?php if ($auth->isAuthenticated()): ?> <?php if ($auth->isAuthenticated()): ?>
<a class="bracketed" href="<?= $url->generate($collection_type . '.collection.add.get') ?>">Add Item</a> <a class="bracketed" href="<?= $url->generate($collection_type . '.collection.add.get') ?>">Add Item</a>
<?php endif ?> <?php endif ?>
@ -14,33 +14,7 @@
<h2><?= $name ?></h2> <h2><?= $name ?></h2>
<section class="media-wrap"> <section class="media-wrap">
<?php foreach ($items as $item): ?> <?php foreach ($items as $item): ?>
<article class="media" id="a-<?= $item['hummingbird_id'] ?>"> <?php include __DIR__ . '/cover-item.php'; ?>
<img src="<?= $urlGenerator->assetUrl("images/anime/{$item['hummingbird_id']}.jpg") ?>"
alt="<?= $item['title'] ?> cover image"/>
<div class="name">
<a href="<?= $url->generate('anime.details', ['id' => $item['slug']]) ?>">
<?= $item['title'] ?>
<?= ($item['alternate_title'] != "") ? "<small><br />{$item['alternate_title']}</small>" : ""; ?>
</a>
</div>
<div class="table">
<?php if ($auth->isAuthenticated()): ?>
<div class="row">
<span class="edit">
<a class="bracketed"
href="<?= $url->generate($collection_type . '.collection.edit.get', [
'id' => $item['hummingbird_id']
]) ?>">Edit</a>
</span>
</div>
<?php endif ?>
<div class="row">
<div class="completion">Episodes: <?= $item['episode_count'] ?></div>
<div class="media_type"><?= $item['show_type'] ?></div>
<div class="age_rating"><?= $item['age_rating'] ?></div>
</div>
</div>
</article>
<?php endforeach ?> <?php endforeach ?>
</section> </section>
</div> </div>

View File

@ -2,7 +2,7 @@
<main> <main>
<h2>Edit Anime Collection Item</h2> <h2>Edit Anime Collection Item</h2>
<form action="<?= $action_url ?>" method="post"> <form action="<?= $action_url ?>" method="post">
<table class="form"> <table class="invisible form" style="border:0">
<thead> <thead>
<tr> <tr>
<th> <th>
@ -11,17 +11,17 @@
<h4><?= $item['alternate_title'] ?></h4> <h4><?= $item['alternate_title'] ?></h4>
<?php endif ?> <?php endif ?>
</th> </th>
<th>
<article class="media">
<?= $helper->img($urlGenerator->assetUrl("images/anime/{$item['hummingbird_id']}.jpg")); ?>
</article>
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td><label for="media_id">Media</label></td> <td rowspan="4" class="align_center">
<td> <?= $helper->img($urlGenerator->assetUrl("images/anime/{$item['hummingbird_id']}.jpg")); ?>
</td>
</tr>
<tr>
<td class="align_right"><label for="media_id">Media</label></td>
<td class="align_left" width="100%">
<select name="media_id" id="media_id"> <select name="media_id" id="media_id">
<?php foreach($media_items as $id => $name): ?> <?php foreach($media_items as $id => $name): ?>
<option <?= $item['media_id'] == $id ? 'selected="selected"' : '' ?> value="<?= $id ?>"><?= $name ?></option> <option <?= $item['media_id'] == $id ? 'selected="selected"' : '' ?> value="<?= $id ?>"><?= $name ?></option>

View File

@ -0,0 +1,19 @@
<tr>
<?php if ($auth->isAuthenticated()): ?>
<td>
<a class="bracketed"
href="<?= $url->generate($collection_type . '.collection.edit.get', ['id' => $item['hummingbird_id']]) ?>">Edit</a>
</td>
<?php endif ?>
<td class="align_left">
<a href="<?= $url->generate('anime.details', ['id' => $item['slug']]) ?>">
<?= $item['title'] ?>
</a>
<?= (!empty($item['alternate_title'])) ? " <br /><small> " . $item['alternate_title'] . "</small>" : "" ?>
</td>
<td><?= $item['episode_count'] ?></td>
<td><?= $item['episode_length'] ?></td>
<td><?= $item['show_type'] ?></td>
<td><?= $item['age_rating'] ?></td>
<td class="align_left"><?= $item['notes'] ?></td>
</tr>

View File

@ -1,58 +1,42 @@
<main> <main>
<?php if ($auth->isAuthenticated()): ?> <?php if ($auth->isAuthenticated()): ?>
<a class="bracketed" href="<?= $url->generate($collection_type . '.collection.add.get') ?>">Add Item</a> <a class="bracketed" href="<?= $url->generate($collection_type . '.collection.add.get') ?>">Add Item</a>
<?php endif ?> <?php endif ?>
<?php if (empty($sections)): ?> <?php if (empty($sections)): ?>
<h3>There's nothing here!</h3> <h3>There's nothing here!</h3>
<?php else: ?> <?php else: ?>
<?php $i = 0; ?> <?php $i = 0; ?>
<div class="tabs"> <div class="tabs">
<?php foreach ($sections as $name => $items): ?> <?php foreach ($sections as $name => $items): ?>
<input <?= $i === 0 ? 'checked="checked"' : '' ?> type="radio" id="collection-tab-<?= $i ?>" name="collection-tabs" /> <input <?= $i === 0 ? 'checked="checked"' : '' ?> type="radio" id="collection-tab-<?= $i ?>"
<label for="collection-tab-<?= $i ?>"><?= $name ?></label> name="collection-tabs"/>
<div class="content"> <label for="collection-tab-<?= $i ?>"><?= $name ?></label>
<h2><?= $name ?></h2> <div class="content">
<table> <h2><?= $name ?></h2>
<thead> <table>
<tr> <thead>
<?php if($auth->isAuthenticated()): ?> <tr>
<th>Actions</th> <?php if ($auth->isAuthenticated()): ?>
<?php endif ?> <td>Actions</td>
<th>Title</th> <?php endif ?>
<th>Episode Count</th> <th>Title</th>
<th>Episode Length</th> <th>Episode Count</th>
<th>Show Type</th> <th>Episode Length</th>
<th>Age Rating</th> <th>Show Type</th>
<th>Notes</th> <th>Age Rating</th>
</tr> <th>Notes</th>
</thead> </tr>
<tbody> </thead>
<?php foreach($items as $item): ?> <tbody>
<tr> <?php foreach ($items as $item): ?>
<?php if($auth->isAuthenticated()): ?> <?php include __DIR__ . '/list-item.php' ?>
<td> <?php endforeach ?>
<a class="bracketed" href="<?= $url->generate($collection_type . '.collection.edit.get', ['id' => $item['hummingbird_id']]) ?>">Edit</a> </tbody>
</td> </table>
<?php endif ?> </div>
<td class="align_left"> <?php $i++ ?>
<a href="<?= $url->generate('anime.details', ['id' => $item['slug']]) ?>"> <?php endforeach ?>
<?= $item['title'] ?> </div>
</a> <?php endif ?>
<?= ( ! empty($item['alternate_title'])) ? " <br /><small> " . $item['alternate_title'] . "</small>" : "" ?>
</td>
<td><?= $item['episode_count'] ?></td>
<td><?= $item['episode_length'] ?></td>
<td><?= $item['show_type'] ?></td>
<td><?= $item['age_rating'] ?></td>
<td class="align_left"><?= $item['notes'] ?></td>
</tr>
<?php endforeach ?>
</tbody>
</table>
</div>
<?php $i++ ?>
<?php endforeach ?>
</div>
<?php endif ?>
</main> </main>
<script defer="defer" src="<?= $urlGenerator->assetUrl('js.php/g/table') ?>"></script> <script defer="defer" src="<?= $urlGenerator->assetUrl('js.php/g/table') ?>"></script>

View File

@ -7,7 +7,7 @@ $lastSegment = $urlGenerator->lastSegment();
$extraSegment = $lastSegment === 'list' ? '/list' : ''; $extraSegment = $lastSegment === 'list' ? '/list' : '';
?> ?>
<h1 class="flex flex-align-end flex-wrap"> <div id="main-nav" class="flex flex-align-end flex-wrap">
<span class="flex-no-wrap grow-1"> <span class="flex-no-wrap grow-1">
<?php if(strpos($route_path, 'collection') === FALSE): ?> <?php if(strpos($route_path, 'collection') === FALSE): ?>
<?= $helper->a( <?= $helper->a(
@ -67,7 +67,7 @@ $extraSegment = $lastSegment === 'list' ? '/list' : '';
[<?= $helper->a($url->generate('login'), "{$whose} Login") ?>] [<?= $helper->a($url->generate('login'), "{$whose} Login") ?>]
<?php endif ?> <?php endif ?>
</span> </span>
</h1> </div>
<nav> <nav>
<?php if ($container->get('util')->isViewPage()): ?> <?php if ($container->get('util')->isViewPage()): ?>
<?= $helper->menu($menu_name) ?> <?= $helper->menu($menu_name) ?>

View File

@ -1,4 +1,4 @@
<main> <main class="media-list">
<?php if ($auth->isAuthenticated()): ?> <?php if ($auth->isAuthenticated()): ?>
<a class="bracketed" href="<?= $url->generate('manga.add.get') ?>">Add Item</a> <a class="bracketed" href="<?= $url->generate('manga.add.get') ?>">Add Item</a>
<?php endif ?> <?php endif ?>

View File

@ -1,23 +1,23 @@
<?php if ($auth->isAuthenticated()): ?> <?php if ($auth->isAuthenticated()): ?>
<main> <main>
<h1> <h2>
Edit <?= $item['manga']['titles'][0] ?> Edit Manga List Item
</h1> </h2>
<form action="<?= $action ?>" method="post"> <form action="<?= $action ?>" method="post">
<table class="form"> <table class="form">
<thead> <thead>
<tr> <tr>
<th>
<h3><?= $escape->html($item['manga']['title']) ?></h3>
<?php foreach($item['manga']['titles'] as $title): ?>
<h4><?= $escape->html($title) ?></h4>
<?php endforeach ?>
</th>
<th> <th>
<article class="media"> <article class="media">
<?= $helper->img($urlGenerator->assetUrl('images/manga', "{$item['manga']['id']}.jpg")); ?> <?= $helper->img($urlGenerator->assetUrl('images/manga', "{$item['manga']['id']}.jpg")); ?>
</article> </article>
</th> </th>
<th class="align_left">
<h3><?= $escape->html($item['manga']['title']) ?></h3>
<?php foreach($item['manga']['titles'] as $title): ?>
<h4><?= $escape->html($title) ?></h4>
<?php endforeach ?>
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@ -1,4 +1,4 @@
<main> <main class="media-list">
<?php if ($auth->isAuthenticated()): ?> <?php if ($auth->isAuthenticated()): ?>
<a class="bracketed" href="<?= $url->generate('manga.add.get') ?>">Add Item</a> <a class="bracketed" href="<?= $url->generate('manga.add.get') ?>">Add Item</a>
<?php endif ?> <?php endif ?>
@ -14,7 +14,7 @@
<thead> <thead>
<tr> <tr>
<?php if ($auth->isAuthenticated()): ?> <?php if ($auth->isAuthenticated()): ?>
<th>&nbsp;</th> <td>&nbsp;</td>
<?php endif ?> <?php endif ?>
<th>Title</th> <th>Title</th>
<th>Rating</th> <th>Rating</th>

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,10 @@
@import "./marx.css"; @import "./marx.css";
:root { :root {
--blue-link: rgb(18, 113, 219);
--link-shadow: 1px 1px 1px #000; --link-shadow: 1px 1px 1px #000;
--shadow: 1px 2px 1px rgba(0, 0, 0, 0.85); --white-link-shadow: 1px 1px 1px #fff;
--shadow: 2px 2px 2px #000;
--title-overlay: rgba(0, 0, 0, 0.45); --title-overlay: rgba(0, 0, 0, 0.45);
--title-overlay-fallback: #000; --title-overlay-fallback: #000;
--text-color: #ffffff; --text-color: #ffffff;
@ -13,28 +15,32 @@
--radius: 5px; --radius: 5px;
} }
template, [hidden="hidden"], .media[hidden] {display:none} template, [hidden="hidden"], .media[hidden] {
display: none
}
body {margin: 0.5em;} body {
margin: 0.5em;
}
button { button {
background:rgba(255,255,255,0.65); background: rgba(255, 255, 255, 0.65);
margin: 0; margin: 0;
} }
table { table {
min-width:85%; min-width: 85%;
margin: 0 auto; margin: 0 auto;
} }
td { td {
padding:1em; padding: 1em;
padding:1rem; padding: 1rem;
} }
thead td, thead th { thead td, thead th {
padding:0.5em; padding: 0.5em;
padding:0.5rem; padding: 0.5rem;
} }
input[type=number] { input[type=number] {
@ -54,63 +60,111 @@ a:hover, a:active {
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
.bracketed { .bracketed {
color: var(--edit-link-color); color: var(--edit-link-color);
} }
.bracketed, h1 a {
.bracketed, #main-nav a {
text-shadow: var(--link-shadow); text-shadow: var(--link-shadow);
} }
.bracketed:before {content: '[\00a0'}
.bracketed:after {content: '\00a0]'} .bracketed:before {
content: '[\00a0'
}
.bracketed:after {
content: '\00a0]'
}
.bracketed:hover, .bracketed:active { .bracketed:hover, .bracketed:active {
color: var(--edit-link-hover-color) color: var(--edit-link-hover-color)
} }
.grow-1 {flex-grow: 1} .grow-1 {
.flex-wrap {flex-wrap: wrap} flex-grow: 1
.flex-no-wrap {flex-wrap: nowrap}
.flex-align-end {align-items: flex-end}
.flex-align-space-around {align-content: space-around}
.flex-justify-space-around {justify-content: space-around}
.flex-self-center {align-self:center}
.flex {display: flex}
.small-font {
font-size:1.6rem;
} }
.justify {text-align:justify} .flex-wrap {
.align_center {text-align:center !important} flex-wrap: wrap
.align_left {text-align:left !important} }
.align_right {text-align:right !important}
.valign_top {vertical-align:top} .flex-no-wrap {
flex-wrap: nowrap
}
.no_border {border:none} .flex-align-end {
align-items: flex-end
}
.flex-align-space-around {
align-content: space-around
}
.flex-justify-space-around {
justify-content: space-around
}
.flex-self-center {
align-self: center
}
.flex {
display: flex
}
.small-font {
font-size: 1.6rem;
}
.justify {
text-align: justify
}
.align_center {
text-align: center !important
}
.align_left {
text-align: left !important
}
.align_right {
text-align: right !important
}
.valign_top {
vertical-align: top
}
.no_border {
border: none
}
.media-wrap { .media-wrap {
text-align:center; text-align: center;
margin:0 auto; margin: 0 auto;
position: relative;
} }
.danger { .danger {
background-color: #ff4136; background-color: #ff4136;
border-color: #924949; border-color: #924949;
color:#fff; color: #fff;
} }
.danger:hover, .danger:active { .danger:hover, .danger:active {
background-color: #924949; background-color: #924949;
border-color: #ff4136; border-color: #ff4136;
color:#fff; color: #fff;
} }
.user-btn { .user-btn {
border-color: var(--edit-link-color); border-color: var(--edit-link-color);
color: var(--edit-link-color); color: var(--edit-link-color);
text-shadow: var(--link-shadow); text-shadow: var(--link-shadow);
padding:0 0.5em; padding: 0 0.5em;
padding:0 0.5rem; padding: 0 0.5rem;
} }
.user-btn:hover, .user-btn:active { .user-btn:hover, .user-btn:active {
border-color: var(--edit-link-hover-color); border-color: var(--edit-link-hover-color);
background-color: var(--edit-link-hover-color); background-color: var(--edit-link-hover-color);
@ -120,6 +174,20 @@ a:hover, a:active {
width: 100%; width: 100%;
} }
/* -----------------------------------------------------------------------------
Main Nav
------------------------------------------------------------------------------*/
#main-nav {
font-family: var(--default-font-list);
margin: 2em 0 1.6em;
margin: 2rem 0 1.6rem;
border-bottom: .1rem solid rgba(0, 0, 0, 0.2);
font-size: 3.6em;
font-size: 3.6rem;
font-style: normal;
font-weight: 500;
}
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
CSS loading icon CSS loading icon
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -145,21 +213,21 @@ a:hover, a:active {
left: 0%; left: 0%;
top: 0%; top: 0%;
animation: cssload-rotate-one 1.15s linear infinite; animation: cssload-rotate-one 1.15s linear infinite;
border-bottom: 3px solid rgb(0,0,0); border-bottom: 3px solid rgb(0, 0, 0);
} }
.cssload-inner.cssload-two { .cssload-inner.cssload-two {
right: 0%; right: 0%;
top: 0%; top: 0%;
animation: cssload-rotate-two 1.15s linear infinite; animation: cssload-rotate-two 1.15s linear infinite;
border-right: 3px solid rgb(0,0,0); border-right: 3px solid rgb(0, 0, 0);
} }
.cssload-inner.cssload-three { .cssload-inner.cssload-three {
right: 0%; right: 0%;
bottom: 0%; bottom: 0%;
animation: cssload-rotate-three 1.15s linear infinite; animation: cssload-rotate-three 1.15s linear infinite;
border-top: 3px solid rgb(0,0,0); border-top: 3px solid rgb(0, 0, 0);
} }
@keyframes cssload-rotate-one { @keyframes cssload-rotate-one {
@ -195,62 +263,69 @@ a:hover, a:active {
.sorting, .sorting,
.sorting_asc, .sorting_asc,
.sorting_desc { .sorting_desc {
vertical-align:text-bottom; vertical-align: text-bottom;
} }
.sorting::before { .sorting::before {
content: " ↕\00a0"; content: " ↕\00a0";
} }
.sorting_asc::before { .sorting_asc::before {
content: " ↑\00a0"; content: " ↑\00a0";
} }
.sorting_desc::before { .sorting_desc::before {
content: " ↓\00a0"; content: " ↓\00a0";
} }
.form { width:100%; } .form {
width: 100%;
}
.form thead th, .form thead tr { .form thead th, .form thead tr {
background: inherit; background: inherit;
border:0; border: 0;
} }
.form tr > td:nth-child(odd) { .form tr > td:nth-child(odd) {
text-align:right; text-align: right;
min-width:25px; min-width: 25px;
max-width:30%; max-width: 30%;
} }
.form tr > td:nth-child(even) { .form tr > td:nth-child(even) {
text-align:left; text-align: left;
width:70%; width: 70%;
} }
.invisible tbody > tr:nth-child(odd) { .invisible tbody > tr:nth-child(odd) {
background: inherit; background: inherit;
} }
.invisible tr, .invisible td, .invisible th { .invisible tr, .invisible td, .invisible th {
border:0; border: 0;
} }
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
Message boxes Message boxes
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
.message{ .message {
position:relative; position: relative;
margin:0.5em auto; margin: 0.5em auto;
padding:0.5em; padding: 0.5em;
width:95%; width: 95%;
} }
.message .close{ .message .close {
width:1em; width: 1em;
height:1em; height: 1em;
position:absolute; position: absolute;
right:0.5em; right: 0.5em;
top:0.5em; top: 0.5em;
text-align:center; text-align: center;
vertical-align:middle; vertical-align: middle;
line-height:1em; line-height: 1em;
} }
.message:hover .close:after { .message:hover .close:after {
@ -258,53 +333,55 @@ a:hover, a:active {
} }
.message:hover { .message:hover {
cursor:pointer; cursor: pointer;
} }
.message .icon{ .message .icon {
left:0.5em; left: 0.5em;
top:0.5em; top: 0.5em;
margin-right:1em; margin-right: 1em;
} }
.message.error{ .message.error {
border:1px solid #924949; border: 1px solid #924949;
background: #f3e6e6; background: #f3e6e6;
} }
.message.error .icon::after { .message.error .icon::after {
content: '✘'; content: '✘';
} }
.message.success{ .message.success {
border:1px solid #1f8454; border: 1px solid #1f8454;
background: #70dda9; background: #70dda9;
} }
.message.success .icon::after {
content: '✔'
}
.message.info{ .message.success .icon::after {
border:1px solid #bfbe3a; content: '✔'
}
.message.info {
border: 1px solid #bfbe3a;
background: #FFFFCC; background: #FFFFCC;
} }
.message.info .icon::after { .message.info .icon::after {
content: '⚠'; content: '⚠';
} }
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
Base list styles Base list styles
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
.media, .character, .small_character { .media, .character, .small_character {
position:relative; position: relative;
vertical-align:top; vertical-align: top;
display:inline-block; display: inline-block;
text-align:center; text-align: center;
width:220px; width: 220px;
height:311px; height: 311px;
margin: var(--normal-padding); margin: var(--normal-padding);
z-index: 0;
} }
.media > img, .media > img,
@ -314,80 +391,111 @@ a:hover, a:active {
} }
.media .edit_buttons > button { .media .edit_buttons > button {
margin:0.5em auto; margin: 0.5em auto;
} }
.name, .name,
.media_metadata > div, .media_metadata > div,
.medium_metadata > div, .medium_metadata > div,
.row { .row {
text-shadow: var(--shadow); text-shadow: var(--shadow);
background: var(--title-overlay-fallback); color: var(--text-color);
background: var(--title-overlay); padding: var(--normal-padding);
color: var(--text-color); text-align: right;
padding: var(--normal-padding); z-index: 2;
text-align:right; }
}
.media_type, .age_rating { .media_type, .age_rating {
text-align:left; text-align: left;
} }
.media > .media_metadata { .media > .media_metadata {
position:absolute; position: absolute;
bottom:0; bottom: 0;
right:0; right: 0;
} }
.media > .medium_metadata { .media > .medium_metadata {
position:absolute; position: absolute;
bottom: 0; bottom: 0;
left:0; left: 0;
} }
.media > .name { .media > .name {
position:absolute; position: absolute;
top: 0; top: 0;
} }
.small_character:hover > .name,
.character:hover > .name,
.media:hover > .name,
.media:hover > .media_metadata > div,
.media:hover > .medium_metadata > div,
.media:hover > .table .row
{
transition: .25s ease;
background:rgba(0,0,0,0.75);
}
.media:hover > button[hidden], .media > .name a {
.media:hover > .edit_buttons[hidden] transition: none;
{ }
transition: .25s ease;
display:block;
}
.small_character > .name a, .media .name a::before {
.small_character > .name a small, /* background: var(--title-overlay-fallback);
.character > .name a, background: var(--title-overlay); */
.character > .name a small, content: '';
.media > .name a, display: block;
.media > .name a small height: 311px;
{ left: 0;
background:none; position: absolute;
color:#fff; top: 0;
text-shadow: var(--shadow); width: 220px;
} z-index: -1; /* Put the pseudo-element behind its parent */
}
.media-list .media:hover .name a::before {
/* transition: .25s ease; */
background: rgba(0, 0, 0, 0.75);
}
.media > .name span.canonical {
font-weight: bold;
}
.media > .name small {
font-weight: normal;
}
.media:hover .name {
background: rgba(0, 0, 0, 0.75);
}
.media-list .media > .name a:hover,
.media-list .media > .name a:hover small {
color: var(--blue-link);
}
.media:hover > button[hidden],
.media:hover > .edit_buttons[hidden] {
transition: .25s ease;
display: block;
}
.media:hover {
transition: .25s ease;
}
.small_character > .name a,
.small_character > .name a small,
.character > .name a,
.character > .name a small,
.media > .name a,
.media > .name a small {
background: none;
color: #fff;
text-shadow: var(--shadow);
}
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
Anime-list-specific styles Anime-list-specific styles
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
.anime .name, .manga .name { .anime .name, .manga .name {
text-align:center; background: var(--title-overlay-fallback);
width:100%; background: var(--title-overlay);
padding:0.5em 0.25em; text-align: center;
width: 100%;
padding: 0.5em 0.25em;
} }
.anime .media_type, .anime .media_type,
@ -398,116 +506,143 @@ a:hover, a:active {
.anime .edit, .anime .edit,
.anime .delete { .anime .delete {
background: none; background: none;
text-align:center; text-align: center;
} }
.anime .table, .manga .table { .anime .table, .manga .table {
position:absolute; position: absolute;
bottom:0; bottom: 0;
left:0; left: 0;
width:100%; width: 100%;
} }
.anime .row, .manga .row { .anime .row, .manga .row {
width:100%; width: 100%;
background: var(--title-overlay-fallback);
background: var(--title-overlay);
display: flex; display: flex;
align-content: space-around; align-content: space-around;
justify-content: space-around; justify-content: space-around;
text-align:center; text-align: center;
padding:0 inherit; padding: 0 inherit;
} }
.anime .row > span, .manga .row > span { .anime .row > span, .manga .row > span {
text-align:left; text-align: left;
z-index: 2;
} }
.anime .row > div, .manga .row > div { .anime .row > div, .manga .row > div {
font-size:0.8em; font-size: 0.8em;
display:flex-item; display: flex-item;
align-self:center; align-self: center;
text-align:center; text-align: center;
vertical-align:middle; vertical-align: middle;
z-index: 2;
} }
.anime .media > button.plus_one { .anime .media > button.plus_one {
position:absolute; border-color: hsla(0, 0%, 100%, .65);
position: absolute;
top: 138px; top: 138px;
top: calc(50% - 21.5px); top: calc(50% - 21.5px);
left: 44px; left: 44px;
left: calc(50% - 66.5px); left: calc(50% - 66.5px);
z-index: 50;
}
.anime .media > button.plus_one:hover {
color: hsla(0, 0%, 100%, .65);
background: #888;
}
.anime .media > button.plus_one:active {
background: #444;
} }
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
Manga-list-specific styles Manga-list-specific styles
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
.manga .row { .manga .row {
padding:1px; padding: 1px;
} }
.manga .media { .manga .media {
border:1px solid #ddd; border: 1px solid #ddd;
height:310px; height: 310px;
margin:0.25em; margin: 0.25em;
} }
.manga .media > .edit_buttons { .manga .media > .edit_buttons {
position:absolute; position: absolute;
top: 86px; top: 86px;
top: calc(50% - 58.5px); /* top: calc(50% - 58.5px); */
top: calc(50% - 22.4px);
left: 43.5px; left: 43.5px;
left: calc(50% - 66.5px); left: calc(50% - 66.5px);
z-index: 50;
} }
.manga .media > .edit_buttons button {
border-color: hsla(0, 0%, 100%, .65);
}
.manga .media > .edit_buttons:hover button {
color: hsla(0, 0%, 100%, .65);
background: #888;
}
.manga .media > .edit_buttons button:active {
background: #444;
}
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
Search page styles Search page styles
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
.media.search > .name { .media.search > .name {
background-color:#555; background-color: #555;
background-color: rgba(000,000,000,0.35); background-color: rgba(000, 000, 000, 0.35);
background-size: cover; background-size: cover;
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.big-check { .big-check {
display:none; display: none;
} }
.big-check:checked + label { .big-check:checked + label {
transition: .25s ease; transition: .25s ease;
background:rgba(0,0,0,0.75); background: rgba(0, 0, 0, 0.75);
} }
.big-check:checked + label:after { .big-check:checked + label:after {
content: '✓'; content: '✓';
font-size: 15em; font-size: 15em;
font-size: 15rem; font-size: 15rem;
text-align:center; text-align: center;
color: greenyellow; color: greenyellow;
position:absolute; position: absolute;
top:147px; top: 147px;
left:0; left: 0;
height:100%; height: 100%;
width:100%; width: 100%;
z-index: 5;
} }
#series_list article.media { #series_list article.media {
position:relative; position: relative;
} }
#series_list .name, #series_list .name label { #series_list .name, #series_list .name label {
position:absolute; position: absolute;
display:block; display: block;
top:0; top: 0;
left:0; left: 0;
height:100%; height: 100%;
width:100%; width: 100%;
vertical-align:middle; vertical-align: middle;
line-height: 1.25em; line-height: 1.25em;
} }
#series_list .name small { #series_list .name small {
color: #fff; color: #fff;
} }
@ -517,16 +652,16 @@ a:hover, a:active {
-----------------------------------------------------------------------------*/ -----------------------------------------------------------------------------*/
.details { .details {
margin: 1.5rem auto 0 auto; margin: 1.5rem auto 0 auto;
padding:1rem; padding: 1rem;
font-size:inherit; font-size: inherit;
} }
.description { .description {
max-width:80rem; max-width: 80rem;
} }
.fixed { .fixed {
max-width:93rem; max-width: 93rem;
} }
.details .cover { .details .cover {
@ -544,55 +679,63 @@ a:hover, a:active {
} }
.details .media_details { .details .media_details {
max-width:300px; max-width: 300px;
}
.details .media_details td {
padding: 0 1.5rem;
} }
.details .media_details td {
padding:0 1.5rem;
}
.details p { .details p {
text-align:justify; text-align: justify;
} }
.details .media_details td:nth-child(odd) { .details .media_details td:nth-child(odd) {
width:1%; width: 1%;
white-space:nowrap; white-space: nowrap;
text-align:right; text-align: right;
} }
.details .media_details td:nth-child(even) { .details .media_details td:nth-child(even) {
text-align:left; text-align: left;
} }
.character, .character,
.small_character { .small_character {
background: rgba(0,0,0,0.5); /* background: rgba(0,0,0,0.5); */
width: 225px; width: 225px;
height: 350px; height: 350px;
vertical-align: middle; vertical-align: middle;
white-space: nowrap; white-space: nowrap;
} }
.small_character a {
display:inline-block;
width: 100%;
height: 100%;
}
.small_character .name, .character:hover .name,
.character .name { .small_character:hover .name {
position: absolute; background: rgba(0, 0, 0, 0.8);
bottom: 0; }
left: 0;
z-index: 10;
}
.small_character img, .small_character a {
.character img { display: inline-block;
position: relative; width: 100%;
top: 50%; height: 100%;
transform: translateY(-50%); }
z-index: 5;
width: 100%; .small_character .name,
} .character .name {
position: absolute;
bottom: 0;
left: 0;
z-index: 10;
}
.small_character img,
.character img {
position: relative;
top: 50%;
transform: translateY(-50%);
z-index: 5;
width: 100%;
}
.min-table { .min-table {
min-width: 0; min-width: 0;
@ -623,17 +766,17 @@ a:hover, a:active {
@media screen and (max-width: 40em) { @media screen and (max-width: 40em) {
nav a { nav a {
line-height:4em; line-height: 4em;
line-height:4rem; line-height: 4rem;
} }
.media { .media {
margin:2px 0; margin: 2px 0;
} }
main { main {
padding:0 0,5em 0.5em; padding: 0 0, 5em 0.5em;
padding:0 0.5rem 0.5rem; padding: 0 0.5rem 0.5rem;
} }
} }
@ -643,12 +786,22 @@ a:hover, a:active {
.streaming-logo { .streaming-logo {
width: 50px; width: 50px;
height: 50px; height: 50px;
vertical-align:middle; vertical-align: middle;
}
.cover_streaming_link {
display:none;
}
.media:hover .cover_streaming_link {
display: block;
} }
.cover_streaming_link .streaming-logo { .cover_streaming_link .streaming-logo {
width: 20px; width: 20px;
height: 20px; height: 20px;
-webkit-filter: drop-shadow(0 -1px 4px #fff);
filter: drop-shadow(0 -1px 4px #fff);
} }
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
@ -660,32 +813,32 @@ a:hover, a:active {
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: rgba(0,0,0,0.8); background: rgba(0, 0, 0, 0.8);
z-index: 500; z-index: 500;
} }
#loading-shadow .loading-wrapper { #loading-shadow .loading-wrapper {
position: fixed; position: fixed;
z-index: 501; z-index: 501;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
display:flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
#loading-shadow .loading-content { #loading-shadow .loading-content {
position: relative; position: relative;
color: #fff color: #fff
} }
.loading-content .cssload-inner.cssload-one, .loading-content .cssload-inner.cssload-one,
.loading-content .cssload-inner.cssload-two, .loading-content .cssload-inner.cssload-two,
.loading-content .cssload-inner.cssload-three { .loading-content .cssload-inner.cssload-three {
border-color: #fff border-color: #fff
} }
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
CSS Tabs CSS Tabs
@ -694,7 +847,7 @@ CSS Tabs
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
background: #efefef; background: #efefef;
box-shadow: 0 48px 80px -32px rgba(0,0,0,0.3); box-shadow: 0 48px 80px -32px rgba(0, 0, 0, 0.3);
margin-top: 1.5em; margin-top: 1.5em;
} }
@ -735,7 +888,7 @@ CSS Tabs
color: #000; color: #000;
} }
.tabs [type=radio]:checked + label + .content{ .tabs [type=radio]:checked + label + .content {
border: 1px solid #e5e5e5; border: 1px solid #e5e5e5;
border-top: 0; border-top: 0;
display: block; display: block;

View File

@ -49,7 +49,7 @@
return; return;
} }
if (data.data.status === 'completed') { if (resData.data.attributes.status === 'completed') {
_.hide(parentSel); _.hide(parentSel);
} }

View File

@ -1,16 +1,15 @@
const LightTableSorter = (function() { 'use strict';
let _cellIndex, _onClickEvent, _order, _reset, _sort, _text, _th, _toggle; const LightTableSorter = (() => {
_th = null; let th = null;
_cellIndex = null; let cellIndex = null;
_order = ''; let order = '';
_text = function(row) { const text = (row) => {
return row.cells.item(_cellIndex).textContent.toLowerCase(); return row.cells.item(cellIndex).textContent.toLowerCase();
}; };
_sort = function(a, b) { const sort = (a, b) => {
let n, textA, textB; let textA = text(a);
textA = _text(a); let textB = text(b);
textB = _text(b); const n = parseInt(textA, 10);
n = parseInt(textA, 10);
if (n) { if (n) {
textA = n; textA = n;
textB = parseInt(textB, 10); textB = parseInt(textB, 10);
@ -23,51 +22,49 @@ const LightTableSorter = (function() {
} }
return 0; return 0;
}; };
_toggle = function() { const toggle = () => {
let c; const c = order !== 'sorting_asc' ? 'sorting_asc' : 'sorting_desc';
c = _order !== 'sorting_asc' ? 'sorting_asc' : 'sorting_desc'; th.className = (th.className.replace(order, '') + ' ' + c).trim();
_th.className = (_th.className.replace(_order, '') + ' ' + c).trim(); return order = c;
return _order = c;
}; };
_reset = function() { const reset = () => {
_th.className = _th.className.replace('sorting_asc', 'sorting').replace('sorting_desc', 'sorting'); th.classList.remove('sorting_asc', 'sorting_desc');
return _order = ''; th.classList.add('sorting');
return order = '';
}; };
_onClickEvent = function(e) { const onClickEvent = (e) => {
let row, rows, tbody, _i, _len; if (th && (cellIndex !== e.target.cellIndex)) {
if (_th && (_cellIndex !== e.target.cellIndex)) { reset();
_reset();
} }
_th = e.target; th = e.target;
if (_th.nodeName.toLowerCase() === 'th') { if (th.nodeName.toLowerCase() === 'th') {
_cellIndex = _th.cellIndex; cellIndex = th.cellIndex;
tbody = _th.offsetParent.getElementsByTagName('tbody')[0]; const tbody = th.offsetParent.getElementsByTagName('tbody')[0];
rows = tbody.rows; let rows = Array.from(tbody.rows);
if (rows) { if (rows) {
rows = Array.prototype.slice.call(rows, 0); rows.sort(sort);
rows = Array.prototype.sort.call(rows, _sort); if (order === 'sorting_asc') {
if (_order === 'sorting_asc') { rows.reverse();
Array.prototype.reverse.call(rows);
} }
_toggle(); toggle();
tbody.innerHtml = ''; tbody.innerHtml = '';
for (_i = 0, _len = rows.length; _i < _len; _i++) {
row = rows[_i]; rows.forEach(row => {
tbody.appendChild(row); tbody.appendChild(row);
} });
} }
} }
}; };
return { return {
init: function() { init: () => {
let ths = document.getElementsByTagName('th'); let ths = document.getElementsByTagName('th');
let _results = []; let results = [];
for (let _i = 0, _len = ths.length; _i < _len; _i++) { for (let i = 0, len = ths.length; i < len; i++) {
let th = ths[_i]; let th = ths[i];
th.className = 'sorting'; th.classList.add('sorting');
_results.push(th.onclick = _onClickEvent); results.push(th.onclick = onClickEvent);
} }
return _results; return results;
} }
}; };
})(); })();