aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Igor Ustyugov2016-09-04 11:30:27 +0500
committerGravatar Vitaly Takmazov2016-09-04 23:43:04 +0300
commitc3422c2c08510dbb7443c63b88adf1587deb8f76 (patch)
tree15b6f448a25f83c4ed05cdf1b8ab392c62230990 /juick-www/src/main/java/com/juick
parent26ed351bbc59767be8ce2500cbb5250de63df5c9 (diff)
Fix avatar/timestamp on small display
Diffstat (limited to 'juick-www/src/main/java/com/juick')
-rw-r--r--juick-www/src/main/java/com/juick/www/PageTemplates.java7
-rw-r--r--juick-www/src/main/java/com/juick/www/UserThread.java34
2 files changed, 23 insertions, 18 deletions
diff --git a/juick-www/src/main/java/com/juick/www/PageTemplates.java b/juick-www/src/main/java/com/juick/www/PageTemplates.java
index a036ecba..ea201b85 100644
--- a/juick-www/src/main/java/com/juick/www/PageTemplates.java
+++ b/juick-www/src/main/java/com/juick/www/PageTemplates.java
@@ -320,11 +320,12 @@ public class PageTemplates {
}
out.println("<article data-mid=\"" + msg.getMID() + "\">");
- out.println(" <aside><a href=\"/" + msg.getUser().getUName() + "/\"><img src=\"//i.juick.com/a/" + msg.getUser().getUID() + ".png\" alt=\"" + msg.getUser().getUName() + "\"/></a></aside>");
out.println(" <header class=\"u\">");
- out.println(" <header class=\"t\"><a href=\"/" + msg.getUser().getUName() + "/" + msg.getMID() + "\"><time datetime=\"" + sdfSQL.format(msg.getDate()) + "Z\" title=\"" + sdfSQL.format(msg.getDate()) + " GMT\">" + formatDate(msg.TimeAgo, msg.getDate()) + "</time></a></header>");
out.println(" @<a href=\"/" + msg.getUser().getUName() + "/\">" + msg.getUser().getUName() + "</a>:");
- out.println(" <div class=\"tags\">" + tagsStr + "</div>");
+ out.println(" <div class=\"msg-avatar\"><a href=\"/" + msg.getUser().getUName() + "/\"><img src=\"//i.juick.com/a/" + msg.getUser().getUID() + ".png\" alt=\"" + msg.getUser().getUName() + "\"/></a></div>");
+ out.println(" <div class=\"msg-ts\"><a href=\"/" + msg.getUser().getUName() + "/" + msg.getMID() + "\"><time datetime=\"" + sdfSQL.format(msg.getDate()) + "Z\" title=\"" + sdfSQL.format(msg.getDate()) + " GMT\">" + formatDate(msg.TimeAgo, msg.getDate()) + "</time></a></div>");
+
+ out.println(" <div class=\"msg-tags\">" + tagsStr + "</div>");
out.println(" </header>");
if (msg.AttachmentType != null) {
diff --git a/juick-www/src/main/java/com/juick/www/UserThread.java b/juick-www/src/main/java/com/juick/www/UserThread.java
index c3228e17..8325cf53 100644
--- a/juick-www/src/main/java/com/juick/www/UserThread.java
+++ b/juick-www/src/main/java/com/juick/www/UserThread.java
@@ -279,16 +279,18 @@ public class UserThread {
}
out.println("\">");
out.println(" <div class=\"msg-cont\">");
- out.println(" <div class=\"msg-menu\"><a href=\"#\" class=\"a-thread-links\"></a></div>");
- out.println(" <div class=\"msg-ts\"><a href=\"/" + msg.getMID() + "#" + msg.getRID() + "\" title=\"" + PageTemplates.sdfSQL.format(msg.getDate()) + " GMT\">" + PageTemplates.formatDate(msg.TimeAgo, msg.getDate()) + "</a></div>");
- if (!msg.getUser().Banned) {
- out.println(" <div class=\"msg-avatar\"><a href=\"/" + msg.getUser().getUName() + "/\"><img src=\"//i.juick.com/a/" + msg.getUser().getUID() + ".png\" alt=\"" + msg.getUser().getUName() + "\"/></a></div>");
- out.println(" <div class=\"msg-header\">@<a href=\"/" + msg.getUser().getUName() + "/\">" + msg.getUser().getUName() + "</a>:</div>");
+ out.println(" <div class=\"msg-header\">");
+ if (!msg.getUser().Banned) {
+ out.println(" @<a href=\"/" + msg.getUser().getUName() + "/\">" + msg.getUser().getUName() + "</a>:");
+ out.println(" <div class=\"msg-avatar\"><a href=\"/" + msg.getUser().getUName() + "/\"><img src=\"//i.juick.com/a/" + msg.getUser().getUID() + ".png\" alt=\"" + msg.getUser().getUName() + "\"/></a></div>");
} else {
- out.println(" <div class=\"msg-avatar\"><img src=\"//i.juick.com/av-96.png\"/></div>");
- out.println(" <div class=\"msg-header\">[удалено]:</div>");
+ out.println(" [удалено]:");
+ out.println(" <div class=\"msg-avatar\"><img src=\"//i.juick.com/av-96.png\"/></div>");
}
- out.println(" <div class=\"msg-txt\">" + Utils.formatMessage(msg.getText()) + "</div>");
+ out.println(" <div class=\"msg-menu\"><a href=\"#\" class=\"a-thread-links\"></a></div>");
+ out.println(" <div class=\"msg-ts\"><a href=\"/" + msg.getMID() + "#" + msg.getRID() + "\" title=\"" + PageTemplates.sdfSQL.format(msg.getDate()) + " GMT\">" + PageTemplates.formatDate(msg.TimeAgo, msg.getDate()) + "</a></div>");
+ out.println(" </div>");
+ out.println(" <div class=\"msg-txt\">" + Utils.formatMessage(msg.getText()) + "</div>");
if (msg.AttachmentType != null) {
out.println(" <div class=\"msg-media\"><a href=\"//i.juick.com/p/" + msg.getMID() + "-" + msg.getRID() + "." + msg.AttachmentType + "\"><img src=\"//i.juick.com/photos-512/" + msg.getMID() + "-" + msg.getRID() + "." + msg.AttachmentType + "\" alt=\"\"/></a></div>");
}
@@ -319,16 +321,18 @@ public class UserThread {
for (Message msg : replies) {
out.print(" <li id=\"" + msg.getRID() + "\" class=\"msg\">");
out.println(" <div class=\"msg-cont\">");
- out.println(" <div class=\"msg-menu\"><a href=\"#\" class=\"a-thread-links\"></a></div>");
- out.println(" <div class=\"msg-ts\"><a href=\"/" + msg.getMID() + "#" + msg.getRID() + "\" title=\"" + PageTemplates.sdfSQL.format(msg.getDate()) + " GMT\">" + PageTemplates.formatDate(msg.TimeAgo, msg.getDate()) + "</a></div>");
+ out.println(" <div class=\"msg-header\">");
if (!msg.getUser().Banned) {
- out.println(" <div class=\"msg-avatar\"><a href=\"/" + msg.getUser().getUName() + "/\"><img src=\"//i.juick.com/a/" + msg.getUser().getUID() + ".png\" alt=\"" + msg.getUser().getUName() + "\"/></a></div>");
- out.println(" <div class=\"msg-header\">@<a href=\"/" + msg.getUser().getUName() + "/\">" + msg.getUser().getUName() + "</a>:</div>");
+ out.println(" @<a href=\"/" + msg.getUser().getUName() + "/\">" + msg.getUser().getUName() + "</a>:");
+ out.println(" <div class=\"msg-avatar\"><a href=\"/" + msg.getUser().getUName() + "/\"><img src=\"//i.juick.com/a/" + msg.getUser().getUID() + ".png\" alt=\"" + msg.getUser().getUName() + "\"/></a></div>");
} else {
- out.println(" <div class=\"msg-avatar\"><img src=\"//i.juick.com/av-96.png\"/></div>");
- out.println(" <div class=\"msg-header\">[удалено]:</div>");
+ out.println(" [удалено]:");
+ out.println(" <div class=\"msg-avatar\"><img src=\"//i.juick.com/av-96.png\"/></div>");
}
- out.println(" <div class=\"msg-txt\">" + Utils.formatMessage(msg.getText()) + "</div>");
+ out.println(" <div class=\"msg-menu\"><a href=\"#\" class=\"a-thread-links\"></a></div>");
+ out.println(" <div class=\"msg-ts\"><a href=\"/" + msg.getMID() + "#" + msg.getRID() + "\" title=\"" + PageTemplates.sdfSQL.format(msg.getDate()) + " GMT\">" + PageTemplates.formatDate(msg.TimeAgo, msg.getDate()) + "</a></div>");
+ out.println(" </div>");
+ out.println(" <div class=\"msg-txt\">" + Utils.formatMessage(msg.getText()) + "</div>");
if (msg.AttachmentType != null) {
out.println(" <div class=\"msg-media\"><a href=\"//i.juick.com/p/" + msg.getMID() + "-" + msg.getRID() + "." + msg.AttachmentType + "\"><img src=\"//i.juick.com/photos-512/" + msg.getMID() + "-" + msg.getRID() + "." + msg.AttachmentType + "\" alt=\"\"/></a></div>");
}