diff options
| author | tim b <timb@camcompu.home> | 2010-04-03 21:11:45 -0700 |
|---|---|---|
| committer | tim b <timb@camcompu.home> | 2010-04-03 21:11:45 -0700 |
| commit | 7114b29dca66ac9032a74255fa9c7bb37e333fdc (patch) | |
| tree | 60153fb300568b34f173cf3c230e197b84cd8415 | |
| parent | d32d26065494ccbd4a9ddba0789003e3daa5fa28 (diff) | |
| parent | 4479097093127a20a40a9dceb604bf4290c09a2d (diff) | |
committing stuff so i can merge pulled repo
| -rwxr-xr-x | bin/repl.bat | 2 | ||||
| -rwxr-xr-x | bin/repl.sh | 2 | ||||
| -rw-r--r-- | db/0-create.psql | 3 | ||||
| -rwxr-xr-x | lib/clojure-contrib.jar | bin | 2945084 -> 3292187 bytes | |||
| -rwxr-xr-x | lib/clojure.jar | bin | 1534952 -> 1846856 bytes | |||
| -rw-r--r-- | lib/mail-1.4.4.jar | bin | 0 -> 482977 bytes | |||
| -rw-r--r-- | src/email.clj | 68 | ||||
| -rw-r--r-- | src/site.clj | 38 | ||||
| -rw-r--r-- | static/4chanbeta.gif | bin | 0 -> 748 bytes | |||
| -rw-r--r-- | static/4chanbeta.png | bin | 0 -> 2981 bytes | |||
| -rwxr-xr-x | static/css/browser.css | 83 | ||||
| -rw-r--r-- | static/css/directory.css | 10 | ||||
| -rwxr-xr-x | static/css/dump.css | 23 | ||||
| -rw-r--r-- | static/css/dumpnewuser.css | 2 | ||||
| -rwxr-xr-x | static/css/header.css | 264 | ||||
| -rw-r--r-- | static/css/index.css | 231 | ||||
| -rw-r--r-- | static/css/log.css | 12 | ||||
| -rw-r--r-- | static/css/pages.css | 14 | ||||
| -rwxr-xr-x | static/css/profile.css | 18 | ||||
| -rw-r--r-- | static/css/win.css | 4 | ||||
| -rw-r--r-- | static/form_login/front.css | 5 | ||||
| -rw-r--r-- | static/img/ako.gif | bin | 0 -> 780 bytes | |||
| -rw-r--r-- | static/img/aol_suck.gif | bin | 0 -> 10645 bytes | |||
| -rwxr-xr-x | static/img/bg-btn-blue.png | bin | 0 -> 411 bytes | |||
| -rw-r--r-- | static/img/bg-btn-red.png | bin | 0 -> 237 bytes | |||
| -rw-r--r-- | static/img/blurbs/beingpostednow.png | bin | 0 -> 21890 bytes | |||
| -rw-r--r-- | static/img/blurbs/imageboard.png | bin | 0 -> 21716 bytes | |||
| -rw-r--r-- | static/img/blurbs/posthere.png | bin | 0 -> 19883 bytes | |||
| -rw-r--r-- | static/img/blurbs/signinblurb.png | bin | 0 -> 8264 bytes | |||
| -rw-r--r-- | static/img/blurbs/uploadstuff.png | bin | 0 -> 18830 bytes | |||
| -rw-r--r-- | static/img/blurbs/userlisthelp.png | bin | 0 -> 26365 bytes | |||
| -rw-r--r-- | static/img/blurbs/webcamhelp.png | bin | 0 -> 19159 bytes | |||
| -rw-r--r-- | static/img/btngrad1.png | bin | 0 -> 199 bytes | |||
| -rw-r--r-- | static/img/cambutton.png | bin | 0 -> 3868 bytes | |||
| -rw-r--r-- | static/img/chanbg.png | bin | 0 -> 218 bytes | |||
| -rwxr-xr-x | static/img/dblue2.png | bin | 0 -> 289 bytes | |||
| -rw-r--r-- | static/img/delishicon.png | bin | 0 -> 136 bytes | |||
| -rw-r--r-- | static/img/directory.gif | bin | 0 -> 740 bytes | |||
| -rw-r--r-- | static/img/door.gif | bin | 0 -> 323 bytes | |||
| -rw-r--r-- | static/img/dot.gif | bin | 0 -> 832 bytes | |||
| -rw-r--r-- | static/img/dumpcats2.png | bin | 0 -> 908489 bytes | |||
| -rw-r--r-- | static/img/dumpclearlogo.png | bin | 0 -> 3004 bytes | |||
| -rw-r--r-- | static/img/dumpclouds.png | bin | 0 -> 38490 bytes | |||
| -rw-r--r-- | static/img/dumpteam.gif | bin | 0 -> 39721 bytes | |||
| -rw-r--r-- | static/img/fade-blue.png | bin | 0 -> 172 bytes | |||
| -rw-r--r-- | static/img/fbbutton.png | bin | 0 -> 607 bytes | |||
| -rw-r--r-- | static/img/flyhorse.gif | bin | 0 -> 145367 bytes | |||
| -rw-r--r-- | static/img/geocities.gif | bin | 0 -> 12892 bytes | |||
| -rw-r--r-- | static/img/guaranteed_customer_satisfaction.gif | bin | 0 -> 5921 bytes | |||
| -rw-r--r-- | static/img/hearts.gif | bin | 0 -> 962 bytes | |||
| -rw-r--r-- | static/img/html_3_2.gif | bin | 0 -> 4471 bytes | |||
| -rw-r--r-- | static/img/hugescreen.png | bin | 0 -> 35913 bytes | |||
| -rw-r--r-- | static/img/image_draw.gif | bin | 0 -> 169 bytes | |||
| -rw-r--r-- | static/img/log.gif | bin | 0 -> 112 bytes | |||
| -rw-r--r-- | static/img/moverc.png | bin | 0 -> 171 bytes | |||
| -rw-r--r-- | static/img/newanim.gif | bin | 0 -> 419 bytes | |||
| -rw-r--r-- | static/img/noinfo.png | bin | 0 -> 52768 bytes | |||
| -rw-r--r-- | static/img/profile.gif | bin | 0 -> 125 bytes | |||
| -rw-r--r-- | static/img/signin.gif | bin | 0 -> 3915 bytes | |||
| -rwxr-xr-x | static/img/spinner.gif | bin | 0 -> 1849 bytes | |||
| -rw-r--r-- | static/img/thumbs_up_sm.gif | bin | 0 -> 91 bytes | |||
| -rw-r--r-- | static/img/tumblricon.gif | bin | 0 -> 567 bytes | |||
| -rw-r--r-- | static/img/tumblricon.png | bin | 0 -> 503 bytes | |||
| -rw-r--r-- | static/img/tvfun.gif | bin | 0 -> 1775 bytes | |||
| -rw-r--r-- | static/img/twittericon.png | bin | 0 -> 659 bytes | |||
| -rw-r--r-- | static/img/upbutton.png | bin | 0 -> 3820 bytes | |||
| -rw-r--r-- | static/img/upload.png | bin | 0 -> 206 bytes | |||
| -rw-r--r-- | static/img/urlbutton.png | bin | 0 -> 2879 bytes | |||
| -rw-r--r-- | static/img/valid_html.gif | bin | 0 -> 231 bytes | |||
| -rw-r--r-- | static/img/vxhtml.gif | bin | 0 -> 7445 bytes | |||
| -rw-r--r-- | static/img/welcomebanner.gif | bin | 0 -> 908 bytes | |||
| -rw-r--r-- | static/index.css | 231 | ||||
| -rwxr-xr-x | static/index.html | 226 | ||||
| -rwxr-xr-x | static/js/FancyZoom.js | 761 | ||||
| -rwxr-xr-x | static/js/FancyZoomHTML.js | 0 | ||||
| -rwxr-xr-x[-rw-r--r--] | static/js/away.js | 0 | ||||
| -rwxr-xr-x | static/js/dumpsearch.js | 39 | ||||
| -rwxr-xr-x | static/js/home.js | 28 | ||||
| -rw-r--r-- | static/js/jquery.js | 171 | ||||
| -rw-r--r-- | static/js/jquery.mousewheel.js | 85 | ||||
| -rw-r--r-- | static/js/pichat.js | 294 | ||||
| -rw-r--r-- | template/directory.st | 7 | ||||
| -rw-r--r-- | template/mail/welcome.st | 5 |
83 files changed, 2178 insertions, 448 deletions
diff --git a/bin/repl.bat b/bin/repl.bat index 79a0aaf..5ab0646 100755 --- a/bin/repl.bat +++ b/bin/repl.bat @@ -1,3 +1,3 @@ REM Windows REPL script SHIFT -java -Xmx256m -server -cp lib/commons-io-1.4.jar;lib/commons-fileupload-1.2.1.jar;lib/commons-codec-1.3.jar;lib/clojure.jar;lib/clojure-contrib.jar;lib/compojure-3.2v1.jar;lib/jetty-6.1.14.jar;lib/jetty-util-6.1.14.jar;lib/servlet-api-2.5-6.1.14.jar;lib/jline-0.9.94.jar;lib/postgresql-8.4-701.jdbc4.jar;lib/stringtemplate-3.2.1.jar;lib/antlr-2.7.7.jar;src/ jline.ConsoleRunner clojure.main -i %0 -r %* +java -Xmx256m -server -cp lib/commons-io-1.4.jar;lib/commons-fileupload-1.2.1.jar;lib/commons-codec-1.3.jar;lib/clojure.jar;lib/clojure-contrib.jar;lib/compojure-3.2v1.jar;lib/jetty-6.1.14.jar;lib/jetty-util-6.1.14.jar;lib/servlet-api-2.5-6.1.14.jar;lib/jline-0.9.94.jar;lib/postgresql-8.4-701.jdbc4.jar;lib/stringtemplate-3.2.1.jar;lib/antlr-2.7.7.jar;lib/mail-1.4.4.jar;src/ jline.ConsoleRunner clojure.main -i %0 -r %* diff --git a/bin/repl.sh b/bin/repl.sh index d4beeda..5fc36b8 100755 --- a/bin/repl.sh +++ b/bin/repl.sh @@ -1,3 +1,3 @@ #!/bin/sh -java -Xmx256m -server -cp .:lib/commons-io-1.4.jar:lib/commons-fileupload-1.2.1.jar:lib/commons-codec-1.3.jar:lib/jline-0.9.94.jar:lib/clojure.jar:lib/clojure-contrib.jar:lib/compojure-3.2v1.jar:lib/jetty-6.1.14.jar:lib/jetty-util-6.1.14.jar:lib/servlet-api-2.5-6.1.14.jar:lib/postgresql-8.4-701.jdbc4.jar:lib/stringtemplate-3.2.1.jar:lib/antlr-2.7.7.jar:src/ jline.ConsoleRunner clojure.main -i $1 -r $@ +java -Xmx256m -server -cp .:lib/commons-io-1.4.jar:lib/commons-fileupload-1.2.1.jar:lib/commons-codec-1.3.jar:lib/jline-0.9.94.jar:lib/clojure.jar:lib/clojure-contrib.jar:lib/compojure-3.2v1.jar:lib/jetty-6.1.14.jar:lib/jetty-util-6.1.14.jar:lib/servlet-api-2.5-6.1.14.jar:lib/postgresql-8.4-701.jdbc4.jar:lib/stringtemplate-3.2.1.jar:lib/antlr-2.7.7.jar:lib/mail-1.4.4.jar:src/ jline.ConsoleRunner clojure.main -i $1 -r $@ diff --git a/db/0-create.psql b/db/0-create.psql index 28d9b45..cad20e9 100644 --- a/db/0-create.psql +++ b/db/0-create.psql @@ -9,7 +9,8 @@ CREATE TABLE users ( is_admin boolean NOT NULL DEFAULT false, avatar text NOT NULL DEFAULT '', contact text NOT NULL DEFAULT '', - bio text NOT NULL DEFAULT '' + bio text NOT NULL DEFAULT '', + profile_bg text ); CREATE TABLE rooms ( diff --git a/lib/clojure-contrib.jar b/lib/clojure-contrib.jar Binary files differindex aca1fec..883638d 100755 --- a/lib/clojure-contrib.jar +++ b/lib/clojure-contrib.jar diff --git a/lib/clojure.jar b/lib/clojure.jar Binary files differindex fce575b..eefb8fc 100755 --- a/lib/clojure.jar +++ b/lib/clojure.jar diff --git a/lib/mail-1.4.4.jar b/lib/mail-1.4.4.jar Binary files differnew file mode 100644 index 0000000..c4fc4c8 --- /dev/null +++ b/lib/mail-1.4.4.jar diff --git a/src/email.clj b/src/email.clj new file mode 100644 index 0000000..2a68e7b --- /dev/null +++ b/src/email.clj @@ -0,0 +1,68 @@ +(ns email + (:import org.antlr.stringtemplate.StringTemplateGroup) + (:require [clojure.contrib.str-utils2 :as str-utils2])) + +(defn base-mail [& m] + (let [mail (apply hash-map m) + props (java.util.Properties.)] + + (doto props + (.put "mail.smtp.host" (:host mail)) + (.put "mail.smtp.port" (:port mail)) + (.put "mail.smtp.user" (:user mail)) + (.put "mail.smtp.socketFactory.port" (:port mail)) + (.put "mail.smtp.auth" "true")) + + (if (= (:ssl mail) true) + (doto props + (.put "mail.smtp.starttls.enable" "true") + (.put "mail.smtp.socketFactory.class" + "javax.net.ssl.SSLSocketFactory") + (.put "mail.smtp.socketFactory.fallback" "false"))) + + (let [authenticator (proxy [javax.mail.Authenticator] [] + (getPasswordAuthentication + [] + (javax.mail.PasswordAuthentication. + (:user mail) (:password mail)))) + session (javax.mail.Session/getDefaultInstance props authenticator) + msg (javax.mail.internet.MimeMessage. session)] + + (.setFrom msg (javax.mail.internet.InternetAddress. (:user mail))) + (doseq [to (:to mail)] + (.setRecipients msg + (javax.mail.Message$RecipientType/TO) + (javax.mail.internet.InternetAddress/parse to))) + (.setSubject msg (:subject mail)) + (.setText msg (:text mail)) + (javax.mail.Transport/send msg)))) + +(def mail-templates (new StringTemplateGroup "dumpfm-mail" "template/mail")) +(.setRefreshInterval mail-templates 3) + +(defn parse-mail-template [temp props] + (let [st (.getInstanceOf mail-templates temp)] + (doseq [[k v] props] + (.setAttribute st k v)) + (let [[s b] (.split (.toString st) "\\n" 2)] + [(.trim (.replaceFirst s "SUBJECT: " "")) + (.trim b)]))) + +(defn dump-mail [to subject text] + (base-mail :user "info@dump.fm" + :password "dumprulez7" + :host "smtpout.secureserver.net" + :port 25 + :ssl false + :to to + :subject subject + :text text)) + +(defn send-registration-email [nick email] + (let [[s b] (parse-mail-template "welcome" {"nick" nick})] + (dump-mail [email] s b))) + +(defn send-reset-email [nick email key] + (let [[s b] (parse-mail-template "reset" {"nick" nick "key" key})] + (dump-mail [email] s b))) + diff --git a/src/site.clj b/src/site.clj index 7f8e22c..eb6d153 100644 --- a/src/site.clj +++ b/src/site.clj @@ -15,6 +15,7 @@ clojure.contrib.sql clojure.contrib.str-utils compojure + email utils cookie-login session-sweeper @@ -367,6 +368,7 @@ [:nick :hash :email] [nick hash email]) (let [db-user (fetch-nick nick)] + (send-registration-email nick email) [(session-assoc-from-db db-user) (resp-success "OK")]))))) @@ -433,7 +435,8 @@ (defn directory-search [offset] (let [directory @*directory-listing* users (subvec directory - (* offset *per-directory-page*) + (min (count directory) + (* offset *per-directory-page*)) (min (count directory) (* (inc offset) *per-directory-page*))) user-ids (apply str (interpose ", " (map #(%1 :user_id) users))) @@ -448,17 +451,19 @@ ORDER BY created_on DESC LIMIT 1)")] (when (> (count user-ids) 0) (let [res (do-select [qry]) - keys (map :user_id res) - dict (zipmap keys res)] + keys (map :user_id res) + res-dict (zipmap keys res)] (map (fn [u] (let [u-id (u :user_id)] - (process-directory-listing (merge u (dict u-id))))) + (process-directory-listing (merge u (res-dict u-id))))) users))))) (defn update-directory! [] (let [qry "SELECT u.user_id, COUNT(m) as cnt FROM users u, messages m WHERE u.user_id = m.user_id + AND m.room_id = 1 + AND m.is_image = true GROUP BY u.user_id ORDER BY COUNT(m) DESC" res (vec (do-select [qry]))] @@ -482,6 +487,8 @@ (cond (= offset 0) (.setAttribute st "prev" false) (= offset 1) (.setAttribute st "prev" "") :else (.setAttribute st "prev" (str "/" (dec offset)))) + (if (> offset 0) + (.setAttribute st "cur" offset)) (.setAttribute st "next" (str "/" (inc offset))) (if (zero? (count @*directory-listing*)) (.setAttribute st "notloaded" true)) @@ -711,11 +718,24 @@ (log session (@rooms room-key) offset params) (resp-error "UNKNOWN_ROOM"))) +;; Account resets + +(defn reset-page [session] + ) + +(defn reset-account-request! [session params] + ) + +(defn reset-account! [session key] + ) + ;; Upload (def *max-image-height* 2000) (def *max-image-width* 2000) +(def *max-avatar-height* 2000) +(def *max-avatar-width* 2000) (def *vip-max-file-size* (mbytes 5)) ; don't be nuts guys (def *max-file-size* (kbytes 750)) (def *ignore-size-limit-for-vip* true) @@ -778,10 +798,6 @@ (not (validate-room-access room-key session)) [200 "UNKNOWN_ROOM"] :else (do-upload session image (@rooms room-key))))) -(defn copy-and-resize [image dest] - ; TODO: resize - (copy image dest)) - ;; N.B. -- Upload responses aren't JSON-evaluated (defn do-upload-avatar [session image] (let [filename (format-filename (:filename image) (session :nick)) @@ -789,7 +805,7 @@ dest (open-file [*avatar-directory* date] filename) url (image-url-from-file "avatars" date dest)] (do - (copy-and-resize (:tempfile image) dest) + (copy (:tempfile image) dest) (update-user-db (session :user_id) "avatar" url) [(session-assoc :avatar url) [200 url]]))) @@ -851,6 +867,7 @@ (-> request :route-params :room) (-> request :route-params :offset) params)) + ;; TODO: add form tokens for all destructive actions (POST "/msg" (validated-msg session params)) (POST "/submit-registration" (register session params)) (POST "/update-profile" (update-profile session params)) @@ -860,6 +877,9 @@ (GET "/directory" (directory session 0)) (GET "/directory/:offset" (directory session (maybe-parse-int (-> request :route-params :offset) 0))) + (GET "/reset" (reset-page session)) + (POST "/reset-request" (reset-account-request! session params)) + (POST "/reset/:key" (reset-account! session (-> request :route-params :key))) (GET "/about_us" (serve-template "about_us" session)) (GET "/goodies" (serve-template "goodies" session)) (GET "/help" (serve-template "help" session)) diff --git a/static/4chanbeta.gif b/static/4chanbeta.gif Binary files differnew file mode 100644 index 0000000..4bd5499 --- /dev/null +++ b/static/4chanbeta.gif diff --git a/static/4chanbeta.png b/static/4chanbeta.png Binary files differnew file mode 100644 index 0000000..913fc65 --- /dev/null +++ b/static/4chanbeta.png diff --git a/static/css/browser.css b/static/css/browser.css index d2edaf0..fcf48f2 100755 --- a/static/css/browser.css +++ b/static/css/browser.css @@ -4,7 +4,7 @@ font-size:13; font-family:"Trebuchet MS", Arial, Helvetica, sans-serif; margin:2%; - background:#EEF2FF url(/static/fade-blue.png) top center repeat-x; + background:#EEF2FF url(/static/img/fade-blue.png) top center repeat-x; background-repeat:repeat-x; background-position:top; @@ -21,7 +21,7 @@ } #description {display:none;width:790px;} #description div, .post, .result {} - #description p > p,#description p {margin:0;line-height:1;width:800;} + #description p > p,#description p {margin:0;line-height:1;width:auto;} #description img {float:left;margin:0 12px 12px 0;} table.search{font-family:Verdana,Arial,Helvetica,sans-serif;text-align:left;font-size:11px;color:#333} .gsc-trailing-more-results,.gsc-resultsHeader, @@ -31,11 +31,10 @@ table.search{font-family:Verdana,Arial,Helvetica,sans-serif;text-align:left;font .gsc-control{width:600;height:30;padding:0px;padding-left:0;}select, label{font:bold 11px Arial,Helvetica,sans-serif;color:#003;text-transform:uppercase;margin-right:5px;} input#q{width:400;height:25px;font:bold Arial,Helvetica,sans-serif;color:#F00;} input#submit{ - width:100px; height:28px; font-size:20px; -background-image:url(/static/bg-btn-blue.png); +background-image:url(/static/img/bg-btn-blue.png); text-align:center; z-index:100; cursor:pointer; @@ -55,7 +54,7 @@ border:1px solid #f0e0d6; -webkit-box-shadow: 0 0 10px #d8dbde, 0px 0px 10px #d8dbde; -moz-box-shadow: 0 0 10px #d8dbde, 0px 0px 10px #d8dbde; background-color:#ffffee; - background-image:url(/static/chanbg.png); + background-image:url(/static/img/chanbg.png); background-repeat:repeat-x; border-top-left-radius:15px; border-top-right-radius:15px; @@ -172,7 +171,7 @@ filter: progid:DXImageTransform.Microsoft.dropShadow(color=#eee, offX=3, offY=4, height:35px; right:0px; font-size:20px; -background-image:url(/static/bg-btn-blue.png); +background-image:url(/static/img/bg-btn-blue.png); top:15px; text-align:center; z-index:100; @@ -259,7 +258,7 @@ text-decoration:none; display:block; width:100%; height:100%; -background-image:url(/static/moverc.png); +background-image:url(/static/img/moverc.png); background-repeat:repeat-x; color:#fff; text-decoration:none; @@ -327,76 +326,6 @@ background-color:#f3f3f3; } -#binfo { - font-family: Arial, Helvetica, sans-serif; - font-size: 11px; - bottom - #chatrap{ - top: 105px; - left:0px; - position:absolute; - width: 100%; - padding-bottom:20px; -} -#chatrap{ - top: 105px; - left:0px; - position:absolute; - width: 100%; - padding-bottom:20px; -} - -#input { - padding-right:15px; - line-height:22px; - font-size: 12px; -} - #loghead { - border-bottom:0px; - padding-left: -50px; - margin-right:60%; - width:70%; - letter-spacing:-3px; - color:#504F61; - height:28px; - font-size:33px; - font-family:Arial, Helvetica, sans-serif; - font-weight:bold; - text-transform:capitalize; - text-shadow: -6px 4px 4px #ccc; - padding-bottom:12px; - left: -40px; - background-color: #FFF; - top: 80px; - position: fixed; - } - -#logc -{ - margin-right:10%; - margin-left:10%; - background-color:#FFF; - padding-left: 40px; - padding-bottom: 30px; - padding-top: 15px; -} - - - #profile { - float: right; - border:1px solid #000; - padding: 20px; - width: 180px; - margin-right:15%; - background-color:#FFF; - background-image:url(/static/cloudbg2.png); - background-position:center; - z-index:10; - border-top-right-radius:5px; - -webkit-border-top-right-radius:5px; - -moz-border-radius-topright:5px; - min-height:600px; - } #chatrap{ top: 105px; left:0px; diff --git a/static/css/directory.css b/static/css/directory.css index d9be85b..0ca097d 100644 --- a/static/css/directory.css +++ b/static/css/directory.css @@ -112,7 +112,7 @@ color:fff; text-shadow: 1px 1px 1px #000; padding-right:8; text-transform:uppercase; - background-image:url(/static/upload.png); + background-image:url(/static/img/upload.png); margin-top:-54; text-indent:5; } @@ -136,7 +136,7 @@ text-indent:6; -moz-border-radius-bottomright:5px; height:32; text-transform:capitalize; - background-image:url(/static/upload.png); + background-image:url(/static/img/upload.png); } @@ -170,7 +170,7 @@ width:73; height:32; padding:2; border:1px; - background-image:url(/static/upload.png); + background-image:url(/static/img/upload.png); border-top-left-radius:5px; border-top-right-radius:5px; -webkit-border-top-left-radius:5px; @@ -362,13 +362,13 @@ font-size:60%; } #headerbar{ top:80; - background-image:url(/static/welcomebar.gif); + background-image:url(/static/img/welcomebar.gif); } .invisible { display: none !important; } body,td,th { font-family: Arial, Helvetica, sans-serif; background-color:#ffffee; - background-image:url(/static/chanbg.png); + background-image:url(/static/img/chanbg.png); background-repeat:repeat-x; background-position:top; background-attachment:fixed; diff --git a/static/css/dump.css b/static/css/dump.css index 36f3231..36739a4 100755 --- a/static/css/dump.css +++ b/static/css/dump.css @@ -2,7 +2,7 @@ body { -background:#EEF2FF url(/static/fade-blue.png) top center repeat-x; +background:#EEF2FF url(/static/img/fade-blue.png) top center repeat-x; margin:0; background-repeat:repeat-x; @@ -61,6 +61,16 @@ right:2; bottom:30; } +#effects-msg{ +position:fixed; +bottom:68; +z-index:1111; +right:38; +font-size:15; +color:#000; +text-shadow: #000 1px 1px 1px; + +} #footerc { text-align:center; @@ -159,7 +169,7 @@ margin-right:374; height:35px; right:260px; font-size:20px; -background-image:url(/static/urlbutton.png); +background-image:url(/static/img/urlbutton.png); text-indent:27; top:15px; @@ -194,7 +204,8 @@ text-indent:28; background-color:#0c8fff; font-size:12px; color:#fff; -background-image:url(/static/cambutton.png); + +background-image:url(/static/img/cambutton.png); text-shadow:1px 1px 3px rgba(0,0,0,1); } @@ -220,7 +231,7 @@ padding-bottom:4; background-color:yellow; font-size:17px; color:#fff; -background-image:url(/static/bg-btn-red.png); +background-image:url(/static/img/bg-btn-red.png); text-shadow:1px 1px 3px rgba(0,0,0,1); } #webcam-button-snap.blink{ @@ -285,7 +296,7 @@ text-indent:24; background-color:#0c8fff; font-size:12px; color:#fff; -background-image:url(/static/upbutton.png); +background-image:url(/static/img/upbutton.png); text-shadow:1px 1px 3px rgba(0,0,0,1); } @@ -363,7 +374,7 @@ text-decoration:none; display:block; width:100%; height:100%; -background-image:url(/static/moverc.png); +background-image:url(/static/img/moverc.png); background-repeat:repeat-x; color:#fff; text-decoration:none; diff --git a/static/css/dumpnewuser.css b/static/css/dumpnewuser.css index 313c228..492b4ac 100644 --- a/static/css/dumpnewuser.css +++ b/static/css/dumpnewuser.css @@ -2,7 +2,7 @@ body { -background:#EEF2FF url(/static/fade-blue.png) top center repeat-x; +background:#EEF2FF url(/static/img/fade-blue.png) top center repeat-x; margin:0; background-repeat:repeat-x; diff --git a/static/css/header.css b/static/css/header.css new file mode 100755 index 0000000..e3a3653 --- /dev/null +++ b/static/css/header.css @@ -0,0 +1,264 @@ +.share-buttons{ +cursor:pointer; +width:100; +} + +.white a:link { + text-decoration: none; + font-size:14px; + + color: #fff; +} +.white a:visited { + text-decoration: none; + font-size:14px; + color: #fff; +} +#strapline{position:absolute; +top:-775; +right:0; +opacity:0.0; +margin-right:80%; + +} +.white a:hover { + text-decoration: none; + text-shadow: 1px 1px 1px #000; + + color: #fff; +} +.white a:active { + text-decoration: none; + + + color: #fff; +} + +#header7{ + background-image:url(/static/dblue2.png); + background-attachment:inherit; + margin: 0px auto -1px auto; + top: 0px; +height:49; + position:fixed; +background-position:7 -14; +background-repeat:repeat-x; + width:100%; + left: 0px; + +} +#bar7{ + top:8px; + position:absolute; + word-spacing:-1; + font-size: 16px; +height:22; +width:455; +color:#fff; +text-indent:14; +line-height:1.9; +font-weight:bold; + left: 140px; + margin-left: 1.1%; + margin-right: 8%; + letter-spacing:.2px; + z-index: 999; +} +#bar7 img{ +margin-top:4; + vertical-align: top; +} +#bar7 a{ + text-decoration: none; + text-shadow: 1px 1px 1px #000; + font-size:13; +padding:6; + color: #fff; +} +#bar7 a:hover{ + text-decoration: none; + text-shadow: 1px 1px 1px #000,2px 2px 1px #f0e; +padding:6; +background-image:url(/static/img/upload.png); + color: #fff; + +} +#logout7{ + top:-1px; + position:relative; + font-size:12px; + margin-right: 5px; + float:right; + z-index: 9999999999999999; + + font-family: Arial, Helvetica, sans-serif; + font-weight: normal; +} +#logout7 a{font-size:11px; +} +#logout7 a:hover{font-size:11px; +color:#fff; +text-shadow: 0px 0px 0.3px #fff; +} +a { + font-size: 12px; + color: #000; +} +a:link { + text-decoration: none; +} +a:visited { + text-decoration: none; + color: #000; +} +a:hover { + text-decoration: none; + color: #00F; +} +a:active { + text-decoration: none; + color: #000; +} +.white a:link { + text-decoration: none; + font-size:14px; + + color: #fff; +} +.white a:visited { + text-decoration: none; + font-size:14px; + color: #fff; +} +#logo7{ + margin-left: 3px; + margin-right: 10%; + z-index:1050; + float:left; + margin-top: -4px; +} +#logo7 a{font-size:42; +font-weight:bold; + + + + text-shadow: 2px 3px 1px #f0e, 3px 3px 1px #fff; +letter-spacing:-4; +color:#fff; + +} +#logo7 a:hover{ + + text-shadow: 1px 1px 1px #000, 2px 3px 1px #f0e; +color:#fff; +} + +#vippp{ + top:0px; + position:absolute; + font-family: Arial, Helvetica, sans-serif; + background-image:url(/static/20bar7.ng); + font-size: 12px; +height:30; +word-spacing:2; +color:#fff; +text-indent:14; +line-height:1.8; + text-shadow: -1px 1px 0px #; + right:65px; +text-transform:capatalize; + margin-right:0; + letter-spacing:.2px; + z-index: 999; +} +#vippp a{color:fff;font-size:11; +} +#vippp a:hover{color:fff; +text-shadow: 0px 0px 0.3px #fff; +} +#rapper7{ + top: 0px; + left:0px; + position:absolute; + width: 100%; + height: 62px; + z-index: 1000; +} +#logoicons{ +width:auto; + +} +#landscape{ +position:absolute; +width:auto; +display:none; +margin-left:55%; +top:-38; +opacity:0.8; +z-index:2; +} +#welcomeinternet{ +position:absolute; +width:auto; +left:190; +margin-left:29%; +top:-19; +display:none; +z-index:3; +} + +#topnav { + padding:10px 0px 12px; + font-size:11px; + line-height:23px; + text-align:right; +} +#topnav a.signin { + background:#88bbd4; + padding:4px 6px 6px; + text-decoration:none; + font-weight:bold; + color:#fff; + -webkit-border-radius:4px; + -moz-border-radius:4px; + border-radius:4px; + *background:transparent url("images/signin-nav-bg-ie.png") no-repeat 0 0; + *padding:4px 12px 6px; +} +#topnav a.signin:hover { + background:#59B; + *background:transparent url("images/signin-nav-bg-hover-ie.png") no-repeat 0 0; + *padding:4px 12px 6px; +} +#topnav a.signin, #topnav a.signin:hover { + *background-position:0 3px!important; +} +#register{ + top:-5px; + position:absolute; + font-size: 16px; +height:22; + +word-spacing:2; +width:365; +color:#fff; +text-indent:14; +line-height:1.9; +font-weight:bold; + left: -140; + margin-left: 1.2%; + margin-right: 8%; + letter-spacing:.2px; + z-index: 999; +} + +.no-cursor { cursor: none; } +.invisible { display: none !important; } +#cursor-big { position: absolute; z-index: 1000; } + +#iesucks{ +background-image:url(/static/ieburnbtn.gif); font-size:40;color:white;height:100%;width:100%;z-index:1000000000000000000000000000000;padding-top:100; +padding-right:400;padding-left:50; +font-weight:bold; + +}
\ No newline at end of file diff --git a/static/css/index.css b/static/css/index.css new file mode 100644 index 0000000..680fe8a --- /dev/null +++ b/static/css/index.css @@ -0,0 +1,231 @@ + + + +body { + background:#EEF2FF url(/static/img/fade-blue.png) top center repeat-x; + background-repeat:repeat-x; + background-position:top; + margin:6%; +} +#preload { + position: absolute; + left: 0px; + top: 0px; +} +#main { + width:460px; + margin: 0 auto 0 auto; + padding: 19px 0; + border-radius: 15px; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border:solid 2px #000; + position: relative; + box-shadow: 0 0 10px #d8dbde, 0px 0px 10px #d8dbde; + -webkit-box-shadow: 0 0 10px #d8dbde, 0px 0px 10px #d8dbde; + -moz-box-shadow: 0 0 10px #d8dbde, 0px 0px 10px #d8dbde; +} +#logo-and-text { + position: relative; + z-index: 20; + padding-bottom: 20px; +} + +#horse { + position: absolute; + z-index: 10; + top: 12px; + left: 140px; +} +#remember{ + +} +#customer { + position: absolute; + left: -90px; + top: -75px; + z-index: 10; + +} +#info { + width:420px; + margin: 11px auto -1px auto; +opacity:0.9; +height:30; + vertical-align: bottom; +} +#dumpednow{ +position:absolute; +height:50px; +width:420px; +top:0px; +} + +p { + font-family: Arial, Helvetica, sans-serif; + font-size: 24px; +} + +.btnav { border: 0px #000 solid;} + +.submit { + + text-shadow: -1px 1px 1px #ccc; + font-size:15px; +} + +input { + height:40px; + width:300px; + border:3px #000; + background:#e3e3e3; + margin:10px; + color:#000; + font-size:30px; + +} +.txt { + font-family:Arial, Helvetica, sans-serif; + font-size:14px; +line-height:1.2; + text-shadow:1px 1px 0.5px #ccc; + word-spacing: 3px; +} + .line { + font-family:Arial, Helvetica, sans-serif; + letter-spacing:0px; +line-height:-1; + color:#000; + font-size:17px; +} + +.no-cursor { cursor: none; } +.invisible { display: none !important; } +#cursor-big { position: absolute; z-index: 1000; } + +#signin-submit { + display:inline-block; + width:300px; + height:33px; + font-size:20px; + background-image:url(/static/img/btngrad1.png); + font-weight:bold; + word-spacing:7; + margin-top:12px; + text-align:center; + z-index:100; + font-size:16px; + color:#fff; + text-shadow:1px 1px 3px #000; + border-radius: 5px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px;*/ + border:solid 1px #eee; +} + +#remembermeInput { + width: 15px; + height: 15px; + margin: 1px; +} + +label { + display: block; + width: 300px; + text-align: right; + font-size: 16px; + color: #222; +} + +/*_____________________________________________ Start - Projects - jCarouselLite _____________________________________________*/ + +#jCarouselLite .carousel { + padding: 10px 0 0 0; + margin: 0 0 20px 10px; + position: relative; +} + #jCarouselLite .digg { + position: absolute; + left: 610px; + top: 110px; + } + #jCarouselLite .main { + margin-left: 40px; + } + + #jCarouselLite .demo em { + color: #FF3300; + font-weight: bold; + font-size: 60%; + font-style: normal; + } + #jCarouselLite .carousel button { /*Don't remove this. we still use this for individual demos. only the front pages use images as of now*/ + float: left; + } + #jCarouselLite .carousel a.prev, #jCarouselLite .carousel a.next { + display: block; + float: left; + width: 30px; + height: 143px; + text-decoration: none; + background: url("/image/imageNavLeft.gif") left 60px no-repeat; + } + #jCarouselLite .carousel a.next { + background: url("/image/imageNavRight.gif") right 60px no-repeat; + } + #jCarouselLite .carousel a.next:hover { + background-image: url("/image/imageNavRightHover.gif"); + } + #jCarouselLite .carousel a.prev:hover { + background-image: url("/image/imageNavLeftHover.gif"); + } + #jCarouselLite .carousel a:hover, #jCarouselLite .carousel a:active { + border: none; + outline: none; + } + #jCarouselLite .carousel .jCarouselLite { + border: 1px solid black; + float: left; + background-color: #dfdfdf; + + /* Needed for rendering without flicker */ + position: relative; + visibility: hidden; + left: -5000px; + } + #jCarouselLite .carousel ul { + margin: 0; + } + #jCarouselLite .carousel li img, + #jCarouselLite .carousel li p { + background-color: #fff; + width: 150px; + height: 118px; + margin: 10px; + } + + #jCarouselLite .widget img { + cursor: pointer; + } + #jCarouselLite .mid { + margin-left: 80px; + width: 400px; + height: 300px; + } + #jCarouselLite .vertical { + margin-left: 170px; + } + #jCarouselLite .vertical .jCarouselLite { /* so that in IE 6, the carousel div doesnt expand to fill the space */ + width: 170px; + } + #jCarouselLite .imageSlider li img, + #jCarouselLite .imageSlider li p, + #jCarouselLite .imageSliderExt li img , + #jCarouselLite .imageSliderExt li p { + width: 400px; + height: 300px; + } + +/*_____________________________________________ End - Projects - jCarouselLite _____________________________________________*/ + + diff --git a/static/css/log.css b/static/css/log.css index ea052a9..94acd19 100644 --- a/static/css/log.css +++ b/static/css/log.css @@ -76,7 +76,7 @@ margin-left:22; margin-right: auto ; #cats{ -background-image:url(/static/dumpcats2.png); +background-image:url(/static/img/dumpcats2.png); } @@ -112,7 +112,7 @@ text-indent:6; -moz-border-radius-bottomright:5px; height:32; text-transform:capitalize; - background-image:url(/static/upload.png); + background-image:url(/static/img/upload.png); } @@ -126,7 +126,7 @@ width:96; height:32; padding:2; border:1px; - background-image:url(/static/upload.png); + background-image:url(/static/img/upload.png); border-top-left-radius:5px; border-top-right-radius:5px; -webkit-border-top-left-radius:5px; @@ -342,7 +342,7 @@ height:auto; margin-top:-100px; width:600; - background-image:url(/static/dumpcats2.png); + background-image:url(/static/img/dumpcats2.png); margin-left:40} #newuser a{font-size:28; @@ -401,13 +401,13 @@ font-size:60%; } #headerbar{ top:80; - background-image:url(/static/welcomebar.gif); + background-image:url(/static/img/welcomebar.gif); } .invisible { display: none !important; } body,td,th { font-family: Arial, Helvetica, sans-serif; background-color:#ffffee; - background-image:url(/static/chanbg.png); + background-image:url(/static/img/chanbg.png); background-repeat:repeat-x; background-position:top; background-attachment:fixed; diff --git a/static/css/pages.css b/static/css/pages.css index c5fcf3a..a24e102 100644 --- a/static/css/pages.css +++ b/static/css/pages.css @@ -10,7 +10,7 @@ top:150; margin-right: auto ; #cats{ -background-image:url(/static/dumpcats2.png); +background-image:url(/static/img/dumpcats2.png); } @@ -21,7 +21,7 @@ display:inline-block; width:181px; height:33px; font-size:20px; - background-image:url(/static/btngrad1.png); + background-image:url(/static/img/btngrad1.png); font-weight:bold; word-spacing:7; margin-top:0; @@ -69,7 +69,7 @@ text-indent:6; -moz-border-radius-bottomright:5px; height:32; text-transform:capitalize; - background-image:url(/static/upload.png); + background-image:url(/static/img/upload.png); } @@ -83,7 +83,7 @@ width:96; height:32; padding:2; border:1px; - background-image:url(/static/upload.png); + background-image:url(/static/img/upload.png); border-top-left-radius:5px; border-top-right-radius:5px; -webkit-border-top-left-radius:5px; @@ -296,7 +296,7 @@ height:auto; margin-top:-100px; width:600; - background-image:url(/static/dumpcats2.png); + background-image:url(/static/img/dumpcats2.png); margin-left:40} #newuser a{font-size:28; @@ -337,12 +337,12 @@ font-size:60%; } #headerbar{ top:80; - background-image:url(/static/welcomebar.gif); + background-image:url(/static/img/welcomebar.gif); } .invisible { display: none !important; } body{ background-color:#ffffee; - background-image:url(/static/chanbg.png); + background-image:url(/static/img/chanbg.png); background-repeat:repeat-x; background-position:top; background-attachment:fixed; diff --git a/static/css/profile.css b/static/css/profile.css index 25a0eaa..a4d75f9 100755 --- a/static/css/profile.css +++ b/static/css/profile.css @@ -3,7 +3,7 @@ position:absolute; top:0; right:0; height:auto; -background-image:url(/static/upload.png); +background-image:url(/static/img/upload.png); width:auto; padding:2; text-align:center; @@ -89,7 +89,7 @@ margin-top:0; margin-right: auto ; #cats{ -background-image:url(/static/dumpcats2.png); +background-image:url(/static/img/dumpcats2.png); } @@ -100,7 +100,7 @@ display:inline-block; width:181px; height:33px; font-size:20px; - background-image:url(/static/btngrad1.png); + background-image:url(/static/img/btngrad1.png); font-weight:bold; word-spacing:7; margin-top:0; @@ -148,7 +148,7 @@ text-indent:6; -moz-border-radius-bottomright:5px; height:32; text-transform:capitalize; - background-image:url(/static/upload.png); + background-image:url(/static/img/upload.png); } @@ -162,7 +162,7 @@ width:96; height:32; padding:2; border:1px; - background-image:url(/static/upload.png); + background-image:url(/static/img/upload.png); border-top-left-radius:5px; border-top-right-radius:5px; -webkit-border-top-left-radius:5px; @@ -376,7 +376,7 @@ height:auto; margin-top:-100px; width:600; - background-image:url(/static/dumpcats2.png); + background-image:url(/static/img/dumpcats2.png); margin-left:40} #newuser a{font-size:28; @@ -420,14 +420,14 @@ font-size:60%; } #headerbar{ top:80; - background-image:url(/static/welcomebar.gif); + background-image:url(/static/img/welcomebar.gif); } .invisible { display: none !important; } body,td,th { font-family: Arial, Helvetica, sans-serif; background-color:#ffffee; - background-image:url(/static/chanbg.png); - background-repeat:repeat-x; + background-image:url(/static/img/chanbg.png); + background-repeat:repeat-x; background-position:top; background-attachment:fixed; margin: 0; diff --git a/static/css/win.css b/static/css/win.css index 9bf2f90..6b59e51 100644 --- a/static/css/win.css +++ b/static/css/win.css @@ -4,7 +4,7 @@ body { font-family: Arial, Helvetica, sans-serif; background-color:#ffffee; - background-image:url(/static/chanbg.png); + background-image:url(/static/img/chanbg.png); background-repeat:repeat-x; background-position:1 10; background-attachment:fixed; @@ -47,7 +47,7 @@ ul { height: 24px; padding:0; background-color:#fff; -background-image:url(/static/upload.png); +background-image:url(/static/img/upload.png); border:1px solid #999; cursor:move; box-shadow:0px 0px 10px #100; diff --git a/static/form_login/front.css b/static/form_login/front.css index 285dec4..bbb289c 100644 --- a/static/form_login/front.css +++ b/static/form_login/front.css @@ -89,9 +89,10 @@ a.signin.menu-open span { border:1px transparent; text-align:left; padding:12px; - top: 24.5px; + top: 23.5px; right: 0px; margin-top:5px; + margin-right: 0px; *margin-right: -1px; color:#789; @@ -107,7 +108,7 @@ filter: progid:DXImageTransform.Microsoft.dropShadow(color=#ccc, offX=3, offY=4, -webkit-border-radius:4px; border:1px solid #ACE; font-size:13px; - margin:0 0 5px; + margin:0 0 5px;border:1px solid; padding:5px; width:203px; } diff --git a/static/img/ako.gif b/static/img/ako.gif Binary files differnew file mode 100644 index 0000000..3f94cfa --- /dev/null +++ b/static/img/ako.gif diff --git a/static/img/aol_suck.gif b/static/img/aol_suck.gif Binary files differnew file mode 100644 index 0000000..c21eecf --- /dev/null +++ b/static/img/aol_suck.gif diff --git a/static/img/bg-btn-blue.png b/static/img/bg-btn-blue.png Binary files differnew file mode 100755 index 0000000..2f5da4c --- /dev/null +++ b/static/img/bg-btn-blue.png diff --git a/static/img/bg-btn-red.png b/static/img/bg-btn-red.png Binary files differnew file mode 100644 index 0000000..f931fad --- /dev/null +++ b/static/img/bg-btn-red.png diff --git a/static/img/blurbs/beingpostednow.png b/static/img/blurbs/beingpostednow.png Binary files differnew file mode 100644 index 0000000..5087009 --- /dev/null +++ b/static/img/blurbs/beingpostednow.png diff --git a/static/img/blurbs/imageboard.png b/static/img/blurbs/imageboard.png Binary files differnew file mode 100644 index 0000000..7e917f2 --- /dev/null +++ b/static/img/blurbs/imageboard.png diff --git a/static/img/blurbs/posthere.png b/static/img/blurbs/posthere.png Binary files differnew file mode 100644 index 0000000..0e3b8f1 --- /dev/null +++ b/static/img/blurbs/posthere.png diff --git a/static/img/blurbs/signinblurb.png b/static/img/blurbs/signinblurb.png Binary files differnew file mode 100644 index 0000000..1ea58dd --- /dev/null +++ b/static/img/blurbs/signinblurb.png diff --git a/static/img/blurbs/uploadstuff.png b/static/img/blurbs/uploadstuff.png Binary files differnew file mode 100644 index 0000000..8a4c30c --- /dev/null +++ b/static/img/blurbs/uploadstuff.png diff --git a/static/img/blurbs/userlisthelp.png b/static/img/blurbs/userlisthelp.png Binary files differnew file mode 100644 index 0000000..db0fc24 --- /dev/null +++ b/static/img/blurbs/userlisthelp.png diff --git a/static/img/blurbs/webcamhelp.png b/static/img/blurbs/webcamhelp.png Binary files differnew file mode 100644 index 0000000..4c7daf2 --- /dev/null +++ b/static/img/blurbs/webcamhelp.png diff --git a/static/img/btngrad1.png b/static/img/btngrad1.png Binary files differnew file mode 100644 index 0000000..2519e34 --- /dev/null +++ b/static/img/btngrad1.png diff --git a/static/img/cambutton.png b/static/img/cambutton.png Binary files differnew file mode 100644 index 0000000..3cb942e --- /dev/null +++ b/static/img/cambutton.png diff --git a/static/img/chanbg.png b/static/img/chanbg.png Binary files differnew file mode 100644 index 0000000..331f4eb --- /dev/null +++ b/static/img/chanbg.png diff --git a/static/img/dblue2.png b/static/img/dblue2.png Binary files differnew file mode 100755 index 0000000..3b5c667 --- /dev/null +++ b/static/img/dblue2.png diff --git a/static/img/delishicon.png b/static/img/delishicon.png Binary files differnew file mode 100644 index 0000000..3d20478 --- /dev/null +++ b/static/img/delishicon.png diff --git a/static/img/directory.gif b/static/img/directory.gif Binary files differnew file mode 100644 index 0000000..d66a2bf --- /dev/null +++ b/static/img/directory.gif diff --git a/static/img/door.gif b/static/img/door.gif Binary files differnew file mode 100644 index 0000000..da0cca1 --- /dev/null +++ b/static/img/door.gif diff --git a/static/img/dot.gif b/static/img/dot.gif Binary files differnew file mode 100644 index 0000000..339faf7 --- /dev/null +++ b/static/img/dot.gif diff --git a/static/img/dumpcats2.png b/static/img/dumpcats2.png Binary files differnew file mode 100644 index 0000000..34768f4 --- /dev/null +++ b/static/img/dumpcats2.png diff --git a/static/img/dumpclearlogo.png b/static/img/dumpclearlogo.png Binary files differnew file mode 100644 index 0000000..4e5fd6e --- /dev/null +++ b/static/img/dumpclearlogo.png diff --git a/static/img/dumpclouds.png b/static/img/dumpclouds.png Binary files differnew file mode 100644 index 0000000..c0fbd6d --- /dev/null +++ b/static/img/dumpclouds.png diff --git a/static/img/dumpteam.gif b/static/img/dumpteam.gif Binary files differnew file mode 100644 index 0000000..28e7b5b --- /dev/null +++ b/static/img/dumpteam.gif diff --git a/static/img/fade-blue.png b/static/img/fade-blue.png Binary files differnew file mode 100644 index 0000000..4bab239 --- /dev/null +++ b/static/img/fade-blue.png diff --git a/static/img/fbbutton.png b/static/img/fbbutton.png Binary files differnew file mode 100644 index 0000000..4ad2d66 --- /dev/null +++ b/static/img/fbbutton.png diff --git a/static/img/flyhorse.gif b/static/img/flyhorse.gif Binary files differnew file mode 100644 index 0000000..ae9d2ad --- /dev/null +++ b/static/img/flyhorse.gif diff --git a/static/img/geocities.gif b/static/img/geocities.gif Binary files differnew file mode 100644 index 0000000..cb8dd65 --- /dev/null +++ b/static/img/geocities.gif diff --git a/static/img/guaranteed_customer_satisfaction.gif b/static/img/guaranteed_customer_satisfaction.gif Binary files differnew file mode 100644 index 0000000..976d686 --- /dev/null +++ b/static/img/guaranteed_customer_satisfaction.gif diff --git a/static/img/hearts.gif b/static/img/hearts.gif Binary files differnew file mode 100644 index 0000000..4a345cb --- /dev/null +++ b/static/img/hearts.gif diff --git a/static/img/html_3_2.gif b/static/img/html_3_2.gif Binary files differnew file mode 100644 index 0000000..12ef87f --- /dev/null +++ b/static/img/html_3_2.gif diff --git a/static/img/hugescreen.png b/static/img/hugescreen.png Binary files differnew file mode 100644 index 0000000..eb0266f --- /dev/null +++ b/static/img/hugescreen.png diff --git a/static/img/image_draw.gif b/static/img/image_draw.gif Binary files differnew file mode 100644 index 0000000..aaf947c --- /dev/null +++ b/static/img/image_draw.gif diff --git a/static/img/log.gif b/static/img/log.gif Binary files differnew file mode 100644 index 0000000..c6958c7 --- /dev/null +++ b/static/img/log.gif diff --git a/static/img/moverc.png b/static/img/moverc.png Binary files differnew file mode 100644 index 0000000..6d021dd --- /dev/null +++ b/static/img/moverc.png diff --git a/static/img/newanim.gif b/static/img/newanim.gif Binary files differnew file mode 100644 index 0000000..c31f5df --- /dev/null +++ b/static/img/newanim.gif diff --git a/static/img/noinfo.png b/static/img/noinfo.png Binary files differnew file mode 100644 index 0000000..a80724a --- /dev/null +++ b/static/img/noinfo.png diff --git a/static/img/profile.gif b/static/img/profile.gif Binary files differnew file mode 100644 index 0000000..baf313f --- /dev/null +++ b/static/img/profile.gif diff --git a/static/img/signin.gif b/static/img/signin.gif Binary files differnew file mode 100644 index 0000000..5ab623b --- /dev/null +++ b/static/img/signin.gif diff --git a/static/img/spinner.gif b/static/img/spinner.gif Binary files differnew file mode 100755 index 0000000..5b33f7e --- /dev/null +++ b/static/img/spinner.gif diff --git a/static/img/thumbs_up_sm.gif b/static/img/thumbs_up_sm.gif Binary files differnew file mode 100644 index 0000000..b039245 --- /dev/null +++ b/static/img/thumbs_up_sm.gif diff --git a/static/img/tumblricon.gif b/static/img/tumblricon.gif Binary files differnew file mode 100644 index 0000000..40e2b35 --- /dev/null +++ b/static/img/tumblricon.gif diff --git a/static/img/tumblricon.png b/static/img/tumblricon.png Binary files differnew file mode 100644 index 0000000..61a8910 --- /dev/null +++ b/static/img/tumblricon.png diff --git a/static/img/tvfun.gif b/static/img/tvfun.gif Binary files differnew file mode 100644 index 0000000..cf18f3e --- /dev/null +++ b/static/img/tvfun.gif diff --git a/static/img/twittericon.png b/static/img/twittericon.png Binary files differnew file mode 100644 index 0000000..662c731 --- /dev/null +++ b/static/img/twittericon.png diff --git a/static/img/upbutton.png b/static/img/upbutton.png Binary files differnew file mode 100644 index 0000000..8129526 --- /dev/null +++ b/static/img/upbutton.png diff --git a/static/img/upload.png b/static/img/upload.png Binary files differnew file mode 100644 index 0000000..6929ad7 --- /dev/null +++ b/static/img/upload.png diff --git a/static/img/urlbutton.png b/static/img/urlbutton.png Binary files differnew file mode 100644 index 0000000..1fc486b --- /dev/null +++ b/static/img/urlbutton.png diff --git a/static/img/valid_html.gif b/static/img/valid_html.gif Binary files differnew file mode 100644 index 0000000..105505f --- /dev/null +++ b/static/img/valid_html.gif diff --git a/static/img/vxhtml.gif b/static/img/vxhtml.gif Binary files differnew file mode 100644 index 0000000..b417962 --- /dev/null +++ b/static/img/vxhtml.gif diff --git a/static/img/welcomebanner.gif b/static/img/welcomebanner.gif Binary files differnew file mode 100644 index 0000000..080bb61 --- /dev/null +++ b/static/img/welcomebanner.gif diff --git a/static/index.css b/static/index.css new file mode 100644 index 0000000..bae708e --- /dev/null +++ b/static/index.css @@ -0,0 +1,231 @@ + + + +body { + background:#EEF2FF url(/static/fade-blue.png) top center repeat-x; + background-repeat:repeat-x; + background-position:top; + margin:6%; +} +#preload { + position: absolute; + left: 0px; + top: 0px; +} +#main { + width:460px; + margin: 0 auto 0 auto; + padding: 19px 0; + border-radius: 15px; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border:solid 2px #000; + position: relative; + box-shadow: 0 0 10px #d8dbde, 0px 0px 10px #d8dbde; + -webkit-box-shadow: 0 0 10px #d8dbde, 0px 0px 10px #d8dbde; + -moz-box-shadow: 0 0 10px #d8dbde, 0px 0px 10px #d8dbde; +} +#logo-and-text { + position: relative; + z-index: 20; + padding-bottom: 20px; +} + +#horse { + position: absolute; + z-index: 10; + top: 12px; + left: 140px; +} +#remember{ + +} +#customer { + position: absolute; + left: -90px; + top: -75px; + z-index: 10; + +} +#info { + width:420px; + margin: 11px auto -1px auto; +opacity:0.9; +height:30; + vertical-align: bottom; +} +#dumpednow{ +position:absolute; +height:50px; +width:420px; +top:0px; +} + +p { + font-family: Arial, Helvetica, sans-serif; + font-size: 24px; +} + +.btnav { border: 0px #000 solid;} + +.submit { + + text-shadow: -1px 1px 1px #ccc; + font-size:15px; +} + +input { + height:40px; + width:300px; + border:3px #000; + background:#e3e3e3; + margin:10px; + color:#000; + font-size:30px; + +} +.txt { + font-family:Arial, Helvetica, sans-serif; + font-size:14px; +line-height:1.2; + text-shadow:1px 1px 0.5px #ccc; + word-spacing: 3px; +} + .line { + font-family:Arial, Helvetica, sans-serif; + letter-spacing:0px; +line-height:-1; + color:#000; + font-size:17px; +} + +.no-cursor { cursor: none; } +.invisible { display: none !important; } +#cursor-big { position: absolute; z-index: 1000; } + +#signin-submit { + display:inline-block; + width:300px; + height:33px; + font-size:20px; + background-image:url(/static/btngrad1.png); + font-weight:bold; + word-spacing:7; + margin-top:12px; + text-align:center; + z-index:100; + font-size:16px; + color:#fff; + text-shadow:1px 1px 3px #000; + border-radius: 5px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px;*/ + border:solid 1px #eee; +} + +#remembermeInput { + width: 15px; + height: 15px; + margin: 1px; +} + +label { + display: block; + width: 300px; + text-align: right; + font-size: 16px; + color: #222; +} + +/*_____________________________________________ Start - Projects - jCarouselLite _____________________________________________*/ + +#jCarouselLite .carousel { + padding: 10px 0 0 0; + margin: 0 0 20px 10px; + position: relative; +} + #jCarouselLite .digg { + position: absolute; + left: 610px; + top: 110px; + } + #jCarouselLite .main { + margin-left: 40px; + } + + #jCarouselLite .demo em { + color: #FF3300; + font-weight: bold; + font-size: 60%; + font-style: normal; + } + #jCarouselLite .carousel button { /*Don't remove this. we still use this for individual demos. only the front pages use images as of now*/ + float: left; + } + #jCarouselLite .carousel a.prev, #jCarouselLite .carousel a.next { + display: block; + float: left; + width: 30px; + height: 143px; + text-decoration: none; + background: url("/image/imageNavLeft.gif") left 60px no-repeat; + } + #jCarouselLite .carousel a.next { + background: url("/image/imageNavRight.gif") right 60px no-repeat; + } + #jCarouselLite .carousel a.next:hover { + background-image: url("/image/imageNavRightHover.gif"); + } + #jCarouselLite .carousel a.prev:hover { + background-image: url("/image/imageNavLeftHover.gif"); + } + #jCarouselLite .carousel a:hover, #jCarouselLite .carousel a:active { + border: none; + outline: none; + } + #jCarouselLite .carousel .jCarouselLite { + border: 1px solid black; + float: left; + background-color: #dfdfdf; + + /* Needed for rendering without flicker */ + position: relative; + visibility: hidden; + left: -5000px; + } + #jCarouselLite .carousel ul { + margin: 0; + } + #jCarouselLite .carousel li img, + #jCarouselLite .carousel li p { + background-color: #fff; + width: 150px; + height: 118px; + margin: 10px; + } + + #jCarouselLite .widget img { + cursor: pointer; + } + #jCarouselLite .mid { + margin-left: 80px; + width: 400px; + height: 300px; + } + #jCarouselLite .vertical { + margin-left: 170px; + } + #jCarouselLite .vertical .jCarouselLite { /* so that in IE 6, the carousel div doesnt expand to fill the space */ + width: 170px; + } + #jCarouselLite .imageSlider li img, + #jCarouselLite .imageSlider li p, + #jCarouselLite .imageSliderExt li img , + #jCarouselLite .imageSliderExt li p { + width: 400px; + height: 300px; + } + +/*_____________________________________________ End - Projects - jCarouselLite _____________________________________________*/ + + diff --git a/static/index.html b/static/index.html index badf35a..8a24365 100755 --- a/static/index.html +++ b/static/index.html @@ -1,188 +1,37 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" -"http://www.w3.org/TR/html4/strict.dtd"> - -<html><head> -<title>dump.fm</title> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> +<html> + <head> + <title>dump.fm</title> + <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <META NAME="keywords" CONTENT="dump.fm, image chat, realtime, internet 3.0, dump, dump fm, image dump, pictures, image links, image board"> <META NAME="description" CONTENT="Talk with pictures!"> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script type="text/javascript" src="/static/js/sha1.js"></script> <script type="text/javascript" src="/static/js/home.js"></script> +<script type="text/javascript" src="/static/js/jcarousellite_1.0.1.pack.js"></script> <script> $(document).ready(initLoginForm); -function MM_swapImgRestore() { //v3.0 - var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; -} -function MM_preloadImages() { //v3.0 - var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); - var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) - if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} -} - -function MM_findObj(n, d) { //v4.01 - var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { - d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} - if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; - for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); - if(!x && d.getElementById) x=d.getElementById(n); return x; -} - -function MM_swapImage() { //v3.0 - var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) - if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} -} +jQuery(".auto .jCarouselLite").jCarouselLite({ + auto: 800, + speed: 1000 +}); </script> -<link rel="stylesheet" type="text/css" href="static/reset.css"> +<link rel="stylesheet" type="text/css" href="static/css/reset.css"> +<link rel="stylesheet" type="text/css" href="static/css/index.css"> <link rel="shortcut icon" href="static/favicon.ico"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>dump.fm</title></head> -<style type="text/css"> - - - -body { - background:#EEF2FF url(/static/fade-blue.png) top center repeat-x; - background-repeat:repeat-x; - background-position:top; - margin:6%; -} -#preload { - position: absolute; - left: 0px; - top: 0px; -} -#main { - width:460px; - margin: 0 auto 0 auto; - padding: 19px 0; - border-radius: 15px; - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border:solid 1px #fff; - position: relative; - box-shadow: 0 0 10px #d8dbde, 0px 0px 10px #d8dbde; - -webkit-box-shadow: 0 0 10px #d8dbde, 0px 0px 10px #d8dbde; - -moz-box-shadow: 0 0 10px #d8dbde, 0px 0px 10px #d8dbde; -} -#logo-and-text { - position: relative; - z-index: 20; - padding-bottom: 20px; -} - -#horse { - position: absolute; - z-index: 10; - top: 12px; - left: 140px; -} -#remember{ - -} -#customer { - position: absolute; - left: -90px; - top: -75px; - z-index: 10; - -} -#info { - width:420px; - margin: 11px auto -1px auto; -opacity:0.9; -height:30; - vertical-align: bottom; -} - - -p { - font-family: Arial, Helvetica, sans-serif; - font-size: 24px; -} - -.btnav { border: 0px #000 solid;} -.submit { - - text-shadow: -1px 1px 1px #ccc; - font-size:15px; -} - -input { - height:40px; - width:300px; - border:3px #000; - background:#e3e3e3; - margin:10px; - color:#000; - font-size:30px; - -} -.txt { - font-family:Arial, Helvetica, sans-serif; - font-size:14px; -line-height:1.2; - text-shadow:1px 1px 0.5px #ccc; - word-spacing: 3px; -} - .line { - font-family:Arial, Helvetica, sans-serif; - letter-spacing:0px; -line-height:-1; - color:#000; - font-size:17px; -} - -.no-cursor { cursor: none; } -.invisible { display: none !important; } -#cursor-big { position: absolute; z-index: 1000; } - -#signin-submit { - display:inline-block; - width:300px; - height:33px; - font-size:20px; - background-image:url(/static/btngrad1.png); - font-weight:bold; - word-spacing:7; - margin-top:12px; - text-align:center; - z-index:100; - font-size:16px; - color:#fff; - text-shadow:1px 1px 3px #000; - border-radius: 5px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px;*/ - border:solid 1px #eee; -} - -#remembermeInput { - width: 15px; - height: 15px; - margin: 1px; -} - -label { - display: block; - width: 300px; - text-align: right; - font-size: 16px; - color: #222; -} - - -</style> </head> <body> <div id="main" align="center"> - <img src="/static/flyhorse.gif" id="horse" /> - <img src="/static/guaranteed_customer_satisfaction.gif" id="customer" /> + <img src="/static/img/flyhorse.gif" id="horse" /> + <img src="/static/img/guaranteed_customer_satisfaction.gif" id="customer" /> <div id="registerbox"> <div id="logo-and-text"> - <a href="/"><img src="/static/dumpmod1.png"></a> + <a href="/"><img src="/static/img/dumpclearlogo.png"></a> <p align="center" class="line">Talk with pictures!</p> <div align="right" class="txt"> <br> @@ -205,26 +54,39 @@ label { </div> </div> <div id="info" align="right"> - <img src="/static/vxhtml.gif"> - <img src="/static/aol_suck.gif"> - <img src="/static/html_3_2.gif"> - <img src="/static/geocities.gif"> - <img src="/static/valid_html.gif"> + <img src="/static/img/vxhtml.gif"> + <img src="/static/img/aol_suck.gif"> + <img src="/static/img/html_3_2.gif"> + <img src="/static/img/geocities.gif"> + <img src="/static/img/valid_html.gif"> + +</div> +<div id="dumpednow" style="display:none;"> + <div class="carousel main"style="display:none;"> + <a href="#" class="prev"> </a> + <div style="visibility: visible; overflow: hidden; position: relative; z-index: 2; left: 0px; width: 420px;display:none;" class="jCarouselLite"> + $.content$ + </div></div></div> + </div> - <div id="preload"> <img src="/static/img/cursors/osx.hand.gif" class="no-cursor invisible" id="cursor-big"> </div> -<script type="text/javascript"> -var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); -document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); -</script> -<script type="text/javascript"> -try { -var pageTracker = _gat._getTracker("UA-12364576-1"); -pageTracker._trackPageview(); -} catch(err) {}</script> -</body> + <div id="preload"> + <img src="/static/img/cursors/osx.hand.gif" class="no-cursor invisible" id="cursor-big"> + </div> + + <script type="text/javascript"> + var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); + document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); + </script> + <script type="text/javascript"> + try { + var pageTracker = _gat._getTracker("UA-12364576-1"); + pageTracker._trackPageview(); + } catch(err) {} + </script> + </body> </html> diff --git a/static/js/FancyZoom.js b/static/js/FancyZoom.js new file mode 100755 index 0000000..42d71ce --- /dev/null +++ b/static/js/FancyZoom.js @@ -0,0 +1,761 @@ +// FancyZoom.js - v1.1 - http://www.fancyzoom.com +// +// Copyright (c) 2008 Cabel Sasser / Panic Inc +// All rights reserved. +// +// Requires: FancyZoomHTML.js +// Instructions: Include JS files in page, call setupZoom() in onLoad. That's it! +// Any <a href> links to images will be updated to zoom inline. +// Add rel="nozoom" to your <a href> to disable zooming for an image. +// +// Redistribution and use of this effect in source form, with or without modification, +// are permitted provided that the following conditions are met: +// +// * USE OF SOURCE ON COMMERCIAL (FOR-PROFIT) WEBSITE REQUIRES ONE-TIME LICENSE FEE PER DOMAIN. +// Reasonably priced! Visit www.fancyzoom.com for licensing instructions. Thanks! +// +// * Non-commercial (personal) website use is permitted without license/payment! +// +// * Redistribution of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// * Redistribution of source code and derived works cannot be sold without specific +// written prior permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +var includeCaption = true; // Turn on the "caption" feature, and write out the caption HTML +var zoomTime = 5; // Milliseconds between frames of zoom animation +var zoomSteps = 15; // Number of zoom animation frames +var includeFade = 1; // Set to 1 to fade the image in / out as it zooms +var minBorder = 90; // Amount of padding between large, scaled down images, and the window edges +var shadowSettings = '0px 5px 25px rgba(0, 0, 0, '; // Blur, radius, color of shadow for compatible browsers + +var zoomImagesURI = '/images-global/zoom/'; // Location of the zoom and shadow images + +// Init. Do not add anything below this line, unless it's something awesome. + +var myWidth = 0, myHeight = 0, myScroll = 0; myScrollWidth = 0; myScrollHeight = 0; +var zoomOpen = false, preloadFrame = 1, preloadActive = false, preloadTime = 0, imgPreload = new Image(); +var preloadAnimTimer = 0; + +var zoomActive = new Array(); var zoomTimer = new Array(); +var zoomOrigW = new Array(); var zoomOrigH = new Array(); +var zoomOrigX = new Array(); var zoomOrigY = new Array(); + +var zoomID = "ZoomBox"; +var theID = "ZoomImage"; +var zoomCaption = "ZoomCaption"; +var zoomCaptionDiv = "ZoomCapDiv"; + +if (navigator.userAgent.indexOf("MSIE") != -1) { + var browserIsIE = true; +} + +// Zoom: Setup The Page! Called in your <body>'s onLoad handler. + +function setupZoom() { + prepZooms(); + insertZoomHTML(); + zoomdiv = document.getElementById(zoomID); + zoomimg = document.getElementById(theID); +} + +// Zoom: Inject Javascript functions into hrefs pointing to images, one by one! +// Skip any href that contains a rel="nozoom" tag. +// This is done at page load time via an onLoad() handler. + +function prepZooms() { + if (! document.getElementsByTagName) { + return; + } + var links = document.getElementsByTagName("a"); + for (i = 0; i < links.length; i++) { + if (links[i].getAttribute("href")) { + if (links[i].getAttribute("href").search(/(.*)\.(jpg|jpeg|gif|png|bmp|tif|tiff)/gi) != -1) { + if (links[i].getAttribute("rel") != "nozoom") { + links[i].onclick = function (event) { return zoomClick(this, event); }; + links[i].onmouseover = function () { zoomPreload(this); }; + } + } + } + } +} + +// Zoom: Load an image into an image object. When done loading, function sets preloadActive to false, +// so other bits know that they can proceed with the zoom. +// Preloaded image is stored in imgPreload and swapped out in the zoom function. + +function zoomPreload(from) { + + var theimage = from.getAttribute("href"); + + // Only preload if we have to, i.e. the image isn't this image already + + if (imgPreload.src.indexOf(from.getAttribute("href").substr(from.getAttribute("href").lastIndexOf("/"))) == -1) { + preloadActive = true; + imgPreload = new Image(); + + // Set a function to fire when the preload is complete, setting flags along the way. + + imgPreload.onload = function() { + preloadActive = false; + } + + // Load it! + imgPreload.src = theimage; + } +} + +// Zoom: Start the preloading animation cycle. + +function preloadAnimStart() { + preloadTime = new Date(); + document.getElementById("ZoomSpin").style.left = (myWidth / 2) + 'px'; + document.getElementById("ZoomSpin").style.top = ((myHeight / 2) + myScroll) + 'px'; + document.getElementById("ZoomSpin").style.visibility = "visible"; + preloadFrame = 1; + document.getElementById("SpinImage").src = zoomImagesURI+'zoom-spin-'+preloadFrame+'.png'; + preloadAnimTimer = setInterval("preloadAnim()", 100); +} + +// Zoom: Display and ANIMATE the jibber-jabber widget. Once preloadActive is false, bail and zoom it up! + +function preloadAnim(from) { + if (preloadActive != false) { + document.getElementById("SpinImage").src = zoomImagesURI+'zoom-spin-'+preloadFrame+'.png'; + preloadFrame++; + if (preloadFrame > 12) preloadFrame = 1; + } else { + document.getElementById("ZoomSpin").style.visibility = "hidden"; + clearInterval(preloadAnimTimer); + preloadAnimTimer = 0; + zoomIn(preloadFrom); + } +} + +// ZOOM CLICK: We got a click! Should we do the zoom? Or wait for the preload to complete? +// todo?: Double check that imgPreload src = clicked src + +function zoomClick(from, evt) { + + var shift = getShift(evt); + + // Check for Command / Alt key. If pressed, pass them through -- don't zoom! + if (! evt && window.event && (window.event.metaKey || window.event.altKey)) { + return true; + } else if (evt && (evt.metaKey|| evt.altKey)) { + return true; + } + + // Get browser dimensions + getSize(); + + // If preloading still, wait, and display the spinner. + if (preloadActive == true) { + // But only display the spinner if it's not already being displayed! + if (preloadAnimTimer == 0) { + preloadFrom = from; + preloadAnimStart(); + } + } else { + // Otherwise, we're loaded: do the zoom! + zoomIn(from, shift); + } + + return false; + +} + +// Zoom: Move an element in to endH endW, using zoomHost as a starting point. +// "from" is an object reference to the href that spawned the zoom. + +function zoomIn(from, shift) { + + zoomimg.src = from.getAttribute("href"); + + // Determine the zoom settings from where we came from, the element in the <a>. + // If there's no element in the <a>, or we can't get the width, make stuff up + + if (from.childNodes[0].width) { + startW = from.childNodes[0].width; + startH = from.childNodes[0].height; + startPos = findElementPos(from.childNodes[0]); + } else { + startW = 50; + startH = 12; + startPos = findElementPos(from); + } + + hostX = startPos[0]; + hostY = startPos[1]; + + // Make up for a scrolled containing div. + // TODO: This HAS to move into findElementPos. + + if (document.getElementById('scroller')) { + hostX = hostX - document.getElementById('scroller').scrollLeft; + } + + // Determine the target zoom settings from the preloaded image object + + endW = imgPreload.width; + endH = imgPreload.height; + + // Start! But only if we're not zooming already! + + if (zoomActive[theID] != true) { + + // Clear everything out just in case something is already open + + if (document.getElementById("ShadowBox")) { + document.getElementById("ShadowBox").style.visibility = "hidden"; + } else if (! browserIsIE) { + + // Wipe timer if shadow is fading in still + if (fadeActive["ZoomImage"]) { + clearInterval(fadeTimer["ZoomImage"]); + fadeActive["ZoomImage"] = false; + fadeTimer["ZoomImage"] = false; + } + + document.getElementById("ZoomImage").style.webkitBoxShadow = shadowSettings + '0.0)'; + } + + document.getElementById("ZoomClose").style.visibility = "hidden"; + + // Setup the CAPTION, if existing. Hide it first, set the text. + + if (includeCaption) { + document.getElementById(zoomCaptionDiv).style.visibility = "hidden"; + if (from.getAttribute('title') && includeCaption) { + // Yes, there's a caption, set it up + document.getElementById(zoomCaption).innerHTML = from.getAttribute('title'); + } else { + document.getElementById(zoomCaption).innerHTML = ""; + } + } + + // Store original position in an array for future zoomOut. + + zoomOrigW[theID] = startW; + zoomOrigH[theID] = startH; + zoomOrigX[theID] = hostX; + zoomOrigY[theID] = hostY; + + // Now set the starting dimensions + + zoomimg.style.width = startW + 'px'; + zoomimg.style.height = startH + 'px'; + zoomdiv.style.left = hostX + 'px'; + zoomdiv.style.top = hostY + 'px'; + + // Show the zooming image container, make it invisible + + if (includeFade == 1) { + setOpacity(0, zoomID); + } + zoomdiv.style.visibility = "visible"; + + // If it's too big to fit in the window, shrink the width and height to fit (with ratio). + + sizeRatio = endW / endH; + if (endW > myWidth - minBorder) { + endW = myWidth - minBorder; + endH = endW / sizeRatio; + } + if (endH > myHeight - minBorder) { + endH = myHeight - minBorder; + endW = endH * sizeRatio; + } + + zoomChangeX = ((myWidth / 2) - (endW / 2) - hostX); + zoomChangeY = (((myHeight / 2) - (endH / 2) - hostY) + myScroll); + zoomChangeW = (endW - startW); + zoomChangeH = (endH - startH); + + // Shift key? + + if (shift) { + tempSteps = zoomSteps * 7; + } else { + tempSteps = zoomSteps; + } + + // Setup Zoom + + zoomCurrent = 0; + + // Setup Fade with Zoom, If Requested + + if (includeFade == 1) { + fadeCurrent = 0; + fadeAmount = (0 - 100) / tempSteps; + } else { + fadeAmount = 0; + } + + // Do It! + + zoomTimer[theID] = setInterval("zoomElement('"+zoomID+"', '"+theID+"', "+zoomCurrent+", "+startW+", "+zoomChangeW+", "+startH+", "+zoomChangeH+", "+hostX+", "+zoomChangeX+", "+hostY+", "+zoomChangeY+", "+tempSteps+", "+includeFade+", "+fadeAmount+", 'zoomDoneIn(zoomID)')", zoomTime); + zoomActive[theID] = true; + } +} + +// Zoom it back out. + +function zoomOut(from, evt) { + + // Get shift key status. + // IE events don't seem to get passed through the function, so grab it from the window. + + if (getShift(evt)) { + tempSteps = zoomSteps * 7; + } else { + tempSteps = zoomSteps; + } + + // Check to see if something is happening/open + + if (zoomActive[theID] != true) { + + // First, get rid of the shadow if necessary. + + if (document.getElementById("ShadowBox")) { + document.getElementById("ShadowBox").style.visibility = "hidden"; + } else if (! browserIsIE) { + + // Wipe timer if shadow is fading in still + if (fadeActive["ZoomImage"]) { + clearInterval(fadeTimer["ZoomImage"]); + fadeActive["ZoomImage"] = false; + fadeTimer["ZoomImage"] = false; + } + + document.getElementById("ZoomImage").style.webkitBoxShadow = shadowSettings + '0.0)'; + } + + // ..and the close box... + + document.getElementById("ZoomClose").style.visibility = "hidden"; + + // ...and the caption if necessary! + + if (includeCaption && document.getElementById(zoomCaption).innerHTML != "") { + // fadeElementSetup(zoomCaptionDiv, 100, 0, 5, 1); + document.getElementById(zoomCaptionDiv).style.visibility = "hidden"; + } + + // Now, figure out where we came from, to get back there + + startX = parseInt(zoomdiv.style.left); + startY = parseInt(zoomdiv.style.top); + startW = zoomimg.width; + startH = zoomimg.height; + zoomChangeX = zoomOrigX[theID] - startX; + zoomChangeY = zoomOrigY[theID] - startY; + zoomChangeW = zoomOrigW[theID] - startW; + zoomChangeH = zoomOrigH[theID] - startH; + + // Setup Zoom + + zoomCurrent = 0; + + // Setup Fade with Zoom, If Requested + + if (includeFade == 1) { + fadeCurrent = 0; + fadeAmount = (100 - 0) / tempSteps; + } else { + fadeAmount = 0; + } + + // Do It! + + zoomTimer[theID] = setInterval("zoomElement('"+zoomID+"', '"+theID+"', "+zoomCurrent+", "+startW+", "+zoomChangeW+", "+startH+", "+zoomChangeH+", "+startX+", "+zoomChangeX+", "+startY+", "+zoomChangeY+", "+tempSteps+", "+includeFade+", "+fadeAmount+", 'zoomDone(zoomID, theID)')", zoomTime); + zoomActive[theID] = true; + } +} + +// Finished Zooming In + +function zoomDoneIn(zoomdiv, theID) { + + // Note that it's open + + zoomOpen = true; + zoomdiv = document.getElementById(zoomdiv); + + // Position the table shadow behind the zoomed in image, and display it + + if (document.getElementById("ShadowBox")) { + + setOpacity(0, "ShadowBox"); + shadowdiv = document.getElementById("ShadowBox"); + + shadowLeft = parseInt(zoomdiv.style.left) - 13; + shadowTop = parseInt(zoomdiv.style.top) - 8; + shadowWidth = zoomdiv.offsetWidth + 26; + shadowHeight = zoomdiv.offsetHeight + 26; + + shadowdiv.style.width = shadowWidth + 'px'; + shadowdiv.style.height = shadowHeight + 'px'; + shadowdiv.style.left = shadowLeft + 'px'; + shadowdiv.style.top = shadowTop + 'px'; + + document.getElementById("ShadowBox").style.visibility = "visible"; + fadeElementSetup("ShadowBox", 0, 100, 5); + + } else if (! browserIsIE) { + // Or, do a fade of the modern shadow + fadeElementSetup("ZoomImage", 0, .8, 5, 0, "shadow"); + } + + // Position and display the CAPTION, if existing + + if (includeCaption && document.getElementById(zoomCaption).innerHTML != "") { + // setOpacity(0, zoomCaptionDiv); + zoomcapd = document.getElementById(zoomCaptionDiv); + zoomcapd.style.top = parseInt(zoomdiv.style.top) + (zoomdiv.offsetHeight + 15) + 'px'; + zoomcapd.style.left = (myWidth / 2) - (zoomcapd.offsetWidth / 2) + 'px'; + zoomcapd.style.visibility = "visible"; + // fadeElementSetup(zoomCaptionDiv, 0, 100, 5); + } + + // Display Close Box (fade it if it's not IE) + + if (!browserIsIE) setOpacity(0, "ZoomClose"); + document.getElementById("ZoomClose").style.visibility = "visible"; + if (!browserIsIE) fadeElementSetup("ZoomClose", 0, 100, 5); + + // Get keypresses + document.onkeypress = getKey; + +} + +// Finished Zooming Out + +function zoomDone(zoomdiv, theID) { + + // No longer open + + zoomOpen = false; + + // Clear stuff out, clean up + + zoomOrigH[theID] = ""; + zoomOrigW[theID] = ""; + document.getElementById(zoomdiv).style.visibility = "hidden"; + zoomActive[theID] == false; + + // Stop getting keypresses + + document.onkeypress = null; + +} + +// Actually zoom the element + +function zoomElement(zoomdiv, theID, zoomCurrent, zoomStartW, zoomChangeW, zoomStartH, zoomChangeH, zoomStartX, zoomChangeX, zoomStartY, zoomChangeY, zoomSteps, includeFade, fadeAmount, execWhenDone) { + + // console.log("Zooming Step #"+zoomCurrent+ " of "+zoomSteps+" (zoom " + zoomStartW + "/" + zoomChangeW + ") (zoom " + zoomStartH + "/" + zoomChangeH + ") (zoom " + zoomStartX + "/" + zoomChangeX + ") (zoom " + zoomStartY + "/" + zoomChangeY + ") Fade: "+fadeAmount); + + // Test if we're done, or if we continue + + if (zoomCurrent == (zoomSteps + 1)) { + zoomActive[theID] = false; + clearInterval(zoomTimer[theID]); + + if (execWhenDone != "") { + eval(execWhenDone); + } + } else { + + // Do the Fade! + + if (includeFade == 1) { + if (fadeAmount < 0) { + setOpacity(Math.abs(zoomCurrent * fadeAmount), zoomdiv); + } else { + setOpacity(100 - (zoomCurrent * fadeAmount), zoomdiv); + } + } + + // Calculate this step's difference, and move it! + + moveW = cubicInOut(zoomCurrent, zoomStartW, zoomChangeW, zoomSteps); + moveH = cubicInOut(zoomCurrent, zoomStartH, zoomChangeH, zoomSteps); + moveX = cubicInOut(zoomCurrent, zoomStartX, zoomChangeX, zoomSteps); + moveY = cubicInOut(zoomCurrent, zoomStartY, zoomChangeY, zoomSteps); + + document.getElementById(zoomdiv).style.left = moveX + 'px'; + document.getElementById(zoomdiv).style.top = moveY + 'px'; + zoomimg.style.width = moveW + 'px'; + zoomimg.style.height = moveH + 'px'; + + zoomCurrent++; + + clearInterval(zoomTimer[theID]); + zoomTimer[theID] = setInterval("zoomElement('"+zoomdiv+"', '"+theID+"', "+zoomCurrent+", "+zoomStartW+", "+zoomChangeW+", "+zoomStartH+", "+zoomChangeH+", "+zoomStartX+", "+zoomChangeX+", "+zoomStartY+", "+zoomChangeY+", "+zoomSteps+", "+includeFade+", "+fadeAmount+", '"+execWhenDone+"')", zoomTime); + } +} + +// Zoom Utility: Get Key Press when image is open, and act accordingly + +function getKey(evt) { + if (! evt) { + theKey = event.keyCode; + } else { + theKey = evt.keyCode; + } + + if (theKey == 27) { // ESC + zoomOut(this, evt); + } +} + +//////////////////////////// +// +// FADE Functions +// + +function fadeOut(elem) { + if (elem.id) { + fadeElementSetup(elem.id, 100, 0, 10); + } +} + +function fadeIn(elem) { + if (elem.id) { + fadeElementSetup(elem.id, 0, 100, 10); + } +} + +// Fade: Initialize the fade function + +var fadeActive = new Array(); +var fadeQueue = new Array(); +var fadeTimer = new Array(); +var fadeClose = new Array(); +var fadeMode = new Array(); + +function fadeElementSetup(theID, fdStart, fdEnd, fdSteps, fdClose, fdMode) { + + // alert("Fading: "+theID+" Steps: "+fdSteps+" Mode: "+fdMode); + + if (fadeActive[theID] == true) { + // Already animating, queue up this command + fadeQueue[theID] = new Array(theID, fdStart, fdEnd, fdSteps); + } else { + fadeSteps = fdSteps; + fadeCurrent = 0; + fadeAmount = (fdStart - fdEnd) / fadeSteps; + fadeTimer[theID] = setInterval("fadeElement('"+theID+"', '"+fadeCurrent+"', '"+fadeAmount+"', '"+fadeSteps+"')", 15); + fadeActive[theID] = true; + fadeMode[theID] = fdMode; + + if (fdClose == 1) { + fadeClose[theID] = true; + } else { + fadeClose[theID] = false; + } + } +} + +// Fade: Do the fade. This function will call itself, modifying the parameters, so +// many instances can run concurrently. Can fade using opacity, or fade using a box-shadow. + +function fadeElement(theID, fadeCurrent, fadeAmount, fadeSteps) { + + if (fadeCurrent == fadeSteps) { + + // We're done, so clear. + + clearInterval(fadeTimer[theID]); + fadeActive[theID] = false; + fadeTimer[theID] = false; + + // Should we close it once the fade is complete? + + if (fadeClose[theID] == true) { + document.getElementById(theID).style.visibility = "hidden"; + } + + // Hang on.. did a command queue while we were working? If so, make it happen now + + if (fadeQueue[theID] && fadeQueue[theID] != false) { + fadeElementSetup(fadeQueue[theID][0], fadeQueue[theID][1], fadeQueue[theID][2], fadeQueue[theID][3]); + fadeQueue[theID] = false; + } + } else { + + fadeCurrent++; + + // Now actually do the fade adjustment. + + if (fadeMode[theID] == "shadow") { + + // Do a special fade on the webkit-box-shadow of the object + + if (fadeAmount < 0) { + document.getElementById(theID).style.webkitBoxShadow = shadowSettings + (Math.abs(fadeCurrent * fadeAmount)) + ')'; + } else { + document.getElementById(theID).style.webkitBoxShadow = shadowSettings + (100 - (fadeCurrent * fadeAmount)) + ')'; + } + + } else { + + // Set the opacity depending on if we're adding or subtracting (pos or neg) + + if (fadeAmount < 0) { + setOpacity(Math.abs(fadeCurrent * fadeAmount), theID); + } else { + setOpacity(100 - (fadeCurrent * fadeAmount), theID); + } + } + + // Keep going, and send myself the updated variables + clearInterval(fadeTimer[theID]); + fadeTimer[theID] = setInterval("fadeElement('"+theID+"', '"+fadeCurrent+"', '"+fadeAmount+"', '"+fadeSteps+"')", 15); + } +} + +//////////////////////////// +// +// UTILITY functions +// + +// Utility: Set the opacity, compatible with a number of browsers. Value from 0 to 100. + +function setOpacity(opacity, theID) { + + var object = document.getElementById(theID).style; + + // If it's 100, set it to 99 for Firefox. + + if (navigator.userAgent.indexOf("Firefox") != -1) { + if (opacity == 100) { opacity = 99.9999; } // This is majorly awkward + } + + // Multi-browser opacity setting + + object.filter = "alpha(opacity=" + opacity + ")"; // IE/Win + object.opacity = (opacity / 100); // Safari 1.2, Firefox+Mozilla + +} + +// Utility: Math functions for animation calucations - From http://www.robertpenner.com/easing/ +// +// t = time, b = begin, c = change, d = duration +// time = current frame, begin is fixed, change is basically finish - begin, duration is fixed (frames), + +function linear(t, b, c, d) +{ + return c*t/d + b; +} + +function sineInOut(t, b, c, d) +{ + return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; +} + +function cubicIn(t, b, c, d) { + return c*(t/=d)*t*t + b; +} + +function cubicOut(t, b, c, d) { + return c*((t=t/d-1)*t*t + 1) + b; +} + +function cubicInOut(t, b, c, d) +{ + if ((t/=d/2) < 1) return c/2*t*t*t + b; + return c/2*((t-=2)*t*t + 2) + b; +} + +function bounceOut(t, b, c, d) +{ + if ((t/=d) < (1/2.75)){ + return c*(7.5625*t*t) + b; + } else if (t < (2/2.75)){ + return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; + } else if (t < (2.5/2.75)){ + return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; + } else { + return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; + } +} + + +// Utility: Get the size of the window, and set myWidth and myHeight +// Credit to quirksmode.org + +function getSize() { + + // Window Size + + if (self.innerHeight) { // Everyone but IE + myWidth = window.innerWidth; + myHeight = window.innerHeight; + myScroll = window.pageYOffset; + } else if (document.documentElement && document.documentElement.clientHeight) { // IE6 Strict + myWidth = document.documentElement.clientWidth; + myHeight = document.documentElement.clientHeight; + myScroll = document.documentElement.scrollTop; + } else if (document.body) { // Other IE, such as IE7 + myWidth = document.body.clientWidth; + myHeight = document.body.clientHeight; + myScroll = document.body.scrollTop; + } + + // Page size w/offscreen areas + + if (window.innerHeight && window.scrollMaxY) { + myScrollWidth = document.body.scrollWidth; + myScrollHeight = window.innerHeight + window.scrollMaxY; + } else if (document.body.scrollHeight > document.body.offsetHeight) { // All but Explorer Mac + myScrollWidth = document.body.scrollWidth; + myScrollHeight = document.body.scrollHeight; + } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari + myScrollWidth = document.body.offsetWidth; + myScrollHeight = document.body.offsetHeight; + } +} + +// Utility: Get Shift Key Status +// IE events don't seem to get passed through the function, so grab it from the window. + +function getShift(evt) { + var shift = false; + if (! evt && window.event) { + shift = window.event.shiftKey; + } else if (evt) { + shift = evt.shiftKey; + if (shift) evt.stopPropagation(); // Prevents Firefox from doing shifty things + } + return shift; +} + +// Utility: Find the Y position of an element on a page. Return Y and X as an array + +function findElementPos(elemFind) +{ + var elemX = 0; + var elemY = 0; + do { + elemX += elemFind.offsetLeft; + elemY += elemFind.offsetTop; + } while ( elemFind = elemFind.offsetParent ) + + return Array(elemX, elemY); +}
\ No newline at end of file diff --git a/static/js/FancyZoomHTML.js b/static/js/FancyZoomHTML.js new file mode 100755 index 0000000..e69de29 --- /dev/null +++ b/static/js/FancyZoomHTML.js diff --git a/static/js/away.js b/static/js/away.js index cf4b19c..cf4b19c 100644..100755 --- a/static/js/away.js +++ b/static/js/away.js diff --git a/static/js/dumpsearch.js b/static/js/dumpsearch.js new file mode 100755 index 0000000..bb0bcce --- /dev/null +++ b/static/js/dumpsearch.js @@ -0,0 +1,39 @@ +if (!window['google']) { +window['google'] = {}; +} +if (!window['google']['loader']) { +window['google']['loader'] = {}; +google.loader.ServiceBase = 'http://www.google.com/uds'; +google.loader.GoogleApisBase = 'http://ajax.googleapis.com/ajax'; +google.loader.ApiKey = 'ABQIAAAA6C4bndUCBastUbawfhKGURQviNTBAztVc6-FhSQEQv6BdFn_BBRfktMUHCKH-MICXpvRmJU3x-Ly0w'; +google.loader.KeyVerified = true; +google.loader.LoadFailure = false; +google.loader.Secure = false; +google.loader.GoogleLocale = 'www.google.com'; +google.loader.ClientLocation = null; +google.loader.AdditionalParams = ''; +(function() {var d=true,e=null,g=false,h=encodeURIComponent,j=window,k=google,m=undefined,n=document;function p(a,b){return a.load=b}var q="push",s="replace",t="charAt",u="ServiceBase",v="name",w="getTime",x="length",y="prototype",z="setTimeout",A="loader",B="substring",C="join",D="toLowerCase";function E(a){if(a in F)return F[a];return F[a]=navigator.userAgent[D]().indexOf(a)!=-1}var F={};function G(a,b){var c=function(){};c.prototype=b[y];a.S=b[y];a.prototype=new c} +function H(a,b){var c=a.G||[];c=c.concat(Array[y].slice.call(arguments,2));if(typeof a.t!="undefined")b=a.t;if(typeof a.s!="undefined")a=a.s;var f=function(){var i=c.concat(Array[y].slice.call(arguments));return a.apply(b,i)};f.G=c;f.t=b;f.s=a;return f}function I(a){a=new Error(a);a.toString=function(){return this.message};return a}function J(a,b){a=a.split(/\./);for(var c=j,f=0;f<a[x]-1;f++){c[a[f]]||(c[a[f]]={});c=c[a[f]]}c[a[a[x]-1]]=b}function K(a,b,c){a[b]=c}if(!L)var L=J;if(!M)var M=K;k[A].u={};L("google.loader.callbacks",k[A].u);var N={},O={};k[A].eval={};L("google.loader.eval",k[A].eval); +p(k,function(a,b,c){function f(r){var o=r.split(".");if(o[x]>2)throw I("Module: '"+r+"' not found!");else if(typeof o[1]!="undefined"){i=o[0];c.packages=c.packages||[];c.packages[q](o[1])}}var i=a;c=c||{};if(a instanceof Array||a&&typeof a=="object"&&typeof a[C]=="function"&&typeof a.reverse=="function")for(var l=0;l<a[x];l++)f(a[l]);else f(a);if(a=N[":"+i]){if(c&&!c.language&&c.locale)c.language=c.locale;if(c&&typeof c.callback=="string"){l=c.callback;if(l.match(/^[[\]A-Za-z0-9._]+$/)){l=j.eval(l); +c.callback=l}}if((l=c&&c.callback!=e)&&!a.r(b))throw I("Module: '"+i+"' must be loaded before DOM onLoad!");else if(l)a.l(b,c)?j[z](c.callback,0):a.load(b,c);else a.l(b,c)||a.load(b,c)}else throw I("Module: '"+i+"' not found!");});L("google.load",k.load);k.R=function(a,b){b?aa(a):P(j,"load",a)};L("google.setOnLoadCallback",k.R);function P(a,b,c){if(a.addEventListener)a.addEventListener(b,c,g);else if(a.attachEvent)a.attachEvent("on"+b,c);else{var f=a["on"+b];a["on"+b]=f!=e?ba([c,f]):c}} +function ba(a){return function(){for(var b=0;b<a[x];b++)a[b]()}}var Q=[];function aa(a){if(Q[x]==0){P(j,"load",R);if(!E("msie")&&!(E("safari")||E("konqueror"))&&E("mozilla")||j.opera)j.addEventListener("DOMContentLoaded",R,g);else if(E("msie"))n.write("<script defer onreadystatechange='google.loader.domReady()' src=//:><\/script>");else(E("safari")||E("konqueror"))&&j[z](ca,10)}Q[q](a)} +k[A].M=function(){var a=j.event.srcElement;if(a.readyState=="complete"){a.onreadystatechange=e;a.parentNode.removeChild(a);R()}};L("google.loader.domReady",k[A].M);var da={loaded:d,complete:d};function ca(){if(da[n.readyState])R();else Q[x]>0&&j[z](ca,10)}function R(){for(var a=0;a<Q[x];a++)Q[a]();Q.length=0} +k[A].e=function(a,b,c){if(c){var f;if(a=="script"){f=n.createElement("script");f.type="text/javascript";f.src=b}else if(a=="css"){f=n.createElement("link");f.type="text/css";f.href=b;f.rel="stylesheet"}(a=n.getElementsByTagName("head")[0])||(a=n.body.parentNode.appendChild(n.createElement("head")));a.appendChild(f)}else if(a=="script")n.write('<script src="'+b+'" type="text/javascript"><\/script>');else a=="css"&&n.write('<link href="'+b+'" type="text/css" rel="stylesheet"></link>')}; +L("google.loader.writeLoadTag",k[A].e);k[A].O=function(a){O=a};L("google.loader.rfm",k[A].O);k[A].Q=function(a){for(var b in a)if(typeof b=="string"&&b&&b[t](0)==":"&&!N[b])N[b]=new T(b[B](1),a[b])};L("google.loader.rpl",k[A].Q);k[A].P=function(a){if((a=a.specs)&&a[x])for(var b=0;b<a[x];++b){var c=a[b];if(typeof c=="string")N[":"+c]=new U(c);else{c=new V(c[v],c.baseSpec,c.customSpecs);N[":"+c[v]]=c}}};L("google.loader.rm",k[A].P);k[A].loaded=function(a){N[":"+a.module].j(a)}; +L("google.loader.loaded",k[A].loaded);k[A].L=function(){var a=(new Date)[w](),b=Math.floor(Math.random()*1E7);return"qid="+(a.toString(16)+b.toString(16))};L("google.loader.createGuidArg_",k[A].L);J("google_exportSymbol",J);J("google_exportProperty",K);k[A].b={};L("google.loader.themes",k[A].b);k[A].b.A="http://www.google.com/cse/style/look/bubblegum.css";M(k[A].b,"BUBBLEGUM",k[A].b.A);k[A].b.C="http://www.google.com/cse/style/look/greensky.css";M(k[A].b,"GREENSKY",k[A].b.C);k[A].b.B="http://www.google.com/cse/style/look/espresso.css"; +M(k[A].b,"ESPRESSO",k[A].b.B);k[A].b.F="http://www.google.com/cse/style/look/shiny.css";M(k[A].b,"SHINY",k[A].b.F);k[A].b.D="http://www.google.com/cse/style/look/minimalist.css";M(k[A].b,"MINIMALIST",k[A].b.D);function U(a){this.a=a;this.p=[];this.o={};this.c={};this.k=d;this.d=-1} +U[y].g=function(a,b){var c="";if(b!=m){if(b.language!=m)c+="&hl="+h(b.language);if(b.nocss!=m)c+="&output="+h("nocss="+b.nocss);if(b.nooldnames!=m)c+="&nooldnames="+h(b.nooldnames);if(b.packages!=m)c+="&packages="+h(b.packages);if(b.callback!=e)c+="&async=2";if(b.style!=m)c+="&style="+h(b.style);if(b.other_params!=m)c+="&"+b.other_params}if(!this.k){if(k[this.a]&&k[this.a].JSHash)c+="&sig="+h(k[this.a].JSHash);b=[];for(var f in this.o)f[t](0)==":"&&b[q](f[B](1));for(f in this.c)f[t](0)==":"&&b[q](f[B](1)); +c+="&have="+h(b[C](","))}return k[A][u]+"/?file="+this.a+"&v="+a+k[A].AdditionalParams+c};U[y].w=function(a){var b=e;if(a)b=a.packages;var c=e;if(b)if(typeof b=="string")c=[a.packages];else if(b[x]){c=[];for(a=0;a<b[x];a++)typeof b[a]=="string"&&c[q](b[a][s](/^\s*|\s*$/,"")[D]())}c||(c=["default"]);b=[];for(a=0;a<c[x];a++)this.o[":"+c[a]]||b[q](c[a]);return b}; +p(U[y],function(a,b){var c=this.w(b),f=b&&b.callback!=e;if(f)var i=new W(b.callback);for(var l=[],r=c[x]-1;r>=0;r--){var o=c[r];f&&i.H(o);if(this.c[":"+o]){c.splice(r,1);f&&this.c[":"+o][q](i)}else l[q](o)}if(c[x]){if(b&&b.packages)b.packages=c.sort()[C](",");if(!b&&O[":"+this.a]!=e&&O[":"+this.a].versions[":"+a]!=e&&!k[A].AdditionalParams&&this.k){a=O[":"+this.a];k[this.a]=k[this.a]||{};for(var S in a.properties)if(S&&S[t](0)==":")k[this.a][S[B](1)]=a.properties[S];k[A].e("script",k[A][u]+a.path+ +a.js,f);a.css&&k[A].e("css",k[A][u]+a.path+a.css,f)}else if(!b||!b.autoloaded)k[A].e("script",this.g(a,b),f);if(this.k){this.k=g;this.d=(new Date)[w]();if(this.d%100!=1)this.d=-1}for(r=0;r<l[x];r++){o=l[r];this.c[":"+o]=[];f&&this.c[":"+o][q](i)}}}); +U[y].j=function(a){if(this.d!=-1){X("al_"+this.a,"jl."+((new Date)[w]()-this.d),d);this.d=-1}this.p=this.p.concat(a.components);k[A][this.a]||(k[A][this.a]={});k[A][this.a].packages=this.p.slice(0);for(var b=0;b<a.components[x];b++){this.o[":"+a.components[b]]=d;var c=this.c[":"+a.components[b]];if(c){for(var f=0;f<c[x];f++)c[f].K(a.components[b]);delete this.c[":"+a.components[b]]}}X("hl",this.a)};U[y].l=function(a,b){return this.w(b)[x]==0};U[y].r=function(){return d}; +function W(a){this.J=a;this.m={};this.q=0}W[y].H=function(a){this.q++;this.m[":"+a]=d};W[y].K=function(a){if(this.m[":"+a]){this.m[":"+a]=g;this.q--;this.q==0&&j[z](this.J,0)}};function V(a,b,c){this.name=a;this.I=b;this.n=c;this.v=this.h=g;this.i=[];k[A].u[this[v]]=H(this.j,this)}G(V,U);p(V[y],function(a,b){var c=b&&b.callback!=e;if(c){this.i[q](b.callback);b.callback="google.loader.callbacks."+this[v]}else this.h=d;if(!b||!b.autoloaded)k[A].e("script",this.g(a,b),c);X("el",this[v])});V[y].l=function(a,b){return b&&b.callback!=e?this.v:this.h};V[y].j=function(){this.v=d;for(var a=0;a<this.i[x];a++)j[z](this.i[a],0);this.i=[]}; +var Y=function(a,b){return a.string?h(a.string)+"="+h(b):a.regex?b[s](/(^.*$)/,a.regex):""};V[y].g=function(a,b){return this.N(this.z(a),a,b)}; +V[y].N=function(a,b,c){var f="";if(a.key)f+="&"+Y(a.key,k[A].ApiKey);if(a.version)f+="&"+Y(a.version,b);b=k[A].Secure&&a.ssl?a.ssl:a.uri;if(c!=e)for(var i in c)if(a.params[i])f+="&"+Y(a.params[i],c[i]);else if(i=="other_params")f+="&"+c[i];else if(i=="base_domain")b="http://"+c[i]+a.uri[B](a.uri.indexOf("/",7));k[this[v]]={};if(b.indexOf("?")==-1&&f)f="?"+f[B](1);return b+f};V[y].r=function(a){return this.z(a).deferred};V[y].z=function(a){if(this.n)for(var b=0;b<this.n[x];++b){var c=this.n[b];if((new RegExp(c.pattern)).test(a))return c}return this.I};function T(a,b){this.a=a;this.f=b;this.h=g}G(T,U);p(T[y],function(a,b){this.h=d;k[A].e("script",this.g(a,b),g)});T[y].l=function(){return this.h};T[y].j=function(){};T[y].g=function(a,b){if(!this.f.versions[":"+a]){if(this.f.aliases){var c=this.f.aliases[":"+a];if(c)a=c}if(!this.f.versions[":"+a])throw I("Module: '"+this.a+"' with version '"+a+"' not found!");}a=k[A].GoogleApisBase+"/libs/"+this.a+"/"+a+"/"+this.f.versions[":"+a][b&&b.uncompressed?"uncompressed":"compressed"];X("el",this.a);return a}; +T[y].r=function(){return g};var ea=g,Z=[],fa=(new Date)[w](),X=function(a,b,c){if(!ea){P(j,"unload",ga);ea=d}if(c){if(!k[A].Secure&&(!k[A].Options||k[A].Options.csi===g)){a=a[D]()[s](/[^a-z0-9_.]+/g,"_");b=b[D]()[s](/[^a-z0-9_.]+/g,"_");j[z](H($,e,"http://csi.gstatic.com/csi?s=uds&v=2&action="+h(a)+"&it="+h(b)),1E4)}}else{Z[q]("r"+Z[x]+"="+h(a+(b?"|"+b:"")));j[z](ga,Z[x]>5?0:15E3)}},ga=function(){if(Z[x]){$(k[A][u]+"/stats?"+Z[C]("&")+"&nc="+(new Date)[w]()+"_"+((new Date)[w]()-fa));Z.length=0}},$=function(a){var b=new Image, +c=ha++;ia[c]=b;b.onload=b.onerror=function(){delete ia[c]};b.src=a;b=e},ia={},ha=0;J("google.loader.recordStat",X);J("google.loader.createImageForLogging",$); + +}) ();google.loader.rm({"specs":[{"name":"books","baseSpec":{"uri":"http://books.google.com/books/api.js","ssl":null,"key":{"string":"key"},"version":{"string":"v"},"deferred":true,"params":{"callback":{"string":"callback"},"language":{"string":"hl"}}}},"feeds",{"name":"friendconnect","baseSpec":{"uri":"http://www.google.com/friendconnect/script/friendconnect.js","ssl":null,"key":{"string":"key"},"version":{"string":"v"},"deferred":false,"params":{}}},"spreadsheets","gdata","visualization",{"name":"sharing","baseSpec":{"uri":"http://www.google.com/s2/sharing/js","ssl":null,"key":{"string":"key"},"version":{"string":"v"},"deferred":false,"params":{"language":{"string":"hl"}}}},"search",{"name":"maps","baseSpec":{"uri":"http://maps.google.com/maps?file\u003dgoogleapi","ssl":"https://maps-api-ssl.google.com/maps?file\u003dgoogleapi","key":{"string":"key"},"version":{"string":"v"},"deferred":true,"params":{"callback":{"regex":"callback\u003d$1\u0026async\u003d2"},"language":{"string":"hl"}}},"customSpecs":[{"uri":"http://maps.google.com/maps/api/js","ssl":null,"key":{"string":"key"},"version":{"string":"v"},"deferred":true,"params":{"callback":{"string":"callback"},"language":{"string":"hl"}},"pattern":"^(3|3..*)$"}]},"annotations_v2","orkut","language","earth",{"name":"annotations","baseSpec":{"uri":"http://www.google.com/reviews/scripts/annotations_bootstrap.js","ssl":null,"key":{"string":"key"},"version":{"string":"v"},"deferred":true,"params":{"callback":{"string":"callback"},"language":{"string":"hl"},"country":{"string":"gl"}}}},"ads","elements"]}); +google.loader.rfm({":feeds":{"versions":{":1":"1",":1.0":"1"},"path":"/api/feeds/1.0/e291a634414cb5ef1c9f3b5424b8ac4b/","js":"default+en.I.js","css":"default.css","properties":{":JSHash":"e291a634414cb5ef1c9f3b5424b8ac4b",":Version":"1.0"}},":search":{"versions":{":1":"1",":1.0":"1"},"path":"/api/search/1.0/d3863cc958afe4c6c797e1fc2d91793c/","js":"default+en.I.js","css":"default.css","properties":{":JSHash":"d3863cc958afe4c6c797e1fc2d91793c",":NoOldNames":false,":Version":"1.0"}},":language":{"versions":{":1":"1",":1.0":"1"},"path":"/api/language/1.0/cd6e6992328d3619ee31352c39a90b10/","js":"default+en.I.js","properties":{":JSHash":"cd6e6992328d3619ee31352c39a90b10",":Version":"1.0"}},":spreadsheets":{"versions":{":0":"1",":0.2":"1"},"path":"/api/spreadsheets/0.2/626554c678ff579189704ea83fe72774/","js":"default.I.js","properties":{":JSHash":"626554c678ff579189704ea83fe72774",":Version":"0.2"}},":earth":{"versions":{":1":"1",":1.0":"1"},"path":"/api/earth/1.0/abef9437280171d37dd6be81a58115d2/","js":"default.I.js","properties":{":JSHash":"abef9437280171d37dd6be81a58115d2",":Version":"1.0"}},":annotations":{"versions":{":1":"1",":1.0":"1"},"path":"/api/annotations/1.0/71b0b459463545c346b09f9e642464ae/","js":"default+en.I.js","properties":{":JSHash":"71b0b459463545c346b09f9e642464ae",":Version":"1.0"}}}); +google.loader.rpl({":scriptaculous":{"versions":{":1.8.3":{"uncompressed":"scriptaculous.js","compressed":"scriptaculous.js"},":1.8.2":{"uncompressed":"scriptaculous.js","compressed":"scriptaculous.js"},":1.8.1":{"uncompressed":"scriptaculous.js","compressed":"scriptaculous.js"}},"aliases":{":1.8":"1.8.3",":1":"1.8.3"}},":yui":{"versions":{":2.6.0":{"uncompressed":"build/yuiloader/yuiloader.js","compressed":"build/yuiloader/yuiloader-min.js"},":2.7.0":{"uncompressed":"build/yuiloader/yuiloader.js","compressed":"build/yuiloader/yuiloader-min.js"},":2.8.0r4":{"uncompressed":"build/yuiloader/yuiloader.js","compressed":"build/yuiloader/yuiloader-min.js"}},"aliases":{":2":"2.8.0r4",":2.7":"2.7.0",":2.6":"2.6.0",":2.8":"2.8.0r4",":2.8.0":"2.8.0r4"}},":swfobject":{"versions":{":2.1":{"uncompressed":"swfobject_src.js","compressed":"swfobject.js"},":2.2":{"uncompressed":"swfobject_src.js","compressed":"swfobject.js"}},"aliases":{":2":"2.2"}},":ext-core":{"versions":{":3.0.0":{"uncompressed":"ext-core-debug.js","compressed":"ext-core.js"}},"aliases":{":3":"3.0.0",":3.0":"3.0.0"}},":mootools":{"versions":{":1.2.3":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.1.1":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.2.4":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.2.1":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.2.2":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.1.2":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"}},"aliases":{":1":"1.1.2",":1.11":"1.1.1",":1.2":"1.2.4",":1.1":"1.1.2"}},":jqueryui":{"versions":{":1.7.2":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.6.0":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.7.0":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.7.1":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.5.3":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.5.2":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"}},"aliases":{":1.7":"1.7.2",":1":"1.7.2",":1.6":"1.6.0",":1.5":"1.5.3"}},":chrome-frame":{"versions":{":1.0.2":{"uncompressed":"CFInstall.js","compressed":"CFInstall.min.js"},":1.0.1":{"uncompressed":"CFInstall.js","compressed":"CFInstall.min.js"},":1.0.0":{"uncompressed":"CFInstall.js","compressed":"CFInstall.min.js"}},"aliases":{":1":"1.0.2",":1.0":"1.0.2"}},":prototype":{"versions":{":1.6.0.2":{"uncompressed":"prototype.js","compressed":"prototype.js"},":1.6.1.0":{"uncompressed":"prototype.js","compressed":"prototype.js"},":1.6.0.3":{"uncompressed":"prototype.js","compressed":"prototype.js"}},"aliases":{":1.6.1":"1.6.1.0",":1":"1.6.1.0",":1.6":"1.6.1.0",":1.6.0":"1.6.0.3"}},":jquery":{"versions":{":1.2.3":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.3.1":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.3.0":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.3.2":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.2.6":{"uncompressed":"jquery.js","compressed":"jquery.min.js"}},"aliases":{":1":"1.3.2",":1.3":"1.3.2",":1.2":"1.2.6"}},":dojo":{"versions":{":1.2.3":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.3.1":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.1.1":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.3.0":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.3.2":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.2.0":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.4.0":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"}},"aliases":{":1":"1.4.0",":1.4":"1.4.0",":1.3":"1.3.2",":1.2":"1.2.3",":1.1":"1.1.1"}}}); +} diff --git a/static/js/home.js b/static/js/home.js index e9be833..072617a 100755 --- a/static/js/home.js +++ b/static/js/home.js @@ -171,3 +171,31 @@ function login() { error: onError }); }; + + +function MM_swapImgRestore() { //v3.0 + var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; +} +function MM_preloadImages() { //v3.0 + var d=document; if(d.images){ + if(!d.MM_p) d.MM_p=new Array(); + var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) + if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} +} + +function MM_findObj(n, d) { //v4.01 + var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { + d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} + if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; + for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); + if(!x && d.getElementById) x=d.getElementById(n); return x; +} + +function MM_swapImage() { //v3.0 + var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) + if ((x=MM_findObj(a[i]))!=null){ + document.MM_sr[j++]=x; + if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2]; + } +} + diff --git a/static/js/jquery.js b/static/js/jquery.js new file mode 100644 index 0000000..7361a61 --- /dev/null +++ b/static/js/jquery.js @@ -0,0 +1,171 @@ +/** + * @projectDescription Monitor Font Size Changes with jQuery + * + * @version 1.0 + * @author Dave Cardwell + * + * jQuery-Em - $Revision: 24 $ ($Date: 2007-08-19 11:24:56 +0100 (Sun, 19 Aug 2007) $) + * http://davecardwell.co.uk/javascript/jquery/plugins/jquery-em/ + * + * Copyright ©2007 Dave Cardwell <http://davecardwell.co.uk/> + * + * Released under the MIT licence: + * http://www.opensource.org/licenses/mit-license.php + */ + +// Upon $(document).ready()… +jQuery(function($) { + // Configuration… + var eventName = 'emchange'; + + + // Set up default options. + $.em = $.extend({ + /** + * The jQuery-Em version string. + * + * @example $.em.version; + * @desc '1.0a' + * + * @property + * @name version + * @type String + * @cat Plugins/Em + */ + version: '1.0', + + /** + * The number of milliseconds to wait when polling for changes to the + * font size. + * + * @example $.em.delay = 400; + * @desc Defaults to 200. + * + * @property + * @name delay + * @type Number + * @cat Plugins/Em + */ + delay: 200, + + /** + * The element used to detect changes to the font size. + * + * @example $.em.element = $('<div />')[0]; + * @desc Default is an empty, absolutely positioned, 100em-wide <div>. + * + * @private + * @property + * @name element + * @type Element + * @cat Plugins/Em + */ + element: $('<div />').css({ left: '-100em', + position: 'absolute', + width: '100em' }) + .prependTo('body')[0], + + /** + * The action to perform when a change in the font size is detected. + * + * @example $.em.action = function() { ... } + * @desc The default action is to trigger a global “emchange” event. + * You probably shouldn’t change this behaviour as other plugins may + * rely on it, but the option is here for completion. + * + * @example $(document).bind('emchange', function(e, cur, prev) {...}) + * @desc Any functions triggered on this event are passed the current + * font size, and last known font size as additional parameters. + * + * @private + * @property + * @name action + * @type Function + * @cat Plugins/Em + * @see current + * @see previous + */ + action: function() { + var currentWidth = $.em.element.offsetWidth / 100; + + // If the font size has changed since we last checked… + if ( currentWidth != $.em.current ) { + /** + * The previous pixel value of the user agent’s font size. See + * $.em.current for caveats. Will initially be undefined until + * the “emchange” event is triggered. + * + * @example $.em.previous; + * @result 16 + * + * @property + * @name previous + * @type Number + * @cat Plugins/Em + * @see current + */ + $.em.previous = $.em.current; + + /** + * The current pixel value of the user agent’s font size. As + * with $.em.previous, this value *may* be subject to minor + * browser rounding errors that mean you might not want to + * rely upon it as an absolute value. + * + * @example $.em.current; + * @result 14 + * + * @property + * @name current + * @type Number + * @cat Plugins/Em + * @see previous + */ + $.em.current = currentWidth; + + $.event.trigger(eventName, [$.em.current, $.em.previous]); + } + } + }, $.em ); + + + /** + * Bind a function to the emchange event of each matched element. + * + * @example $("p").emchange( function() { alert("Hello"); } ); + * + * @name emchange + * @type jQuery + * @param Function fn A function to bind to the emchange event. + * @cat Plugins/Em + */ + + /** + * Trigger the emchange event of each matched element. + * + * @example $("p").emchange() + * + * @name emchange + * @type jQuery + * @cat Plugins/Em + */ + $.fn[eventName] = function(fn) { return fn ? this.bind(eventName, fn) + : this.trigger(eventName); }; + + + // Store the initial pixel value of the user agent’s font size. + $.em.current = $.em.element.offsetWidth / 100; + + /** + * While polling for font-size changes, $.em.iid stores the intervalID in + * case you should want to cancel with clearInterval(). + * + * @example window.clearInterval( $.em.iid ); + * + * @property + * @name iid + * @type Number + * @cat Plugins/Em + */ + $.em.iid = setInterval( $.em.action, $.em.delay ); +}); diff --git a/static/js/jquery.mousewheel.js b/static/js/jquery.mousewheel.js new file mode 100644 index 0000000..f255340 --- /dev/null +++ b/static/js/jquery.mousewheel.js @@ -0,0 +1,85 @@ +/* Copyright (c) 2006 Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net) + * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) + * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. + * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. + * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. + * + * $LastChangedDate: 2007-12-20 09:02:08 -0600 (Thu, 20 Dec 2007) $ + * $Rev: 4265 $ + * + * Version: 3.0 + * + * Requires: $ 1.2.2+ + */ + +(function($) { + +$.event.special.mousewheel = { + setup: function() { + var handler = $.event.special.mousewheel.handler; + + // Fix pageX, pageY, clientX and clientY for mozilla + if ( $.browser.mozilla ) + $(this).bind('mousemove.mousewheel', function(event) { + $.data(this, 'mwcursorposdata', { + pageX: event.pageX, + pageY: event.pageY, + clientX: event.clientX, + clientY: event.clientY + }); + }); + + if ( this.addEventListener ) + this.addEventListener( ($.browser.mozilla ? 'DOMMouseScroll' : 'mousewheel'), handler, false); + else + this.onmousewheel = handler; + }, + + teardown: function() { + var handler = $.event.special.mousewheel.handler; + + $(this).unbind('mousemove.mousewheel'); + + if ( this.removeEventListener ) + this.removeEventListener( ($.browser.mozilla ? 'DOMMouseScroll' : 'mousewheel'), handler, false); + else + this.onmousewheel = function(){}; + + $.removeData(this, 'mwcursorposdata'); + }, + + handler: function(event) { + var args = Array.prototype.slice.call( arguments, 1 ); + + event = $.event.fix(event || window.event); + // Get correct pageX, pageY, clientX and clientY for mozilla + $.extend( event, $.data(this, 'mwcursorposdata') || {} ); + var delta = 0, returnValue = true; + + if ( event.wheelDelta ) delta = event.wheelDelta/120; + if ( event.detail ) delta = -event.detail/3; +// if ( $.browser.opera ) delta = -event.wheelDelta; + + event.data = event.data || {}; + event.type = "mousewheel"; + + // Add delta to the front of the arguments + args.unshift(delta); + // Add event to the front of the arguments + args.unshift(event); + + return $.event.handle.apply(this, args); + } +}; + +$.fn.extend({ + mousewheel: function(fn) { + return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel"); + }, + + unmousewheel: function(fn) { + return this.unbind("mousewheel", fn); + } +}); + +})(jQuery);
\ No newline at end of file diff --git a/static/js/pichat.js b/static/js/pichat.js index ce27ebd..2cb577f 100644 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -7,67 +7,67 @@ var MaxImagePosts = 40 // use e.g. "backgroundColor" not "background-color" function isCSSPropertySupported(prop){ - return prop in document.body.style; + return prop in document.body.style; } function escapeHtml(txt) { - if (!txt) { return ""; } - else { return $("<span>").text(txt).html(); } + if (!txt) { return ""; } + else { return $("<span>").text(txt).html(); } } function linkify(text) { - LastMsgContainsImage = false - var URLRegex = /((\b(http\:\/\/|https\:\/\/|ftp\:\/\/)|(www\.))+(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi; - return text.replace(URLRegex, linkReplace); + LastMsgContainsImage = false + var URLRegex = /((\b(http\:\/\/|https\:\/\/|ftp\:\/\/)|(www\.))+(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi; + return text.replace(URLRegex, linkReplace); } // durty hack to use a global to check this... but otherwise i'd have to rewrite the String.replace function? :/ var LastMsgContainsImage = false -function linkReplace(url){ - var PicRegex = /\.(jpg|jpeg|png|gif|bmp)$/i; - var urlWithoutParams = url.replace(/\?.*$/i, ""); - - if (url.indexOf('http://') == 0 || url.indexOf('https://') == 0 || url.indexOf('ftp://') == 0) - linkUrl = url; - else - linkUrl = 'http://' + url; - - if (PicRegex.test(urlWithoutParams)){ - LastMsgContainsImage = true - return "<a target='_blank' href='" + linkUrl + "'><img src='" + linkUrl + "'></a>" - } else { - return "<a target='_blank' href='" + linkUrl + "'>" + url + "</a>" - } +function linkReplace(url) { + var PicRegex = /\.(jpg|jpeg|png|gif|bmp)$/i; + var urlWithoutParams = url.replace(/\?.*$/i, ""); + + if (url.indexOf('http://') == 0 || url.indexOf('https://') == 0 || url.indexOf('ftp://') == 0) + linkUrl = url; + else + linkUrl = 'http://' + url; + + if (PicRegex.test(urlWithoutParams)){ + LastMsgContainsImage = true + return "<a target='_blank' href='" + linkUrl + "'><img src='" + linkUrl + "'></a>" + } else { + return "<a target='_blank' href='" + linkUrl + "'>" + url + "</a>" + } } function linkifyWithoutImage(text) { - LastMsgContainsImage = false - var URLRegex = /((\b(http\:\/\/|https\:\/\/|ftp\:\/\/)|(www\.))+(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi; - return text.replace(URLRegex, linkReplaceWithoutImage); + LastMsgContainsImage = false + var URLRegex = /((\b(http\:\/\/|https\:\/\/|ftp\:\/\/)|(www\.))+(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi; + return text.replace(URLRegex, linkReplaceWithoutImage); } function linkReplaceWithoutImage(url){ - var PicRegex = /\.(jpg|jpeg|png|gif|bmp)$/i; - var urlWithoutParams = url.replace(/\?.*$/i, ""); - linkUrl = url.indexOf('http://') == 0 ? url : 'http://' + url; + var PicRegex = /\.(jpg|jpeg|png|gif|bmp)$/i; + var urlWithoutParams = url.replace(/\?.*$/i, ""); + linkUrl = url.indexOf('http://') == 0 ? url : 'http://' + url; - return "<a target='_blank' href='" + linkUrl + "'>" + url + "</a>" + return "<a target='_blank' href='" + linkUrl + "'>" + url + "</a>" } // Message Handling var ImageMsgCount = 0 function removeOldMessages(){ - // don't count posts that are all text - if (LastMsgContainsImage) ImageMsgCount += 1; - while (ImageMsgCount > MaxImagePosts) { - var imgMsg = $(".contains-image:first") - if (imgMsg.length) { - imgMsg.prevAll().remove() // remove all text messages before the image message - imgMsg.remove() - } else break; - ImageMsgCount -= 1; - } + // don't count posts that are all text + if (LastMsgContainsImage) ImageMsgCount += 1; + while (ImageMsgCount > MaxImagePosts) { + var imgMsg = $(".contains-image:first") + if (imgMsg.length) { + imgMsg.prevAll().remove() // remove all text messages before the image message + imgMsg.remove() + } else break; + ImageMsgCount -= 1; + } } function buildMsgContent(content) { @@ -75,15 +75,15 @@ function buildMsgContent(content) { } function buildMessageDiv(msg, isLoading) { - removeOldMessages() - var nick = escapeHtml(msg.nick); - var msgId = !isLoading ? 'id="message-' + msg.msg_id + '"' : ''; - var loadingClass = isLoading ? ' loading' : ''; - var containsImageClass = LastMsgContainsImage ? ' contains-image' : ''; - return '<div class="msgDiv ' + loadingClass + containsImageClass + '" ' + msgId + '>' - + '<b><a href="/u/' + nick + ' ">' + nick + '</a>: </b>' - + buildMsgContent(msg.content) - + '</div>'; + removeOldMessages() + var nick = escapeHtml(msg.nick); + var msgId = !isLoading ? 'id="message-' + msg.msg_id + '"' : ''; + var loadingClass = isLoading ? ' loading' : ''; + var containsImageClass = LastMsgContainsImage ? ' contains-image' : ''; + return '<div class="msgDiv ' + loadingClass + containsImageClass + '" ' + msgId + '>' + + '<b><a href="/u/' + nick + ' ">' + nick + '</a>: </b>' + + buildMsgContent(msg.content) + + '</div>'; } function buildUserDiv(user) { @@ -95,6 +95,7 @@ function buildUserDiv(user) { } else { return '<div class="username">' + '<a href="/u/' + escapeHtml(user.nick) + '" target="_blank">' + + '<img src="/static/noinfo.png" width="50" height="50">' + escapeHtml(user.nick) + '</a></div>'; } } @@ -139,8 +140,8 @@ function submitMessage() { var div = addNewMessage(msg, true); var onSuccess = function(json) { - if (typeof pageTracker !== 'undefined') { - pageTracker._trackEvent('Message', 'Submit', typeof Room !== 'undefined' ? Room : 'UnknownRoom'); + if (typeof pageTracker !== 'undefined') { + pageTracker._trackEvent('Message', 'Submit', typeof Room !== 'undefined' ? Room : 'UnknownRoom'); } div.attr('id', 'message-' + json) .removeClass('loading').addClass('loaded'); @@ -207,11 +208,11 @@ function updateUI(msgs, users) { } function sortUsersByAlpha(a, b){ - var nickA = a.nick.toLowerCase() - var nickB = b.nick.toLowerCase() - if (nickA > nickB) return 1 - else if (nickA < nickB) return -1 - return 0 + var nickA = a.nick.toLowerCase() + var nickB = b.nick.toLowerCase() + if (nickA > nickB) return 1 + else if (nickA < nickB) return -1 + return 0 } function isDuplicateMessage(m) { @@ -312,7 +313,7 @@ function activateProfileEditable() { var onSubmit = function(attr, newVal, oldVal) { newVal = $.trim(newVal); if (newVal == oldVal) { return oldVal }; - + $.ajax({ type: "POST", timeout: 5000, @@ -433,13 +434,29 @@ function favoriteImage() {}; function setupUpload(elementId, roomKey) { var onSubmit = function(file, ext) { if (!(ext && /^(jpg|png|jpeg|gif|bmp)$/i.test(ext))) { - alert('SORRY, NOT AN IMAGE DUDE... '); - return false; + alert('SORRY, NOT AN IMAGE DUDE... '); + return false; } }; var onComplete = function(file, response) { - if (typeof pageTracker !== 'undefined') { - pageTracker._trackEvent('Message', 'Upload', typeof Room !== 'undefined' ? Room : 'UnknownRoom'); + if (response.match(/FILE_TOO_BIG/)) { + var maxSize = response.split(" ")[1] / 1024; + alert("Sorry. Your file is just too fucking big. " + + maxSize + "KB or less please."); + return; + } else if (response.match(/FILE_NOT_IMAGE/)) { + alert("What did you upload? Doesn't seem like an image. Sorry."); + return; + } else if (response.match(/INVALID_RESOLUTION/)) { + var maxWidth = response.split(" ")[1]; + var maxHeight = response.split(" ")[2]; + alert("Sorry, the maximum image resolution is " + + maxWidth + "x" + maxHeight); + return; + } + if (typeof pageTracker !== 'undefined') { + var r = typeof Room !== 'undefined' ? Room : 'UnknownRoom'; + pageTracker._trackEvent('Message', 'Upload', r); } } new AjaxUpload(elementId, { @@ -447,7 +464,7 @@ function setupUpload(elementId, roomKey) { autoSubmit: true, name: 'image', data: { room: roomKey }, - onSubmit: onSubmit, + onSubmit: onSubmit, onComplete: onComplete }); } @@ -479,50 +496,50 @@ function setupUploadAvatar(elementId) { onComplete: onComplete }); } - + // scrolling stuff // this code keeps the div scrolled to the bottom, but will also let the user scroll up, without jumping down function isScrolledToBottom(){ - var threshold = 15; - - var containerHeight = messageList.style.pixelHeight || messageList.offsetHeight - var currentHeight = (messageList.scrollHeight > 0) ? messageList.scrollHeight : 0 + var threshold = 15; + + var containerHeight = messageList.style.pixelHeight || messageList.offsetHeight + var currentHeight = (messageList.scrollHeight > 0) ? messageList.scrollHeight : 0 - var result = (currentHeight - messageList.scrollTop - containerHeight < threshold); + var result = (currentHeight - messageList.scrollTop - containerHeight < threshold); - return result; + return result; } function scrollIfPossible(){ - if (lastScriptedScrolledPosition <= messageList.scrollTop || isScrolledToBottom()) - scrollToEnd() + if (lastScriptedScrolledPosition <= messageList.scrollTop || isScrolledToBottom()) + scrollToEnd() } var lastScriptedScrolledPosition = 0 function scrollToEnd(){ - messageList.scrollTop = messageList.scrollHeight - lastScriptedScrolledPosition = messageList.scrollTop + messageList.scrollTop = messageList.scrollHeight + lastScriptedScrolledPosition = messageList.scrollTop } function scrollWatcher(){ - scrollIfPossible() - setTimeout(scrollWatcher, 500) + scrollIfPossible() + setTimeout(scrollWatcher, 500) } // well fuck webkit for not supporting {text-decoration: blink} function blinkStart(){ - blinkTimer = setInterval(function(){ - $(".blink").removeClass("blink").addClass("blink-turning-off") - $(".blink-off").removeClass("blink-off").addClass("blink") - $(".blink-turning-off").removeClass("blink-turning-off").addClass("blink-off") - },500); + blinkTimer = setInterval(function(){ + $(".blink").removeClass("blink").addClass("blink-turning-off") + $(".blink-off").removeClass("blink-off").addClass("blink") + $(".blink-turning-off").removeClass("blink-turning-off").addClass("blink-off") + },500); } function blinkStop(){ - clearInterval(blinkTimer); + clearInterval(blinkTimer); } function initDirectory() { @@ -536,71 +553,72 @@ function initDirectory() { // TODO: replace this with simple pointer-events thing. function initBigHand(id){ - var cursorId = "#cursor-big" - var cursor = $(cursorId)[0] - - // jquery's reported element sizes are not exactly the same as the browser's 'mouseover' target sizes - // so we'll allow a few pixels extra - var fudgeFactor = 2 + var cursorId = "#cursor-big" + var cursor = $(cursorId)[0] + + // jquery's reported element sizes are not exactly the same as the browser's 'mouseover' target sizes + // so we'll allow a few pixels extra + var fudgeFactor = 2 - $(id).addClass("no-cursor") + $(id).addClass("no-cursor") - // i have to do this weirdly bc putting the cursor image where the mouse cursor is causes problems with mouse events: - // * it stops mousemove events on the image below the mouse cursor - // * it fucks up mouseover/out and even mouseenter/leave events, as well as click - - // so i am doing this: - // on mousing over the image: - // make cursor visible - // find image co-ords - // bind a global mousemove func - // bind cursor click event - // unbind mouseover - // mousemove func: - // move image to mouse co-ords - // if mouse co-ords are outside the image co-ords: - // make cursor invisible - // unbind mousemove func - // unbind cursor click event + // i have to do this weirdly bc putting the cursor image where the mouse cursor is causes problems with mouse events: + // * it stops mousemove events on the image below the mouse cursor + // * it fucks up mouseover/out and even mouseenter/leave events, as well as click + + // so i am doing this: + // on mousing over the image: + // make cursor visible + // find image co-ords + // bind a global mousemove func + // bind cursor click event + // unbind mouseover + // mousemove func: + // move image to mouse co-ords + // if mouse co-ords are outside the image co-ords: + // make cursor invisible + // unbind mousemove func + // unbind cursor click event - var mousemove = function(e){ - var y = e.pageY, x = e.pageX, coords = initBigHand.coords + var mousemove = function(e){ + var y = e.pageY, x = e.pageX, coords = initBigHand.coords + + cursor.style.top = y + "px" + cursor.style.left = x - 32 + "px" // 32: (4 pixels * 8 pixels per big pixel) to line up pointy finger with cursor + if (y < coords.top || + y > coords.bottom || + x < coords.left || + x > coords.right) { + $(cursorId).addClass('invisible') + $(cursorId).css({"top": 0, "left": 0 }) + $(cursorId).unbind('click', cursorClick) + $('logo7').unbind('mousemove', mousemove) + $(id).mouseover(imageMouseOver) + } + } - cursor.style.top = y + "px" - cursor.style.left = x - 32 + "px" // 32: (4 pixels * 8 pixels per big pixel) to line up pointy finger with cursor - if (y < coords.top || - y > coords.bottom || - x < coords.left || - x > coords.right) { - $(cursorId).addClass('invisible') - $(cursorId).css({"top": 0, "left": 0 }) - $(cursorId).unbind('click', cursorClick) - $('logo7').unbind('mousemove', mousemove) - $(id).mouseover(imageMouseOver) - } - } - - var cursorClick = function(){ $(id).click() } - - var imageMouseOver = function(){ - //console.log("moused over...") - initBigHand.coords = { - "left": $(id).offset().left - fudgeFactor, - "top": $(id).offset().top - fudgeFactor, - "right": $(id).offset().left + $(id).width() + fudgeFactor, - "bottom": $(id).offset().top + $(id).height() + fudgeFactor + var cursorClick = function(){ $(id).click() } + + var imageMouseOver = function(){ + //console.log("moused over...") + initBigHand.coords = { + "left": $(id).offset().left - fudgeFactor, + "top": $(id).offset().top - fudgeFactor, + "right": $(id).offset().left + $(id).width() + fudgeFactor, + "bottom": $(id).offset().top + $(id).height() + fudgeFactor + } + $('body').mousemove(mousemove) + $(cursorId).click(cursorClick) + $(cursorId).removeClass('invisible') + $(id).unbind('mouseover', imageMouseOver) } - $('body').mousemove(mousemove) - $(cursorId).click(cursorClick) - $(cursorId).removeClass('invisible') - $(id).unbind('mouseover', imageMouseOver) - } - - $(id).mouseover(imageMouseOver) - + + $(id).mouseover(imageMouseOver) + } Share = { +<<<<<<< HEAD "getMessage": function(button){ var message = $(button).parents(".logged-dump") var id = message.attr("id").substr(8) // cut "message-001" to "001" @@ -650,7 +668,9 @@ Tag = { var rawContent = content.html() var img = content.find("img").attr("src") var via = "via " + nick + " on dump.fm" - return {"nick": nick, "id": id, "link": encodeURIComponent(link), "content": content, "img": encodeURIComponent(img), "via": encodeURIComponent(via)} + return {"nick": nick, "id": id, "link": encodeURIComponent(link), + "content": content, "img": encodeURIComponent(img), + "via": encodeURIComponent(via)} }, "favorite": function(button){ var message = Share.getMessage(button) diff --git a/template/directory.st b/template/directory.st index f6d633c..9135947 100644 --- a/template/directory.st +++ b/template/directory.st @@ -1,7 +1,10 @@ <html> <head> - - <title>dump.fm</title> + $if(cur)$ + <title>dump.fm directory [$cur$]</title> + $else$ + <title>dump.fm directory</title> + $endif$ $head()$ <link rel="stylesheet" type="text/css" href="/static/css/directory.css"> <script> diff --git a/template/mail/welcome.st b/template/mail/welcome.st new file mode 100644 index 0000000..42a0b38 --- /dev/null +++ b/template/mail/welcome.st @@ -0,0 +1,5 @@ +SUBJECT: Welcome to dump.fm, $nick$! + +Welcome to the dump.fm posting experience. +Get started at <http://dump.fm/chat>, or setup your +profile at <http://dump.fm/u/$nick$>! |
