From: Niki Roo Date: Fri, 15 May 2020 16:38:08 +0000 (+0200) Subject: fix html indentation X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=9a705a5aa74f35f9dfece944f3d8d965270b21f2;p=fanfix.git fix html indentation --- diff --git a/src/be/nikiroo/fanfix/library/WebLibraryServerHtml.java b/src/be/nikiroo/fanfix/library/WebLibraryServerHtml.java index 8895fb8..1ec3b1f 100644 --- a/src/be/nikiroo/fanfix/library/WebLibraryServerHtml.java +++ b/src/be/nikiroo/fanfix/library/WebLibraryServerHtml.java @@ -315,23 +315,25 @@ abstract class WebLibraryServerHtml implements Runnable { appendPreHtml(builder, true); if (login.isBadLogin()) { - builder.append("
Bad login or password
"); + builder.append( + "\t\t
Bad login or password
"); } else if (login.isBadCookie()) { - builder.append("
Your session timed out
"); + builder.append( + "\t\t
Your session timed out
"); } if (WebLibraryUrls.LOGOUT_URL.equals(uri)) { uri = WebLibraryUrls.INDEX_URL; } + builder.append("\t\t
\n"); builder.append( - "\n"); - builder.append( - "

You must be logged into the system to see the stories.

"); - builder.append("\t\n"); - builder.append("\t\n"); - builder.append("\t\n"); - builder.append("
\n"); + "\t\t\t

You must be logged into the system to see the stories.

"); + builder.append("\t\t\t\n"); + builder.append("\t\t\t\n"); + builder.append("\t\t\t\n"); + builder.append("\t\t\n"); appendPostHtml(builder); @@ -369,42 +371,42 @@ abstract class WebLibraryServerHtml implements Runnable { // TODO: javascript in realtime, using visible=false + hide [submit] - builder.append("
\n"); - builder.append("\n"); // TODO: javascript in realtime, using visible=false + hide [submit] - builder.append("
\n"); - builder.append("\tFilter: \n"); + builder.append("\t\t\t
\n"); + builder.append("\t\t\t\tFilter: \n"); builder.append( - "\t\n"); - builder.append("\t\n"); + builder.append("\t\t\t\t\n"); - builder.append("\t"); builder.append( - "\t\n"); - builder.append("
\n"); - builder.append("\n"); + "\t\t\t\t\n"); + builder.append( + "\t\t\t\t\n"); + builder.append("\t\t\t
\n"); + builder.append("\t\t\n"); - builder.append("\t
"); + builder.append("\t\t
\n"); for (MetaData meta : result.getMetas()) { if (!filter.isEmpty() && !meta.getTitle().toLowerCase() .contains(filter.toLowerCase())) { @@ -478,7 +481,7 @@ abstract class WebLibraryServerHtml implements Runnable { continue; } - builder.append("
"); + builder.append("\t\t\t
"); builder.append(""); - desc.append(story.getMeta().getTitle()); - desc.append("\n"); - desc.append("
\n"); - desc.append("\t\n"); - desc.append("\t\t\n"); - desc.append("\t\n"); - desc.append("\t\n"); + desc.append("\t\t\t

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

\n"); + desc.append("\t\t\t
\n"); + desc.append( + "\t\t\t\t\n"); + desc.append("\t\t\t\t\t\n"); + desc.append("\t\t\t\t\n"); + desc.append("\t\t\t\t
\n"); Map details = BasicLibrary .getMetaDesc(story.getMeta()); for (String key : details.keySet()) { - appendTableRow(desc, 2, key, details.get(key)); + appendTableRow(desc, 5, key, details.get(key)); } - desc.append("\t
\n"); - desc.append("
\n"); - desc.append("

Description

\n"); + desc.append("\t\t\t\t\n"); + desc.append("\t\t\t
\n"); + desc.append("\t\t\t

Description

\n"); } - content.append("
\n"); + content.append("\t\t
\n"); content.append(desc); - String description = new TextOutput(false).convert(chap, - chapter > 0); - content.append(chap.getParagraphs().size() <= 0 - ? "No content provided." - : description); - content.append("
\n"); + if (chap.getParagraphs().size() <= 0) { + content.append("\t\t\tNo content provided.\n"); + } else { + content.append( + "\t\t\t\n"); // + content.append("\t\t\t").append( + new TextOutput(false).convert(chap, chapter > 0)) + .append("\n"); + } + content.append("\t\t
\n"); if (chapter <= 0) disabledLeft = " disabled='disbaled'"; @@ -691,9 +700,9 @@ abstract class WebLibraryServerHtml implements Runnable { String javascript = "document.getElementById(\"previous\").click(); return false;"; content.append(String.format("" // - + "" - + "" - + "", // + + "\t\t\n" + + "\t\t\t\n" + + "\t\t\n", // javascript, // next, // zoomStyle, // @@ -701,18 +710,20 @@ abstract class WebLibraryServerHtml implements Runnable { paragraph))); } else { content.append(String.format("" // - + "
%s
", // + + "\t\t
" // + + "\t\t\t%s\n" // + + "\t\t
\n", // para.getContent())); } } builder.append(String.format("" // - + "\n", // disabledRight, next, // disabledRight, last // )); builder.append(content); - builder.append("
0) { - builder.append("s4"); + builder.append(" s4"); } else { - builder.append("s1"); + builder.append(" s1"); } builder.append("'>\n"); - builder.append(" BACK\n"); + builder.append("\t\t\tBACK\n"); if (paragraph > 0) { builder.append(String.format("" // - + "\tREAL\n"// - + "\tWIDTH\n"// - + "\tHEIGHT\n"// - + "
\n", // + + "\t\t\tREAL\n"// + + "\t\t\tWIDTH\n"// + + "\t\t\tHEIGHT\n", // disabledZoomReal, uri + "?optionName=zoom&optionValue=real", // disabledZoomWidth, @@ -780,6 +790,8 @@ abstract class WebLibraryServerHtml implements Runnable { )); } + builder.append("\t\t
\n"); + appendPostHtml(builder); return NanoHTTPD.newFixedLengthResponse(Status.OK, NanoHTTPD.MIME_HTML, builder.toString()); @@ -826,15 +838,15 @@ abstract class WebLibraryServerHtml implements Runnable { getContentOf("index.pre.html").replace("favicon.ico", favicon)); if (banner) { - builder.append("\n"); + builder.append("\t\t
\n"); } } diff --git a/src/be/nikiroo/fanfix/library/web/index.post.html b/src/be/nikiroo/fanfix/library/web/index.post.html index d4e0905..52ba19e 100644 --- a/src/be/nikiroo/fanfix/library/web/index.post.html +++ b/src/be/nikiroo/fanfix/library/web/index.post.html @@ -1,2 +1,2 @@ -
+ \ No newline at end of file diff --git a/src/be/nikiroo/fanfix/library/web/index.pre.html b/src/be/nikiroo/fanfix/library/web/index.pre.html index 18c1508..e4d9da8 100644 --- a/src/be/nikiroo/fanfix/library/web/index.pre.html +++ b/src/be/nikiroo/fanfix/library/web/index.pre.html @@ -45,4 +45,4 @@ -
+