Skip to content

Instantly share code, notes, and snippets.

@odoe
Created January 12, 2015 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odoe/1b0f0cef590ba96c5845 to your computer and use it in GitHub Desktop.
Save odoe/1b0f0cef590ba96c5845 to your computer and use it in GitHub Desktop.
Sample layout using hiccup with Leaflet lib
(ns mapviewer.views.layout
(:require [hiccup.page :refer [html5 include-css]]
[hiccup.page :refer [include-css include-js]]))
(defn common [& body]
(html5
[:head
[:title "Welcome to mapviewer"]
(include-css "/css/screen.css")
(include-css "http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css")]
[:body body
[:div {:id "map"}]
(include-js "http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js")
(include-js "http://cdn-geoweb.s3.amazonaws.com/esri-leaflet/1.0.0-rc.3/esri-leaflet.js")
(include-js "/js/main.js")
[:script "site.init();"]]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment