improve desc
authorNiki Roo <niki@nikiroo.be>
Wed, 13 May 2020 11:33:01 +0000 (13:33 +0200)
committerNiki Roo <niki@nikiroo.be>
Wed, 13 May 2020 11:33:01 +0000 (13:33 +0200)
src/be/nikiroo/fanfix/library/WebLibraryServer.java
src/be/nikiroo/fanfix/library/web/style.css

index 982d224d03cc7f12c1415dbf4b0dd3324210139d..26de6a862f58086f18b195811789715c307cb7f6 100644 (file)
@@ -858,6 +858,9 @@ public class WebLibraryServer implements Runnable {
                                StringBuilder desc = new StringBuilder();
 
                                if (chapter <= 0) {
+                                       desc.append("<h1 class='title'>");
+                                       desc.append(story.getMeta().getTitle());
+                                       desc.append("</h1>\n");
                                        desc.append("<div class='desc'>\n");
                                        desc.append("\t<div class='cover'>\n");
                                        desc.append("\t\t<img src='/story/" + luid + "/cover'/>\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("</div>\n");
 
                                if (chapter <= 0)
index 3e59952f722096151bd2d684d34a709fe48f4b50..e541ddd9861f63b4f579b63f4d31b05a42b11b89 100644 (file)
@@ -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;
+       }
 }