   (:use noir.core
         hiccup.core
         hiccup.page-helpers))
+
+(def ^:dynamic *javascripts* ["/js/bootstrap.min.js"])
+
+(defmacro with-javascripts
+  "Specify what javascripts to use dynamically."
+  [js-paths & body]
+  `(binding [*javascripts* ~js-paths]
+     ~@body))
 
 (defpartial base-layout [& content]
   (html5

     (include-js (str "https://ajax.googleapis.com/ajax/libs/"
                      "jquery/1.7.2/jquery.min.js")
                 "/js/jquery-1.7.2.min.js")
     [:script {:type "text/javascript"}
      "var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-32354071-1']);

      s.parentNode.insertBefore(ga, s);
      })();"]]
    [:body
     content
     (html (map include-js *javascripts*))]))

(defpartial user-links []
  [:li.dropdown
