Adjust layout of edit pages

This commit is contained in:
Timothy Warren 2018-08-13 15:13:20 -04:00
parent 675f8ed9b2
commit ea31131e0f
7 changed files with 55 additions and 45 deletions

View File

@ -2,7 +2,7 @@
<main>
<h2>Edit Anime List Item</h2>
<form action="<?= $action ?>" method="post">
<table class="form">
<table class="invisible form">
<thead>
<tr>
<th>
@ -11,14 +11,16 @@
<h4><?= $escape->html($title) ?></h4>
<?php endforeach ?>
</th>
<th>
<article class="media">
<?= $helper->img($urlGenerator->assetUrl('images/anime', "{$item['anime']['id']}.jpg")) ?>
</article>
</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="9">
<article class="media">
<?= $helper->img($urlGenerator->assetUrl('images/anime', "{$item['anime']['id']}.jpg")) ?>
</article>
</td>
</tr>
<tr>
<td><label for="private">Is Private?</label></td>
<td>

View File

@ -16,12 +16,14 @@
<tbody>
<tr>
<td rowspan="4" class="align_center">
<article class="media">
<?= $helper->img($urlGenerator->assetUrl("images/anime/{$item['hummingbird_id']}.jpg")); ?>
</article>
</td>
</tr>
<tr>
<td class="align_right"><label for="media_id">Media</label></td>
<td class="align_left" width="100%">
<td class="align_left">
<select name="media_id" id="media_id">
<?php foreach($media_items as $id => $name): ?>
<option <?= $item['media_id'] == $id ? 'selected="selected"' : '' ?> value="<?= $id ?>"><?= $name ?></option>

View File

@ -73,8 +73,8 @@
Chapters: <span class="chapters_read"><?= $item['chapters']['read'] ?></span> /
<span class="chapter_count"><?= $item['chapters']['total'] ?></span>
</div>
</div>
<div class="row">
<?php /* </div>
<div class="row"> */ ?>
<div class="volume_completion">
Volumes: <span class="volume_count"><?= $item['volumes']['total'] ?></span>
</div>

View File

@ -4,15 +4,10 @@
Edit Manga List Item
</h2>
<form action="<?= $action ?>" method="post">
<table class="form">
<table class="invisible form">
<thead>
<tr>
<th>
<article class="media">
<?= $helper->img($urlGenerator->assetUrl('images/manga', "{$item['manga']['id']}.jpg")); ?>
</article>
</th>
<th class="align_left">
<h3><?= $escape->html($item['manga']['title']) ?></h3>
<?php foreach ($item['manga']['titles'] as $title): ?>
<h4><?= $escape->html($title) ?></h4>
@ -21,6 +16,13 @@
</tr>
</thead>
<tbody>
<tr>
<td rowspan="9">
<article class="media">
<?= $helper->img($urlGenerator->assetUrl('images/manga', "{$item['manga']['id']}.jpg")); ?>
</article>
</td>
</tr>
<tr>
<td><label for="status">Reading Status</label></td>
<td>
@ -35,19 +37,22 @@
<tr>
<td><label for="series_rating">Rating</label></td>
<td>
<input type="number" min="0" max="10" maxlength="2" name="new_rating" value="<?= $item['user_rating'] ?>" id="series_rating" size="2" /> / 10
<input type="number" min="0" max="10" maxlength="2" name="new_rating"
value="<?= $item['user_rating'] ?>" id="series_rating" size="2"/> / 10
</td>
</tr>
<tr>
<td><label for="chapters_read">Chapters Read</label></td>
<td>
<input type="number" min="0" name="chapters_read" id="chapters_read" value="<?= $item['chapters']['read'] ?>" /> / <?= $item['chapters']['total'] ?>
<input type="number" min="0" name="chapters_read" id="chapters_read"
value="<?= $item['chapters']['read'] ?>"/> / <?= $item['chapters']['total'] ?>
</td>
</tr>
<tr>
<td><label for="volumes_read">Volumes Read</label></td>
<td>
<?php /*<input type="number" disabled="disabled" min="0" name="volumes_read" id="volumes_read" value="" /> */ ?> - / <?= $item['volumes']['total'] ?>
<?php /*<input type="number" disabled="disabled" min="0" name="volumes_read" id="volumes_read" value="" /> */ ?>
- / <?= $item['volumes']['total'] ?>
</td>
</tr>
<tr>
@ -61,7 +66,8 @@
<tr>
<td><label for="reread_count">Reread Count</label></td>
<td>
<input type="number" min="0" id="reread_count" name="reread_count" value="<?= $item['reread'] ?>" />
<input type="number" min="0" id="reread_count" name="reread_count"
value="<?= $item['reread'] ?>"/>
</td>
</tr>
<tr>

File diff suppressed because one or more lines are too long

View File

@ -29,7 +29,7 @@ button {
}
table {
min-width: 85%;
/* min-width: 85%; */
margin: 0 auto;
}
@ -279,7 +279,7 @@ a:hover, a:active {
}
.form {
width: 100%;
/* width: 100%; */
}
.form thead th, .form thead tr {
@ -295,7 +295,7 @@ a:hover, a:active {
.form tr > td:nth-child(even) {
text-align: left;
width: 70%;
/* width: 70%; */
}
.invisible tbody > tr:nth-child(odd) {
@ -566,7 +566,7 @@ a:hover, a:active {
}
.manga .media {
border: 1px solid #ddd;
/* border: 1px solid #ddd; */
height: 310px;
margin: 0.25em;
}
@ -578,7 +578,7 @@ a:hover, a:active {
top: calc(50% - 22.4px);
left: 43.5px;
left: calc(50% - 66.5px);
z-index: 50;
z-index: 40;
}
.manga .media > .edit_buttons button {

View File

@ -247,7 +247,7 @@ final class Kitsu {
$isSubset = mb_substr_count($existing, $title) > 0;
$diff = levenshtein(mb_strtolower($existing), mb_strtolower($title));
if ($diff <= 4 || $isSubset || mb_strlen($title) > 40 || mb_strlen($existing) > 40)
if ($diff <= 4 || $isSubset || mb_strlen($title) > 45 || mb_strlen($existing) > 50)
{
return FALSE;
}