aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/User.java
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/www/User.java
parent45bc7349af0696b9c68266feece63d7359260cec (diff)
New header design
Diffstat (limited to 'src/java/com/juick/http/www/User.java')
-rw-r--r--src/java/com/juick/http/www/User.java65
1 files changed, 22 insertions, 43 deletions
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) {