diff --git a/resources/public/index.html b/resources/public/index.html index f259ae7..7ea4696 100644 --- a/resources/public/index.html +++ b/resources/public/index.html @@ -33,6 +33,7 @@ table {border-collapse: collapse;border-spacing: 0;} .anchor:hover {opacity:0.9;} img.userpic { filter: saturate(0); -webkit-filter: saturate(0); } img.userpic:hover { filter: none; -webkit-filter: none; } +.tweet:hover {cursor:pointer;} diff --git a/src/apintro/core.cljs b/src/apintro/core.cljs index b6e1127..dbd1f6d 100644 --- a/src/apintro/core.cljs +++ b/src/apintro/core.cljs @@ -10,8 +10,8 @@ (enable-console-print!) ;; INIT -(init! {:title "I'm the Title" - :subtitle "Atom Sub Title" +(init! {:title "Vigiglobe" + :subtitle "Second Page" :vgapi vgapi/initial-state }) @@ -27,14 +27,14 @@ (def ease1 (animation/easer 0.0)) (def ease2 (animation/easer 0.3)) -(def ease3 (animation/easer 0.0)) +(def ease3 (animation/easer 3.14)) (def ease4 (animation/easer 0.0)) (def complex-transition (animation/easing-chain - [[ease1 0.5 1.0 400 animation/linear] - [ease2 0.3 1.0 400 animation/linear] - [ease3 0.0 360.0 600 animation/linear] + [[ease1 0.5 1.0 1400 animation/linear] + [ease2 0.1 1.0 400 animation/linear] + [ease3 3.14 0.0 600 animation/quad-out] ])) (def orange "#E67E22") @@ -48,12 +48,10 @@ (defn animated-title [text] [:h1 {:style - {:font-size (rx (str (* 5 @ease1) "vh")) + {:font-size (rx (str (* 10 @ease1) "vh")) :padding-top (rx (str (* 10 @ease1) "vh")) :opacity (rx (str @ease2)) - :transform (rx (str "rotate(" @ease3 "deg)")) - :-webkit-transform (rx (str "rotate(" @ease3 "deg)")) - :-ms-transform (rx (str "rotate(" @ease3 "deg)")) + :-webkit-transform (rx (str "translateX(" (* 20 @ease3 (Math/sin (* 30 @ease3))) "px) rotate(" (* 5 (Math/sin (* 30 @ease3))) "deg)")) :text-align "center" :text-shadow (str "1px 3px 0 rgba(0,0,0,0.1)") :line-height "2em" @@ -87,7 +85,7 @@ [:div [animated-title (gets [:title])] [:div.project {:style {:font-family "Monaco,monospace" :opacity 0.5}} - (gets [:vgapi :project-id])] + (drop 1 (clojure.string/split (gets [:vgapi :project-id]) "-"))] [:div {:style {:opacity (rx (str @ease4)) :-webkit-filter (rx (str "blur(" (* 15 (- 1 @ease4)) "px)"))} diff --git a/src/apintro/message.cljs b/src/apintro/message.cljs index 6df282e..c4b4995 100644 --- a/src/apintro/message.cljs +++ b/src/apintro/message.cljs @@ -138,29 +138,27 @@ (let [original-text (if (:reshared message) (get-in message [:retweeted_status :text]) (:text message))] - [:p {:style {:cursor "pointer" - :line-height "1.2em"} - :on-click #(let [target (js/$ (aget % "target")) - el-type (aget target 0 "localName")] - (when-not (= el-type "a") - (open (tweet-url message)))) - :class "text"} + [:p.text {:style {:line-height "1.2em"}} original-text])) (defn message [message height & params] "Message component" (when message - [:div {:style {:height (str height "vh") - :line-height "1.6em" - :width "99%" - ; :-webkit-filter "blur(1px)" - :background "rgba(0,0,0,0.9)" - :margin "1px" - :color "rgba(255,255,255,0.8)" - :font-size "0.3em" - :overflow "hidden" - }} + [:div.tweet + {:style {:height (str height "vh") + :line-height "1.6em" + :width "99%" + ; :-webkit-filter "blur(1px)" + :background "rgba(0,0,0,0.9)" + :margin "1px" + :color "rgba(255,255,255,0.8)" + :font-size "0.3em" + :overflow "hidden" + } + :on-click #(open (tweet-url message)) + } [user-pic {:message message}] - [user-name message params] + ; [user-name message params] [text message] - [actions-holder message params]])) + ; [actions-holder message params] + ])) diff --git a/src/apintro/vgapi.cljs b/src/apintro/vgapi.cljs index 9e351a2..dfee436 100644 --- a/src/apintro/vgapi.cljs +++ b/src/apintro/vgapi.cljs @@ -19,6 +19,10 @@ :project-id "vigiglobe-Microsoft" :msg "Nothing done yet."}) +(def time-protection 10000) +(def time-period 10000) +(def time-period-margin 90000) + ;; ------------------------------------------------------------------------------ ;; Tasks ;; ------------------------------------------------------------------------------ @@ -30,9 +34,9 @@ (smart-si (fn [] (go (let [now (.getTime (new js/Date)) - from (.toISOString (new js/Date (- now (+ (* 3 interval) (* 40 1000))))) - to (.toISOString (new js/Date (- now (* 40 1000)))) - response (