From f723832791490ad342c7ab1190d1f16dce84ade9 Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Mon, 21 Oct 2013 04:23:40 +0700 Subject: New main page --- src/java/com/juick/http/www/Blogs.java | 3 +- src/java/com/juick/http/www/Login.java | 168 +++++++++++++++++++++---- src/java/com/juick/http/www/Main.java | 21 +++- src/java/com/juick/http/www/PageTemplates.java | 2 +- 4 files changed, 162 insertions(+), 32 deletions(-) (limited to 'src/java/com/juick/http') diff --git a/src/java/com/juick/http/www/Blogs.java b/src/java/com/juick/http/www/Blogs.java index 89113def..cf58ed4f 100644 --- a/src/java/com/juick/http/www/Blogs.java +++ b/src/java/com/juick/http/www/Blogs.java @@ -42,7 +42,7 @@ import javax.servlet.http.HttpServletResponse; */ public class Blogs { - protected void doGet(Connection sql, Connection sqlSearch, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + protected void doGet(Connection sql, Connection sqlSearch, HttpServletRequest request, HttpServletResponse response, com.juick.User visitor) throws ServletException, IOException { String paramTagStrQuery = request.getParameter("tag"); if (paramTagStrQuery != null) { String url = "/tag/" + URLEncoder.encode(paramTagStrQuery, "UTF-8"); @@ -53,7 +53,6 @@ public class Blogs { Utils.sendPermanentRedirect(response, url); } - com.juick.User visitor = Utils.getVisitorUser(sql, request); Locale locale = request.getLocale(); ResourceBundle rb = ResourceBundle.getBundle("Blogs", locale); diff --git a/src/java/com/juick/http/www/Login.java b/src/java/com/juick/http/www/Login.java index f693b97c..329cb767 100644 --- a/src/java/com/juick/http/www/Login.java +++ b/src/java/com/juick/http/www/Login.java @@ -44,37 +44,157 @@ public class Login { Locale locale = request.getLocale(); ResourceBundle rb = ResourceBundle.getBundle("Login", locale); + ResourceBundle rbg = ResourceBundle.getBundle("Global", locale); response.setContentType("text/html; charset=UTF-8"); PrintWriter out = response.getWriter(); try { - PageTemplates.pageHead(out, rb.getString("Login"), ""); - PageTemplates.pageNavigation(out, locale, visitor, null); - - out.println("
" + rb.getString("Login VK text") + "
"); - out.println("" + rb.getString("XMPP instructions") + "
"); - out.println("