diff options
Diffstat (limited to 'src/java/com/juick/http/www/User.java')
-rw-r--r-- | src/java/com/juick/http/www/User.java | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/java/com/juick/http/www/User.java b/src/java/com/juick/http/www/User.java index 73dd5827..0ddac42d 100644 --- a/src/java/com/juick/http/www/User.java +++ b/src/java/com/juick/http/www/User.java @@ -100,6 +100,7 @@ public class User { PageTemplates.pageNavigation(out, locale, visitor); PageTemplates.pageUserTitle(out, sql, locale, user, visitor); + out.println("<div id=\"topwrapper\">"); out.println("<div id=\"wrapper\">"); out.println("<div id=\"content\">"); out.println("<ul>"); @@ -122,6 +123,7 @@ public class User { pageUserColumn(out, sql, user, visitor, locale); out.println("</div>"); + out.println("</div>"); // topwrapper PageTemplates.pageFooter(request, out, locale, visitor); } finally { @@ -146,11 +148,7 @@ public class User { out.println("<div id=\"wrapper\">"); out.println("<div id=\"content\">"); - - out.print("<p>"); - pageUserTags(out, sql, user, visitor, 0); - out.print("</p>"); - + out.println("<p>" + pageUserTags(sql, user, visitor, 0) + "</p>"); out.println("</div>"); pageUserColumn(out, sql, user, visitor, locale); out.println("</div>"); @@ -219,7 +217,7 @@ public class User { try { PageTemplates.pageHead(out, "@" + user.UName + ": " + rb.getString("(Stats) I read"), null); PageTemplates.pageNavigation(out, locale, visitor); - PageTemplates.pageUserTitle(out, sql, locale, user, visitor); + //PageTemplates.pageUserTitle(out, sql, locale, user, visitor); out.println("<div id=\"wrapper\">"); out.println("<div id=\"content\">"); @@ -260,21 +258,21 @@ 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\">"); - out.println("<h2>" + rb.getString("(Menu) Messages") + "</h2>"); + out.println("<div id=\"column\" class=\"stickya\">"); out.println("<ul>"); - out.println(" <li><a href=\"?\">" + rb.getString("(Menu) Blog") + "</a></li>"); - out.println(" <li><a href=\"?show=recomm\">" + rb.getString("(Menu) Recommendations") + "</a></li>"); - out.println(" <li><a href=\"?show=photos\">" + rb.getString("(Menu) Photos") + "</a></li>"); + out.println(" <li><a href=\"./\">" + rb.getString("(Menu) Blog") + "</a></li>"); + out.println(" <li><a href=\"./?show=recomm\">" + rb.getString("(Menu) Recommendations") + "</a></li>"); + out.println(" <li><a href=\"./?show=photos\">" + rb.getString("(Menu) Photos") + "</a></li>"); out.println("</ul>"); - out.println("<h2>" + rb.getString("(Menu) Tags") + " <a href=\"./tags\">" + rb.getString("all") + "</a></h2>"); - pageUserTags(out, sql, user, visitor, 15); - out.println("<h2>" + rb.getString("(Menu) Search") + "</h2>"); - out.println("<form action=\"./\" id=\"search\"><p><input type=\"text\" name=\"search\" class=\"inp\"/></p></form>"); + out.println("<hr/>"); + out.println("<p>" + pageUserTags(sql, user, visitor, 15) + "</p>"); + out.println("<form action=\"./\" id=\"searchuser\">"); + out.println("<p><input type=\"text\" name=\"search\" class=\"inp\" placeholder=\"" + rb.getString("Search") + "\"/></p>"); + out.println("</form>"); out.println("</div>"); } - public static void pageUserTags(PrintWriter out, Connection sql, com.juick.User user, com.juick.User visitor, int cnt) { + public static String pageUserTags(Connection sql, com.juick.User user, com.juick.User visitor, int cnt) { com.juick.Tag tags[] = null; int maxUsageCnt = 0; @@ -313,6 +311,7 @@ public class User { Arrays.sort(tags, 0, cnt); } + String ret = ""; for (int i = 0; i < cnt; i++) { String tag = Utils.encodeHTML(tags[i].Name); try { @@ -321,12 +320,13 @@ public class User { } if (tags[i].UsageCnt > maxUsageCnt / 3 * 2) { - out.print("<big>" + tag + "</big> "); + ret += "<big>" + tag + "</big> "; } else if (tags[i].UsageCnt > maxUsageCnt / 3) { - out.print("<small>" + tag + "</small> "); + ret += "<small>" + tag + "</small> "; } else { - out.print(tag + " "); + ret += tag + " "; } } + return ret; } } |