From 6b675cd472d827a68abfc2624789947fa207a1e0 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Wed, 13 May 2020 13:33:01 +0200 Subject: [PATCH] improve desc --- .../fanfix/library/WebLibraryServer.java | 9 ++++++--- src/be/nikiroo/fanfix/library/web/style.css | 18 +++++++++++++++--- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/be/nikiroo/fanfix/library/WebLibraryServer.java b/src/be/nikiroo/fanfix/library/WebLibraryServer.java index 982d224d..26de6a86 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 3e59952f..e541ddd9 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; + } } -- 2.27.0