From 8d0ab05f444169e7f73cc0501201b9559b315a07 Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Fri, 13 Aug 2010 15:35:08 -0400 Subject: timb commiting prod changes (dis register, home redir) --- src/site.clj | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/site.clj b/src/site.clj index 4cde45d..e27a485 100644 --- a/src/site.clj +++ b/src/site.clj @@ -248,9 +248,7 @@ ;; Landing (defn landing [session] - (if (session :nick) - (redirect-to "/chat") - (serve-file "static" "index.html"))) + (redirect-to "/chat")) (defn log-login [user_id ip] ;; i'm using do-cmds here because update-values can't deal with stuff like 'last_login = now()' @@ -1161,7 +1159,7 @@ order by count desc limit ? offset ?") (GET "/login" (login session params cookies request)) (GET "/logout" (logout session)) (GET "/register" (serve-static "static" "register.html")) - (GET "/dis-register" (serve-static "static" "registerdis.html")) + (GET "/registerdis" (serve-static "static" "registerdis.html")) (GET "/browser" (browser session)) (GET "/refresh" (validated-refresh session params)) (GET "/tag/:tag" (tagged-dumps session params (request-url request))) -- cgit v1.2.3-70-g09d2 From 0791d4f2c2152c4e88ba6c4527fe354667cacf45 Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Sun, 22 Aug 2010 19:48:17 -0400 Subject: sostler prod commit --- conf/nginx.conf | 2 +- static/css/dump.css | 168 ++++++++++++++++++++++++++++--------------- static/js/fullscreen.js | 23 +++++- static/js/pichat.js | 2 +- static/js/supersized.js | 108 ++++++++++++++++++++++++++++ template/banner.st | 16 +++-- template/banner_dis.st | 6 +- template/chat.st | 22 ++++++ template/fullscreen.ryder.st | 46 ++++++++++++ template/fullscreen.st | 89 ++++++++++++++++++++++- template/fullscreen2.st | 79 ++++++++++++++++++++ template/head.st | 2 +- template/log.st | 8 +-- template/picnic.st | 16 +++++ template/popular.st | 8 +-- template/userlog.st | 8 +-- 16 files changed, 518 insertions(+), 85 deletions(-) create mode 100644 static/js/supersized.js create mode 100644 template/fullscreen.ryder.st create mode 100644 template/fullscreen2.st create mode 100644 template/picnic.st diff --git a/conf/nginx.conf b/conf/nginx.conf index 44967bb..9900c47 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -33,7 +33,7 @@ http { location ~* /(avatars|images)/ { if (!-f $request_filename) { - rewrite ^(.*)$ http://dumpfm.s3.amazonaws.com$1 permanent; + rewrite ^(.*)$ http://dumpfm.s3.amazonaws.com$1 temporary; break; } diff --git a/static/css/dump.css b/static/css/dump.css index 1abf7fa..3f0dea9 100755 --- a/static/css/dump.css +++ b/static/css/dump.css @@ -2062,26 +2062,119 @@ font-size:20px;font-weight:bold;word-spacing:-3px; /*DIS STUFF*/ #dissearchbox{position:absolute;right:55px;display:inline-block;top:19px;} #toptoolsdis{position:absolute;left:155px;display:inline-block;top:2px;} -#disregister{ -left:8; -color:#fff; - position: absolute; -top:-14; -filter:alpha(opacity=90); - -moz-opacity:0.9; - -khtml-opacity: 0.9; - opacity: 0.9;color:#000; -font-size:15px; - padding:0px 5px 0px 0px; - text-decoration:none; - background-color:#fff; +#bar7dis { + right: 142px; + top: -7px; +} + #bar7dis a { + display: block; + border: 1px solid #CCC; + box-shadow:2px 3px 10px #BBB; + height: 16px; + padding: 20px 4px 4px; + text-indent: 0; + width: 16px; + -moz-box-shadow: 2px 3px 10px #BBB; + -webkit-box-shadow: 2px 3px 10px #BBB; + } + #bar7dis a img { + display: block; + margin: 0 auto; + } + #bar7dis a#disregister { + background: #FCF0AD; + border: none; + border-top: 10px solid #f6eaaa; + color: #fe1409; + cursor: pointer;position:absolute; + font-size: 20px;left:-40px; + font-weight: bold; + line-height: 1em; + opacity: 1.0; + padding: 25px 10px 40px; + top: 8px; + width: auto; + -webkit-transform: rotate(-9deg); + -moz-transform: rotate(-9deg); + transform: rotate(-9deg); + } + #bar7dis a#disregister:hover { + background: #E9E74A; + border-top: 10px solid #e1df47; + } +#midtxt{ +padding-left:45px; +padding-right:40px; +padding-bottom:45px; + color: #000; + font: 25px Helvetica, Arial, Sans-Serif; + text-shadow: 1px 1px #eee, 2px 2px #eee, 3px 3px #eee,4px 4px #eee,5px 5px #eee; +text-align: justify; text-justify: newspaper +} +#dis_welcome { + background-image: url(http://dump.fm/static/img/hearts.gif); + position: fixed; + top: 0; + left: 0; + bottom: 0; + right: 0; + opacity: .8; + z-index: 6; + text-align: left; + text-indent: -6000px; + } + #dis_frame { + height: 300px; + overflow-x: hidden; + width: 100%; + } + #dis_content { + background-color: rgba(255, 255, 255, 0.8)!important; + border: 1px solid #CCC; + top: 426px; + box-shadow: 0 3px 10px #110000; + height: auto; + padding: 20px; + position: absolute; + left: 0; + line-height: 1em; + right: 0; + text-align: center; + left:50%; + margin-left: -250px; + width:460px; + /*top: 547px;*/ + z-index: 8; + -moz-box-shadow: 0 3px 10px #110000; + -webkit-box-shadow: 0 3px 10px #110000; + + } + #dis_welcome #dis_content { + display: none; + } + #dis_content a { + color: #3B5998; + } + #dis_content a:hover { text-decoration: underline; } +.divDragTitle { + border: 1px solid #CCC; + border-top: 1px solid #666; + left:50%!important; background:#f0f9ff url(/static/img/fade-blue.png) top center repeat-x; + margin-left: -250px!important; } -#disregister a:link, a:visited { - color:#000; - text-decoration:none; +.divDragContent { + + left:50%!important; + margin-left: -250px!important; + +} + +#dissearchbox { + top: 20px; } + #dislogout7{ top:-1px; height:14px; @@ -2104,46 +2197,3 @@ background-color:#fff; #dislogout7 a:hover{font-size:10px; color:#000; text-shadow: 0px 1px 0px #fff; } -#backgroundPopup{ -display:none; -position:fixed; -_position:absolute; /* hack for internet explorer 6*/ -height:100%; -width:100%; -top:0; -left:0; -background:#000000; -border:1px solid #cecece; -z-index:1; -} -#popupContact{ -display:none; -position:fixed; -_position:absolute; /* hack for internet explorer 6*/ -height:384px; -width:408px; -background:#FFFFFF; -border:2px solid #cecece; -z-index:2; -padding:12px; -font-size:13px; -} -#popupContact h1{ -text-align:left; -color:#6FA5FD; -font-size:22px; -font-weight:700; -border-bottom:1px dotted #D3D3D3; -padding-bottom:2px; -margin-bottom:20px; -} -#popupContactClose{ -font-size:14px; -line-height:14px; -right:6px; -top:4px; -position:absolute; -color:#6fa5fd; -font-weight:700; -display:block; -} diff --git a/static/js/fullscreen.js b/static/js/fullscreen.js index 2cce5a1..cf2d997 100644 --- a/static/js/fullscreen.js +++ b/static/js/fullscreen.js @@ -3,6 +3,20 @@ function initFullscreen(){ refresh() ImageCache = [] SeenImages = {} + $('#tools-button').click(toolsToggle); +} +function toolsToggle(){ + if ($("#msgInputDiv").css("display") == "none") + toolsShow() + else + toolsHide() +} +function toolsShow(){ + $("#msgInputDiv").css("display", "block") + +} +function toolsHide(){ + $("#msgInputDiv").css("display", "none") } function scanMessagesForImages(messages){ @@ -47,4 +61,11 @@ function refresh() { success: onSuccess, error: onError }); -} \ No newline at end of file +} + + + + + + + diff --git a/static/js/pichat.js b/static/js/pichat.js index aebe14e..4f8b47b 100644 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -224,7 +224,7 @@ function buildMsgContent(content) { // isLoading doesn't get passed the right thing by $.map in addMessages function buildMessageDiv(msg, isLoading) { var nick = escapeHtml(msg.nick); - if (nick == 'frakbuddy' && Nick != 'frakbuddy') return; +// if (nick == 'frakbuddy' && Nick != 'frakbuddy') return; removeOldMessages() var msgId = ('msg_id' in msg) ? 'id="message-' + msg.msg_id + '"' : ''; var loadingClass = isLoading ? ' loading' : ''; diff --git a/static/js/supersized.js b/static/js/supersized.js new file mode 100644 index 0000000..7b0e44d --- /dev/null +++ b/static/js/supersized.js @@ -0,0 +1,108 @@ +/* +Supersized - Full Screen Background/Slideshow jQuery Plugin +supersized.1.0.js +February 2009 +By Sam Dunn +www.buildinternet.com / www.onemightyroar.com +*/ +(function($){ + + //Resize image on ready or resize + $.fn.supersized = function() { + + var options = $.extend($.fn.supersized.defaults, $.fn.supersized.options); + + if (options.slideshow == 1){ + setInterval("theslideshow()", options.slideinterval); + } + + $().ready(function() { + $('#supersize').resizenow(); + }); + $(window).bind("resize", function(){ + $('#supersize').resizenow(); + }); + }; + + //Adjust image size + $.fn.resizenow = function() { + + var options = $.extend($.fn.supersized.defaults, $.fn.supersized.options); + + return this.each(function() { + + //Define image ratio & minimum dimensions + var minwidth = options.minsize*(options.startwidth); + var minheight = options.minsize*(options.startheight); + var ratio = options.startheight/options.startwidth; + + //Gather browser and current image size + var imagewidth = $(this).width(); + var imageheight = $(this).height(); + var browserwidth = $(window).width(); + var browserheight = $(window).height(); + + //Check for minimum dimensions + if ((browserheight < minheight) && (browserwidth < minwidth)){ + $(this).height(minheight); + $(this).width(minwidth); + } + else{ + //When browser is taller + if (browserheight > browserwidth){ + imageheight = browserheight; + $(this).height(browserheight); + imagewidth = browserheight/ratio; + $(this).width(imagewidth); + + if (browserwidth > imagewidth){ + imagewidth = browserwidth; + $(this).width(browserwidth); + imageheight = browserwidth * ratio; + $(this).height(imageheight); + } + + } + + //When browser is wider + if (browserwidth >= browserheight){ + imagewidth = browserwidth; + $(this).width(browserwidth); + imageheight = browserwidth * ratio; + $(this).height(imageheight); + + if (browserheight > imageheight){ + imageheight = browserheight; + $(this).height(browserheight); + imagewidth = browserheight/ratio; + $(this).width(imagewidth); + } + } + } + return false; + }); + }; + + $.fn.supersized.defaults = { + startwidth: 640, + startheight: 480, + minsize: .5, + slideshow: 1, + slideinterval: 5000 + }; + +})(jQuery); + +//Slideshow Add-on +function theslideshow() { + + var currentslide = $('#supersize .activeslide'); + + if ( currentslide.length == 0 ) currentslide = $('#supersize :last'); + + var nextslide = currentslide.next().length ? currentslide.next() : $('#supersize :first'); + + nextslide.addClass('activeslide'); + currentslide.removeClass('activeslide'); + +} \ No newline at end of file diff --git a/template/banner.st b/template/banner.st index 5d629ca..7ab45a6 100644 --- a/template/banner.st +++ b/template/banner.st @@ -8,7 +8,10 @@
-
+ $if(!user_nick)$ +
$else$ +
+ $endif$
$if(user_nick)$ @@ -53,7 +56,7 @@ $else$ - The coolest way to share pictures. Click here to get started! + Register $endif$
@@ -81,8 +84,8 @@
$if(user_nick)$ -SUPPORT DUMP.FM! BUY SOME STICKERS!! $else$ Talk with pictures! $endif$ - - dis magazine new style options +SUPPORT DUMP.FM! BUY SOME STICKERS!!- dis magazine new style options $else$ Talk with pictures! $endif$ + $if(isadmin)$ - NAUGHTY BOYS DELIGHT $endif$
@@ -102,6 +105,9 @@ $else$ $form_login()$
$endif$ + + +
previous @@ -114,4 +120,4 @@ $endif$

-
\ No newline at end of file +
diff --git a/template/banner_dis.st b/template/banner_dis.st index 1e075b8..1afc15e 100644 --- a/template/banner_dis.st +++ b/template/banner_dis.st @@ -8,7 +8,7 @@ $else$ $endif$ - +
@@ -35,7 +35,7 @@ $else$ $else$ - Register + Register $endif$
@@ -118,7 +118,7 @@ $if(!user_nick)$

- If you already have an account, . If not, register now. + If you already have an account, . If not, register now.

diff --git a/template/chat.st b/template/chat.st index 21ae381..f4c4162 100644 --- a/template/chat.st +++ b/template/chat.st @@ -71,6 +71,28 @@ $if(dis)$ $banner_dis()$ $else$ $banner()$ + $if(!user_nick)$ + +
+

+ If you already have an account, . If not, register now. +

+
+
+ + +
dump.fm lets you talk with pictures! Paste an image url, upload, or snap a pic right from your webcam. Talk to friends, fav images, and keep track of the pix you love! +
+
+
+ + + + +$endif$ $endif$ diff --git a/template/fullscreen.ryder.st b/template/fullscreen.ryder.st new file mode 100644 index 0000000..83d5ae0 --- /dev/null +++ b/template/fullscreen.ryder.st @@ -0,0 +1,46 @@ + + + + + $head()$ + $roomname$ dump.fm + + + + + + + +$messages: { m | +
+
+ +
+}$ +
+ + \ No newline at end of file diff --git a/template/fullscreen.st b/template/fullscreen.st index 906cbe6..0ae2952 100644 --- a/template/fullscreen.st +++ b/template/fullscreen.st @@ -1,17 +1,102 @@ +$head()$ +dump.fm - fullscreen + + + +$if(user_nick)$ + +$endif$ + -
+
waiting 4 new image from dump.fm.............
+ + + + + + +$messages: { m | +
+
+ $m.content$ +
+ +}$ + + + \ No newline at end of file diff --git a/template/head.st b/template/head.st index e5b03c8..4171858 100644 --- a/template/head.st +++ b/template/head.st @@ -28,6 +28,6 @@ $endif$ diff --git a/template/log.st b/template/log.st index c747305..5a36611 100644 --- a/template/log.st +++ b/template/log.st @@ -39,15 +39,15 @@
$if(prev)$ - + $else$ - + $endif$ $if(next)$ - + $else$ - + $endif$ diff --git a/template/picnic.st b/template/picnic.st new file mode 100644 index 0000000..e53af50 --- /dev/null +++ b/template/picnic.st @@ -0,0 +1,16 @@ + + DIS/dump - 8/14/10 PICNIC + $head()$ + + + + +
+ +
+ + + \ No newline at end of file diff --git a/template/popular.st b/template/popular.st index b48a999..65eeece 100644 --- a/template/popular.st +++ b/template/popular.st @@ -28,15 +28,15 @@
$if(prev)$ - + $else$ - + $endif$ $if(next)$ - + $else$ - + $endif$
diff --git a/template/userlog.st b/template/userlog.st index 5c925fd..0019499 100644 --- a/template/userlog.st +++ b/template/userlog.st @@ -28,15 +28,15 @@
$if(prev)$ - + $else$ - + $endif$ $if(next)$ - + $else$ - + $endif$
-- cgit v1.2.3-70-g09d2 From 5bc995cc19ea506b7b4888f849b4c1895547cf02 Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Mon, 23 Aug 2010 03:48:21 -0400 Subject: fixed bad nginx config file --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 9900c47..30e083e 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -33,7 +33,7 @@ http { location ~* /(avatars|images)/ { if (!-f $request_filename) { - rewrite ^(.*)$ http://dumpfm.s3.amazonaws.com$1 temporary; + rewrite ^(.*)$ http://dumpfm.s3.amazonaws.com$1; break; } -- cgit v1.2.3-70-g09d2