Browse Source

Adjust layout of edit pages

Timothy J. Warren 4 months ago
parent
commit
24ea198dad

+ 7
- 5
app/views/anime/edit.php View File

@@ -2,7 +2,7 @@
2 2
 	<main>
3 3
 		<h2>Edit Anime List Item</h2>
4 4
 		<form action="<?= $action ?>" method="post">
5
-			<table class="form">
5
+			<table class="invisible form">
6 6
 				<thead>
7 7
 					<tr>
8 8
 						<th>
@@ -11,14 +11,16 @@
11 11
 							<h4><?= $escape->html($title) ?></h4>
12 12
 							<?php endforeach ?>
13 13
 						</th>
14
-						<th>
14
+					</tr>
15
+				</thead>
16
+				<tbody>
17
+					<tr>
18
+						<td rowspan="9">
15 19
 							<article class="media">
16 20
 								<?= $helper->img($urlGenerator->assetUrl('images/anime', "{$item['anime']['id']}.jpg")) ?>
17 21
 							</article>
18
-						</th>
22
+						</td>
19 23
 					</tr>
20
-				</thead>
21
-				<tbody>
22 24
 					<tr>
23 25
 						<td><label for="private">Is Private?</label></td>
24 26
 						<td>

+ 3
- 1
app/views/collection/edit.php View File

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

+ 2
- 2
app/views/manga/cover.php View File

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

+ 35
- 29
app/views/manga/edit.php View File

@@ -4,64 +4,70 @@
4 4
 			Edit Manga List Item
5 5
 		</h2>
6 6
 		<form action="<?= $action ?>" method="post">
7
-		<table class="form">
8
-			<thead>
7
+			<table class="invisible form">
8
+				<thead>
9 9
 				<tr>
10 10
 					<th>
11
+						<h3><?= $escape->html($item['manga']['title']) ?></h3>
12
+						<?php foreach ($item['manga']['titles'] as $title): ?>
13
+							<h4><?= $escape->html($title) ?></h4>
14
+						<?php endforeach ?>
15
+					</th>
16
+				</tr>
17
+				</thead>
18
+				<tbody>
19
+				<tr>
20
+					<td rowspan="9">
11 21
 						<article class="media">
12 22
 							<?= $helper->img($urlGenerator->assetUrl('images/manga', "{$item['manga']['id']}.jpg")); ?>
13 23
 						</article>
14
-					</th>
15
-                    <th class="align_left">
16
-                        <h3><?= $escape->html($item['manga']['title']) ?></h3>
17
-						<?php foreach($item['manga']['titles'] as $title): ?>
18
-                            <h4><?= $escape->html($title) ?></h4>
19
-						<?php endforeach ?>
20
-                    </th>
24
+					</td>
21 25
 				</tr>
22
-			</thead>
23
-			<tbody>
24 26
 				<tr>
25 27
 					<td><label for="status">Reading Status</label></td>
26 28
 					<td>
27 29
 						<select name="status" id="status">
28
-						<?php foreach($status_list as $val => $status): ?>
29
-							<option <?php if($item['reading_status'] === $val): ?>selected="selected"<?php endif ?>
30
-								value="<?= $val ?>"><?= $status ?></option>
31
-						<?php endforeach ?>
30
+							<?php foreach ($status_list as $val => $status): ?>
31
+								<option <?php if ($item['reading_status'] === $val): ?>selected="selected"<?php endif ?>
32
+										value="<?= $val ?>"><?= $status ?></option>
33
+							<?php endforeach ?>
32 34
 						</select>
33 35
 					</td>
34 36
 				</tr>
35 37
 				<tr>
36 38
 					<td><label for="series_rating">Rating</label></td>
37 39
 					<td>
38
-						<input type="number" min="0" max="10" maxlength="2" name="new_rating" value="<?= $item['user_rating'] ?>" id="series_rating" size="2" /> / 10
40
+						<input type="number" min="0" max="10" maxlength="2" name="new_rating"
41
+							   value="<?= $item['user_rating'] ?>" id="series_rating" size="2"/> / 10
39 42
 					</td>
40 43
 				</tr>
41 44
 				<tr>
42 45
 					<td><label for="chapters_read">Chapters Read</label></td>
43 46
 					<td>
44
-						<input type="number" min="0" name="chapters_read" id="chapters_read" value="<?= $item['chapters']['read'] ?>" /> / <?= $item['chapters']['total'] ?>
47
+						<input type="number" min="0" name="chapters_read" id="chapters_read"
48
+							   value="<?= $item['chapters']['read'] ?>"/> / <?= $item['chapters']['total'] ?>
45 49
 					</td>
46 50
 				</tr>
47 51
 				<tr>
48 52
 					<td><label for="volumes_read">Volumes Read</label></td>
49 53
 					<td>
