Commits

Miki Tebeka  committed 7d6964c

JS at end

  • Participants
  • Parent commits d0ff33d

Comments (0)

Files changed (1)

File src/biggieurl.clj

 (def *jquery-url* 
   "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js")
 
-
 (defn header-link []
   (if (nil? (current-user))
     [:a {:href (login-url "/")} "Login"]
   (html
     [:head
      (include-css "/static/site.css")
-     (include-js *jquery-url*)
-     (include-js "/static/site.js")
      [:title *title*]]
     [:body 
      [:div {:class "header"} "Hello " (user-name) " [" (header-link) "]"]
      [:h1 *title*]
      "URL: " [:input {:type "text" :id "url" :size "100"}]
      [:button {:id "shorten"} "Shorten"]
-     [:div {:id "shortened" :class "shortened"}]]))
+     [:div {:id "shortened" :class "shortened"}]]
+     (include-js *jquery-url*)
+     (include-js "/static/site.js")))
 
 (defroutes biggieurl-routes
   (GET "/" [] (home-page))