|
1 | 1 | <!DOCTYPE html> |
2 | 2 | <html lang="en"> |
3 | | - |
4 | | -<head> |
5 | | - <title>React mapbox gl example</title> |
6 | | - <meta charset="UTF-8"> |
7 | | - <meta name="description" content="React mapbox gl example"> |
8 | | - <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> |
9 | | - <link href="https://fonts.googleapis.com/css?family=Nunito:300,400,600,700|Source+Code+Pro" rel="stylesheet"> |
10 | | - <!-- Start Single Page Apps for GitHub Pages --> |
11 | | - <script type="text/javascript"> |
12 | | - // Single Page Apps for GitHub Pages |
13 | | - // https://github.com/rafrex/spa-github-pages |
14 | | - // Copyright (c) 2016 Rafael Pedicini, licensed under the MIT License |
15 | | - // ---------------------------------------------------------------------- |
16 | | - // This script checks to see if a redirect is present in the query string |
17 | | - // and converts it back into the correct url and adds it to the |
18 | | - // browser's history using window.history.replaceState(...), |
19 | | - // which won't cause the browser to attempt to load the new url. |
20 | | - // When the single page app is loaded further down in this file, |
21 | | - // the correct url will be waiting in the browser's history for |
22 | | - // the single page app to route accordingly. |
23 | | - (function (l) { |
24 | | - if (l.search) { |
25 | | - var q = {}; |
26 | | - l.search.slice(1).split('&').forEach(function (v) { |
27 | | - var a = v.split('='); |
28 | | - q[a[0]] = a.slice(1).join('=').replace(/~and~/g, '&'); |
29 | | - }); |
30 | | - if (q.p !== undefined) { |
31 | | - window.history.replaceState(null, null, |
32 | | - l.pathname.slice(0, -1) + (q.p || '') + |
33 | | - (q.q ? ('?' + q.q) : '') + |
34 | | - l.hash |
35 | | - ); |
| 3 | + <head> |
| 4 | + <title>React mapbox gl example</title> |
| 5 | + <meta charset="UTF-8" /> |
| 6 | + <meta name="description" content="React mapbox gl example" /> |
| 7 | + <meta |
| 8 | + name="viewport" |
| 9 | + content="width=device-width, initial-scale=1.0, user-scalable=yes" |
| 10 | + /> |
| 11 | + <link |
| 12 | + href="https://api.mapbox.com/mapbox-gl-js/v1.10.1/mapbox-gl.css" |
| 13 | + rel="stylesheet" |
| 14 | + /> |
| 15 | + <link |
| 16 | + href="https://fonts.googleapis.com/css?family=Nunito:300,400,600,700|Source+Code+Pro" |
| 17 | + rel="stylesheet" |
| 18 | + /> |
| 19 | + <!-- Start Single Page Apps for GitHub Pages --> |
| 20 | + <script type="text/javascript"> |
| 21 | + // Single Page Apps for GitHub Pages |
| 22 | + // https://github.com/rafrex/spa-github-pages |
| 23 | + // Copyright (c) 2016 Rafael Pedicini, licensed under the MIT License |
| 24 | + // ---------------------------------------------------------------------- |
| 25 | + // This script checks to see if a redirect is present in the query string |
| 26 | + // and converts it back into the correct url and adds it to the |
| 27 | + // browser's history using window.history.replaceState(...), |
| 28 | + // which won't cause the browser to attempt to load the new url. |
| 29 | + // When the single page app is loaded further down in this file, |
| 30 | + // the correct url will be waiting in the browser's history for |
| 31 | + // the single page app to route accordingly. |
| 32 | + (function (l) { |
| 33 | + if (l.search) { |
| 34 | + var q = {}; |
| 35 | + l.search |
| 36 | + .slice(1) |
| 37 | + .split('&') |
| 38 | + .forEach(function (v) { |
| 39 | + var a = v.split('='); |
| 40 | + q[a[0]] = a.slice(1).join('=').replace(/~and~/g, '&'); |
| 41 | + }); |
| 42 | + if (q.p !== undefined) { |
| 43 | + window.history.replaceState( |
| 44 | + null, |
| 45 | + null, |
| 46 | + l.pathname.slice(0, -1) + |
| 47 | + (q.p || '') + |
| 48 | + (q.q ? '?' + q.q : '') + |
| 49 | + l.hash |
| 50 | + ); |
| 51 | + } |
36 | 52 | } |
37 | | - } |
38 | | - }(window.location)) |
39 | | - </script> |
40 | | - <!-- End Single Page Apps for GitHub Pages --> |
41 | | -</head> |
42 | | - |
43 | | -<body> |
44 | | - <div id="root"></div> |
45 | | -</body> |
| 53 | + })(window.location); |
| 54 | + </script> |
| 55 | + <!-- End Single Page Apps for GitHub Pages --> |
| 56 | + </head> |
46 | 57 |
|
| 58 | + <body> |
| 59 | + <div id="root"></div> |
| 60 | + </body> |
47 | 61 | </html> |
0 commit comments