From ad184e4b5bebc950842653998471cc6e60e8b5bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sun, 18 Nov 2018 08:17:28 +0100 Subject: [PATCH] Add global tabs --- index.php | 1 + src/index.js | 4 ++++ style.css | 5 +++++ 3 files changed, 10 insertions(+) diff --git a/index.php b/index.php index f27a722d..5108e2b3 100644 --- a/index.php +++ b/index.php @@ -64,6 +64,7 @@ html_export_var(array(
OpenStreet Browser
'>
+
diff --git a/src/index.js b/src/index.js index 0dab30bf..3ba31ffa 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,7 @@ /* globals map:true, overpassFrontend:true, currentPath:true, options:true, baseCategory:true, overpassUrl:true showDetails */ var LeafletGeoSearch = require('leaflet-geosearch') +const tabs = require('modulekit-tabs') var OverpassFrontend = require('overpass-frontend') var OpenStreetBrowserLoader = require('./OpenStreetBrowserLoader') @@ -17,6 +18,7 @@ global.baseCategory = null global.overpassUrl = null global.overpassFrontend = null global.currentPath = null +global.tabs = null var lastPopupClose = 0 // Optional modules @@ -42,6 +44,8 @@ window.onload = function () { options = {} } + global.tabs = new tabs.Tabs(document.getElementById('globalTabs')) + call_hooks('init') call_hooks_callback('init_callback', initState, onload2.bind(this, initState)) diff --git a/style.css b/style.css index ddc416e2..ee0a8534 100644 --- a/style.css +++ b/style.css @@ -77,6 +77,11 @@ a:active { font-size: 16px; } +#sidebar > #globalTabs { + padding-left: 10px; + padding-right: 10px; +} + #sidebar > #content { flex: 1; flex-shrink: 0;