diff options
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/PageTemplates.java')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/PageTemplates.java | 18 |
1 files changed, 11 insertions, 7 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 be9a024c..69b37e9b 100644 --- a/juick-www/src/main/java/com/juick/www/PageTemplates.java +++ b/juick-www/src/main/java/com/juick/www/PageTemplates.java @@ -59,7 +59,7 @@ public class PageTemplates { out.print("<html>"); out.print("<head>"); out.println("<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">"); - out.print("<link rel=\"stylesheet\" href=\"/style.css\"/>"); + out.print("<link rel=\"stylesheet\" href=\"/style.css?v=1\"/>"); out.print("<script type=\"text/javascript\" src=\"/scripts.js\"></script>"); if (headers != null) { out.print(headers); @@ -190,7 +190,7 @@ public class PageTemplates { for (Tag tag : tags) { String tagName = tag.getName().replaceAll("<", "<").replaceAll(">", ">"); try { - ret += " *<a href=\"/tag/" + URLEncoder.encode(tag.getName(), "utf-8") + "\""; + ret += "<a href=\"/tag/" + URLEncoder.encode(tag.getName(), "utf-8") + "\""; if (tag.UsageCnt < 2) { ret += " rel=\"nofollow\""; } @@ -417,13 +417,13 @@ public class PageTemplates { List<Tag> tags = MessagesQueries.getMessageTags(sql, msg.getMID()); String tagsStr = formatTags(tags); if (msg.ReadOnly) { - tagsStr += " *readonly"; + tagsStr += "<a>readonly</a>"; } if (msg.Privacy < 0) { - tagsStr += " *friends"; + tagsStr += "<a>friends</a>"; } if (msg.getMID() == ad_mid) { - tagsStr += " *реклама"; + tagsStr += "<a>реклама</a>"; } String txt; @@ -435,8 +435,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\">@<a href=\"/" + msg.getUser().getUName() + "/\">" + msg.getUser().getUName() + "</a>:" + tagsStr + "</header>"); - 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(" <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(" </header>"); + if (msg.AttachmentType != null) { String fname = msg.getMID() + "." + msg.AttachmentType; out.println(" <p class=\"ir\"><a href=\"//i.juick.com/photos-512/" + fname + "\" data-fname=\"" + fname + "\"><img src=\"//i.juick.com/photos-512/" + fname + "\" alt=\"\"/></a></p>"); |