From: Niki Roo Date: Wed, 13 May 2020 11:33:01 +0000 (+0200) Subject: improve desc X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=6b675cd472d827a68abfc2624789947fa207a1e0;p=nikiroo-utils.git improve desc --- diff --git a/src/be/nikiroo/fanfix/library/WebLibraryServer.java b/src/be/nikiroo/fanfix/library/WebLibraryServer.java index 982d224..26de6a8 100644 --- a/src/be/nikiroo/fanfix/library/WebLibraryServer.java +++ b/src/be/nikiroo/fanfix/library/WebLibraryServer.java @@ -858,6 +858,9 @@ public class WebLibraryServer implements Runnable { StringBuilder desc = new StringBuilder(); if (chapter <= 0) { + desc.append("

"); + desc.append(story.getMeta().getTitle()); + desc.append("

\n"); desc.append("
\n"); desc.append("\t
\n"); desc.append("\t\t\n"); @@ -877,9 +880,9 @@ public class WebLibraryServer implements Runnable { content.append(desc); String description = new TextOutput(false).convert(chap, chapter > 0); - content.append( - description.isEmpty() ? "No description provided." - : description); + content.append(chap.getParagraphs().size() <= 0 + ? "No content provided." + : description); content.append("
\n"); if (chapter <= 0) diff --git a/src/be/nikiroo/fanfix/library/web/style.css b/src/be/nikiroo/fanfix/library/web/style.css index 3e59952..e541ddd 100644 --- a/src/be/nikiroo/fanfix/library/web/style.css +++ b/src/be/nikiroo/fanfix/library/web/style.css @@ -295,13 +295,19 @@ a.viewer.link:hover { .desc { display: flex; + flex-direction: column; padding-top: 10px; } -.desc .cover img { - width: 100px; - padding-right: 10px; +.desc .cover { max-height: 280px; + overflow: hidden; +} + +.desc .cover img { + max-width: 80%; + margin: auto; + display: block; } .desc .details .col1 { @@ -323,4 +329,10 @@ a.viewer.link:hover { .bar.optionbar.s1 { padding-left: calc(400px - (1 * (64px + 5px) / 2)); } .bar.optionbar.s4 { padding-left: calc(400px - (4 * (64px + 5px) / 2)); } + + .desc { flex-direction: row; } + .desc .cover img { + width: 200px; + padding-right: 10px; + } }