Browse Source

Tweak display of descriptions on detail pages

pull/23/head
Timothy Warren 5 months ago
parent
commit
62781355b1

+ 3
- 1
app/views/anime/details.php View File

@@ -49,7 +49,9 @@
49 49
 				<h3><?= $title ?></h3>
50 50
 			<?php endforeach ?>
51 51
 			<br />
52
-			<p class="description"><?= nl2br($data['synopsis']) ?></p>
52
+			<div class="description">
53
+				<p><?= str_replace("\n", '</p><p>', $data['synopsis']) ?></p>
54
+			</div>
53 55
 			<?php if (count($data['streaming_links']) > 0): ?>
54 56
 				<hr />
55 57
 				<h4>Streaming on:</h4>

+ 12
- 8
app/views/character/details.php View File

@@ -8,12 +8,6 @@ use Aviat\AnimeClient\API\Kitsu;
8 8
 	<section class="flex flex-no-wrap">
9 9
 		<div>
10 10
 			<?= $helper->picture("images/characters/{$data['id']}-original.webp") ?>
11
-			<?php if ( ! empty($data['otherNames'])): ?>
12
-				<h3>Nicknames / Other names</h3>
13
-				<?php foreach ($data['otherNames'] as $name): ?>
14
-					<h4><?= $name ?></h4>
15
-				<?php endforeach ?>
16
-			<?php endif ?>
17 11
 		</div>
18 12
 		<div>
19 13
 			<h2 class="toph"><?= $data['name'] ?></h2>
@@ -21,9 +15,19 @@ use Aviat\AnimeClient\API\Kitsu;
21 15
 				<h3><?= $name ?></h3>
22 16
 			<?php endforeach ?>
23 17
 
18
+			<?php if ( ! empty($data['otherNames'])): ?>
19
+				<h4>Also Known As:</h4>
20
+				<ul>
21
+				<?php foreach ($data['otherNames'] as $name): ?>
22
+					<li><h5><?= $name ?></h5></li>
23
+				<?php endforeach ?>
24
+				</ul>
25
+			<?php endif ?>
26
+			<br />
24 27
 			<hr />
25
-
26
-			<p class="description"><?= $data['description'] ?></p>
28
+			<div class="description">
29
+				<p><?= str_replace("\n", '</p><p>', $data['description']) ?></p>
30
+			</div>
27 31
 		</div>
28 32
 	</section>
29 33
 

+ 3
- 1
app/views/manga/details.php View File

@@ -35,7 +35,9 @@
35 35
 			<?php endforeach ?>
36 36
 
37 37
 			<br />
38
-			<p><?= nl2br($data['synopsis']) ?></p>
38
+			<div class="description">
39
+				<p><?= str_replace("\n", '</p><p>', $data['synopsis']) ?></p>
40
+			</div>
39 41
 		</article>
40 42
 	</section>
41 43
 

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


+ 17
- 3
public/css/general.css View File

@@ -21,6 +21,7 @@ body {
21 21
 	margin: 0.5em;
22 22
 }
23 23
 
24
+
24 25
 button {
25 26
 	background: #fff;
26 27
 	background: linear-gradient(#ddd, #eee, #fff, #eee, #ddd);
@@ -682,7 +683,20 @@ picture.cover {
682 683
 }
683 684
 
684 685
 .description {
685
-	max-width: 80rem;
686
+	/* max-width: 80rem;*/
687
+	columns: 4 28rem;
688
+	columns: 4 28em;
689
+	margin-bottom: 1.6em;
690
+	margin-bottom: 1.6rem;
691
+}
692
+
693
+p.description br + br {
694
+	page-break-before: avoid;
695
+	page-break-after: auto;
696
+	page-break-inside: avoid;
697
+	break-inside: avoid;
698
+	break-after: auto;
699
+	break-before: avoid;
686 700
 }
687 701
 
688 702
 .fixed {
@@ -820,9 +834,9 @@ aside.info picture, aside.info img {
820 834
 	margin: 0 auto;
821 835
 }
822 836
 
823
-aside.info + article {
837
+/* aside.info + article {
824 838
 	max-width: 66%;
825
-}
839
+} */
826 840
 
827 841
 /* ----------------------------------------------------------------------------
828 842
 	User page styles

Loading…
Cancel
Save