diff options
author | Ugnich Anton | 2013-10-23 23:20:21 +0700 |
---|---|---|
committer | Ugnich Anton | 2013-10-23 23:20:21 +0700 |
commit | dfaed35136ba1ed24cfb49acb87e837a11a2a8d1 (patch) | |
tree | 9b1b38774e619028f64b91d175074c5c4d5d7e67 /src/java/com/juick/http/www/PageTemplates.java | |
parent | f723832791490ad342c7ab1190d1f16dce84ade9 (diff) |
New feed design
Diffstat (limited to 'src/java/com/juick/http/www/PageTemplates.java')
-rw-r--r-- | src/java/com/juick/http/www/PageTemplates.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java index f83713c9..fc9bb1d5 100644 --- a/src/java/com/juick/http/www/PageTemplates.java +++ b/src/java/com/juick/http/www/PageTemplates.java @@ -50,7 +50,7 @@ public class PageTemplates { out.println("<!DOCTYPE html>"); out.print("<html>"); out.print("<head>"); - out.print("<link rel=\"stylesheet\" href=\"/style.2013100900.css\"/>"); + out.print("<link rel=\"stylesheet\" href=\"/style.2013102203.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=\"//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js\" defer=\"defer\" async=\"async\"></script>"); out.print("<script type=\"text/javascript\" src=\"/scripts.2013072200.js\" defer=\"defer\"></script>"); @@ -209,7 +209,7 @@ public class PageTemplates { if (user == null) { ret += "/tag/"; } else { - ret += "./?tag="; + ret += "/" + user.UName + "/?tag="; } ret += URLEncoder.encode(tags.get(i), "utf-8") + "\">" + tag + "</a>"; } catch (UnsupportedEncodingException e) { @@ -400,7 +400,7 @@ public class PageTemplates { com.juick.Message msg = msgs.get(i); - String tags = msg.Tags.isEmpty() ? "" : formatTags(msg.Tags, user); + String tags = msg.Tags.isEmpty() ? "" : formatTags(msg.Tags, msg.User); if (msg.ReadOnly) { tags += " *readonly"; } @@ -426,10 +426,16 @@ public class PageTemplates { txt = formatMessage(msg.Text); } + if (!tags.isEmpty()) { + tags = "<span class=\"msg-tags\">" + tags + "</span>"; + } + out.println(" <li id=\"msg-" + msg.MID + "\" class=\"msg\">"); out.println(" <div class=\"msg-avatar\"><a href=\"/" + msg.User.UName + "/\"><img src=\"//i.juick.com/a/" + msg.User.UID + ".png\" alt=\"" + msg.User.UName + "\"/></a></div>"); + out.println(" <div class=\"msg-cont\">"); + out.println(" <div class=\"msg-menu\"><a href=\"#\" onclick=\"showMessageLinksDialog(" + msg.MID + "); return false\"></a></div>"); out.println(" <div class=\"msg-header\"><a href=\"/" + msg.User.UName + "/\">@" + msg.User.UName + "</a>:" + tags + "</div>"); - out.println(" <div class=\"msg-ts\"><a href=\"/" + msg.User.UName + "/" + msg.MID + "\" title=\"" + msg.TimestampString + " GMT\">" + formatDate(msg.TimeAgo, msg.TimestampString, locale) + "</a><a href=\"#\" onclick=\"showMessageLinksDialog(" + msg.MID + "); return false\" class=\"msg-menu\"></a></div>"); + out.println(" <div class=\"msg-ts\"><a href=\"/" + msg.User.UName + "/" + msg.MID + "\" title=\"" + msg.TimestampString + " GMT\">" + formatDate(msg.TimeAgo, msg.TimestampString, locale) + "</a></div>"); if (msg.Place != null) { out.println(" <div class=\"msg-place\"><a href=\"/places/" + msg.Place.pid + "\">" + msg.Place.name + "</a></div>"); } @@ -453,6 +459,7 @@ public class PageTemplates { out.println(" <div class=\"msg-comment\"><textarea name=\"body\" rows=\"1\" class=\"reply\" placeholder=\"" + rb.getString("Add a comment") + "\" onkeypress=\"postformListener(this.form,event)\"></textarea></div>"); out.println(" </form>"); } + out.println(" </div>"); out.println(" </li>"); } } |