From 599c214ec4aa5dfcffb14d68dbd9b56eb0df2e9d Mon Sep 17 00:00:00 2001 From: "Yann Esposito (Yogsototh)" Date: Fri, 28 Aug 2015 23:19:36 +0200 Subject: [PATCH] nicer effects --- src/apintro/message.cljs | 26 ++++++++++++++---------- src/apintro/vgapi.cljs | 44 +++++++++++++++++++++++++--------------- 2 files changed, 43 insertions(+), 27 deletions(-) diff --git a/src/apintro/message.cljs b/src/apintro/message.cljs index 6ecfc84..96fde52 100644 --- a/src/apintro/message.cljs +++ b/src/apintro/message.cljs @@ -22,7 +22,8 @@ (defn user-name [message params] "display user screen name as message header section" (if (:reshared message) - [:div + [:div {:style {:text-decoration "underline" + :font-weight "bold"}} ;;double display with original author if RT [:div {:class "retweeted_holder"} [:p {:style {:cursor "pointer"} @@ -46,7 +47,8 @@ ;; simple display otherwise - [:div {:class "username_holder "} + [:div {:style {:text-decoration "underline" + :font-weight "bold"}} [:p {:style {:cursor "pointer"} :on-click #(open (str "http://www.twitter.com/" (:user-screen_name message))) @@ -81,7 +83,8 @@ (defn publish-date "Display the publication date in timeago format." [message] - [:span (:pub_date_epoch_ms message)]) + [:div {:style {:opacity 0.5}} + (.toISOString (js/Date. (:pub_date_epoch_ms message)))]) (defn actions-holder [message params] "twitter actions for a message" @@ -118,8 +121,8 @@ (:user-profile_image_url message)) _ (when-not image-url (println "image-url nil: " message)) author-page (author-page-url message)] - [:img {:style {:height height - :width width + [:img {:style {:max-height "100%" + :max-width "30%" :margin-right "2%" :cursor "pointer" :float "left" @@ -133,7 +136,6 @@ (get-in message [:retweeted_status :text]) (:text message))] [:p {:style {:cursor "pointer" - :font-size "0.8em" :line-height "1.2em"} :on-click #(let [target (js/$ (aget % "target")) el-type (aget target 0 "localName")] @@ -145,13 +147,15 @@ (defn message [message & params] "Message component" (when message - [:div {:style {:height "250px" :width "23%" :overflow "hidden" :float "left" + [:div {:style {:height "120px" + :width "100%" + :font-size "0.5em" + :overflow "hidden" :border "solid 1px rgba(0,0,0,0.3)" :background "rgba(0,0,0,0.1)" :margin "0.5%" }} - [:div - [user-pic {:message message :width "30%"}] - [user-name message params] - [text message]] + [user-pic {:message message}] + [user-name message params] + [text message] [actions-holder message params]])) diff --git a/src/apintro/vgapi.cljs b/src/apintro/vgapi.cljs index 38e93fb..1dacd61 100644 --- a/src/apintro/vgapi.cljs +++ b/src/apintro/vgapi.cljs @@ -30,7 +30,7 @@ (smart-si (fn [] (go (let [now (.getTime (new js/Date)) - from (.toISOString (new js/Date (- now (+ interval (* 60 1000))))) + from (.toISOString (new js/Date (- now (+ (* 2 interval) (* 60 1000))))) to (.toISOString (new js/Date (- now (* 60 1000)))) response (