Merge branch 'release/0.1.2'
This commit is contained in:
commit
c3da2ec5b1
61 changed files with 6728 additions and 489 deletions
9
.babelrc
Normal file
9
.babelrc
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"presets": [
|
||||
["latest", {
|
||||
"es2015": {
|
||||
"modules": false
|
||||
}
|
||||
}]
|
||||
]
|
||||
}
|
||||
18
Makefile
18
Makefile
|
|
@ -1,13 +1,14 @@
|
|||
# A Makefile to run various tasks
|
||||
|
||||
.PHONY: sass js compress
|
||||
.PHONY: sass frontend js compress lint-sass lint-js
|
||||
jsfiles := $(wildcard resources/assets/js/*.js)
|
||||
sassfiles := $(wildcard resources/assets/sass/*.scss)
|
||||
yarnfiles:= node_modules/whatwg-fetch/fetch.js \
|
||||
node_modules/alertify.js/dist/js/alertify.js \
|
||||
node_modules/store2/dist/store2.min.js \
|
||||
node_modules/autolinker/dist/Autolinker.min.js \
|
||||
node_modules/marked/marked.min.js
|
||||
node_modules/marked/marked.min.js \
|
||||
node_modules/mapbox-gl/dist/mapbox-gl.css
|
||||
assets := public/assets/css/app.css \
|
||||
public/assets/prism/prism.css public/assets/prism/prism.js \
|
||||
$(wildcard public/assets/js/*.js) \
|
||||
|
|
@ -16,8 +17,9 @@ $(wildcard public/assets/frontend/*.js)
|
|||
|
||||
sass: public/assets/css/app.css
|
||||
|
||||
public/assets/css/app.css: $(sassfiles)
|
||||
public/assets/css/app.css: lint-sass
|
||||
sassc --style compressed --sourcemap resources/assets/sass/app.scss public/assets/css/app.css
|
||||
postcss --use autoprefixer --autoprefixer.browsers "> 5%" --output public/assets/css/app.css public/assets/css/app.css
|
||||
|
||||
frontend: $(yarnfiles)
|
||||
for f in $^; do \
|
||||
|
|
@ -34,3 +36,13 @@ compress: $(assets)
|
|||
zopfli $$f; \
|
||||
bro --force --quality 11 --input $$f --output $$f.br; \
|
||||
done;
|
||||
|
||||
lint-sass: $(sassfiles)
|
||||
for f in $^; do \
|
||||
stylelint --syntax=scss $$f; \
|
||||
done;
|
||||
|
||||
lint-js: $(jsfiles)
|
||||
for f in $^; do \
|
||||
eslint $$f; \
|
||||
done;
|
||||
|
|
|
|||
|
|
@ -103,7 +103,6 @@ class MicropubController extends Controller
|
|||
* appropriately. Further if the request has the query parameter
|
||||
* synidicate-to we respond with the known syndication endpoints.
|
||||
*
|
||||
* @todo Move the syndication endpoints into a .env variable
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ class NotesController extends Controller
|
|||
$note->longitude = $lnglat[0];
|
||||
$note->address = $note->place->name;
|
||||
$note->placeLink = '/places/' . $note->place->slug;
|
||||
$note->geoJson = $this->getGeoJson($note->longitude, $note->latitude, $note->place->name, $note->place->icon);
|
||||
}
|
||||
$photoURLs = [];
|
||||
$photos = $note->getMedia();
|
||||
|
|
@ -109,16 +110,22 @@ class NotesController extends Controller
|
|||
case 'in-reply-to':
|
||||
$content['source'] = $webmention->source;
|
||||
if (isset($microformats['items'][0]['properties']['published'][0])) {
|
||||
$content['date'] = $carbon->parse($microformats['items'][0]['properties']['published'][0])->toDayDateTimeString();
|
||||
$content['date'] = $carbon->parse(
|
||||
$microformats['items'][0]['properties']['published'][0]
|
||||
)->toDayDateTimeString();
|
||||
} else {
|
||||
$content['date'] = $webmention->updated_at->toDayDateTimeString();
|
||||
}
|
||||
$content['reply'] = $this->filterHTML($microformats['items'][0]['properties']['content'][0]['html']);
|
||||
$content['reply'] = $this->filterHTML(
|
||||
$microformats['items'][0]['properties']['content'][0]['html']
|
||||
);
|
||||
$replies[] = $content;
|
||||
break;
|
||||
|
||||
case 'repost-of':
|
||||
$content['date'] = $carbon->parse($microformats['items'][0]['properties']['published'][0])->toDayDateTimeString();
|
||||
$content['date'] = $carbon->parse(
|
||||
$microformats['items'][0]['properties']['published'][0]
|
||||
)->toDayDateTimeString();
|
||||
$content['source'] = $webmention->source;
|
||||
$reposts[] = $content;
|
||||
break;
|
||||
|
|
@ -144,6 +151,7 @@ class NotesController extends Controller
|
|||
$note->longitude = $lnglat[0];
|
||||
$note->address = $note->place->name;
|
||||
$note->placeLink = '/places/' . $note->place->slug;
|
||||
$note->geoJson = $this->getGeoJson($note->longitude, $note->latitude, $note->place->name, $note->place->icon);
|
||||
}
|
||||
|
||||
$photoURLs = [];
|
||||
|
|
@ -311,7 +319,11 @@ class NotesController extends Controller
|
|||
]);
|
||||
$json = json_decode($response->getBody());
|
||||
if (isset($json->address->town)) {
|
||||
$address = '<span class="p-locality">' . $json->address->town . '</span>, <span class="p-country-name">' . $json->address->country . '</span>';
|
||||
$address = '<span class="p-locality">'
|
||||
. $json->address->town
|
||||
. '</span>, <span class="p-country-name">'
|
||||
. $json->address->country
|
||||
. '</span>';
|
||||
Cache::forever($latlng, $address);
|
||||
|
||||
return $address;
|
||||
|
|
@ -323,7 +335,11 @@ class NotesController extends Controller
|
|||
return $address;
|
||||
}
|
||||
if (isset($json->address->county)) {
|
||||
$address = '<span class="p-region">' . $json->address->county . '</span>, <span class="p-country-name">' . $json->address->country . '</span>';
|
||||
$address = '<span class="p-region">'
|
||||
. $json->address->county
|
||||
. '</span>, <span class="p-country-name">'
|
||||
. $json->address->country
|
||||
. '</span>';
|
||||
Cache::forever($latlng, $address);
|
||||
|
||||
return $address;
|
||||
|
|
@ -334,4 +350,21 @@ class NotesController extends Controller
|
|||
return $address;
|
||||
});
|
||||
}
|
||||
|
||||
private function getGeoJson($longitude, $latitude, $title, $icon)
|
||||
{
|
||||
$icon = $icon ?? 'marker';
|
||||
|
||||
return '{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [' . $longitude . ', ' . $latitude . ']
|
||||
},
|
||||
"properties": {
|
||||
"title": "' . $title . '",
|
||||
"icon": "' . $icon . '"
|
||||
}
|
||||
}';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -235,7 +235,11 @@ class Note extends Model implements HasMedia
|
|||
foreach ($matches[0] as $name) {
|
||||
$name = str_replace('#', '', $name);
|
||||
$replacements[$name] =
|
||||
'<a rel="tag" class="p-category" href="/notes/tagged/' . Tag::normalizeTag($name) . '">#' . $name . '</a>';
|
||||
'<a rel="tag" class="p-category" href="/notes/tagged/'
|
||||
. Tag::normalizeTag($name)
|
||||
. '">#'
|
||||
. $name
|
||||
. '</a>';
|
||||
}
|
||||
|
||||
// Replace #tags with valid microformat-enabled link
|
||||
|
|
|
|||
|
|
@ -72,28 +72,35 @@ class NoteService
|
|||
dispatch(new SendWebMentions($note));
|
||||
|
||||
//syndication targets
|
||||
//string sent from either local admin CP or micropub
|
||||
if ($request->input('twitter') == true || $request->input('syndicate-to') == 'https://twitter.com/jonnybarnes') {
|
||||
//from admin CP
|
||||
if ($request->input('twitter')) {
|
||||
dispatch(new SyndicateToTwitter($note));
|
||||
}
|
||||
if ($request->input('facebook') == true || $request->input('syndicate-to') == 'https://facebook.com/jonnybarnes') {
|
||||
if ($request->input('facebook')) {
|
||||
dispatch(new SyndicateToFacebook($note));
|
||||
}
|
||||
|
||||
//micropub request, syndication sent as array
|
||||
if (
|
||||
(is_array($request->input('syndicate-to')))
|
||||
&&
|
||||
(in_array('https://twitter.com/jonnybarnes', $request->input('syndicate-to')))
|
||||
) {
|
||||
dispatch(new SyndicateToTwitter($note));
|
||||
//from a micropub request
|
||||
$targets = array_pluck(config('syndication.targets'), 'uid', 'service.name');
|
||||
if (is_string($request->input('syndicate-to'))) {
|
||||
$service = array_search($request->input('syndicate-to'));
|
||||
if ($service == 'Twitter') {
|
||||
dispatch(new SyndicateToTwitter($note));
|
||||
}
|
||||
if ($service == 'Facebook') {
|
||||
dispatch(new SyndicateToFacebook($note));
|
||||
}
|
||||
}
|
||||
if (
|
||||
(is_array($request->input('syndicate-to')))
|
||||
&&
|
||||
(in_array('https://facebook.com/jonnybarnes', $request->input('syndicate-to')))
|
||||
) {
|
||||
dispatch(new SyndicateToFacebook($note));
|
||||
if (is_array($request->input('syndicate-to'))) {
|
||||
foreach ($targets as $service => $target) {
|
||||
if (in_array($target, $request->input('syndicate-to'))) {
|
||||
if ($service == 'Twitter') {
|
||||
dispatch(new SyndicateToTwitter($note));
|
||||
}
|
||||
if ($service == 'Facebook') {
|
||||
dispatch(new SyndicateToFacebook($note));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $note;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
# Changelog
|
||||
|
||||
## Version 0.1.2 (2017-01-26)
|
||||
- Improve syndication flow when working out which targets to use
|
||||
- Use webpack/babel/es6 (this was a big one, code wise, functionality now basically the same though)
|
||||
|
||||
## Version 0.1.1 (2016-12-10)
|
||||
- Fix: use correct link for footer iwc icon
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@
|
|||
"phpunit/phpunit": "~5.0",
|
||||
"symfony/css-selector": "3.1.*",
|
||||
"symfony/dom-crawler": "3.1.*",
|
||||
"barryvdh/laravel-debugbar": "~2.0"
|
||||
"barryvdh/laravel-debugbar": "~2.0",
|
||||
"jakub-onderka/php-parallel-lint": "^0.9.2"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
|
|
|
|||
587
composer.lock
generated
587
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
return [
|
||||
// if you don’t have any targets, then set this to 'targets' => [];
|
||||
'targets' => [
|
||||
[
|
||||
'uid' => 'https://twitter.com/jonnybarnes',
|
||||
|
|
|
|||
32
database/migrations/2016_12_28_160024_add_icon_to_places.php
Normal file
32
database/migrations/2016_12_28_160024_add_icon_to_places.php
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddIconToPlaces extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('places', function (Blueprint $table) {
|
||||
$table->string('icon')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('places', function (Blueprint $table) {
|
||||
$table->dropColumn('icon');
|
||||
});
|
||||
}
|
||||
}
|
||||
12
package.json
12
package.json
|
|
@ -6,15 +6,23 @@
|
|||
"dependencies": {
|
||||
"alertify.js": "^1.0.12",
|
||||
"autolinker": "^1.2.0",
|
||||
"mapbox-gl": "^0.29.0",
|
||||
"marked": "^0.3.6",
|
||||
"normalize.css": "^5.0.0",
|
||||
"store2": "^2.3.2",
|
||||
"webStorage": "^1.2.2",
|
||||
"whatwg-fetch": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.18.0",
|
||||
"babel-core": "^6.21.0",
|
||||
"babel-loader": "^6.2.10",
|
||||
"babel-preset-es2015": "^6.18.0",
|
||||
"babel-preset-latest": "^6.16.0",
|
||||
"babel-runtime": "^6.20.0",
|
||||
"lint-staged": "^3.2.1",
|
||||
"pre-commit": "^1.1.3",
|
||||
"stylelint-config-standard": "^14.0.0"
|
||||
"stylelint-config-standard": "^14.0.0",
|
||||
"webpack": "^2.2.0"
|
||||
},
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
|||
3
public/assets/css/app.css
vendored
3
public/assets/css/app.css
vendored
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
|
|
@ -1,15 +1 @@
|
|||
{
|
||||
"version": 3,
|
||||
"file": "app.css",
|
||||
"sources": [
|
||||
"../../../resources/assets/sass/app.scss",
|
||||
"../../../resources/assets/sass/layout.scss",
|
||||
"../../../resources/assets/sass/styles.scss",
|
||||
"../../../resources/assets/sass/pagination.scss",
|
||||
"../../../resources/assets/sass/note-form.scss",
|
||||
"../../../resources/assets/sass/mapbox.scss",
|
||||
"../../../resources/assets/sass/contacts.scss"
|
||||
],
|
||||
"mappings": "AAIA,AAAA,IAAI,AAAC,CACD,UAAU,CAAE,UAAW,CACvB,SAAS,CAAE,IAAK,CACnB,AAED,AAAA,CAAC,CACD,AAAC,CAAA,AAAA,QAAQ,CACT,AAAC,CAAA,AAAA,OAAO,AAAC,CACL,UAAU,CAAE,OAAQ,CACvB,ACXD,AAAA,IAAI,AAAC,CACD,SAAS,CAAE,IAAK,CAChB,MAAM,CAAE,MAAO,CACf,YAAY,CAAE,GAAI,CAClB,aAAa,CAAE,GAAI,CACnB,SAAS,CAAE,UAAW,CACzB,AAED,AAAA,UAAU,AAAC,CACP,UAAU,CAAE,MAAO,CACtB,AAED,AAAA,QAAQ,AAAC,CACL,WAAW,CAAE,IAAK,CACrB,AAED,AAAA,KAAK,AAAC,CACF,OAAO,CAAE,IAAK,CACd,cAAc,CAAE,MAAO,CAC1B,AAED,AAAA,cAAc,AAAC,CACX,OAAO,CAAE,IAAK,CACd,cAAc,CAAE,GAAI,CACpB,eAAe,CAAE,aAAc,CAC/B,SAAS,CAAE,MAAO,CACrB,AAED,AAAA,aAAa,AAAC,CACV,OAAO,CAAE,IAAK,CACd,WAAW,CAAE,MAAO,CACvB,AAED,AAAc,aAAD,CAAC,GAAG,AAAC,CACd,YAAY,CAAE,GAAI,CACrB,AAED,AAAa,YAAD,CAAC,GAAG,AAAC,CACb,OAAO,CAAE,YAAa,CACtB,MAAM,CAAE,IAAK,CAChB,AAED,AAAO,IAAH,CAAG,OAAO,AAAC,CACX,UAAU,CAAE,GAAI,CAChB,UAAU,CAAE,cAAe,CAC9B,AAED,AAAA,MAAM,AAAC,CACH,UAAU,CAAE,IAAK,CACpB,AAED,AAAO,MAAD,CAAC,MAAM,AAAC,CACV,WAAW,CAAE,GAAI,CACpB,AAED,AAAA,cAAc,AAAC,CACX,OAAO,CAAE,MAAO,CAChB,MAAM,CAAE,GAAI,CACf,AAED,AAAA,U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,"sources":["../../../resources/assets/sass/app.scss","../../../resources/assets/sass/layout.scss","../../../resources/assets/sass/styles.scss","../../../resources/assets/sass/pagination.scss","../../../resources/assets/sass/note-form.scss","../../../resources/assets/sass/mapbox.scss","../../../resources/assets/sass/contacts.scss"],"names":[],"mappings":"AAIA,KACI,sBACA,cAAgB,CACnB,qBAKG,kBAAoB,CACvB,KCVG,eACA,cACA,iBACA,kBACA,oBAAsB,CACzB,WAGG,iBAAmB,CACtB,SAGG,gBAAkB,CACrB,MAGG,oBACA,AADA,aACA,4BAAuB,AAAvB,6BAAuB,AAAvB,qBAAuB,CAC1B,eAGG,oBACA,AADA,aACA,8BACA,AADA,6BACA,AADA,mBACA,yBACA,AADA,8BACA,gBAAkB,CACrB,cAGG,oBACA,AADA,aACA,yBAAoB,AAApB,kBAAoB,CACvB,kBAGG,gBAAkB,CACrB,iBAGG,qBACA,WAAa,CAChB,aAGG,eACA,yBAA2B,CAC9B,OAGG,eAAiB,CACpB,cAGG,eAAiB,CACpB,WAGG,eACA,cACA,iBAAmB,CACtB,sBAGG,cAAgB,CACnB,sBAGG,iBACA,cAAgB,CACnB,KClEG,6JAWe,CAClB,EAGG,qBACA,wBACA,UAAY,CACf,gBAGG,kBAAoB,CACvB,MAGG,WACA,UAAY,CACf,OAGG,iBACA,iBAAmB,CACtB,WAGG,kBAAoB,CACvB,UAGG,YACA,WAAa,CAChB,YC1CG,WACA,YACA,oBACA,AADA,aACA,8BACA,AADA,6BACA,AADA,mBACA,yBACA,AADA,8BACA,yBAAoB,AAApB,kBAAoB,CACvB,eAGG,oBAAsB,CACzB,SCVG,oBACA,AADA,aACA,4BAAuB,AAAvB,6BAAuB,AAAvB,qBAAuB,CAC1B,0BAGG,aACI,oBACA,AADA,aACA,8BACA,AADA,6BACA,AADA,mBACA,cAAgB,CACnB,CAGL,0BACI,sBACI,UAAY,CACf,CAGL,eACI,UACA,oBACA,gBAAkB,CACrB,oDAIG,mBAAQ,AAAR,MAAQ,CACX,kBAGG,qBAAuB,CAC1B,QAGG,mBAAqB,CACxB,KCnCG,eACA,YAAc,CACjB,QAGG,y4HACA,wBACA,WACA,WAAa,CAChB,UAGG,kBACA,MACA,OACA,iBACA,cAAgB,CACnB,gBAGG,gBACA,gBAAkB,CACrB,SCtBG,oBACA,AADA,aACA,8BACA,AADA,6BACA,AADA,mBACA,eACA,6BAA+B,CAClC,aAGG,oBACA,YACA,YAAc,CACjB","file":"app.css"}
|
||||
299
public/assets/frontend/mapbox-gl.css
vendored
Normal file
299
public/assets/frontend/mapbox-gl.css
vendored
Normal file
|
|
@ -0,0 +1,299 @@
|
|||
.mapboxgl-map {
|
||||
font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||
}
|
||||
|
||||
.mapboxgl-canvas-container.mapboxgl-interactive,
|
||||
.mapboxgl-ctrl-nav-compass {
|
||||
cursor: -webkit-grab;
|
||||
cursor: -moz-grab;
|
||||
cursor: grab;
|
||||
}
|
||||
.mapboxgl-canvas-container.mapboxgl-interactive:active,
|
||||
.mapboxgl-ctrl-nav-compass:active {
|
||||
cursor: -webkit-grabbing;
|
||||
cursor: -moz-grabbing;
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
.mapboxgl-ctrl-top-left,
|
||||
.mapboxgl-ctrl-top-right,
|
||||
.mapboxgl-ctrl-bottom-left,
|
||||
.mapboxgl-ctrl-bottom-right { position:absolute; pointer-events:none; z-index:2; }
|
||||
.mapboxgl-ctrl-top-left { top:0; left:0; }
|
||||
.mapboxgl-ctrl-top-right { top:0; right:0; }
|
||||
.mapboxgl-ctrl-bottom-left { bottom:0; left:0; }
|
||||
.mapboxgl-ctrl-bottom-right { right:0; bottom:0; }
|
||||
|
||||
.mapboxgl-ctrl { clear:both; pointer-events:auto }
|
||||
.mapboxgl-ctrl-top-left .mapboxgl-ctrl { margin:10px 0 0 10px; float:left; }
|
||||
.mapboxgl-ctrl-top-right .mapboxgl-ctrl{ margin:10px 10px 0 0; float:right; }
|
||||
.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl { margin:0 0 10px 10px; float:left; }
|
||||
.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl { margin:0 10px 10px 0; float:right; }
|
||||
|
||||
.mapboxgl-ctrl-group {
|
||||
border-radius: 4px;
|
||||
-moz-box-shadow: 0px 0px 2px rgba(0,0,0,0.1);
|
||||
-webkit-box-shadow: 0px 0px 2px rgba(0,0,0,0.1);
|
||||
box-shadow: 0px 0px 0px 2px rgba(0,0,0,0.1);
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
}
|
||||
.mapboxgl-ctrl-group > button {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
display: block;
|
||||
padding: 0;
|
||||
outline: none;
|
||||
border: none;
|
||||
border-bottom: 1px solid #ddd;
|
||||
box-sizing: border-box;
|
||||
background-color: rgba(0,0,0,0);
|
||||
cursor: pointer;
|
||||
}
|
||||
/* https://bugzilla.mozilla.org/show_bug.cgi?id=140562 */
|
||||
.mapboxgl-ctrl > button::-moz-focus-inner {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.mapboxgl-ctrl > button:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
.mapboxgl-ctrl > button:hover {
|
||||
background-color: rgba(0,0,0,0.05);
|
||||
}
|
||||
.mapboxgl-ctrl-icon,
|
||||
.mapboxgl-ctrl-icon > span.arrow {
|
||||
speak: none;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
.mapboxgl-ctrl-icon {
|
||||
padding: 5px;
|
||||
}
|
||||
.mapboxgl-ctrl-icon.mapboxgl-ctrl-zoom-out {
|
||||
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0A%20%20%3Cpath%20style%3D%27fill%3A%23333333%3B%27%20d%3D%27m%207%2C9%20c%20-0.554%2C0%20-1%2C0.446%20-1%2C1%200%2C0.554%200.446%2C1%201%2C1%20l%206%2C0%20c%200.554%2C0%201%2C-0.446%201%2C-1%200%2C-0.554%20-0.446%2C-1%20-1%2C-1%20z%27%20%2F%3E%0A%3C%2Fsvg%3E%0A");
|
||||
}
|
||||
.mapboxgl-ctrl-icon.mapboxgl-ctrl-zoom-in {
|
||||
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0A%20%20%3Cpath%20style%3D%27fill%3A%23333333%3B%27%20d%3D%27M%2010%206%20C%209.446%206%209%206.4459904%209%207%20L%209%209%20L%207%209%20C%206.446%209%206%209.446%206%2010%20C%206%2010.554%206.446%2011%207%2011%20L%209%2011%20L%209%2013%20C%209%2013.55401%209.446%2014%2010%2014%20C%2010.554%2014%2011%2013.55401%2011%2013%20L%2011%2011%20L%2013%2011%20C%2013.554%2011%2014%2010.554%2014%2010%20C%2014%209.446%2013.554%209%2013%209%20L%2011%209%20L%2011%207%20C%2011%206.4459904%2010.554%206%2010%206%20z%27%20%2F%3E%0A%3C%2Fsvg%3E%0A");
|
||||
}
|
||||
.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate {
|
||||
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0D%0A%20%20%3Cpath%20style%3D%27fill%3A%23333%3B%27%20d%3D%27M10%204C9%204%209%205%209%205L9%205.1A5%205%200%200%200%205.1%209L5%209C5%209%204%209%204%2010%204%2011%205%2011%205%2011L5.1%2011A5%205%200%200%200%209%2014.9L9%2015C9%2015%209%2016%2010%2016%2011%2016%2011%2015%2011%2015L11%2014.9A5%205%200%200%200%2014.9%2011L15%2011C15%2011%2016%2011%2016%2010%2016%209%2015%209%2015%209L14.9%209A5%205%200%200%200%2011%205.1L11%205C11%205%2011%204%2010%204zM10%206.5A3.5%203.5%200%200%201%2013.5%2010%203.5%203.5%200%200%201%2010%2013.5%203.5%203.5%200%200%201%206.5%2010%203.5%203.5%200%200%201%2010%206.5zM10%208.3A1.8%201.8%200%200%200%208.3%2010%201.8%201.8%200%200%200%2010%2011.8%201.8%201.8%200%200%200%2011.8%2010%201.8%201.8%200%200%200%2010%208.3z%27%20%2F%3E%0D%0A%3C%2Fsvg%3E");
|
||||
}
|
||||
.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.watching {
|
||||
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0D%0A%20%20%3Cpath%20style%3D%27fill%3A%2300f%3B%27%20d%3D%27M10%204C9%204%209%205%209%205L9%205.1A5%205%200%200%200%205.1%209L5%209C5%209%204%209%204%2010%204%2011%205%2011%205%2011L5.1%2011A5%205%200%200%200%209%2014.9L9%2015C9%2015%209%2016%2010%2016%2011%2016%2011%2015%2011%2015L11%2014.9A5%205%200%200%200%2014.9%2011L15%2011C15%2011%2016%2011%2016%2010%2016%209%2015%209%2015%209L14.9%209A5%205%200%200%200%2011%205.1L11%205C11%205%2011%204%2010%204zM10%206.5A3.5%203.5%200%200%201%2013.5%2010%203.5%203.5%200%200%201%2010%2013.5%203.5%203.5%200%200%201%206.5%2010%203.5%203.5%200%200%201%2010%206.5zM10%208.3A1.8%201.8%200%200%200%208.3%2010%201.8%201.8%200%200%200%2010%2011.8%201.8%201.8%200%200%200%2011.8%2010%201.8%201.8%200%200%200%2010%208.3z%27%20%2F%3E%0D%0A%3C%2Fsvg%3E");
|
||||
}
|
||||
|
||||
.mapboxgl-ctrl-icon.mapboxgl-ctrl-compass > span.arrow {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 5px;
|
||||
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%0A%09%3Cpolygon%20fill%3D%27%23333333%27%20points%3D%276%2C9%2010%2C1%2014%2C9%27%2F%3E%0A%09%3Cpolygon%20fill%3D%27%23CCCCCC%27%20points%3D%276%2C11%2010%2C19%2014%2C11%20%27%2F%3E%0A%3C%2Fsvg%3E");
|
||||
background-repeat: no-repeat;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.mapboxgl-ctrl.mapboxgl-ctrl-attrib {
|
||||
padding: 0 5px;
|
||||
background-color: rgba(255, 255, 255, .5);
|
||||
margin: 0;
|
||||
}
|
||||
.mapboxgl-ctrl-attrib.compact {
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
margin: 0 10px 10px 10px;
|
||||
position: relative;
|
||||
padding-right: 24px;
|
||||
background-color: #fff;
|
||||
border-radius: 3px 12px 12px 3px;
|
||||
visibility: hidden;
|
||||
}
|
||||
.mapboxgl-ctrl-attrib.compact:hover {
|
||||
visibility: visible;
|
||||
}
|
||||
.mapboxgl-ctrl-attrib.compact:after {
|
||||
content: '';
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0D%0A%09%3Cpath%20fill%3D%27%23333333%27%20fill-rule%3D%27evenodd%27%20d%3D%27M4%2C10a6%2C6%200%201%2C0%2012%2C0a6%2C6%200%201%2C0%20-12%2C0%20M9%2C7a1%2C1%200%201%2C0%202%2C0a1%2C1%200%201%2C0%20-2%2C0%20M9%2C10a1%2C1%200%201%2C1%202%2C0l0%2C3a1%2C1%200%201%2C1%20-2%2C0%27%20%2F%3E%0D%0A%3C%2Fsvg%3E");
|
||||
background-color: rgba(255, 255, 255, .5);
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
box-sizing: border-box;
|
||||
visibility: visible;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.mapboxgl-ctrl-attrib a {
|
||||
color: rgba(0,0,0,0.75);
|
||||
text-decoration: none;
|
||||
}
|
||||
.mapboxgl-ctrl-attrib a:hover {
|
||||
color: inherit;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.mapboxgl-ctrl-attrib .mapbox-improve-map {
|
||||
font-weight: bold;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.mapboxgl-ctrl-scale {
|
||||
background-color: rgba(255,255,255,0.75);
|
||||
font-size: 10px;
|
||||
border-width: medium 2px 2px;
|
||||
border-style: none solid solid;
|
||||
border-color: #333;
|
||||
padding: 0 5px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mapboxgl-popup {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
will-change: transform;
|
||||
pointer-events: none;
|
||||
}
|
||||
.mapboxgl-popup-anchor-top,
|
||||
.mapboxgl-popup-anchor-top-left,
|
||||
.mapboxgl-popup-anchor-top-right {
|
||||
-webkit-flex-direction: column;
|
||||
flex-direction: column;
|
||||
}
|
||||
.mapboxgl-popup-anchor-bottom,
|
||||
.mapboxgl-popup-anchor-bottom-left,
|
||||
.mapboxgl-popup-anchor-bottom-right {
|
||||
-webkit-flex-direction: column-reverse;
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
.mapboxgl-popup-anchor-left {
|
||||
-webkit-flex-direction: row;
|
||||
flex-direction: row;
|
||||
}
|
||||
.mapboxgl-popup-anchor-right {
|
||||
-webkit-flex-direction: row-reverse;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
.mapboxgl-popup-tip {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 10px solid transparent;
|
||||
z-index: 1;
|
||||
}
|
||||
.mapboxgl-popup-anchor-top .mapboxgl-popup-tip {
|
||||
-webkit-align-self: center;
|
||||
align-self: center;
|
||||
border-top: none;
|
||||
border-bottom-color: #fff;
|
||||
}
|
||||
.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip {
|
||||
-webkit-align-self: flex-start;
|
||||
align-self: flex-start;
|
||||
border-top: none;
|
||||
border-left: none;
|
||||
border-bottom-color: #fff;
|
||||
}
|
||||
.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip {
|
||||
-webkit-align-self: flex-end;
|
||||
align-self: flex-end;
|
||||
border-top: none;
|
||||
border-right: none;
|
||||
border-bottom-color: #fff;
|
||||
}
|
||||
.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip {
|
||||
-webkit-align-self: center;
|
||||
align-self: center;
|
||||
border-bottom: none;
|
||||
border-top-color: #fff;
|
||||
}
|
||||
.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip {
|
||||
-webkit-align-self: flex-start;
|
||||
align-self: flex-start;
|
||||
border-bottom: none;
|
||||
border-left: none;
|
||||
border-top-color: #fff;
|
||||
}
|
||||
.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip {
|
||||
-webkit-align-self: flex-end;
|
||||
align-self: flex-end;
|
||||
border-bottom: none;
|
||||
border-right: none;
|
||||
border-top-color: #fff;
|
||||
}
|
||||
.mapboxgl-popup-anchor-left .mapboxgl-popup-tip {
|
||||
-webkit-align-self: center;
|
||||
align-self: center;
|
||||
border-left: none;
|
||||
border-right-color: #fff;
|
||||
}
|
||||
.mapboxgl-popup-anchor-right .mapboxgl-popup-tip {
|
||||
-webkit-align-self: center;
|
||||
align-self: center;
|
||||
border-right: none;
|
||||
border-left-color: #fff;
|
||||
}
|
||||
.mapboxgl-popup-close-button {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
border: none;
|
||||
border-radius: 0 3px 0 0;
|
||||
cursor: pointer;
|
||||
background-color: rgba(0,0,0,0);
|
||||
}
|
||||
.mapboxgl-popup-close-button:hover {
|
||||
background-color: rgba(0,0,0,0.05);
|
||||
}
|
||||
.mapboxgl-popup-content {
|
||||
position: relative;
|
||||
background: #fff;
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,0.10);
|
||||
padding: 10px 10px 15px;
|
||||
pointer-events: auto;
|
||||
}
|
||||
.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content {
|
||||
border-top-left-radius: 0;
|
||||
}
|
||||
.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content {
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content {
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content {
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
.mapboxgl-marker {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.mapboxgl-crosshair,
|
||||
.mapboxgl-crosshair .mapboxgl-interactive,
|
||||
.mapboxgl-crosshair .mapboxgl-interactive:active {
|
||||
cursor: crosshair;
|
||||
}
|
||||
.mapboxgl-boxzoom {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
background: #fff;
|
||||
border: 2px dotted #202020;
|
||||
opacity: 0.5;
|
||||
}
|
||||
@media print {
|
||||
.mapbox-improve-map {
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
2846
public/assets/js/commons.js
Normal file
2846
public/assets/js/commons.js
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +0,0 @@
|
|||
function getKeys(){for(var e=[],t=document.querySelectorAll("input[type=text], textarea"),r=0;r<t.length;r++){var o=getFormElement(t[r]);if(o!==!1){var n=o.id+"~"+t[r].id;e.push(n)}}return e}function getFormElement(e){if("body"!==e.nodeName.toLowerCase()){var t=e.parentNode;return"form"===t.nodeName.toLowerCase()?t:getFormElement(t)}return!1}var feature={addEventListener:!!window.addEventListener,querySelectorAll:!!document.querySelectorAll};if(feature.addEventListener&&feature.querySelectorAll)for(var keys=getKeys(),i=0;i<keys.length;i++)if(store.get(keys[i])){var formId=keys[i].split("~")[1];document.getElementById(formId).value=store.get(keys[i])}for(var timerId=window.setInterval(function(){for(var e=!1,t=document.querySelectorAll("input[type=text], textarea"),r=0;r<t.length;r++){var o=getFormElement(t[r]).id+"~"+t[r].id;store.get(o)!==t[r].value&&""!==t[r].value&&(store.set(o,t[r].value),e=!0)}e===!0&&(alertify.logPosition("top right"),alertify.success("Auto saved text"))},5e3),forms=document.querySelectorAll("form"),f=0;f<forms.length;f++){var form=forms[f];form.addEventListener("submit",function(){window.clearInterval(timerId);for(var e=form.id,t=store.keys(),r=0;r<t.length;r++)t[r].indexOf(e)>-1&&store.remove(t[r])})}
|
||||
//# sourceMappingURL=public/assets/js/form-save.js.map
|
||||
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue