diff options
author | Ugnich Anton | 2014-03-17 07:03:13 +0700 |
---|---|---|
committer | Ugnich Anton | 2014-03-17 07:03:13 +0700 |
commit | afe7ff2701d4940a0413557ff03379779c47750c (patch) | |
tree | c0543575811ce20a79f015d8bbb60b57916df4ba | |
parent | 4fb2d4cad66b24efff2913c3058e2ed581bbef39 (diff) |
Page width 1024px; small improvements
-rw-r--r-- | src/java/com/juick/http/www/Home.java | 2 | ||||
-rw-r--r-- | src/java/com/juick/http/www/PageTemplates.java | 8 | ||||
-rw-r--r-- | web/scripts3.js | 4 | ||||
-rw-r--r-- | web/style3.css | 24 |
4 files changed, 21 insertions, 17 deletions
diff --git a/src/java/com/juick/http/www/Home.java b/src/java/com/juick/http/www/Home.java index 41e85c0d..6d60bfaf 100644 --- a/src/java/com/juick/http/www/Home.java +++ b/src/java/com/juick/http/www/Home.java @@ -109,7 +109,7 @@ public class Home { 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(" <textarea name=\"body\" placeholder=\"Новое сообщение...\" onclick=\"$('#newmessage>div').css('display','block');$('#newmessage textarea').css('min-height','70px');\" 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>"); diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java index a6d278bf..88366ce0 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.2014031100.css\"/>"); + out.print("<link rel=\"stylesheet\" href=\"/style.2014031700.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.2014031200.js\" defer=\"defer\"></script>"); + out.print("<script type=\"text/javascript\" src=\"/scripts.2014031201.js\" defer=\"defer\"></script>"); if (headers != null) { out.print(headers); } @@ -201,7 +201,7 @@ public class PageTemplates { PreparedStatement stmt = null; ResultSet rs = null; try { - stmt = sql.prepareStatement("SELECT users.id,users.nick,COUNT(users_refs.user_id) AS cnt FROM users INNER JOIN users_refs ON users.id=users_refs.ref GROUP BY users_refs.ref ORDER BY cnt DESC LIMIT 10"); + stmt = sql.prepareStatement("SELECT users.id,users.nick,COUNT(users_refs.user_id) AS cnt FROM users INNER JOIN users_refs ON users.id=users_refs.ref WHERE users.id>2 GROUP BY users_refs.ref ORDER BY cnt DESC LIMIT 10"); rs = stmt.executeQuery(); rs.beforeFirst(); while (rs.next()) { @@ -501,7 +501,7 @@ public class PageTemplates { out.println("<article data-mid=\"" + msg.MID + "\">"); out.println(" <aside><a href=\"/" + msg.User.UName + "/\"><img src=\"//i.juick.com/a/" + msg.User.UID + ".png\" alt=\"" + msg.User.UName + "\"/></a></aside>"); out.println(" <header class=\"u\">@<a href=\"/" + msg.User.UName + "/\">" + msg.User.UName + "</a>:" + tags + "</header>"); - out.println(" <header class=\"t\"><a href=\"/" + msg.User.UName + "/" + msg.MID + "\"><time datetime=\"" + msg.TimestampString + "Z\">" + formatDate(msg.TimeAgo, msg.TimestampString) + "</time></a></header>"); + out.println(" <header class=\"t\"><a href=\"/" + msg.User.UName + "/" + msg.MID + "\"><time datetime=\"" + msg.TimestampString + "Z\" title=\""+msg.TimestampString+" GMT\">" + formatDate(msg.TimeAgo, msg.TimestampString) + "</time></a></header>"); if (msg.AttachmentType != null) { String fname = msg.MID + "." + msg.AttachmentType; out.println(" <p class=\"ir\"><a href=\"//i.juick.com/photos-512/" + fname + "\" onclick=\"return showPhotoDialog('" + fname + "')\"><img src=\"//i.juick.com/photos-512/" + fname + "\" alt=\"\"/></a></p>"); diff --git a/web/scripts3.js b/web/scripts3.js index 626c4020..bf283594 100644 --- a/web/scripts3.js +++ b/web/scripts3.js @@ -54,6 +54,7 @@ function postformListener(formEl,ev) { function unfoldPostForm() { if(window.location.pathname==="/" && window.location.hash==="#post") { $('#newmessage>div').css('display','block'); + $('#newmessage textarea').css('min-height','70px'); $('#newmessage textarea')[0].focus(); } } @@ -169,13 +170,16 @@ function showMessageLinksDialog(mid,rid) { function showPhotoDialog(fname) { var width=$(window).width(); + var height=$(window).height()*0.9; if(width<640) { return true; } else if(width<1280) { openDialog("<a href=\"//i.juick.com/photos-1024/"+fname+"\"><img src=\"//i.juick.com/photos-512/"+fname+"\"/></a>"); + $('#dialogw img').css('max-height',height+'px'); return false; } else { openDialog("<a href=\"//i.juick.com/p/"+fname+"\"><img src=\"//i.juick.com/photos-1024/"+fname+"\"/></a>"); + $('#dialogw img').css('max-height',height+'px'); return false; } } diff --git a/web/style3.css b/web/style3.css index b90d849e..a4591a6f 100644 --- a/web/style3.css +++ b/web/style3.css @@ -1,7 +1,7 @@ html,body,div,h1,h2,ul,li,p,form,input,textarea,pre { margin: 0; padding: 0; } html,input,textarea { font-family: sans-serif; font-size: 12pt; } html { background: #EEEEE5; color: #000; } -body { width: 1010px; margin: 0 auto; } +body { width: 1024px; margin: 0 auto; } h1,h2 { font-weight: normal; } ul { list-style-type: none; } a { text-decoration: none; color: #069; } @@ -10,12 +10,12 @@ hr { height: 1px; background: #CCC; margin: 10px 0; } pre { white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word; } span.u { text-decoration: underline; } -#content, #footer { width: 700px; margin: 15px 0 0 300px; } +#content, #footer { width: 728px; margin: 15px 0 0 286px; } #topwrapper { position: relative; clear: both; } /********/ -body>header { width: 1010px; } +body>header { width: 1024px; } body>header a { color: #000; border-bottom: 1px dotted #666; font-size: 13pt; } #logo { float: left; width: 110px; height: 36px; margin: 7px 25px 0 20px; } @@ -39,7 +39,7 @@ body>header p { color: #000; font-size: 13pt; margin: 12px 0; text-align: center #content>p, #content>h1, #content>h2 { margin: 1em 0; } #newmessage { background: #E5E5E0; padding: 15px; margin-bottom: 20px; text-align: right; } -#newmessage textarea { border: 1px solid #CCC; padding: 4px; width: 660px; resize: vertical; min-height: 14pt; height: 14pt; } +#newmessage textarea { border: 1px solid #CCC; padding: 4px; width: 688px; resize: vertical; min-height: 14pt; height: 14pt; } #newmessage>div { display: none; margin-top: 8px; } #newmessage input { border: 1px solid #CCC; padding: 2px 4px; } #newmessage .tags { width: 400px; float: left; } @@ -52,7 +52,7 @@ article>aside img { width: 48px; height: 48px; } article>header.u { overflow: hidden; display: inline-block; width: 460px; } article>header.t { width: 140px; text-align: right; float: right; } article time { color: #999; font-size: 10pt; border-bottom: 1px dotted #999; } -article p { overflow: hidden; margin: 10px 0 15px 0; } +article p { margin: 10px 0 15px 0; } article p.i { text-align: center; } article p.ir { float: right; margin-left: 10px; margin-bottom: 10px; } article p.ir a { cursor: -webkit-zoom-in; cursor: -moz-zoom-in; } @@ -75,7 +75,7 @@ article input { width: 50px; margin-left: 6px; vertical-align: top; border: 1px .msgthread { margin-bottom: 0; } .msg-avatar { float: left; width: 48px; height: 48px; } .msg-avatar img { width: 48px; height: 48px; vertical-align: top; } -.msg-cont { background: #FFF; margin-left: 58px; padding: 12px 15px; width: 610px; } +.msg-cont { background: #FFF; margin-left: 58px; padding: 12px 15px; width: 640px; } .msg-menu { float: right; width: 16px; height: 16px; } .msg-menu>a { display: block; width: 16px; height: 16px; vertical-align: top; background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAALRQTFRFAAAAldX/ncT/ksj/ltL/nMb/lMn/mcz/l9H/lcr/mZmZmcz/m83/mJiYmZmZmcz/mM7/mpqamsr/l8v/m83/mJiYmM7/l8v/mZmZmcz/mpqamMv/mcz/mM3/ms3/msv/mMv/mMz/mcz/msz/mc3/mMz/mcz/msz/mc3/mcv/mc3/mcv/mcz/mcz/mcz/mcz/mZmZmZmZmcz/mcz/mcz/mcz/mcz/mcz/mcz/mcz/mcz/mZmZiZsGCAAAADx0Uk5TAAwNDhESExQWGC0tLi8yMjQ1NTY4OTk7PDxESktNUVNUd3h5eoGCg4mKmMvMzc7P29zd3uLj7O3u8vT2+A5wCAAAAJFJREFUGBkFwQlCgkAAAMDRxEySkryyzDxSAc+gkvX//2oGAAB42J5COG46AJ+/+SiKxvl1DsyqJyCtZnBXxgDxdxPrHQDZCvvUNIFkalAgtCSXHr1LIqpRt+ifu91zn6hG8YLh7TbEoMAyg8kEsgWaZQzwWDbgvXoG0p83YH7Nx+32a/73AdDZHEIovu4BAMA/t6QMuyHliCkAAAAASUVORK5CYII=") no-repeat; } .msg-header { overflow: hidden; } @@ -89,16 +89,16 @@ article input { width: 50px; margin-left: 6px; vertical-align: top; border: 1px .msg-comments { overflow: hidden; font-size: small; color: #AAA; text-indent: 10px; margin-top: 10px; } .msg-comment { margin: 5px 0; } .ta-wrapper { display: inline-block; border: 1px solid #DDD; } -.msg-comment textarea { width: 604px; padding: 2px; resize: vertical; vertical-align: top; min-height: 12pt; height: 12pt; border: 0; } -.msg-comment .narrow { width: 524px; } -.msg-comment .narrowpm { width: 550px; } +.msg-comment textarea { width: 634px; padding: 2px; resize: vertical; vertical-align: top; min-height: 12pt; height: 12pt; border: 0; } +.msg-comment .narrow { width: 554px; } +.msg-comment .narrowpm { width: 580px; } .attach-photo { display: inline-block; padding: 2px 4px; cursor: pointer; width: 16px; height: 13px; overflow: hidden; background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAANCAQAAAAKsiavAAAAAXNSR0IArs4c6QAAAKRJREFUGNNjZICC6Q5M+xlQwD/HzAMMDEwwLnM9AxqAiDDO/M+AFzCh8B4zhrDwsfAxBjHcggkhm/CY2SDlHYQ5TZD5EoMMmgmMhSnvZnrPfDLzyQyvrPf/CzGs+L2TgYFhBoM0gzTjDAaGX7uwuQG/I1ldGRj+pzM8YXjMmMrAwOGK6cibfy2z3sMdeYpBBTMcHjMU/9zJzsjo8r8DIk1yQGEBAFzpL+AuTCqZAAAAAElFTkSuQmCC") no-repeat 3px 4px; } .attach-photo-active { display: inline-block; padding: 2px 4px; cursor: pointer; width: 16px; height: 13px; overflow: hidden; background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAANCAMAAACXZR4WAAAAAXNSR0IArs4c6QAAAEVQTFRFAAAAAJUAAJ0AAJIAAJkAAJYAAJwAAJcAAJoAAJgAAJkAAJoAAJoAAJgAAJkAAJoAAJkAAJkAAJkAAJkAAJkAAJkAAJkA9z3GXQAAABZ0Uk5TAAwNDg8REkBHSktRU1RVv9jZ2+Lj5OeV7PgAAABSSURBVAhbdcjBFkAgFADRIUlE9Or9/6daUC0cs5pzAXD65niKFSJQv/aChHHcrg4yA9jcILCW4tkbDGRVwfzDhs+yEBqcFsCmBiqHmULSDr0P3JdgDbuscEckAAAAAElFTkSuQmCC") no-repeat 3px 4px; } .msg-comment input { width: 50px; margin-left: 6px; vertical-align: top; border: 1px solid #CCC; background: #EEE; color: #999; } .msg-recomms { margin-top: 10px; overflow: hidden; font-size: small; color: #AAA; text-indent: 10px; } blockquote { border-left: 1px dashed #CCC; margin: 10px 0 10px 10px; padding-left: 10px; } -#mtoolbar { width: 640px; margin-left: 58px; background: #E5E5DD; border-top: 1px solid #CCC; } +#mtoolbar { width: 670px; margin-left: 58px; background: #E5E5DD; border-top: 1px solid #CCC; } #mtoolbar ul, #mtoolbar a { padding: 5px; } #mtoolbar li { display: inline; } #mtoolbar div { display: inline-block; width: 16px; height: 16px; background: url(//static.juick.com/toolbar-icons.png) no-repeat; vertical-align: middle; margin: 5px; } @@ -129,7 +129,7 @@ blockquote { border-left: 1px dashed #CCC; margin: 10px 0 10px 10px; padding-lef /********/ -#column { width: 250px; padding-top: 10px; overflow: hidden; float: left; margin-left: 15px; } +#column { width: 240px; padding-top: 10px; overflow: hidden; float: left; margin-left: 10px; } #column ul, #column p, #column hr { margin: 10px 0; } #column li { margin: 6px 0; } #column .margtop { margin-top: 15px; } @@ -147,7 +147,7 @@ blockquote { border-left: 1px dashed #CCC; margin: 10px 0 10px 10px; padding-lef /********/ #dialogb { position: fixed; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.6; background: #000; z-index: 10; } -#dialogt { position: fixed; top: 0; left: 0; width: 100%; height: 100%; } +#dialogt { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; } #dialogt td { vertical-align: middle; text-align: center; } #dialogw { position: relative; display: inline-block; text-align: left; z-index: 11; } #dialogc { position: absolute; top: -15px; right: -15px; width: 30px; height: 30px; z-index: 12; cursor: pointer; background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAQAAACROWYpAAAEEElEQVQ4y32Va2yTVRzGf23fd10vUNqxsY1dGIyba7BsTgiwhcRkgxHkFkJAuQzIggY0IXGYkKA4DeAQMQTIiIB+MyRAJn7hAxJRJKIRiJgQIhESZxYFEuja9f74oe1aoPh/vrx5z3nO/3qeA0+aBSvW+UaT2VBUb+91HXY3FDUUNZnzDaxYsfBcs2DDpHjqqC1ln07YU79t0oGX+mY1V3dWv1/VWVrqphgTW+EDLBjYS91tZZ/5v+34d1/sijIWv/bw2IXFy2urfKVu7BjP0q0YOCaMWVlzfF7wdJY2mLybzH4/+mpq3cxKrwcHBtanvTqrfK/X97+avCvFUn2xtjDBNJpDn8SGU1Ls+oXVTTUeL8587xYMHKN97fWnlikqnU/UDmWJWUwL/ZKQpPOvTZvg8eLI0W3Y8cyo+3hB4p50MmYLUgC24EdRSTq6rLIaD/Z06SyYuMdWvjnv4TfS+URhahpHYlLwR16gH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