From e707a8e607ec92fcf0137b75b170ff898755ecb2 Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Fri, 11 Oct 2013 21:35:17 +0700 Subject: Two columns --- src/java/com/juick/http/www/Blogs.java | 3 +++ src/java/com/juick/http/www/Help.java | 23 +++++++++++------------ src/java/com/juick/http/www/PageTemplates.java | 6 ++++-- src/java/com/juick/http/www/User.java | 2 +- src/java/com/juick/http/www/UserThread.java | 4 ++-- 5 files changed, 21 insertions(+), 17 deletions(-) (limited to 'src/java/com/juick') diff --git a/src/java/com/juick/http/www/Blogs.java b/src/java/com/juick/http/www/Blogs.java index 0f13d946..89113def 100644 --- a/src/java/com/juick/http/www/Blogs.java +++ b/src/java/com/juick/http/www/Blogs.java @@ -213,6 +213,9 @@ public class Blogs { out.println("
  • " + rb.getString("With photos") + "
  • "); out.println(" "); out.println("
    "); + out.println("
    "); + out.println("

    "); + out.println("
    "); out.println("

    " + getTags(sql, 45) + "

    "); out.println(""); diff --git a/src/java/com/juick/http/www/Help.java b/src/java/com/juick/http/www/Help.java index 9fc21aad..7adcb920 100644 --- a/src/java/com/juick/http/www/Help.java +++ b/src/java/com/juick/http/www/Help.java @@ -34,7 +34,7 @@ import javax.servlet.http.HttpServletResponse; * @author Ugnich Anton */ public class Help { - + protected void doRedirectToHelpIndex(Connection sql, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String lang = request.getLocale().getLanguage(); if (!(lang.equals("ru") || lang.equals("fr"))) { @@ -42,19 +42,19 @@ public class Help { } Utils.sendTemporaryRedirect(response, "/help/" + lang + "/"); } - + protected void doGetHelp(Connection sql, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { com.juick.User visitor = Utils.getVisitorUser(sql, request); Locale locale = request.getLocale(); ResourceBundle rb = ResourceBundle.getBundle("Global", locale); - + String path[] = request.getRequestURI().split("/"); String page; if (path.length < 3 || path.length > 4 || path[2].length() != 2 || !path[2].matches("^[a-z]+$")) { response.sendError(404); return; } - + if (path.length == 4) { page = path[3]; if (!page.matches("^[a-zA-Z0-9\\-]*$") || page.equals("navigation") || page.equals("index")) { @@ -64,41 +64,40 @@ public class Help { } else { page = "index"; } - + File f = new File("/var/www/juick.com/help3/" + path[2] + "/" + page); if (!f.isFile()) { response.sendError(404); return; } - + response.setContentType("text/html; charset=UTF-8"); PrintWriter out = response.getWriter(); try { PageTemplates.pageHead(out, rb.getString("Help"), ""); PageTemplates.pageNavigation(out, locale, visitor, null); - + out.println("
    "); out.println("
    "); out.println("
    "); printFile(out, f); + PageTemplates.pageFooter(request, out, locale, visitor, false); out.println("
    "); out.println("
    "); - + out.println("
    "); printFile(out, new File("/var/www/juick.com/help3/" + path[2] + "/navigation")); out.println("
    "); printFile(out, new File("/var/www/juick.com/help3/langs")); out.println("
    "); - + out.println("
    "); - - PageTemplates.pageFooter(request, out, locale, visitor, false); PageTemplates.pageEnd(out); } finally { out.close(); } } - + private void printFile(PrintWriter out, File f) throws IOException { BufferedReader br = new BufferedReader(new FileReader(f)); String str; diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java index f2326b3e..ba19c40b 100644 --- a/src/java/com/juick/http/www/PageTemplates.java +++ b/src/java/com/juick/http/www/PageTemplates.java @@ -50,7 +50,7 @@ public class PageTemplates { out.println(""); out.print(""); out.print(""); - out.print(""); + out.print(""); out.print(""); out.print(""); out.print(""); @@ -70,11 +70,13 @@ public class PageTemplates { out.println("
    "); out.println(""); out.println("
    "); - out.println("
    "); + out.println(" "); out.println("

    "); out.println("
    "); out.println("

    " + pageUserTags(sql, user, visitor, 15) + "...

    "); diff --git a/src/java/com/juick/http/www/UserThread.java b/src/java/com/juick/http/www/UserThread.java index 3ba5c96b..6fb63209 100644 --- a/src/java/com/juick/http/www/UserThread.java +++ b/src/java/com/juick/http/www/UserThread.java @@ -278,8 +278,8 @@ public class UserThread { public static void printTree(PrintWriter out, ArrayList replies, int ReplyTo, int margin, boolean hidden, Locale locale) { ResourceBundle rb = ResourceBundle.getBundle("Global", locale); - if (margin > 420) { - margin = 420; + if (margin > 240) { + margin = 240; } for (int i = 0; i < replies.size(); i++) { -- cgit v1.2.3