slight optimization
This commit is contained in:
parent
ecfd91d960
commit
fc8f008e2d
3 changed files with 39 additions and 30 deletions
|
@ -51,7 +51,9 @@
|
|||
{:font-size (rx (str (* 10 @ease1) "vh"))
|
||||
:padding-top (rx (str (* 10 @ease1) "vh"))
|
||||
:opacity (rx (str @ease2))
|
||||
:transform (rx (str "translateX(" (* 20 @ease3 (Math/sin (* 30 @ease3))) "px) rotate(" (* 5 (Math/sin (* 30 @ease3))) "deg)"))
|
||||
:-webkit-transform (rx (str "translateX(" (* 20 @ease3 (Math/sin (* 30 @ease3))) "px) rotate(" (* 5 (Math/sin (* 30 @ease3))) "deg)"))
|
||||
:-moz-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"
|
||||
|
@ -88,7 +90,10 @@
|
|||
(drop 1 (clojure.string/split (gets [:vgapi :project-id]) "-"))]
|
||||
[:div
|
||||
{:style {:opacity (rx (str @ease4))
|
||||
:-webkit-filter (rx (str "blur(" (* 15 (- 1 @ease4)) "px)"))}
|
||||
:-webkit-filter (rx (str "blur(" (* 15 (- 1 @ease4)) "px)"))
|
||||
:-moz-filter (rx (str "blur(" (* 15 (- 1 @ease4)) "px)"))
|
||||
:filter (rx (str "blur(" (* 15 (- 1 @ease4)) "px)"))
|
||||
}
|
||||
:node/on-attached (fn [node callback]
|
||||
(animation/start-easing! ease4 0.0 1.0 7000 animation/quad-in callback))
|
||||
}
|
||||
|
|
|
@ -157,8 +157,10 @@
|
|||
}
|
||||
:on-click #(open (tweet-url message))
|
||||
}
|
||||
(when (> height 2)
|
||||
[:div
|
||||
[user-pic {:message message}]
|
||||
; [user-name message params]
|
||||
[user-name message params]
|
||||
[text message]
|
||||
; [actions-holder message params]
|
||||
]))
|
||||
[actions-holder message params]]
|
||||
)]))
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
:msg "Nothing done yet."})
|
||||
|
||||
(def time-protection 10000)
|
||||
(def time-period 10000)
|
||||
(def time-period-margin 90000)
|
||||
(def time-period 4000)
|
||||
(def time-period-margin 15000)
|
||||
|
||||
;; ------------------------------------------------------------------------------
|
||||
;; Tasks
|
||||
|
@ -105,15 +105,18 @@
|
|||
[:div {:style {:text-align "left"
|
||||
:line-height "2em"
|
||||
:position "relative"
|
||||
:overflow "hidden"
|
||||
:right (rx (str (* @e tw-width) "vh"))
|
||||
:height "50vh"
|
||||
:font-family "Verdana, sans-serif"}}
|
||||
(for [tweet-sec (keys tweets-by-sec)]
|
||||
(for [tweet-sec (sort-by :pub_date_epoch_ms (keys tweets-by-sec))]
|
||||
(let [decalage (-
|
||||
(/ (+ time-period
|
||||
(- (:pub_date_epoch_ms tweet-sec)
|
||||
from))
|
||||
1000))]
|
||||
[:div {:style {:position "absolute"
|
||||
:bottom "0"
|
||||
:right (rx
|
||||
(str (- (* (- (/ (- (:pub_date_epoch_ms tweet-sec) (- time-period) from)
|
||||
1000) @e ) tw-width)) "vh"))
|
||||
:right (str (* decalage tw-width) "vh")
|
||||
:width (str tw-width "vh")
|
||||
}
|
||||
}
|
||||
|
@ -128,8 +131,7 @@
|
|||
:line-height "1.5em"
|
||||
:text-shadow "0 0 2px rgba(0,0,0,0.5)"
|
||||
:width "100%"}} (clojure.string/replace (.toISOString (js/Date. (:pub_date_epoch_ms tweet-sec)))
|
||||
#".*T(.*)\....Z" "$1")]
|
||||
])])))
|
||||
#".*T(.*)\....Z" "$1")]]))])))
|
||||
|
||||
(defn view-volume [state]
|
||||
[:div
|
||||
|
|
Loading…
Reference in a new issue