diff options
author | Ugnich Anton | 2013-10-11 21:35:17 +0700 |
---|---|---|
committer | Ugnich Anton | 2013-10-11 21:35:17 +0700 |
commit | e707a8e607ec92fcf0137b75b170ff898755ecb2 (patch) | |
tree | a9c06479f0dde2fb499369d5704ce6e4e787a343 /src/java/com | |
parent | fed850115e69e7ec7c69da504c8c9f1e160e7f44 (diff) |
Two columns
Diffstat (limited to 'src/java/com')
-rw-r--r-- | src/java/com/juick/http/www/Blogs.java | 3 | ||||
-rw-r--r-- | src/java/com/juick/http/www/Help.java | 23 | ||||
-rw-r--r-- | src/java/com/juick/http/www/PageTemplates.java | 6 | ||||
-rw-r--r-- | src/java/com/juick/http/www/User.java | 2 | ||||
-rw-r--r-- | src/java/com/juick/http/www/UserThread.java | 4 |
5 files changed, 21 insertions, 17 deletions
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(" <li><a href=\"/?show=photos\">" + rb.getString("With photos") + "</a></li>"); out.println(" </ul>"); out.println(" <hr/>"); + out.println(" <form action=\"/\">"); + out.println(" <p><input type=\"text\" name=\"search\" class=\"inp\" placeholder=\"" + rb.getString("Search") + "\"/></p>"); + out.println(" </form>"); out.println(" <p>" + getTags(sql, 45) + "</p>"); out.println("</div>"); 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("<div id=\"topwrapper\">"); out.println("<div id=\"wrapper\">"); out.println("<div id=\"content\">"); printFile(out, f); + PageTemplates.pageFooter(request, out, locale, visitor, false); out.println("</div>"); out.println("</div>"); - + out.println("<div id=\"column\" class=\"abs\">"); printFile(out, new File("/var/www/juick.com/help3/" + path[2] + "/navigation")); out.println("<hr/>"); printFile(out, new File("/var/www/juick.com/help3/langs")); out.println("</div>"); - + out.println("</div>"); - - 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("<!DOCTYPE html>"); out.print("<html>"); out.print("<head>"); - out.print("<link rel=\"stylesheet\" href=\"/style.2013072200.css\"/>"); + out.print("<link rel=\"stylesheet\" href=\"/style.2013100900.css\"/>"); out.print("<script type=\"text/javascript\" src=\"//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js\" defer=\"defer\"></script>"); out.print("<script type=\"text/javascript\" src=\"//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js\" defer=\"defer\" async=\"async\"></script>"); out.print("<script type=\"text/javascript\" src=\"/scripts.2013072200.js\" defer=\"defer\"></script>"); @@ -70,11 +70,13 @@ public class PageTemplates { out.println("<div id=\"hwrapper\">"); out.println("<ul id=\"header\">"); out.println(" <li id=\"logo\"><a href=\"" + (user != null ? "/?show=my" : "/") + "\"><div class=\"head-ico\" id=\"hi-logo\"></div></a></li>"); + /* out.print(" <li id=\"search\"><form action=\"/\"><input type=\"text\" name=\"search\" class=\"text\" placeholder=\"" + rb.getString("Search") + "\""); if (search != null) { - out.print(" value=\"" + Utils.encodeHTML(search) + "\""); + out.print(" value=\"" + Utils.encodeHTML(search) + "\""); } out.println("/></form></li>"); + */ if (user != null) { out.println(" <li class=\"right\"><a href=\"/logout\"><div class=\"head-ico\" id=\"hi-logout\"></div></a></li>"); out.println(" <li class=\"right\"><a href=\"/settings\"><div class=\"head-ico\" id=\"hi-settings\"></div></a></li>"); diff --git a/src/java/com/juick/http/www/User.java b/src/java/com/juick/http/www/User.java index 3b526727..e91076e0 100644 --- a/src/java/com/juick/http/www/User.java +++ b/src/java/com/juick/http/www/User.java @@ -317,7 +317,7 @@ public class User { out.println(" <li><a href=\"./?show=photos\">" + rb.getString("(Menu) Photos") + "</a></li>"); out.println(" </ul>"); out.println(" <hr/>"); - out.println(" <form action=\"./\" id=\"searchuser\">"); + out.println(" <form action=\"./\">"); out.println(" <p><input type=\"text\" name=\"search\" class=\"inp\" placeholder=\"" + rb.getString("Search") + "\"/></p>"); out.println(" </form>"); out.println(" <p>" + pageUserTags(sql, user, visitor, 15) + "<a href=\"./tags\">...</a></p>"); 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<com.juick.Message> 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++) { |