diff options
Diffstat (limited to 'StoneIsland')
| -rw-r--r-- | StoneIsland/www/css/blogs.css | 4 | ||||
| -rw-r--r-- | StoneIsland/www/index.html | 2 | ||||
| -rw-r--r-- | StoneIsland/www/js/index.js | 1 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/etc/geo.js | 33 |
4 files changed, 40 insertions, 0 deletions
diff --git a/StoneIsland/www/css/blogs.css b/StoneIsland/www/css/blogs.css index 19e3f8fd..455b76d5 100644 --- a/StoneIsland/www/css/blogs.css +++ b/StoneIsland/www/css/blogs.css @@ -226,6 +226,10 @@ ul.links { transform: translateZ(0) translateX(-50%) translateY(-50%); } +#archive .menu .items { + border-top: 1px solid transparent; +} + #archive.menu .menu { opacity: 1; pointer-events: auto; diff --git a/StoneIsland/www/index.html b/StoneIsland/www/index.html index 5bab617f..7bd73c84 100644 --- a/StoneIsland/www/index.html +++ b/StoneIsland/www/index.html @@ -1063,6 +1063,8 @@ <script src="js/sdk/product.js"></script> <script src="js/sdk/shipping.js"></script> +<script src="js/lib/etc/geo.js"></script> + <script src="js/lib/view/View.js"></script> <script src="js/lib/view/Router.js"></script> <script src="js/lib/view/Scrollable.js"></script> diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js index 208eab21..1f2de128 100644 --- a/StoneIsland/www/js/index.js +++ b/StoneIsland/www/js/index.js @@ -64,6 +64,7 @@ var app = (function(){ app.ready = function(){ if (window.cordova) { cordova.plugins.Keyboard.disableScroll(true) + geo.fetch() } app.view = null diff --git a/StoneIsland/www/js/lib/etc/geo.js b/StoneIsland/www/js/lib/etc/geo.js new file mode 100644 index 00000000..0270d681 --- /dev/null +++ b/StoneIsland/www/js/lib/etc/geo.js @@ -0,0 +1,33 @@ +var geo = (function(){ + var geo = {} + + geo.fetch = function(){ + navigator.geolocation.getCurrentPosition(geo.success, geo.error, {timeout: 15000}) + } + + geo.success = function(position){ + var lat_str = as_degrees( position.coords.latitude ) + var lng_str = as_degrees( position.coords.longitude ) + } + + geo.error = function(error){ + $(".latlng").html( "+40° 58' 90\" -74° 04' 46\"" ) + } + + function as_degrees (n) { + var s = "" + if (n >= 0) s += "+" + s += Math.floor(n) + "° " + + n %= 1 + n *= 60 + s += Math.floor(n) + "'" + + n %= 1 + n *= 60 + + s += Math.floor(n) + '"' + } + + return geo +})()
\ No newline at end of file |