50
-						<?php /*<input type="number" disabled="disabled" min="0" name="volumes_read" id="volumes_read" value="" /> */ ?> - / <?= $item['volumes']['total'] ?>
54
+						<?php /*<input type="number" disabled="disabled" min="0" name="volumes_read" id="volumes_read" value="" /> */ ?>
55
+						- / <?= $item['volumes']['total'] ?>
51 56
 					</td>
52 57
 				</tr>
53 58
 				<tr>
54 59
 					<td><label for="rereading_flag">Rereading?</label></td>
55 60
 					<td>
56 61
 						<input type="checkbox" name="rereading" id="rereading_flag"
57
-							<?php if($item['rereading'] === TRUE): ?>checked="checked"<?php endif ?>
62
+							   <?php if ($item['rereading'] === TRUE): ?>checked="checked"<?php endif ?>
58 63
 						/>
59 64
 					</td>
60 65
 				</tr>
61 66
 				<tr>
62 67
 					<td><label for="reread_count">Reread Count</label></td>
63 68
 					<td>
64
-						<input type="number" min="0" id="reread_count" name="reread_count" value="<?= $item['reread'] ?>" />
69
+						<input type="number" min="0" id="reread_count" name="reread_count"
70
+							   value="<?= $item['reread'] ?>"/>
65 71
 					</td>
66 72
 				</tr>
67 73
 				<tr>
@@ -73,16 +79,16 @@
73 79
 				<tr>
74 80
 					<td>&nbsp;</td>
75 81
 					<td>
76
-						<input type="hidden" value="<?= $item['id'] ?>" name="id" />
77
-						<input type="hidden" value="<?= $item['mal_id'] ?>" name="mal_id" />
78
-						<input type="hidden" value="<?= $item['manga']['slug'] ?>" name="manga_id" />
79
-						<input type="hidden" value="<?= $item['user_rating'] ?>" name="old_rating" />
80
-						<input type="hidden" value="true" name="edit" />
82
+						<input type="hidden" value="<?= $item['id'] ?>" name="id"/>
83
+						<input type="hidden" value="<?= $item['mal_id'] ?>" name="mal_id"/>
84
+						<input type="hidden" value="<?= $item['manga']['slug'] ?>" name="manga_id"/>
85
+						<input type="hidden" value="<?= $item['user_rating'] ?>" name="old_rating"/>
86
+						<input type="hidden" value="true" name="edit"/>
81 87
 						<button type="submit">Submit</button>
82 88
 					</td>
83 89
 				</tr>
84
-			</tbody>
85
-		</table>
90
+				</tbody>
91
+			</table>
86 92
 		</form>
87 93
 		<fieldset>
88 94
 			<legend>Danger Zone</legend>
@@ -92,8 +98,8 @@
92 98
 					<tr>
93 99
 						<td>&nbsp;</td>
94 100
 						<td>
95
-							<input type="hidden" value="<?= $item['id'] ?>" name="id" />
96
-							<input type="hidden" value="<?= $item['mal_id'] ?>" name="mal_id" />
101
+							<input type="hidden" value="<?= $item['id'] ?>" name="id"/>
102
+							<input type="hidden" value="<?= $item['mal_id'] ?>" name="mal_id"/>
97 103
 							<button type="submit" class="danger">Delete Entry</button>
98 104
 						</td>
99 105
 					</tr>

+ 1
- 1
public/css/app.min.css
File diff suppressed because it is too large
View File


+ 5
- 5
public/css/base.css View File

@@ -29,7 +29,7 @@ button {
29 29
 }
30 30
 
31 31
 table {
32
-	min-width: 85%;
32
+	/* min-width: 85%; */
33 33
 	margin: 0 auto;
34 34
 }
35 35
 
@@ -279,7 +279,7 @@ a:hover, a:active {
279 279
 }
280 280
 
281 281
 .form {
282
-	width: 100%;
282
+	/* width: 100%; */
283 283
 }
284 284
 
285 285
 .form thead th, .form thead tr {
@@ -295,7 +295,7 @@ a:hover, a:active {
295 295
 
296 296
 .form tr > td:nth-child(even) {
297 297
 	text-align: left;
298
-	width: 70%;
298
+	/* width: 70%; */
299 299
 }
300 300
 
301 301
 .invisible tbody > tr:nth-child(odd) {
@@ -566,7 +566,7 @@ a:hover, a:active {
566 566
 }
567 567
 
568 568
 .manga .media {
569
-	border: 1px solid #ddd;
569
+	/* border: 1px solid #ddd; */
570 570
 	height: 310px;
571 571
 	margin: 0.25em;
572 572
 }
@@ -578,7 +578,7 @@ a:hover, a:active {
578 578
 	top: calc(50% - 22.4px);
579 579
 	left: 43.5px;
580 580
 	left: calc(50% - 66.5px);
581
-	z-index: 50;
581
+	z-index: 40;
582 582
 }
583 583
 
584 584
 .manga .media > .edit_buttons button {

+ 1
- 1
src/API/Kitsu.php View File

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