aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2014-01-31 01:01:48 +0700
committerGravatar Ugnich Anton2014-01-31 01:01:48 +0700
commit80dc112383a88def23eb95e34e3d7f739994bd3b (patch)
tree6bc9ee932110dc046df801ae6f1b65c217f55c94 /src/java/com/juick/http
parent45bc7349af0696b9c68266feece63d7359260cec (diff)
New header design
Diffstat (limited to 'src/java/com/juick/http')
-rw-r--r--src/java/com/juick/http/www/Discover.java14
-rw-r--r--src/java/com/juick/http/www/Help.java18
-rw-r--r--src/java/com/juick/http/www/Home.java15
-rw-r--r--src/java/com/juick/http/www/NewMessage.java8
-rw-r--r--src/java/com/juick/http/www/PM.java33
-rw-r--r--src/java/com/juick/http/www/PageTemplates.java122
-rw-r--r--src/java/com/juick/http/www/SignUp.java9
-rw-r--r--src/java/com/juick/http/www/User.java65
-rw-r--r--src/java/com/juick/http/www/UserThread.java11
9 files changed, 98 insertions, 197 deletions
diff --git a/src/java/com/juick/http/www/Discover.java b/src/java/com/juick/http/www/Discover.java
index 98f46656..ca6415ff 100644
--- a/src/java/com/juick/http/www/Discover.java
+++ b/src/java/com/juick/http/www/Discover.java
@@ -74,9 +74,9 @@ public class Discover {
PageTemplates.pageHead(out, title, null);
PageTemplates.pageNavigation(out, locale, visitor, null);
- out.println("<div id=\"topwrapper\">");
- out.println("<div id=\"wrapper\">");
- out.println("<div id=\"content\">");
+ PageTemplates.pageHomeColumn(out, sql, visitor, locale);
+
+ out.println("<section id=\"content\">");
if (mids.size() > 0) {
out.println("<ul>");
@@ -88,14 +88,10 @@ public class Discover {
String nextpage = "?before=" + mids.get(mids.size() - 1);
out.println("<p class=\"page\"><a href=\"" + nextpage + "\">Older →</a></p>");
}
- PageTemplates.pageFooter(request, out, locale, visitor, true);
- out.println("</div>");
- out.println("</div>"); // wrapper
- PageTemplates.pageHomeColumn(out, sql, visitor, locale);
-
- out.println("</div>"); // topwrapper
+ out.println("</section>");
+ PageTemplates.pageFooter(request, out, locale, visitor, true);
PageTemplates.pageDialogTemplate(out, locale);
PageTemplates.pageEnd(out);
} finally {
diff --git a/src/java/com/juick/http/www/Help.java b/src/java/com/juick/http/www/Help.java
index 028539df..c6a64622 100644
--- a/src/java/com/juick/http/www/Help.java
+++ b/src/java/com/juick/http/www/Help.java
@@ -77,21 +77,17 @@ public class Help {
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\">");
+ out.println("<aside id=\"column\">");
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("</aside>");
- out.println("</div>");
+ out.println("<section id=\"content\">");
+ printFile(out, f);
+ out.println("</section>");
+
+ PageTemplates.pageFooter(request, out, locale, visitor, false);
PageTemplates.pageEnd(out);
} finally {
out.close();
diff --git a/src/java/com/juick/http/www/Home.java b/src/java/com/juick/http/www/Home.java
index 5ef43858..ae82633f 100644
--- a/src/java/com/juick/http/www/Home.java
+++ b/src/java/com/juick/http/www/Home.java
@@ -94,9 +94,9 @@ public class Home {
PageTemplates.pageHead(out, title, null);
PageTemplates.pageNavigation(out, locale, visitor, null);
- out.println("<div id=\"topwrapper\">");
- out.println("<div id=\"wrapper\">");
- out.println("<div id=\"content\">");
+ PageTemplates.pageHomeColumn(out, sql, visitor, locale);
+
+ out.println("<section id=\"content\">");
if (paramShow == null && paramBefore == 0) {
out.println("<!--noindex-->");
@@ -136,14 +136,9 @@ public class Home {
out.println("<!--/noindex-->");
}
- PageTemplates.pageFooter(request, out, locale, visitor, true);
- out.println("</div>");
- out.println("</div>"); // wrapper
-
- PageTemplates.pageHomeColumn(out, sql, visitor, locale);
-
- out.println("</div>"); // topwrapper
+ out.println("</section>");
+ PageTemplates.pageFooter(request, out, locale, visitor, true);
PageTemplates.pageDialogTemplate(out, locale);
PageTemplates.pageEnd(out);
} finally {
diff --git a/src/java/com/juick/http/www/NewMessage.java b/src/java/com/juick/http/www/NewMessage.java
index 20e1102c..7ab93e1d 100644
--- a/src/java/com/juick/http/www/NewMessage.java
+++ b/src/java/com/juick/http/www/NewMessage.java
@@ -50,7 +50,7 @@ public class NewMessage {
+ "<script src=\"//static.juick.com/post3.js\" type=\"text/javascript\" defer=\"defer\"></script>");
PageTemplates.pageNavigation(out, locale, visitor, null);
- out.println("<div id=\"topwrapper\"><div id=\"wrapper\"><div id=\"content\" class=\"pagetext\">");
+ out.println("<section id=\"content\" class=\"pagetext\">");
out.println("<form action=\"/post\" method=\"post\" id=\"postmsg\" enctype=\"multipart/form-data\">");
out.println("<p style=\"text-align: left\"><b>" + rbnm.getString("Location") + ": <span id=\"location\"></span></b> <span id=\"locationclear\">&mdash; <a href=\"#\" onclick=\"clearLocation()\">" + rbnm.getString("Clear") + "</a></span></p>");
out.println("<p style=\"text-align: left\"><b>" + rbnm.getString("Photo") + ":</b> <span id=\"attachmentfile\"><input type=\"file\" name=\"attach\"/> <i>" + rbnm.getString("Photo_JPG") + "</i></span></p>");
@@ -71,11 +71,9 @@ public class NewMessage {
out.println("<div id=\"geomap\"></div>");
out.println("<p style=\"text-align: left\"><b>" + rbnm.getString("Tags") + ":</b></p>");
printUserTags(sql, out, visitor);
- PageTemplates.pageFooter(request, out, locale, visitor, false);
- out.println("</div>");
- out.println("</div>");
- out.println("</div>");
+ out.println("</section>");
+ PageTemplates.pageFooter(request, out, locale, visitor, false);
PageTemplates.pageEnd(out);
} finally {
out.close();
diff --git a/src/java/com/juick/http/www/PM.java b/src/java/com/juick/http/www/PM.java
index 5a07cd5a..ec51d44c 100644
--- a/src/java/com/juick/http/www/PM.java
+++ b/src/java/com/juick/http/www/PM.java
@@ -64,9 +64,9 @@ public class PM {
PageTemplates.pageHead(out, title, null);
PageTemplates.pageNavigation(out, locale, visitor, null);
- out.println("<div id=\"topwrapper\">");
- out.println("<div id=\"wrapper\">");
- out.println("<div id=\"content\">");
+ PageTemplates.pageHomeColumn(out, sql, visitor, locale);
+
+ out.println("<section id=\"content\">");
if (!msgs.isEmpty()) {
out.println("<ul>");
@@ -99,14 +99,9 @@ public class PM {
}
*/
- PageTemplates.pageFooter(request, out, locale, visitor, true);
- out.println("</div>");
- out.println("</div>"); // wrapper
-
- PageTemplates.pageHomeColumn(out, sql, visitor, locale);
-
- out.println("</div>"); // topwrapper
+ out.println("</section>");
+ PageTemplates.pageFooter(request, out, locale, visitor, true);
PageTemplates.pageDialogTemplate(out, locale);
PageTemplates.pageEnd(out);
} finally {
@@ -144,9 +139,9 @@ public class PM {
PageTemplates.pageHead(out, title, null);
PageTemplates.pageNavigation(out, locale, visitor, null);
- out.println("<div id=\"topwrapper\">");
- out.println("<div id=\"wrapper\">");
- out.println("<div id=\"content\">");
+ PageTemplates.pageHomeColumn(out, sql, visitor, locale);
+
+ out.println("<section id=\"content\">");
out.println("<form action=\"/pm/send\" method=\"POST\" enctype=\"multipart/form-data\">");
out.println("<div class=\"newpm\">");
@@ -182,14 +177,9 @@ public class PM {
}
*/
- PageTemplates.pageFooter(request, out, locale, visitor, true);
- out.println("</div>");
- out.println("</div>"); // wrapper
-
- PageTemplates.pageHomeColumn(out, sql, visitor, locale);
-
- out.println("</div>"); // topwrapper
+ out.println("</section>");
+ PageTemplates.pageFooter(request, out, locale, visitor, true);
PageTemplates.pageDialogTemplate(out, locale);
PageTemplates.pageEnd(out);
} finally {
@@ -199,6 +189,9 @@ public class PM {
public void doPostPM(Connection sql, HttpServletRequest request, HttpServletResponse response, Stream xmpp, com.juick.User visitor) throws ServletException, IOException {
String uname = request.getParameter("uname");
+ if (uname.startsWith("@")) {
+ uname = uname.substring(1);
+ }
int uid = 0;
if (UserQueries.checkUserNameValid(uname)) {
uid = UserQueries.getUIDbyName(sql, uname);
diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java
index 16a00d24..462fdf31 100644
--- a/src/java/com/juick/http/www/PageTemplates.java
+++ b/src/java/com/juick/http/www/PageTemplates.java
@@ -55,9 +55,9 @@ public class PageTemplates {
out.println("<!DOCTYPE html>");
out.print("<html>");
out.print("<head>");
- out.print("<link rel=\"stylesheet\" href=\"/style.2014012700.css\"/>");
+ out.print("<link rel=\"stylesheet\" href=\"/style.2014013002.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=\"/scripts.2014012700.js\" defer=\"defer\"></script>");
+ out.print("<script type=\"text/javascript\" src=\"/scripts.2014013000.js\" defer=\"defer\"></script>");
if (headers != null) {
out.print(headers);
}
@@ -69,75 +69,43 @@ public class PageTemplates {
out.println("<body>");
}
- public static void pageNavigation(PrintWriter out, Locale loc, com.juick.User user, String search) {
- ResourceBundle rb = ResourceBundle.getBundle("Global", loc);
- out.println("<div id=\"hwrapper\">");
- out.println("<ul id=\"header\">");
- if (user != null) {
- out.println(" <li><a href=\"/?show=my\"><div class=\"head-ico\" id=\"hi-home\"></div><label>" + rb.getString("Home") + "</label></a></li>");
- } else {
- out.println(" <li><a href=\"/\"><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") + "\"");
+ public static void pageNavigation(PrintWriter out, Locale loc, com.juick.User visitor, String search) {
+ out.println("<header>");
+ out.println(" <div id=\"logo\"><a href=\"/\">Juick</a></div>");
+ out.println(" <nav id=\"global\"><ul>");
+ out.println(" <li><a href=\"/\">Популярные</a></li>");
+ out.println(" <li>/</li>");
+ out.println(" <li><a href=\"/?show=all\">Все сообщения</a></li>");
+ out.println(" </ul></nav>");
+ out.print(" <div id=\"search\"><form action=\"/\"><input type=\"text\" name=\"search\" class=\"text\" placeholder=\"Поиск\"");
if (search != null) {
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>");
- out.println(" <li class=\"right\"><a href=\"/" + user.UName + "\" class=\"wide\"><img src=\"//i.juick.com/as/" + user.UID + ".png\" alt=\"" + user.UName + "\"/><label>" + user.UName + "</label></a></li>");
- out.println(" <li class=\"right\"><a href=\"/post\" class=\"wide\"><div class=\"head-ico\" id=\"hi-post\"></div><label>" + rb.getString("Post") + "</label></a></li>");
+ out.println("/></form></div>");
+ out.println(" <section id=\"headdiv\">");
+ if (visitor != null) {
+ out.println(" <nav id=\"user\"><ul>");
+ out.println(" <li><a href=\"/?show=my\">Моя лента</a></li>");
+ out.println(" <li>/</li>");
+ out.println(" <li><a href=\"/pm/inbox\">Приватные</a></li>");
+ out.println(" <li>/</li>");
+ out.println(" <li><a href=\"/?show=discuss\">Обсуждения</a></li>");
+ out.println(" <li>/</li>");
+ out.println(" <li><a href=\"/?show=recommended\">Рекомендации</a></li>");
+ out.println(" </ul></nav>");
+ out.println(" <nav id=\"actions\"><ul>");
+ out.println(" <li><a href=\"/post\">Написать</a></li>");
+ out.println(" <li>/</li>");
+ out.println(" <li><a href=\"/" + visitor.UName + "\">@" + visitor.UName + "</a></li>");
+ out.println(" <li>/</li>");
+ out.println(" <li><a href=\"/logout\">Выйти</a></li>");
+ out.println(" </ul></nav>");
} else {
- out.println(" <li class=\"right\"><a href=\"/login\" class=\"wide\" rel=\"nofollow\">" + rb.getString("Login") + "</a></li>");
+ out.println("<p>Чтобы добавлять сообщения и комментарии, <a href=\"/login\">представьтесь</a>.</p>");
}
- out.println("</ul>");
- out.println("</div>");
- }
- /*
- public static void pageUserTitle(PrintWriter out, Connection sql, Locale loc, com.juick.User user, com.juick.User visitor) {
- ResourceBundle rb = ResourceBundle.getBundle("User", loc);
-
- // Full name and description
- String fullname = null;
- String description = null;
- PreparedStatement stmt = null;
- ResultSet rs = null;
- try {
- stmt = sql.prepareStatement("SELECT fullname,descr FROM usersinfo WHERE user_id=?");
- stmt.setInt(1, user.UID);
- rs = stmt.executeQuery();
- if (rs.first()) {
- fullname = rs.getString(1) + " (" + user.UName + ")";
- description = rs.getString(2);
+ out.println(" </section>");
+ out.println("</header>");
}
- } catch (SQLException e) {
- System.err.println(e);
- } finally {
- Utils.finishSQL(rs, stmt);
- }
- if (fullname == null) {
- fullname = user.UName;
- }
- if (description == null) {
- description = "";
- }
-
- out.println("<div id=\"title\">");
- out.println(" <div id=\"title-av\"><a href=\"/" + user.UName + "/\"><img src=\"//i.juick.com/a/" + user.UID + ".png\" width=\"96\" height=\"96\" alt=\"" + user.UName + "\"/></a></div>");
- out.println(" <div id=\"title-stats\"><ul>");
- out.println(" <li><a href=\"/" + user.UName + "/friends\">" + rb.getString("(Stats) I read") + ": " + UserQueries.getStatsIRead(sql, user.UID) + "</a></li>");
- out.println(" <li><a href=\"/" + user.UName + "/readers\">" + rb.getString("(Stats) My readers") + ": " + UserQueries.getStatsMyReaders(sql, user.UID) + "</a></li>");
- out.println(" <li>" + rb.getString("(Stats) Messages") + ": " + UserQueries.getStatsMessages(sql, user.UID) + "</li>");
- out.println(" <li>" + rb.getString("(Stats) Replies") + ": " + UserQueries.getStatsReplies(sql, user.UID) + "</li>");
- out.println(" </ul></div>");
- out.println(" <div id=\"title-username\"><h1>" + fullname + "</h1><p>" + description + "</p></div>");
- out.println("</div>");
- out.println();
- }
- */
public static void pageYandexAd(PrintWriter out, int stat_id) {
out.println("<div id=\"yandex_ad\"></div>");
@@ -171,26 +139,13 @@ public class PageTemplates {
}
public static void pageHomeColumn(PrintWriter out, Connection sql, com.juick.User visitor, Locale locale) {
- ResourceBundle rb = ResourceBundle.getBundle("Blogs", locale);
-
if (tagsHTML == null) {
tagsHTML = PageTemplates.getPopularTags(sql, 60);
}
- out.println("<div id=\"column\" class=\"abs\">");
- out.println(" <ul>");
- if (visitor != null) {
- out.println(" <li><a href=\"/?show=my\">" + rb.getString("My feed") + "</a></li>");
- out.println(" <li><a href=\"/pm/inbox\">" + rb.getString("Private") + "</a> · <a href=\"/pm/sent\">" + rb.getString("Private sent") + "</a></li>");
- out.println(" <li><a href=\"/?show=discuss\">" + rb.getString("Discussions") + "</a></li>");
- out.println(" <li><a href=\"/?show=recommended\">" + rb.getString("Recommended") + "</a></li>");
- }
- out.println(" <li class=\"margtop\"><a href=\"/\">" + rb.getString("Popular") + "</a></li>");
- out.println(" <li><a href=\"/?show=all\">" + rb.getString("All messages") + "</a></li>");
- out.println(" </ul>");
- out.println(" <hr/>");
+ out.println("<aside id=\"column\">");
out.println(" <p>" + tagsHTML + "</p>");
- out.println("</div>");
+ out.println("</aside>");
}
public static String getPopularTags(Connection sql, int cnt) {
@@ -260,14 +215,13 @@ public class PageTemplates {
}
public static void pageFooter(HttpServletRequest request, PrintWriter out, Locale loc, com.juick.User visitor, boolean sapeon) {
- ResourceBundle rb = ResourceBundle.getBundle("Global", loc);
out.println("<div id=\"fwrapper\"><div id=\"footer\">");
- out.println(" <div id=\"footer-right\"><a href=\"/help/ru/contacts\" rel=\"nofollow\">" + rb.getString("Contacts") + "</a> &#183; <a href=\"/help/\" rel=\"nofollow\">" + rb.getString("Help") + "</a> &#183; <a href=\"/help/ru/adv\" rel=\"nofollow\">" + rb.getString("Advertising") + "</a></div>");
- out.print(" <div id=\"footer-left\">juick.com &copy; 2008-2013");
+ out.println(" <div id=\"footer-right\"><a href=\"/settings\" rel=\"nofollow\">Настройки</a> &#183; <a href=\"/help/ru/contacts\" rel=\"nofollow\">Контакты</a> &#183; <a href=\"/help/\" rel=\"nofollow\">Справка</a> &#183; <a href=\"/help/ru/adv\" rel=\"nofollow\">Реклама</a></div>");
+ out.print(" <div id=\"footer-left\">juick.com &copy; 2008-2014");
if (sapeon && sape != null && (visitor == null || visitor.UID == 1) && request.getQueryString() == null) {
String links = sape.getPageLinks(request.getRequestURI(), request.getCookies()).render();
if (links != null && !links.isEmpty()) {
- out.print("<br/>" + rb.getString("Sponsored by") + ": " + links);
+ out.print("<br/>Спонсоры: " + links);
}
}
out.println("</div>");
diff --git a/src/java/com/juick/http/www/SignUp.java b/src/java/com/juick/http/www/SignUp.java
index b5780676..f6212e3d 100644
--- a/src/java/com/juick/http/www/SignUp.java
+++ b/src/java/com/juick/http/www/SignUp.java
@@ -67,9 +67,8 @@ public class SignUp {
try {
PageTemplates.pageHead(out, rb.getString("Unknown account"), "");
PageTemplates.pageNavigation(out, locale, visitor, null);
- out.println("<div id=\"topwrapper\">");
- out.println("<div id=\"wrapper\">");
- out.println("<div id=\"content\">");
+
+ out.println("<section id=\"content\">");
out.print("<h1 class=\"signup-h1\">");
if (type.charAt(0) == 'f') {
@@ -114,9 +113,7 @@ public class SignUp {
out.println("<p><input type=\"submit\" value=\" OK \"/></p>");
out.println("</form>");
- out.println("</div>");
- out.println("</div>");
- out.println("</div>"); // topwrapper
+ out.println("</section>");
PageTemplates.pageFooter(request, out, locale, visitor, false);
PageTemplates.pageEnd(out);
diff --git a/src/java/com/juick/http/www/User.java b/src/java/com/juick/http/www/User.java
index 2af66275..51a282d2 100644
--- a/src/java/com/juick/http/www/User.java
+++ b/src/java/com/juick/http/www/User.java
@@ -108,11 +108,10 @@ public class User {
try {
PageTemplates.pageHead(out, title, "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"@" + user.UName + "\" href=\"//rss.juick.com/" + user.UName + "/blog\"/>");
PageTemplates.pageNavigation(out, locale, visitor, null);
- //PageTemplates.pageUserTitle(out, sql, locale, user, visitor);
- out.println("<div id=\"topwrapper\">");
- out.println("<div id=\"wrapper\">");
- out.println("<div id=\"content\">");
+ pageUserColumn(out, sql, user, visitor, locale);
+
+ out.println("<section id=\"content\">");
out.println("<ul>");
if (mids.size() > 0) {
PageTemplates.printMessages(out, sql, user, mids, visitor, locale, visitor == null ? 4 : 5, 0);
@@ -132,18 +131,10 @@ public class User {
}
out.println("<p class=\"page\"><a href=\"" + nextpage + "\">Older →</a></p>");
}
- PageTemplates.pageFooter(request, out, locale, visitor, true);
- out.println("</div>");
-
- pageUserColumn(out, sql, user, visitor, locale);
- out.println("</div>");
-
- //out.println("<div id=\"rcol\" class=\"abs\">");
- //PageTemplates.pageYandexAd(out, visitor == null ? 4 : 5); // разный ID для залогиненых и нет
- //out.println("</div>");
- out.println("</div>"); // topwrapper
+ out.println("</section>");
+ PageTemplates.pageFooter(request, out, locale, visitor, true);
PageTemplates.pageDialogTemplate(out, locale);
PageTemplates.pageEnd(out);
} finally {
@@ -164,18 +155,14 @@ public class User {
try {
PageTemplates.pageHead(out, "@" + user.UName + ": " + rb.getString("(Menu) Tags"), null);
PageTemplates.pageNavigation(out, locale, visitor, null);
- //PageTemplates.pageUserTitle(out, sql, locale, user, visitor);
- out.println("<div id=\"topwrapper\">");
- out.println("<div id=\"wrapper\">");
- out.println("<div id=\"content\">");
- out.println("<p>" + pageUserTags(sql, user, visitor, 0) + "</p>");
- PageTemplates.pageFooter(request, out, locale, visitor, false);
- out.println("</div>");
pageUserColumn(out, sql, user, visitor, locale);
- out.println("</div>");
- out.println("</div>");
+ out.println("<section id=\"content\">");
+ out.println("<p>" + pageUserTags(sql, user, visitor, 0) + "</p>");
+ out.println("</section>");
+
+ PageTemplates.pageFooter(request, out, locale, visitor, false);
PageTemplates.pageDialogTemplate(out, locale);
PageTemplates.pageEnd(out);
} finally {
@@ -193,11 +180,10 @@ public class User {
try {
PageTemplates.pageHead(out, "@" + user.UName + ": " + rb.getString("(Stats) I read"), null);
PageTemplates.pageNavigation(out, locale, visitor, null);
- //PageTemplates.pageUserTitle(out, sql, locale, user, visitor);
- out.println("<div id=\"topwrapper\">");
- out.println("<div id=\"wrapper\">");
- out.println("<div id=\"content\">");
+ pageUserColumn(out, sql, user, visitor, locale);
+
+ out.println("<section id=\"content\">");
out.println("<table class=\"users\"><tr>");
PreparedStatement stmt = null;
@@ -222,12 +208,9 @@ public class User {
}
out.println("</tr></table>");
- PageTemplates.pageFooter(request, out, locale, visitor, false);
- out.println("</div>");
- pageUserColumn(out, sql, user, visitor, locale);
- out.println("</div>");
- out.println("</div>");
+ out.println("</section>");
+ PageTemplates.pageFooter(request, out, locale, visitor, false);
PageTemplates.pageDialogTemplate(out, locale);
PageTemplates.pageEnd(out);
} finally {
@@ -245,11 +228,10 @@ public class User {
try {
PageTemplates.pageHead(out, "@" + user.UName + ": " + rb.getString("(Stats) My readers"), null);
PageTemplates.pageNavigation(out, locale, visitor, null);
- //PageTemplates.pageUserTitle(out, sql, locale, user, visitor);
- out.println("<div id=\"topwrapper\">");
- out.println("<div id=\"wrapper\">");
- out.println("<div id=\"content\">");
+ pageUserColumn(out, sql, user, visitor, locale);
+
+ out.println("<section id=\"content\">");
out.println("<table class=\"users\"><tr>");
PreparedStatement stmt = null;
@@ -274,12 +256,9 @@ public class User {
}
out.println("</tr></table>");
- PageTemplates.pageFooter(request, out, locale, visitor, false);
- out.println("</div>");
- pageUserColumn(out, sql, user, visitor, locale);
- out.println("</div>");
- out.println("</div>");
+ out.println("</section>");
+ PageTemplates.pageFooter(request, out, locale, visitor, false);
PageTemplates.pageDialogTemplate(out, locale);
PageTemplates.pageEnd(out);
} finally {
@@ -290,7 +269,7 @@ public class User {
public static void pageUserColumn(PrintWriter out, Connection sql, com.juick.User user, com.juick.User visitor, Locale locale) {
ResourceBundle rb = ResourceBundle.getBundle("User", locale);
- out.println("<div id=\"column\" class=\"abs\">");
+ out.println("<aside id=\"column\">");
out.println(" <div id=\"ctitle\"><a href=\"./\"><img src=\"//i.juick.com/as/" + user.UID + ".png\" alt=\"\"/>" + user.UName + "</a></div>");
if (visitor != null && visitor.UID > 0 && visitor.UID != user.UID) {
out.println(" <ul id=\"ctoolbar\">");
@@ -328,7 +307,7 @@ public class User {
out.println(" <li>" + rb.getString("(Stats) Messages") + ": " + UserQueries.getStatsMessages(sql, user.UID) + "</li>");
out.println(" <li>" + rb.getString("(Stats) Replies") + ": " + UserQueries.getStatsReplies(sql, user.UID) + "</li>");
out.println(" </ul></div>");
- out.println("</div>");
+ out.println("</aside>");
}
public static String pageUserTags(Connection sql, com.juick.User user, com.juick.User visitor, int cnt) {
diff --git a/src/java/com/juick/http/www/UserThread.java b/src/java/com/juick/http/www/UserThread.java
index c37ead00..ff05cf4b 100644
--- a/src/java/com/juick/http/www/UserThread.java
+++ b/src/java/com/juick/http/www/UserThread.java
@@ -66,18 +66,11 @@ public class UserThread {
try {
PageTemplates.pageHead(out, title, "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"@" + user.UName + "\" href=\"//rss.juick.com/" + user.UName + "/blog\"/>");
PageTemplates.pageNavigation(out, locale, visitor, null);
- //PageTemplates.pageUserTitle(out, sql, locale, user, visitor);
-
- out.println("<div id=\"topwrapper\">");
- out.println("<div id=\"wrapper\">");
- out.println("<div id=\"content\" style=\"margin-left: 0; width: 100%\">");
+ out.println("<section id=\"content\" style=\"margin-left: 0; width: 100%\">");
com.juick.Message msg = printMessage(out, sql, user, MID, visitor, locale);
printReplies(out, sql, msg, visitor, locale, listview);
-
- out.println("</div>");
- out.println("</div>");
- out.println("</div>"); // topwrapper
+ out.println("</section>");
PageTemplates.pageDialogTemplate(out, locale);
PageTemplates.pageFooter(request, out, locale, visitor, false);