diff options
Diffstat (limited to 'src/java/com')
-rw-r--r-- | src/java/com/juick/http/www/Home.java | 13 | ||||
-rw-r--r-- | src/java/com/juick/http/www/PageTemplates.java | 6 |
2 files changed, 16 insertions, 3 deletions
diff --git a/src/java/com/juick/http/www/Home.java b/src/java/com/juick/http/www/Home.java index c3a93107..41e85c0d 100644 --- a/src/java/com/juick/http/www/Home.java +++ b/src/java/com/juick/http/www/Home.java @@ -106,6 +106,19 @@ public class Home { out.println("<!--noindex-->"); } + if (visitor != null) { + out.println("<form action=\"/post\" method=\"post\" enctype=\"multipart/form-data\" onsubmit=\"return onsubmitNewMessage()\">"); + out.println("<section id=\"newmessage\">"); + out.println(" <textarea name=\"body\" placeholder=\"Новое сообщение...\" onclick=\"$('#newmessage>div').css('display','block')\" onkeypress=\"postformListener(this.form,event)\"></textarea>"); + out.println(" <div>"); + out.println(" <input type=\"text\" class=\"tags\" name=\"tags\" placeholder=\"Теги (через пробел)\"/>"); + out.println(" <div class=\"attach-photo\" onclick=\"attachCommentPhoto(this)\"></div>"); + out.println(" <input type=\"submit\" class=\"subm\" value=\"Отправить\"/>"); + out.println(" </div>"); + out.println("</section>"); + out.println("</form>"); + } + if (mids.size() > 0) { int ad_mid = 0; if (visitor != null && (paramShow == null || paramShow.equals("top") || paramShow.equals("all"))) { diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java index bb89ea4d..a6d278bf 100644 --- a/src/java/com/juick/http/www/PageTemplates.java +++ b/src/java/com/juick/http/www/PageTemplates.java @@ -52,9 +52,9 @@ public class PageTemplates { out.println("<!DOCTYPE html>"); out.print("<html>"); out.print("<head>"); - out.print("<link rel=\"stylesheet\" href=\"/style.2014030803.css\"/>"); + out.print("<link rel=\"stylesheet\" href=\"/style.2014031100.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=\"/scripts.2014030801.js\" defer=\"defer\"></script>"); + out.print("<script type=\"text/javascript\" src=\"/scripts.2014031200.js\" defer=\"defer\"></script>"); if (headers != null) { out.print(headers); } @@ -87,7 +87,7 @@ public class PageTemplates { out.print("<li><a href=\"/?show=recommended\">Рекомендации</a></li>"); out.println("</ul></nav>"); out.print(" <nav id=\"actions\"><ul>"); - out.print("<li><a href=\"/post\">Написать</a></li>"); + out.print("<li><a href=\"/#post\">Написать</a></li>"); out.print("<li><a href=\"/" + visitor.UName + "\">@" + visitor.UName + "</a></li>"); out.print("<li><a href=\"/logout\">Выйти</a></li>"); out.println("</ul></nav>"); |