 "]
              [:div {:style "margin-top: 20px"}
               (like-button site-url)]]
+            [:a {:style "text-decoration: underline" :href "/yhteiset"}
+             "Yhteiset tiedostot"]
             [:h2 "Koulut"]
             koulut
             [:h2 "Päiväkodit"]


(def styles "
<style>

  .intro-jumbotron {
      background-image: url(siru_ja_muksu2.jpg);

(defn add-ip! [ip]
  (swap! ips-atom (fn [ips]
                    (take 10 (conj ips {:ip ip
                                        :time (Date.)})))))

(defn report-ips [ips]
  (hiccup/html
   [:ul
    (map (fn [ip]
           [:li (date-time-string (date-to-map (:time ip))) [:br]
            [:strong (pr-str (:ip ip))]])
         ips)]))

(defn app []
  (compojure/routes (compojure/GET "/" []
                                   (front-page))

                    (compojure/GET "/ip/add" request
                                   (add-ip! (or (get-in request [:headers "x-forwarded-for"])
                                                (:remote-addr request)))
                                   "thanks!")

                    (compojure/GET "/ip/report" request
                                   (report-ips @ips-atom))

                    (compojure/GET "/ip/edn" request
                                   (pr-str @ips-atom))

                    (compojure/GET ["/get/:folder/:file" :folder #"[^/]+" :file #"[^/]+"]  [folder file]
                                   (do (timbre/info (str "load file " (URLDecoder/decode folder) "/" (URLDecoder/decode file)))
                                       (response/file-response (str files-directory "/" (URLDecoder/decode folder) "/" (URLDecoder/decode file)))))

                    (compojure/GET ["/:folder" :folder #"[^/]+"]  [folder]
                                   (show-folder folder))

                    (compojure/GET ["/:folder/:file" :folder #"[^/]+" :file #"[^/]+"] [folder file]
                                   (show-file folder file))))

(def handler (-> (app)
                 (file/wrap-file "resources")))

(comment
  * * * * * curl http://kuntotiedot.sirpakauppinen.fi/ip/add
  ) ;; TODO: remove-me
