aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/front/javascript.html
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2015-10-05 11:20:09 +0100
committerMatthew Somerville <matthew@mysociety.org>2015-10-07 13:35:21 +0100
commit1eccd97c82cf22bf3979378f85cbc7ec39a66807 (patch)
treec093dff839f28bc506cb5ab5fb9bf31405ec43dc /templates/web/base/front/javascript.html
parent2b9178d071c383f0064ce3e545afb3f4b4ffdabd (diff)
Combine some base/fixmystreet templates.
The aim is to combine base and fixmystreet as much as possible, providing enough template/styling hooks for any cobrand. This commit removes the need for separate base/fixmystreet templates for the front page, almost all of the /around templates, the open graph headers, and the low level item list templates.
Diffstat (limited to 'templates/web/base/front/javascript.html')
-rw-r--r--templates/web/base/front/javascript.html15
1 files changed, 15 insertions, 0 deletions
diff --git a/templates/web/base/front/javascript.html b/templates/web/base/front/javascript.html
new file mode 100644
index 000000000..13aa5216c
--- /dev/null
+++ b/templates/web/base/front/javascript.html
@@ -0,0 +1,15 @@
+[%# Assume using OpenStreetMap maps %]
+<script>
+yepnope.addPrefix( 'preload', function ( resource ) {
+ resource.noexec = true;
+ return resource;
+});
+Modernizr.load({
+ load: [
+ "preload![% version('/js/OpenLayers.fixmystreet.js') %]",
+ "preload![% version('/js/map-OpenLayers.js') %]",
+ "preload![% version('/js/map-OpenStreetMap.js') %]",
+ "preload![% version('/js/jquery.ba-hashchange.min.js') %]"
+ ]
+});
+</script>