 (defn gist-login-dialog
   []
   (let [can-dump-gist? (subscribe [:can-dump-gist? :cljs-console])
-        showing? (subscribe [:gist-showing?])]
+        showing? (subscribe [:gist-showing?])
+        media-query (subscribe [:media-query-size])]
     (fn []
       [popover-anchor-wrapper
        :showing? showing?
-       :position :right-center
+       :position (gist-position media-query)
        :anchor   [md-icon-button
                   :md-icon-name "zmdi-github"
                   :on-click #(dispatch [:show-gist-login])

    (utils/open-new-window (:html_url response))
    (dispatch [:set-gist-error-msg "An error occured: unable to create gist."])))

(defn gist-login-dialog-body
  []
  (let [showing? (subscribe [:gist-showing?])
        auth-data (subscribe [:gist-auth-data])
        ok-fn #(dispatch [:create-gist :cljs-console auth-data on-gist-created gist-error-handler])
        cancel-fn #(dispatch [:hide-gist-login])]

       [popover-content-wrapper
        :showing? showing?
        :on-cancel cancel-fn
        :position (gist-position media-query)
        :width "280"
        :backdrop-opacity 0.4
        :title "Github login"
