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/Login.properties | 14 +-- src/java/Login_ru.properties | 14 +-- 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 +- 6 files changed, 170 insertions(+), 52 deletions(-) (limited to 'src') diff --git a/src/java/Login.properties b/src/java/Login.properties index f8b3919b..3275155e 100644 --- a/src/java/Login.properties +++ b/src/java/Login.properties @@ -1,12 +1,6 @@ -# To change this template, choose Tools | Templates -# and open the template in the editor. - -Login=Login +SignUp=Sign up +VKontakte=VKontakte +XMPPLogin=Send LOGIN to +HaveAccount=Already have an account? Username=Username Password=Password -Login\ Facebook=Login with Facebook -Login\ VK=Login with VKontakte -Login\ VK\ text=Login -Login\ XMPP=Login with Jabber/XMPP -XMPP\ instructions=Send LOGIN from your Jabber/XMPP account to juick@juick.com. -Have\ Juick=Have a Juick account? diff --git a/src/java/Login_ru.properties b/src/java/Login_ru.properties index 6d5922e4..b3acd0c7 100644 --- a/src/java/Login_ru.properties +++ b/src/java/Login_ru.properties @@ -1,12 +1,6 @@ -# To change this template, choose Tools | Templates -# and open the template in the editor. - -Login=\u0412\u0445\u043e\u0434 +SignUp=\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f +VKontakte=\u0412\u041a\u043e\u043d\u0442\u0430\u043a\u0442\u0435 +XMPPLogin=\u041e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 LOGIN \u043d\u0430 +HaveAccount=\u0423\u0436\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b? Username=\u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f Password=\u041f\u0430\u0440\u043e\u043b\u044c -Login\ Facebook=\u0412\u043e\u0439\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 Facebook -Login\ VK=\u0412\u043e\u0439\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 \u0412\u041a\u043e\u043d\u0442\u0430\u043a\u0442\u0435 -Login\ VK\ text=\u0412\u043e\u0439\u0442\u0438 -Login\ XMPP=\u0412\u043e\u0439\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 Jabber/XMPP -XMPP\ instructions=\u041e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 LOGIN \u0441 \u0432\u0430\u0448\u0435\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 Jabber/XMPP \u043d\u0430 juick@juick.com. -Have\ Juick=\u0423\u0436\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043d\u0430 Juick? 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("