+
{results.map((result, idx) => (
-
{result.label}
+
{result.label}
))}
);
diff --git a/docs/index.html b/docs/index.html
index eb92babc..6a3b7179 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -4,10 +4,10 @@
Leaflet.GeoSearch / Google Provider
-
-
+
+
-
+
diff --git a/docs/style.css b/docs/style.css
index d09c8a78..60a23495 100644
--- a/docs/style.css
+++ b/docs/style.css
@@ -10,147 +10,3 @@ html, body {
*, *:before, *:after {
box-sizing: inherit;
}
-
-#app, #app > .container {
- height: 100%;
- position: relative;
-}
-
-#app .header,
-.content.search {
- width: 80%;
- margin: 0 auto;
- position: relative;
-}
-
-.content.search {
- width: calc(80% - 325px);
- margin: 0 0 0 10%;
-}
-
-#app .header {
- height: 100px;
-}
-
-h1 {
- font-family: 'Roboto', sans-serif;
- font-size: 32px;
- font-weight: 300;
- line-height: 64px;
- margin: 0;
- padding: 0;
-}
-
-ul {
- list-style: none;
- display: block;
- overflow: hidden;
- margin: 0;
- padding: 0;
- line-height: 32px
-}
-
-ul li {
- float: left;
- display: block;
- cursor: pointer;
-}
-
-ul li a {
- text-decoration: none;
- color: inherit;
- display: block;
- width: 100%;
- height: 100%;
- padding: 0 24px;
-}
-
-ul li.active {
- border-bottom: 4px solid #2196f3;
-}
-
-ul li:hover {
- border-bottom: 4px solid #00bcd4;
-}
-
-.content {
- position: absolute;
- display: block;
- width: 100%;
- height: calc(100% - 100px);
-}
-
-
-.results > * {
- border: 1px solid transparent;
- line-height: 32px;
- padding: 0 32px;
-}
-
-.results > *:hover,
-.results > .active {
- background-color: #f8f8f8;
- border-color: #c6c6c6;
-}
-
-form {
- position: relative;
- margin: 32px 0;
- background-color: #fff;
- vertical-align: top;
- border-radius: 2px;
- box-shadow: 0 2px 2px 0 rgba(0,0,0,0.16), 0 0 0 1px rgba(0,0,0,0.08);
- transition: box-shadow 200ms cubic-bezier(0.4, 0.0, 0.2, 1);
-}
-
-form.active, form:hover {
- box-shadow: 0 3px 8px 0 rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.08);
-}
-
-input {
- border: none;
- padding: 0;
- margin: 0;
- width: 100%;
- outline: none;
- font: 16px arial, sans-serif;
- line-height: 48px;
- height: 48px;
- text-indent: 18px;
-}
-
-form button {
- outline: none;
- display: block;
- position: absolute;
- right: 0;
- height: 100%;
- width: 100px;
- background-color: #f8f8f8;
- border: 1px solid #c6c6c6;
-}
-
-.leaflet-map {
- position: absolute;
- display: block;
- width: 100%;
- height: 100%;
-}
-
-.code {
- position: absolute;
- top: 120px;
- right: 20px;
- bottom: 20px;
- width: 425px;
-
- background: rgba(0, 0, 0, .7);
- color: #fff;
- border-radius: 4px;
- padding: 24px;
- font-family: Roboto, monospace;
- white-space: pre;
-
- font-size: 14px;
- line-height: 22px;
-}
diff --git a/package.json b/package.json
index 1459eb90..150591df 100644
--- a/package.json
+++ b/package.json
@@ -63,6 +63,7 @@
"babel-preset-power-assert": "^1.0.0",
"browser-env": "^2.0.16",
"cross-env": "^3.1.3",
+ "css-loader": "^0.26.1",
"dotenv": "^2.0.0",
"eslint": "^3.12.2",
"eslint-config-airbnb": "^13.0.0",
@@ -70,6 +71,7 @@
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-react": "^6.8.0",
"eslint-watch": "^2.1.14",
+ "extract-text-webpack-plugin": "^1.0.1",
"fast-async": "^6.1.2",
"leaflet": "^1.0.2",
"lodash.merge": "^4.6.0",
@@ -80,6 +82,7 @@
"preact": "^7.1.0",
"raw-loader": "^0.5.1",
"rimraf": "^2.5.4",
+ "style-loader": "^0.13.1",
"testdouble": "^1.10.0",
"webpack": "^1.14.0",
"webpack-dev-server": "^1.16.2"
diff --git a/webpack.config.babel.js b/webpack.config.babel.js
index 7da1e8c0..74769e88 100644
--- a/webpack.config.babel.js
+++ b/webpack.config.babel.js
@@ -1,5 +1,6 @@
import webpack from 'webpack';
import path from 'path';
+import ExtractTextPlugin from 'extract-text-webpack-plugin';
const { NODE_ENV } = process.env;
const production = NODE_ENV === 'production';
@@ -9,6 +10,7 @@ const plugins = [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(NODE_ENV),
}),
+ new ExtractTextPlugin('style.css', { allChunks: true }),
];
if (production) {
@@ -50,7 +52,14 @@ export default {
module: {
loaders: [
{
- test: /\.html|\.css$/,
+ test: /\.css$/,
+ loader: ExtractTextPlugin.extract(
+ 'style-loader',
+ 'css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]',
+ ),
+ },
+ {
+ test: /\.html$/,
loader: 'raw-loader',
},
{