diff --git a/frontend/css/app.css b/frontend/css/app.css index fb704e866..be80e4f81 100644 --- a/frontend/css/app.css +++ b/frontend/css/app.css @@ -63,3 +63,12 @@ main { line-height: 20px; color: #E0E0E0; } + +div.leaflet-container .leaflet-marker-photo { + box-shadow: 0px 3px 1px -2px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 1px 5px 0px rgba(0,0,0,0.12) !important; + background-color: rgba(0,0,0,0.3); + border-color: #fff; + color: rgba(0,0,0,0.87); + display: block; + border-radius: 50%; +} diff --git a/frontend/src/app.js b/frontend/src/app.js index 846a1e415..ca3864c5c 100644 --- a/frontend/src/app.js +++ b/frontend/src/app.js @@ -6,7 +6,8 @@ import App from 'app/main.vue'; import routes from 'app/routes'; import Api from 'common/api'; import Config from 'common/config'; -import Components from 'component/components'; +import Components from 'component/init'; +import Maps from 'maps/init'; import Alert from 'common/alert'; import Gallery from 'common/gallery'; import Session from 'common/session'; @@ -49,6 +50,7 @@ Vue.use(InfiniteScroll); Vue.use(VueTruncate); Vue.use(VueFullscreen); Vue.use(Components); +Vue.use(Maps); Vue.use(Router); // Configure client-side routing diff --git a/frontend/src/app/pages/places.vue b/frontend/src/app/pages/places.vue index 99b2d420a..f72a82161 100644 --- a/frontend/src/app/pages/places.vue +++ b/frontend/src/app/pages/places.vue @@ -135,6 +135,7 @@ iconUrl: result.getThumbnailUrl('square', 50), iconRetinaUrl: result.getThumbnailUrl('square', 100), iconSize: [50, 50], + className: 'leaflet-marker-photo', }), location: L.latLng(result.PhotoLat, result.PhotoLong), }); diff --git a/frontend/src/component/components.js b/frontend/src/component/components.js deleted file mode 100644 index ab3fcf71d..000000000 --- a/frontend/src/component/components.js +++ /dev/null @@ -1,30 +0,0 @@ -import AppAlert from './app-alert.vue'; -import AppNavigation from './app-navigation.vue'; -import AppLoadingBar from './app-loading-bar.vue'; -import AppGallery from './app-gallery.vue'; -import {LMap, LTileLayer, LMarker, LControl} from 'vue2-leaflet'; -import {Icon} from 'leaflet'; - -const components = {}; - -components.install = (Vue) => { - Vue.component('app-alert', AppAlert); - Vue.component('app-gallery', AppGallery); - Vue.component('app-navigation', AppNavigation); - Vue.component('app-loading-bar', AppLoadingBar); - - Vue.component('l-map', LMap); - Vue.component('l-tile-layer', LTileLayer); - Vue.component('l-marker', LMarker); - Vue.component('l-control', LControl); - - delete Icon.Default.prototype._getIconUrl; - - Icon.Default.mergeOptions({ - iconRetinaUrl: require('leaflet/dist/images/marker-icon-2x.png'), - iconUrl: require('leaflet/dist/images/marker-icon.png'), - shadowUrl: require('leaflet/dist/images/marker-shadow.png') - }); -}; - -export default components; diff --git a/frontend/src/component/init.js b/frontend/src/component/init.js new file mode 100644 index 000000000..ebed582c7 --- /dev/null +++ b/frontend/src/component/init.js @@ -0,0 +1,15 @@ +import AppAlert from './app-alert.vue'; +import AppNavigation from './app-navigation.vue'; +import AppLoadingBar from './app-loading-bar.vue'; +import AppGallery from './app-gallery.vue'; + +const components = {}; + +components.install = (Vue) => { + Vue.component('app-alert', AppAlert); + Vue.component('app-gallery', AppGallery); + Vue.component('app-navigation', AppNavigation); + Vue.component('app-loading-bar', AppLoadingBar); +}; + +export default components; diff --git a/frontend/src/maps/init.js b/frontend/src/maps/init.js new file mode 100644 index 000000000..79f11d023 --- /dev/null +++ b/frontend/src/maps/init.js @@ -0,0 +1,21 @@ +import {LMap, LTileLayer, LMarker, LControl} from 'vue2-leaflet'; +import {Icon} from 'leaflet'; + +const components = {}; + +components.install = (Vue) => { + Vue.component('l-map', LMap); + Vue.component('l-tile-layer', LTileLayer); + Vue.component('l-marker', LMarker); + Vue.component('l-control', LControl); + + delete Icon.Default.prototype._getIconUrl; + + Icon.Default.mergeOptions({ + iconRetinaUrl: require('./marker/marker-icon-2x-red.png'), + iconUrl: require('./marker/marker-icon-red.png'), + shadowUrl: require('./marker/marker-shadow.png') + }); +}; + +export default components; diff --git a/frontend/src/maps/marker/marker-icon-2x-black.png b/frontend/src/maps/marker/marker-icon-2x-black.png new file mode 100644 index 000000000..23c94cfed Binary files /dev/null and b/frontend/src/maps/marker/marker-icon-2x-black.png differ diff --git a/frontend/src/maps/marker/marker-icon-2x-green.png b/frontend/src/maps/marker/marker-icon-2x-green.png new file mode 100644 index 000000000..c359abb6c Binary files /dev/null and b/frontend/src/maps/marker/marker-icon-2x-green.png differ diff --git a/frontend/src/maps/marker/marker-icon-2x-grey.png b/frontend/src/maps/marker/marker-icon-2x-grey.png new file mode 100644 index 000000000..43b3eb4d0 Binary files /dev/null and b/frontend/src/maps/marker/marker-icon-2x-grey.png differ diff --git a/frontend/src/maps/marker/marker-icon-2x-orange.png b/frontend/src/maps/marker/marker-icon-2x-orange.png new file mode 100644 index 000000000..c3c863211 Binary files /dev/null and b/frontend/src/maps/marker/marker-icon-2x-orange.png differ diff --git a/frontend/src/maps/marker/marker-icon-2x-red.png b/frontend/src/maps/marker/marker-icon-2x-red.png new file mode 100644 index 000000000..1c26e9fc2 Binary files /dev/null and b/frontend/src/maps/marker/marker-icon-2x-red.png differ diff --git a/frontend/src/maps/marker/marker-icon-2x-violet.png b/frontend/src/maps/marker/marker-icon-2x-violet.png new file mode 100644 index 000000000..ea748aa32 Binary files /dev/null and b/frontend/src/maps/marker/marker-icon-2x-violet.png differ diff --git a/frontend/src/maps/marker/marker-icon-2x-yellow.png b/frontend/src/maps/marker/marker-icon-2x-yellow.png new file mode 100644 index 000000000..8b677d939 Binary files /dev/null and b/frontend/src/maps/marker/marker-icon-2x-yellow.png differ diff --git a/frontend/src/maps/marker/marker-icon-black.png b/frontend/src/maps/marker/marker-icon-black.png new file mode 100644 index 000000000..d262ae42e Binary files /dev/null and b/frontend/src/maps/marker/marker-icon-black.png differ diff --git a/frontend/src/maps/marker/marker-icon-green.png b/frontend/src/maps/marker/marker-icon-green.png new file mode 100644 index 000000000..56db5ea9f Binary files /dev/null and b/frontend/src/maps/marker/marker-icon-green.png differ diff --git a/frontend/src/maps/marker/marker-icon-grey.png b/frontend/src/maps/marker/marker-icon-grey.png new file mode 100644 index 000000000..ebbab8eff Binary files /dev/null and b/frontend/src/maps/marker/marker-icon-grey.png differ diff --git a/frontend/src/maps/marker/marker-icon-orange.png b/frontend/src/maps/marker/marker-icon-orange.png new file mode 100644 index 000000000..fbbce7b2a Binary files /dev/null and b/frontend/src/maps/marker/marker-icon-orange.png differ diff --git a/frontend/src/maps/marker/marker-icon-red.png b/frontend/src/maps/marker/marker-icon-red.png new file mode 100644 index 000000000..3e64e06d1 Binary files /dev/null and b/frontend/src/maps/marker/marker-icon-red.png differ diff --git a/frontend/src/maps/marker/marker-icon-violet.png b/frontend/src/maps/marker/marker-icon-violet.png new file mode 100644 index 000000000..28efc3cc0 Binary files /dev/null and b/frontend/src/maps/marker/marker-icon-violet.png differ diff --git a/frontend/src/maps/marker/marker-icon-yellow.png b/frontend/src/maps/marker/marker-icon-yellow.png new file mode 100644 index 000000000..b011eea31 Binary files /dev/null and b/frontend/src/maps/marker/marker-icon-yellow.png differ diff --git a/frontend/src/maps/marker/marker-shadow.png b/frontend/src/maps/marker/marker-shadow.png new file mode 100644 index 000000000..84c580847 Binary files /dev/null and b/frontend/src/maps/marker/marker-shadow.png differ diff --git a/frontend/webpack.config.js b/frontend/webpack.config.js index e339f9fa0..b24011206 100644 --- a/frontend/webpack.config.js +++ b/frontend/webpack.config.js @@ -157,7 +157,12 @@ const config = { }, { test: /\.(png|jpg|jpeg|gif)$/, - loader: 'url-loader', + loader: 'file-loader', + options: { + name: '[hash].[ext]', + publicPath: '/assets/build/img', + outputPath: 'img', + } }, { test: /\.(woff(2)?|ttf|eot)(\?v=\d+\.\d+\.\d+)?$/,