diff options
author | 2012-10-23 01:44:58 +0700 | |
---|---|---|
committer | 2012-10-23 01:44:58 +0700 | |
commit | 9b94011a09685dec1b1b38fef8294c6ffa578079 (patch) | |
tree | ab6808f9f10a29628d9bb93905b1fcd3c2887b43 /web | |
parent | adfc38138808eede6bcc29a706c9191e7d2d84fe (diff) |
JS/CSS optimization
Diffstat (limited to 'web')
-rw-r--r-- | web/scripts3.js | 64 | ||||
-rw-r--r-- | web/style3.css | 4 |
2 files changed, 37 insertions, 31 deletions
diff --git a/web/scripts3.js b/web/scripts3.js index 13686067..853734ed 100644 --- a/web/scripts3.js +++ b/web/scripts3.js @@ -2,12 +2,13 @@ function inlinevideo(mid) { var flashvars={ file:'http://i.juick.com/video/'+mid+'.mp4', image:'http://i.juick.com/thumbs/'+mid+'.jpg', - skin:'http://static.juick.com/glow.zip' + skin:'http://static.juick.com/glow.zip', + autostart:'true' }; var params={ allowfullscreen:'true' }; - swfobject.embedSWF('http://static.juick.com/player.swf','video-'+mid,'640','390','9.0.115','false',flashvars,params,null); + swfobject.embedSWF('http://static.juick.com/player.swf','video-'+mid,'512','384','9.0.115','false',flashvars,params,null); } function postformListener(formEl,ev) { @@ -62,33 +63,6 @@ function unfoldReply() { } } -$(document).ready(function() { - var tareply=$('textarea.reply'); - tareply.autoResize({ - extraSpace: 0, - minHeight: 1 - }); - tareply.click(function () { - $(this).addClass("narrow"); - $(this).after('<input type="submit" value="OK"/>'); - $(this).off('click'); - }); - - if(!!$('.stickya').offset()) { - var stickyTop = $('.stickya').offset().top; - $(window).scroll(function() { - var windowTop = $(window).scrollTop(); - if (stickyTop < windowTop) { - $('.stickya').css({ - position:'fixed' - }); - } else { - $('.stickya').css('position','absolute'); - } - }); - } -}); - /* * jQuery.fn.autoResize 1.14 */ @@ -364,3 +338,35 @@ $(document).ready(function() { }; })(jQuery); + +/******************************************************************************/ + +$(document).ready(function() { + var tareply=$('textarea.reply'); + tareply.autoResize({ + extraSpace: 0, + minHeight: 1 + }); + tareply.click(function () { + $(this).addClass("narrow"); + $(this).after('<input type="submit" value="OK"/>'); + $(this).off('click'); + }); + + if(!!$('.stickya').offset()) { + var stickyTop = $('.stickya').offset().top; + $(window).scroll(function() { + var windowTop = $(window).scrollTop(); + if (stickyTop < windowTop) { + $('.stickya').css({ + position:'fixed' + }); + } else { + $('.stickya').css('position','absolute'); + } + }); + } + + unfoldReply(); + $(window).bind('hashchange',unfoldReply); +}); diff --git a/web/style3.css b/web/style3.css index ea2fca98..e528454f 100644 --- a/web/style3.css +++ b/web/style3.css @@ -1,5 +1,5 @@ html,body,h1,h2,ul,li,form,input,textarea { margin: 0; padding: 0; } -html { font-family: sans-serif; font-size: 16px; } +html,input { font-family: sans-serif; font-size: 12pt; } h1,h2 { font-weight: normal; } ul { list-style-type: none; } a { text-decoration: none; } @@ -63,7 +63,7 @@ img { border: none; } #content .msg-links { font-size: small; margin: 8px 0 0 68px; } #content .msg-comments { margin: 10px 0 0 58px; padding: 5px 0 0 10px; overflow: hidden; font-size: small; border-top: 1px solid; } #content .msg-comment { margin: 8px 0 0 58px; } -#content .msg-comment textarea { border: 1px solid; width: 505px; padding: 2px; resize: vertical; vertical-align: top; } +#content .msg-comment textarea { border: 1px solid; width: 505px; padding: 2px; resize: vertical; vertical-align: top; min-height: 12pt; height: 12pt; } #content .msg-comment textarea.narrow { width: 450px; } #content .msg-comment input { border: 1px solid; width: 50px; margin-left: 6px; vertical-align: top; } #content .msg-recomms { margin: 10px 0 0 68px; padding: 0; overflow: hidden; font-size: small; } |