Merge branch 'release/0.0.18'

This commit is contained in:
Jonny Barnes 2016-12-08 15:39:55 +00:00
commit 12526c5ec6
70 changed files with 579 additions and 1956 deletions

View file

@ -48,6 +48,4 @@ TWITTER_CONSUMER_SECRET=
TWITTER_ACCESS_TOKEN=
TWITTER_ACCESS_TOKEN_SECRET=
SCOUT_DRIVER=algolia
ALGOLIA_APP_ID=
ALGOLIA_SECRET=
SCOUT_DRIVER=pgsql

View file

@ -10,4 +10,4 @@ CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync
SCOUT_DRIVER='null'
SCOUT_DRIVER=pgsql

View file

@ -14,6 +14,7 @@ env:
php:
- 7.0
- 7.1
- nightly
matrix:
allow_failures:
@ -35,6 +36,7 @@ before_script:
- php artisan key:generate
- php artisan migrate
- php artisan db:seed
- php artisan token:generate
- php artisan serve &
- sleep 5 # Give artisan some time to start serving

36
Makefile Normal file
View file

@ -0,0 +1,36 @@
# A Makefile to run various tasks
.PHONY: sass js compress
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
assets := public/assets/css/app.css \
public/assets/prism/prism.css public/assets/prism/prism.js \
$(wildcard public/assets/js/*.js) \
$(wildcard pubilc/assets/frontend/*.css) \
$(wildcard public/assets/frontend/*.js)
sass: public/assets/css/app.css
public/assets/css/app.css: $(sassfiles)
sassc --style compressed --sourcemap resources/assets/sass/app.scss public/assets/css/app.css
frontend: $(yarnfiles)
for f in $^; do \
cp $$f public/assets/frontend/`basename $$f`; \
done;
js: $(jsfiles)
for f in $^; do \
uglifyjs $$f --screw-ie8 --compress --mangle --source-map public/assets/js/`basename $$f`.map --output public/assets/js/`basename $$f`; \
done;
compress: $(assets)
for f in $^; do \
zopfli $$f; \
bro --force --quality 11 --input $$f --output $$f.br; \
done;

View file

@ -10,7 +10,6 @@ use Illuminate\Database\Eloquent\SoftDeletes;
class Article extends Model
{
use SoftDeletes;
/*
* We want to turn the titles into slugs
*/

View file

@ -0,0 +1,59 @@
<?php
namespace App\Console\Commands;
use App\Services\TokenService;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;
class GenerateToken extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'token:generate';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Generate a token that can be used for testing purposes';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* The token service class.
*
* @var TokenService
*/
protected $tokenService;
/**
* Execute the console command.
*
* @return mixed
*/
public function handle(TokenService $tokenService)
{
$data = [
'me' => env('APP_URL'),
'client_id' => env('APP_URL') . '/notes/new',
'scope' => 'post',
];
$token = $tokenService->getNewToken($data);
Storage::disk('local')->put('dev-token', $token);
$this->info('Set token');
}
}

View file

@ -16,6 +16,7 @@ class Kernel extends ConsoleKernel
Commands\SecurityCheck::class,
Commands\ParseCachedWebMentions::class,
Commands\ReDownloadWebMentions::class,
Commands\GenerateToken::class,
];
/**

View file

@ -4,10 +4,10 @@ namespace App\Http\Controllers;
use App\Place;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use App\Services\NoteService;
use App\Services\TokenService;
use Illuminate\Http\Response;
use App\Services\PlaceService;
use App\Services\TokenService;
class MicropubController extends Controller
{
@ -124,35 +124,7 @@ class MicropubController extends Controller
//we have a valid token, is `syndicate-to` set?
if ($request->input('q') === 'syndicate-to') {
return response()->json([
'syndicate-to' => [
[
'uid' => 'https://twitter.com/jonnybarnes',
'name' => 'jonnybarnes on Twitter',
'service' => [
'name' => 'Twitter',
'url' => 'https://twitter.com',
'photo' => 'https://upload.wikimedia.org/wikipedia/en/9/9f/Twitter_bird_logo_2012.svg',
],
'user' => [
'name' => 'jonnybarnes',
'url' => 'https://twitter.com/jonnybarnes',
'photo' => 'https://pbs.twimg.com/profile_images/1853565405/jmb-bw.jpg',
],
],
[
'uid' => 'https://facebook.com/jonnybarnes',
'name' => 'jonnybarnes on Facebook',
'service' => [
'name' => 'Facebook',
'url' => 'https://facebook.com',
'photo' => 'https://en.facebookbrand.com/wp-content/uploads/2016/05/FB-fLogo-Blue-broadcast-2.png',
],
'user' => [
'name' => 'jonnybarnes',
'url' => 'https://facebook.com/jonnybarnes',
],
],
],
'syndicate-to' => config('syndication.targets'),
]);
}
//nope, how about a geo URL?
@ -176,35 +148,7 @@ class MicropubController extends Controller
//nope, ho about a config query?
if ($request->input('q') == 'config') {
return response()->json([
'syndicate-to' => [
[
'uid' => 'https://twitter.com/jonnybarnes',
'name' => 'jonnybarnes on Twitter',
'service' => [
'name' => 'Twitter',
'url' => 'https://twitter.com',
'photo' => 'https://upload.wikimedia.org/wikipedia/en/9/9f/Twitter_bird_logo_2012.svg',
],
'user' => [
'name' => 'jonnybarnes',
'url' => 'https://twitter.com/jonnybarnes',
'photo' => 'https://pbs.twimg.com/profile_images/1853565405/jmb-bw.jpg',
],
],
[
'uid' => 'https://facebook.com/jonnybarnes',
'name' => 'jonnybarnes on Facebook',
'service' => [
'name' => 'Facebook',
'url' => 'https://facebook.com',
'photo' => 'https://en.facebookbrand.com/wp-content/uploads/2016/05/FB-fLogo-Blue-broadcast-2.png',
],
'user' => [
'name' => 'jonnybarnes',
'url' => 'https://facebook.com/jonnybarnes',
],
],
],
'syndicate-to' => config('syndication.targets'),
]);
}

View file

@ -5,8 +5,8 @@ namespace App\Http\Controllers;
use App\Note;
use Validator;
use Illuminate\Http\Request;
use App\Services\NoteService;
use App\Jobs\SendWebMentions;
use App\Services\NoteService;
class NotesAdminController extends Controller
{

View file

@ -2,8 +2,8 @@
namespace App\Http\Controllers;
use Twitter;
use App\Tag;
use Twitter;
use App\Note;
use HTMLPurifier;
use GuzzleHttp\Client;

View file

@ -62,6 +62,13 @@ class Note extends Model implements HasMedia
*/
protected $guarded = ['id'];
/**
* Hide the column used with Laravel Scout.
*
* @var array
*/
protected $hidden = ['searchable'];
/**
* The attributes that should be mutated to dates.
*
@ -69,6 +76,18 @@ class Note extends Model implements HasMedia
*/
protected $dates = ['deleted_at'];
/**
* Set the attributes to be indexed for searching with Scout.
*
* @return array
*/
public function toSearchableArray()
{
return [
'note' => $this->note,
];
}
/**
* A mutator to ensure that in-reply-to is always non-empty or null.
*

View file

@ -10,7 +10,6 @@ use Phaza\LaravelPostgis\Eloquent\PostgisTrait;
class Place extends Model
{
use PostgisTrait;
/*
* We want to turn the names into slugs.
*/

View file

@ -5,6 +5,7 @@ namespace App\Providers;
use App\Tag;
use App\Note;
use Validator;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
@ -48,8 +49,10 @@ class AppServiceProvider extends ServiceProvider
//allow micropub use in development
if (env('APP_DEBUG') == true) {
session(['me' => 'https://jonnybarnes.localhost']);
session(['token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJtZSI6Imh0dHBzOlwvXC9qb25ueWJhcm5lcy5sb2NhbGhvc3QiLCJjbGllbnRfaWQiOiJodHRwczpcL1wvam9ubnliYXJuZXMubG9jYWxob3N0XC9ub3Rlc1wvbmV3Iiwic2NvcGUiOiJwb3N0IiwiZGF0ZV9pc3N1ZWQiOjE0Nzk3NzM1NDIsIm5vbmNlIjoiNzU1MTdmMjc0MjBkYjJiZCJ9.2Px--_L-n2E15I3P4tS98C-eAKrmLOLExXgBiwZuYHI']);
session(['me' => env('APP_URL')]);
if (Storage::exists('dev-token')) {
session(['token' => Storage::get('dev-token')]);
}
}
}

View file

@ -1,5 +1,13 @@
# Changelog
## Version 0.0.18 (2016-12-08)
- Some minor style tweaks
- Fix some validation issues
- Switch to Makefile for front-end build tasks
- Switch to Postgres based search
- Update travis to use aforementioned search and php 7.1
- Move syndication targets into a config file (issue#27)
## Version 0.0.17 (2016-11-25)
- Add a basic search feature using Laravel Scout and Algolia (issue#38)
- Get CI testing working with algolia

View file

@ -24,7 +24,7 @@
"lcobucci/jwt": "^3.1",
"sensiolabs/security-checker": "^4.0",
"laravel/scout": "^1.1",
"algolia/algoliasearch-client-php": "^1.11"
"pmatseykanets/laravel-scout-postgres": "^0.2.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",

286
composer.lock generated
View file

@ -4,59 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "f9c5f3db6efad2ea0d257e1240b1370a",
"content-hash": "1c3fcc062b9b6e27bea438f835985c6b",
"packages": [
{
"name": "algolia/algoliasearch-client-php",
"version": "1.11.0",
"source": {
"type": "git",
"url": "https://github.com/algolia/algoliasearch-client-php.git",
"reference": "d4f29a1fe82f3d6361a516276849bd98dd014cc0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/algolia/algoliasearch-client-php/zipball/d4f29a1fe82f3d6361a516276849bd98dd014cc0",
"reference": "d4f29a1fe82f3d6361a516276849bd98dd014cc0",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"php": ">=5.3"
},
"require-dev": {
"phpunit/phpunit": "^4.8 || ^5.0",
"satooshi/php-coveralls": "0.6.*"
},
"type": "library",
"autoload": {
"psr-0": {
"AlgoliaSearch": "src/",
"AlgoliaSearch\\Tests": "tests/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Algolia Team",
"email": "contact@algolia.com"
},
{
"name": "Ryan T. Catlin",
"email": "ryan.catlin@gmail.com"
},
{
"name": "Jonathan H. Wage",
"email": "jonwage@gmail.com"
}
],
"description": "Algolia Search API Client for PHP",
"homepage": "https://github.com/algolia/algoliasearch-client-php",
"time": "2016-10-20T11:25:18+00:00"
},
{
"name": "anahkiasen/underscore-php",
"version": "2.0.0",
@ -109,16 +58,16 @@
},
{
"name": "aws/aws-sdk-php",
"version": "3.19.32",
"version": "3.20.1",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
"reference": "4c3093e320c4a34e30327043d24099787b702665"
"reference": "c83afe188b2f462840a5ab12d43f2e83f356f3f0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/4c3093e320c4a34e30327043d24099787b702665",
"reference": "4c3093e320c4a34e30327043d24099787b702665",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c83afe188b2f462840a5ab12d43f2e83f356f3f0",
"reference": "c83afe188b2f462840a5ab12d43f2e83f356f3f0",
"shasum": ""
},
"require": {
@ -185,7 +134,7 @@
"s3",
"sdk"
],
"time": "2016-11-22T23:10:38+00:00"
"time": "2016-12-01T19:25:12+00:00"
},
{
"name": "barnabywalters/mf-cleaner",
@ -283,20 +232,20 @@
},
{
"name": "classpreloader/classpreloader",
"version": "3.0.0",
"version": "3.1.0",
"source": {
"type": "git",
"url": "https://github.com/ClassPreloader/ClassPreloader.git",
"reference": "9b10b913c2bdf90c3d2e0d726b454fb7f77c552a"
"reference": "bc7206aa892b5a33f4680421b69b191efd32b096"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ClassPreloader/ClassPreloader/zipball/9b10b913c2bdf90c3d2e0d726b454fb7f77c552a",
"reference": "9b10b913c2bdf90c3d2e0d726b454fb7f77c552a",
"url": "https://api.github.com/repos/ClassPreloader/ClassPreloader/zipball/bc7206aa892b5a33f4680421b69b191efd32b096",
"reference": "bc7206aa892b5a33f4680421b69b191efd32b096",
"shasum": ""
},
"require": {
"nikic/php-parser": "^1.0|^2.0",
"nikic/php-parser": "^1.0|^2.0|^3.0",
"php": ">=5.5.9"
},
"require-dev": {
@ -305,7 +254,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
"dev-master": "3.1-dev"
}
},
"autoload": {
@ -333,7 +282,7 @@
"class",
"preload"
],
"time": "2015-11-09T22:51:51+00:00"
"time": "2016-09-16T12:50:15+00:00"
},
{
"name": "dnoegel/php-xdg-base-dir",
@ -574,16 +523,16 @@
},
{
"name": "doctrine/common",
"version": "v2.6.1",
"version": "v2.6.2",
"source": {
"type": "git",
"url": "https://github.com/doctrine/common.git",
"reference": "a579557bc689580c19fee4e27487a67fe60defc0"
"reference": "7bce00698899aa2c06fe7365c76e4d78ddb15fa3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/common/zipball/a579557bc689580c19fee4e27487a67fe60defc0",
"reference": "a579557bc689580c19fee4e27487a67fe60defc0",
"url": "https://api.github.com/repos/doctrine/common/zipball/7bce00698899aa2c06fe7365c76e4d78ddb15fa3",
"reference": "7bce00698899aa2c06fe7365c76e4d78ddb15fa3",
"shasum": ""
},
"require": {
@ -643,7 +592,7 @@
"persistence",
"spl"
],
"time": "2015-12-25T13:18:31+00:00"
"time": "2016-11-30T16:50:46+00:00"
},
{
"name": "doctrine/dbal",
@ -1583,16 +1532,16 @@
},
{
"name": "laravel/framework",
"version": "v5.3.24",
"version": "v5.3.26",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "b603b7cf77ff083c2248f7baa23f3add34c3ff84"
"reference": "609bcffd2ce2006925f8304e022288b3da5d23a4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/b603b7cf77ff083c2248f7baa23f3add34c3ff84",
"reference": "b603b7cf77ff083c2248f7baa23f3add34c3ff84",
"url": "https://api.github.com/repos/laravel/framework/zipball/609bcffd2ce2006925f8304e022288b3da5d23a4",
"reference": "609bcffd2ce2006925f8304e022288b3da5d23a4",
"shasum": ""
},
"require": {
@ -1707,7 +1656,7 @@
"framework",
"laravel"
],
"time": "2016-11-21T14:14:16+00:00"
"time": "2016-11-30T14:58:38+00:00"
},
{
"name": "laravel/scout",
@ -2187,16 +2136,16 @@
},
{
"name": "monolog/monolog",
"version": "1.21.0",
"version": "1.22.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
"reference": "f42fbdfd53e306bda545845e4dbfd3e72edb4952"
"reference": "bad29cb8d18ab0315e6c477751418a82c850d558"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/f42fbdfd53e306bda545845e4dbfd3e72edb4952",
"reference": "f42fbdfd53e306bda545845e4dbfd3e72edb4952",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/bad29cb8d18ab0315e6c477751418a82c850d558",
"reference": "bad29cb8d18ab0315e6c477751418a82c850d558",
"shasum": ""
},
"require": {
@ -2207,7 +2156,7 @@
"psr/log-implementation": "1.0.0"
},
"require-dev": {
"aws/aws-sdk-php": "^2.4.9",
"aws/aws-sdk-php": "^2.4.9 || ^3.0",
"doctrine/couchdb": "~1.0@dev",
"graylog2/gelf-php": "~1.0",
"jakub-onderka/php-parallel-lint": "0.9",
@ -2261,7 +2210,7 @@
"logging",
"psr-3"
],
"time": "2016-07-29T03:23:52+00:00"
"time": "2016-11-26T00:15:39+00:00"
},
{
"name": "mtdowling/cron-expression",
@ -2309,16 +2258,16 @@
},
{
"name": "mtdowling/jmespath.php",
"version": "2.3.0",
"version": "2.4.0",
"source": {
"type": "git",
"url": "https://github.com/jmespath/jmespath.php.git",
"reference": "192f93e43c2c97acde7694993ab171b3de284093"
"reference": "adcc9531682cf87dfda21e1fd5d0e7a41d292fac"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/192f93e43c2c97acde7694993ab171b3de284093",
"reference": "192f93e43c2c97acde7694993ab171b3de284093",
"url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/adcc9531682cf87dfda21e1fd5d0e7a41d292fac",
"reference": "adcc9531682cf87dfda21e1fd5d0e7a41d292fac",
"shasum": ""
},
"require": {
@ -2360,7 +2309,7 @@
"json",
"jsonpath"
],
"time": "2016-01-05T18:25:05+00:00"
"time": "2016-12-03T22:08:25+00:00"
},
{
"name": "nesbot/carbon",
@ -2617,6 +2566,61 @@
"description": "Postgis extensions for laravel. Aims to make it easy to work with geometries from laravel models",
"time": "2016-05-21T08:00:18+00:00"
},
{
"name": "pmatseykanets/laravel-scout-postgres",
"version": "v0.2.0",
"source": {
"type": "git",
"url": "https://github.com/pmatseykanets/laravel-scout-postgres.git",
"reference": "f45230853a367f522bb0551d1641e7e133011ee4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/pmatseykanets/laravel-scout-postgres/zipball/f45230853a367f522bb0551d1641e7e133011ee4",
"reference": "f45230853a367f522bb0551d1641e7e133011ee4",
"shasum": ""
},
"require": {
"illuminate/contracts": "~5.3",
"illuminate/database": "~5.3",
"illuminate/support": "~5.3",
"laravel/scout": "^1.0",
"php": ">=5.6.4"
},
"require-dev": {
"mockery/mockery": "^0.9.5",
"phpunit/phpunit": "5.*"
},
"type": "library",
"autoload": {
"psr-4": {
"ScoutEngines\\Postgres\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Peter Matseykanets",
"email": "pmatseykanets@gmail.com",
"homepage": "https://github.com/pmatseykanets",
"role": "Developer"
}
],
"description": "PostgreSQL Full Text Search Driver for Laravel Scout",
"homepage": "https://github.com/pmatseykanets/laravel-scout-postgres",
"keywords": [
"fts",
"full text search",
"laravel",
"laravel scout",
"postgresql",
"search"
],
"time": "2016-10-07T18:54:49+00:00"
},
{
"name": "predis/predis",
"version": "v1.1.1",
@ -3124,16 +3128,16 @@
},
{
"name": "spatie/string",
"version": "2.2.0",
"version": "2.2.1",
"source": {
"type": "git",
"url": "https://github.com/spatie/string.git",
"reference": "42b433803942494ee96dabd8f763f5b455e8de1a"
"reference": "5435f8095a6c2f4ac67cbc9a1fbc116197863144"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/string/zipball/42b433803942494ee96dabd8f763f5b455e8de1a",
"reference": "42b433803942494ee96dabd8f763f5b455e8de1a",
"url": "https://api.github.com/repos/spatie/string/zipball/5435f8095a6c2f4ac67cbc9a1fbc116197863144",
"reference": "5435f8095a6c2f4ac67cbc9a1fbc116197863144",
"shasum": ""
},
"require": {
@ -3173,7 +3177,7 @@
"spatie",
"string"
],
"time": "2016-10-04T15:31:55+00:00"
"time": "2016-12-01T13:46:28+00:00"
},
{
"name": "swiftmailer/swiftmailer",
@ -3348,16 +3352,16 @@
},
{
"name": "symfony/event-dispatcher",
"version": "v3.1.7",
"version": "v3.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "28b0832b2553ffb80cabef6a7a812ff1e670c0bc"
"reference": "e8f47a327c2f0fd5aa04fa60af2b693006ed7283"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/28b0832b2553ffb80cabef6a7a812ff1e670c0bc",
"reference": "28b0832b2553ffb80cabef6a7a812ff1e670c0bc",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/e8f47a327c2f0fd5aa04fa60af2b693006ed7283",
"reference": "e8f47a327c2f0fd5aa04fa60af2b693006ed7283",
"shasum": ""
},
"require": {
@ -3377,7 +3381,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.1-dev"
"dev-master": "3.2-dev"
}
},
"autoload": {
@ -3404,7 +3408,7 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
"time": "2016-10-13T06:28:43+00:00"
"time": "2016-10-13T06:29:04+00:00"
},
{
"name": "symfony/finder",
@ -4726,16 +4730,16 @@
},
{
"name": "phpunit/php-code-coverage",
"version": "4.0.2",
"version": "4.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "6cba06ff75a1a63a71033e1a01b89056f3af1e8d"
"reference": "903fd6318d0a90b4770a009ff73e4a4e9c437929"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6cba06ff75a1a63a71033e1a01b89056f3af1e8d",
"reference": "6cba06ff75a1a63a71033e1a01b89056f3af1e8d",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/903fd6318d0a90b4770a009ff73e4a4e9c437929",
"reference": "903fd6318d0a90b4770a009ff73e4a4e9c437929",
"shasum": ""
},
"require": {
@ -4785,20 +4789,20 @@
"testing",
"xunit"
],
"time": "2016-11-01T05:06:24+00:00"
"time": "2016-11-28T16:00:31+00:00"
},
{
"name": "phpunit/php-file-iterator",
"version": "1.4.1",
"version": "1.4.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
"reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0"
"reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
"reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
"reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
"shasum": ""
},
"require": {
@ -4832,7 +4836,7 @@
"filesystem",
"iterator"
],
"time": "2015-06-21T13:08:43+00:00"
"time": "2016-10-03T07:40:28+00:00"
},
{
"name": "phpunit/php-text-template",
@ -4970,16 +4974,16 @@
},
{
"name": "phpunit/phpunit",
"version": "5.6.5",
"version": "5.7.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "875145fabfa261fa9c1aea663dd29ddce92dca8f"
"reference": "336aff0ac52e306c98e7455bc3e8d7b0bf777a5e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/875145fabfa261fa9c1aea663dd29ddce92dca8f",
"reference": "875145fabfa261fa9c1aea663dd29ddce92dca8f",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/336aff0ac52e306c98e7455bc3e8d7b0bf777a5e",
"reference": "336aff0ac52e306c98e7455bc3e8d7b0bf777a5e",
"shasum": ""
},
"require": {
@ -4991,14 +4995,14 @@
"myclabs/deep-copy": "~1.3",
"php": "^5.6 || ^7.0",
"phpspec/prophecy": "^1.3.1",
"phpunit/php-code-coverage": "^4.0.1",
"phpunit/php-code-coverage": "^4.0.3",
"phpunit/php-file-iterator": "~1.4",
"phpunit/php-text-template": "~1.2",
"phpunit/php-timer": "^1.0.6",
"phpunit/phpunit-mock-objects": "^3.2",
"sebastian/comparator": "~1.2.2",
"sebastian/diff": "~1.2",
"sebastian/environment": "^1.3 || ^2.0",
"sebastian/environment": "^1.3.4 || ^2.0",
"sebastian/exporter": "~2.0",
"sebastian/global-state": "~1.0",
"sebastian/object-enumerator": "~2.0",
@ -5022,7 +5026,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.6.x-dev"
"dev-master": "5.7.x-dev"
}
},
"autoload": {
@ -5048,20 +5052,20 @@
"testing",
"xunit"
],
"time": "2016-11-21T15:23:34+00:00"
"time": "2016-12-03T08:33:00+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
"version": "3.4.1",
"version": "3.4.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
"reference": "45026c8383187ad1dcb14fbfec77dced265b9cfc"
"reference": "90a08f5deed5f7ac35463c161f2e8fa0e5652faf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/45026c8383187ad1dcb14fbfec77dced265b9cfc",
"reference": "45026c8383187ad1dcb14fbfec77dced265b9cfc",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/90a08f5deed5f7ac35463c161f2e8fa0e5652faf",
"reference": "90a08f5deed5f7ac35463c161f2e8fa0e5652faf",
"shasum": ""
},
"require": {
@ -5107,7 +5111,7 @@
"mock",
"xunit"
],
"time": "2016-11-19T09:07:46+00:00"
"time": "2016-11-27T07:52:03+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
@ -5272,28 +5276,28 @@
},
{
"name": "sebastian/environment",
"version": "1.3.8",
"version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
"reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea"
"reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea",
"reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
"reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
"shasum": ""
},
"require": {
"php": "^5.3.3 || ^7.0"
"php": "^5.6 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8 || ^5.0"
"phpunit/phpunit": "^5.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3.x-dev"
"dev-master": "2.0.x-dev"
}
},
"autoload": {
@ -5318,7 +5322,7 @@
"environment",
"hhvm"
],
"time": "2016-08-18T05:49:44+00:00"
"time": "2016-11-26T07:53:53+00:00"
},
{
"name": "sebastian/exporter",
@ -5581,16 +5585,16 @@
},
{
"name": "sebastian/version",
"version": "2.0.0",
"version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/version.git",
"reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5"
"reference": "99732be0ddb3361e16ad77b68ba41efc8e979019"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5",
"reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5",
"url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
"reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
"shasum": ""
},
"require": {
@ -5620,7 +5624,7 @@
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
"time": "2016-02-04T12:56:52+00:00"
"time": "2016-10-03T07:35:21+00:00"
},
{
"name": "symfony/css-selector",
@ -5733,25 +5737,31 @@
},
{
"name": "symfony/yaml",
"version": "v3.1.7",
"version": "v3.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "9da375317228e54f4ea1b013b30fa47417e84943"
"reference": "f2300ba8fbb002c028710b92e1906e7457410693"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/9da375317228e54f4ea1b013b30fa47417e84943",
"reference": "9da375317228e54f4ea1b013b30fa47417e84943",
"url": "https://api.github.com/repos/symfony/yaml/zipball/f2300ba8fbb002c028710b92e1906e7457410693",
"reference": "f2300ba8fbb002c028710b92e1906e7457410693",
"shasum": ""
},
"require": {
"php": ">=5.5.9"
},
"require-dev": {
"symfony/console": "~2.8|~3.0"
},
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.1-dev"
"dev-master": "3.2-dev"
}
},
"autoload": {
@ -5778,7 +5788,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2016-11-18T21:05:29+00:00"
"time": "2016-11-18T21:17:59+00:00"
},
{
"name": "webmozart/assert",

View file

@ -208,6 +208,11 @@ return [
*/
Laravel\Scout\ScoutServiceProvider::class,
/*
* Postgres Engine for Scout
*/
ScoutEngines\Postgres\PostgresEngineServiceProvider::class,
],
/*

View file

@ -15,7 +15,7 @@ return [
|
*/
'driver' => env('SCOUT_DRIVER') ?? 'null',
'driver' => env('SCOUT_DRIVER'),
/*
|--------------------------------------------------------------------------
@ -80,4 +80,11 @@ return [
],
],
'pgsql' => [
'connection' => env('DB_CONNECTION', 'pgsql'),
// You may want to update index documents directly in PostgreSQL (i.e. via triggers).
// In this case you can set this value to false.
'maintain_index' => true,
],
];

38
config/syndication.php Normal file
View file

@ -0,0 +1,38 @@
<?php
/*
* Here we define the syndication targets to be
* returned by the micropub endpoint.
*/
return [
'targets' => [
[
'uid' => 'https://twitter.com/jonnybarnes',
'name' => 'jonnybarnes on Twitter',
'service' => [
'name' => 'Twitter',
'url' => 'https://twitter.com',
'photo' => 'https://upload.wikimedia.org/wikipedia/en/9/9f/Twitter_bird_logo_2012.svg',
],
'user' => [
'name' => 'jonnybarnes',
'url' => 'https://twitter.com/jonnybarnes',
'photo' => 'https://pbs.twimg.com/profile_images/1853565405/jmb-bw.jpg',
],
],
[
'uid' => 'https://facebook.com/jonnybarnes',
'name' => 'jonnybarnes on Facebook',
'service' => [
'name' => 'Facebook',
'url' => 'https://facebook.com',
'photo' => 'https://en.facebookbrand.com/wp-content/uploads/2016/05/FB-fLogo-Blue-broadcast-2.png',
],
'user' => [
'name' => 'jonnybarnes',
'url' => 'https://facebook.com/jonnybarnes',
],
]
]
];

View file

@ -0,0 +1,33 @@
<?php
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddSearchToNotes extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('notes', function (Blueprint $table) {
DB::statement('ALTER TABLE notes ADD searchable tsvector NULL');
DB::statement('CREATE INDEX notes_searchable_index ON notes USING GIN (searchable)');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
DB::statement('DROP INDEX IF EXISTS notes_searchable_index');
DB::statement('ALTER TABLE notes DROP searchable');
}
}

View file

@ -1,89 +0,0 @@
'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
var brotli = require('gulp-brotli');
var uglify = require('gulp-uglify');
var zopfli = require('gulp-zopfli');
var sourcemaps = require('gulp-sourcemaps');
var autoprefixer = require('gulp-autoprefixer');
gulp.task('sass', function () {
return gulp.src('./resources/assets/sass/app.scss')
.pipe(sourcemaps.init())
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
.pipe(autoprefixer({browsers: ['last 2 version']}))
.pipe(sourcemaps.write('./maps'))
.pipe(gulp.dest('./public/assets/css'));
});
gulp.task('js-assets', function () {
//return gulp.src(['resources/assets/js/**/*'])
// .pipe(gulp.dest('./public/assets/js'));
return gulp.src(['resources/assets/js/**/*'])
.pipe(sourcemaps.init())
.pipe(uglify())
.pipe(sourcemaps.write('./maps'))
.pipe(gulp.dest('./public/assets/js'));
});
gulp.task('frontend', function () {
//copy JS files
gulp.src([
'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',
])
.pipe(gulp.dest('public/assets/frontend/'));
//copy CSS files
gulp.src([
'node_modules/alertify.js/dist/css/alertify.css',
'node_modules/normalize.css/normalize.css',
])
.pipe(gulp.dest('public/assets/frontend/'));
});
gulp.task('compress', function () {
//hand-made css
gulp.src('public/assets/css/*.css')
.pipe(zopfli({ format: 'gzip', append: true }))
.pipe(gulp.dest('public/assets/css/'));
gulp.src('public/assets/css/*.css')
.pipe(brotli.compress({mode: 1, quality: 11}))
.pipe(gulp.dest('public/assets/css/'));
//hand-made js
gulp.src('public/assets/js/*.js')
.pipe(zopfli({ format: 'gzip', append: true }))
.pipe(gulp.dest('public/assets/js/'));
gulp.src('public/assets/js/*.js')
.pipe(brotli.compress({mode: 1, quality: 11}))
.pipe(gulp.dest('public/assets/js/'));
//bower components
gulp.src('public/assets/frontend/*.css')
.pipe(zopfli({ format: 'gzip', append: true }))
.pipe(gulp.dest('public/assets/frontend/'));
gulp.src('public/assets/frontend/*.js')
.pipe(zopfli({ format: 'gzip', append: true }))
.pipe(gulp.dest('public/assets/frontend/'));
gulp.src('public/assets/frontend/*.css')
.pipe(brotli.compress({mode: 1, quality: 11}))
.pipe(gulp.dest('public/assets/frontend/'));
gulp.src('public/assets/frontend/*.js')
.pipe(brotli.compress({mode: 1, quality: 11}))
.pipe(gulp.dest('public/assets/frontend/'));
//prism
gulp.src('public/assets/prism/*.css')
.pipe(zopfli({ format: 'gzip', append: true }))
.pipe(gulp.dest('public/assets/prism/'));
gulp.src('public/assets/prism/*.js')
.pipe(zopfli({ format: 'gzip', append: true }))
.pipe(gulp.dest('public/assets/prism/'));
gulp.src('public/assets/prism/*.css')
.pipe(brotli.compress({mode: 1, quality: 11}))
.pipe(gulp.dest('public/assets/prism/'));
gulp.src('public/assets/prism/*.js')
.pipe(brotli.compress({mode: 1, quality: 11}))
.pipe(gulp.dest('public/assets/prism/'));
});

View file

@ -12,13 +12,6 @@
"whatwg-fetch": "^1.0.0"
},
"devDependencies": {
"gulp": "~3.9",
"gulp-autoprefixer": "^3.1.0",
"gulp-brotli": "^1.0.1",
"gulp-sass": "^2.3.2",
"gulp-sourcemaps": "^2.2.0",
"gulp-uglify": "^2.0.0",
"gulp-zopfli": "^1.0.0",
"lint-staged": "^3.2.1",
"pre-commit": "^1.1.3",
"stylelint-config-standard": "^14.0.0"

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,15 @@
{
"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,UAAU,AAAC,CACP,UAAU,CAAE,GAAI,CAChB,OAAO,CAAE,KAAM,CACf,SAAS,CAAE,OAAQ,CACtB,AAED,AAAkB,UAAR,AAAA,OAAO,CAAC,GAAG,AAAC,CAClB,MAAM,CAAE,OAAQ,CACnB,AAED,AAAW,UAAD,CAAC,UAAU,AAAC,CAClB,UAAU,CAAE,KAAM,CAClB,SAAS,CAAE,IAAK,CACnB,ACzED,AAAA,IAAI,AAAC,CAED,WAAW,CAAE,iJAGE,CAClB,AAED,AAAA,CAAC,AAAC,CACE,eAAe,CAAE,IAAK,CACtB,aAAa,CAAE,SAAU,CACzB,KAAK,CAAE,IAAK,CACf,AAED,AAAc,aAAD,CAAC,CAAC,AAAC,CACZ,aAAa,CAAE,IAAK,CACvB,AAED,AAAA,KAAK,AAAC,CACF,MAAM,CAAE,GAAI,CACZ,KAAK,CAAE,IAAK,CACf,AAED,AAAA,MAAM,AAAC,CACH,SAAS,CAAE,MAAO,CAClB,UAAU,CAAE,MAAO,CACtB,AC1BD,AAAA,WAAW,AAAC,CACR,KAAK,CAAE,IAAK,CACZ,MAAM,CAAE,IAAK,CACb,OAAO,CAAE,IAAK,CACd,cAAc,CAAE,GAAI,CACpB,eAAe,CAAE,aAAc,CAC/B,WAAW,CAAE,MAAO,CACvB,AAED,AAAY,WAAD,CAAC,EAAE,AAAC,CACX,eAAe,CAAE,IAAK,CACzB,ACXD,AAAA,QAAQ,AAAC,CACL,OAAO,CAAE,IAAK,CACd,cAAc,CAAE,MAAO,CAC1B,AAED,MAAM,EAAL,SAAS,EAAE,KAAK,EACb,AAAW,QAAH,CAAG,GAAG,AAAC,CACX,OAAO,CAAE,IAAK,CACd,cAAc,CAAE,GAAI,CACpB,OAAO,CAAE,MAAO,CACnB,CAGL,MAAM,EAAL,SAAS,EAAE,KAAK,EACb,AAAoB,KAAf,CAAA,AAAA,IAAC,CAAK,SAAS,AAAd,CAAgB,CAClB,KAAK,CAAE,IAAK,CACf,CAGL,AAAS,QAAD,CAAC,KAAK,AAAC,CACX,KAAK,CAAE,GAAI,CACX,YAAY,CAAE,MAAO,CACrB,UAAU,CAAE,KAAM,CACrB,AAED,AAAgC,QAAxB,CAAC,KAAK,AAAA,IAAK,EAAA,AAAA,AAAY,IAAX,CAAD,MAAC,AAAA,GACpB,AAAS,QAAD,CAAC,QAAQ,AAAC,CACd,IAAI,CAAE,CAAE,CACX,AAED,AAAS,QAAD,CAAC,QAAQ,AAAC,CACd,OAAO,CAAE,aAAc,CAC1B,AAED,AAAA,OAAO,AAAC,CACJ,YAAY,CAAE,MAAO,CACxB,ACpCD,AAAA,IAAI,AAAC,CACD,UAAU,CAAE,GAAI,CAChB,MAAM,CAAE,KAAM,CACjB,AAED,AAAA,OAAO,AAAC,CACJ,gBAAgB,CAAw3H,u3HAAC,CACz4H,eAAe,CAAE,OAAQ,CACzB,KAAK,CAAE,IAAK,CACZ,MAAM,CAAE,IAAK,CAChB,AAED,AAAA,SAAS,AAAC,CACN,QAAQ,CAAE,QAAS,CACnB,GAAG,CAAE,CAAE,CACP,IAAI,CAAE,CAAE,CACR,UAAU,CAAE,KAAM,CAClB,OAAO,CAAE,MAAO,CACnB,AAED,AAAU,SAAD,CAAC,KAAK,AAAC,CACZ,WAAW,CAAE,GAAI,CACjB,YAAY,CAAE,GAAI,CACrB,ACvBD,AAAA,QAAQ,AAAC,CACL,OAAO,CAAE,IAAK,CACd,cAAc,CAAE,GAAI,CACpB,UAAU,CAAE,GAAI,CAChB,aAAa,CAAE,eAAgB,CAClC,AAED,AAAS,QAAD,CAAC,GAAG,AAAC,CACT,YAAY,CAAE,MAAO,CACrB,KAAK,CAAE,KAAM,CACb,MAAM,CAAC,KAAM,CAChB",
"names": []
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -20,6 +20,28 @@
arrayBuffer: 'ArrayBuffer' in self
}
if (support.arrayBuffer) {
var viewClasses = [
'[object Int8Array]',
'[object Uint8Array]',
'[object Uint8ClampedArray]',
'[object Int16Array]',
'[object Uint16Array]',
'[object Int32Array]',
'[object Uint32Array]',
'[object Float32Array]',
'[object Float64Array]'
]
var isDataView = function(obj) {
return obj && DataView.prototype.isPrototypeOf(obj)
}
var isArrayBufferView = ArrayBuffer.isView || function(obj) {
return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
}
}
function normalizeName(name) {
if (typeof name !== 'string') {
name = String(name)
@ -152,14 +174,36 @@
function readBlobAsArrayBuffer(blob) {
var reader = new FileReader()
var promise = fileReaderReady(reader)
reader.readAsArrayBuffer(blob)
return fileReaderReady(reader)
return promise
}
function readBlobAsText(blob) {
var reader = new FileReader()
var promise = fileReaderReady(reader)
reader.readAsText(blob)
return fileReaderReady(reader)
return promise
}
function readArrayBufferAsText(buf) {
var view = new Uint8Array(buf)
var chars = new Array(view.length)
for (var i = 0; i < view.length; i++) {
chars[i] = String.fromCharCode(view[i])
}
return chars.join('')
}
function bufferClone(buf) {
if (buf.slice) {
return buf.slice(0)
} else {
var view = new Uint8Array(buf.byteLength)
view.set(new Uint8Array(buf))
return view.buffer
}
}
function Body() {
@ -167,7 +211,9 @@
this._initBody = function(body) {
this._bodyInit = body
if (typeof body === 'string') {
if (!body) {
this._bodyText = ''
} else if (typeof body === 'string') {
this._bodyText = body
} else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
this._bodyBlob = body
@ -175,11 +221,12 @@
this._bodyFormData = body
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
this._bodyText = body.toString()
} else if (!body) {
this._bodyText = ''
} else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {
// Only support ArrayBuffers for POST method.
// Receiving ArrayBuffers happens via Blobs, instead.
} else if (support.arrayBuffer && support.blob && isDataView(body)) {
this._bodyArrayBuffer = bufferClone(body.buffer)
// IE 10-11 can't handle a DataView body.
this._bodyInit = new Blob([this._bodyArrayBuffer])
} else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
this._bodyArrayBuffer = bufferClone(body)
} else {
throw new Error('unsupported BodyInit type')
}
@ -204,6 +251,8 @@
if (this._bodyBlob) {
return Promise.resolve(this._bodyBlob)
} else if (this._bodyArrayBuffer) {
return Promise.resolve(new Blob([this._bodyArrayBuffer]))
} else if (this._bodyFormData) {
throw new Error('could not read FormData body as blob')
} else {
@ -212,27 +261,28 @@
}
this.arrayBuffer = function() {
return this.blob().then(readBlobAsArrayBuffer)
}
this.text = function() {
var rejected = consumed(this)
if (rejected) {
return rejected
}
if (this._bodyBlob) {
return readBlobAsText(this._bodyBlob)
} else if (this._bodyFormData) {
throw new Error('could not read FormData body as text')
if (this._bodyArrayBuffer) {
return consumed(this) || Promise.resolve(this._bodyArrayBuffer)
} else {
return Promise.resolve(this._bodyText)
return this.blob().then(readBlobAsArrayBuffer)
}
}
} else {
this.text = function() {
var rejected = consumed(this)
return rejected ? rejected : Promise.resolve(this._bodyText)
}
this.text = function() {
var rejected = consumed(this)
if (rejected) {
return rejected
}
if (this._bodyBlob) {
return readBlobAsText(this._bodyBlob)
} else if (this._bodyArrayBuffer) {
return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
} else if (this._bodyFormData) {
throw new Error('could not read FormData body as text')
} else {
return Promise.resolve(this._bodyText)
}
}
@ -260,7 +310,10 @@
function Request(input, options) {
options = options || {}
var body = options.body
if (Request.prototype.isPrototypeOf(input)) {
if (typeof input === 'string') {
this.url = input
} else {
if (input.bodyUsed) {
throw new TypeError('Already read')
}
@ -271,12 +324,10 @@
}
this.method = input.method
this.mode = input.mode
if (!body) {
if (!body && input._bodyInit != null) {
body = input._bodyInit
input.bodyUsed = true
}
} else {
this.url = input
}
this.credentials = options.credentials || this.credentials || 'omit'
@ -294,7 +345,7 @@
}
Request.prototype.clone = function() {
return new Request(this)
return new Request(this, { body: this._bodyInit })
}
function decode(body) {
@ -310,16 +361,17 @@
return form
}
function headers(xhr) {
var head = new Headers()
var pairs = (xhr.getAllResponseHeaders() || '').trim().split('\n')
pairs.forEach(function(header) {
var split = header.trim().split(':')
var key = split.shift().trim()
var value = split.join(':').trim()
head.append(key, value)
function parseHeaders(rawHeaders) {
var headers = new Headers()
rawHeaders.split('\r\n').forEach(function(line) {
var parts = line.split(':')
var key = parts.shift().trim()
if (key) {
var value = parts.join(':').trim()
headers.append(key, value)
}
})
return head
return headers
}
Body.call(Request.prototype)
@ -330,10 +382,10 @@
}
this.type = 'default'
this.status = options.status
this.status = 'status' in options ? options.status : 200
this.ok = this.status >= 200 && this.status < 300
this.statusText = options.statusText
this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)
this.statusText = 'statusText' in options ? options.statusText : 'OK'
this.headers = new Headers(options.headers)
this.url = options.url || ''
this._initBody(bodyInit)
}
@ -371,35 +423,16 @@
self.fetch = function(input, init) {
return new Promise(function(resolve, reject) {
var request
if (Request.prototype.isPrototypeOf(input) && !init) {
request = input
} else {
request = new Request(input, init)
}
var request = new Request(input, init)
var xhr = new XMLHttpRequest()
function responseURL() {
if ('responseURL' in xhr) {
return xhr.responseURL
}
// Avoid security warnings on getResponseHeader when not allowed by CORS
if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {
return xhr.getResponseHeader('X-Request-URL')
}
return
}
xhr.onload = function() {
var options = {
status: xhr.status,
statusText: xhr.statusText,
headers: headers(xhr),
url: responseURL()
headers: parseHeaders(xhr.getAllResponseHeaders() || '')
}
options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')
var body = 'response' in xhr ? xhr.response : xhr.responseText
resolve(new Response(body, options))
}

Binary file not shown.

Binary file not shown.

View file

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="391px" height="124px" viewBox="0 0 391 124" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.0.4 (8053) - http://www.bohemiancoding.com/sketch -->
<title>Algolia_logo_bg-white</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Algolia_logo_bg-white" sketch:type="MSLayerGroup" transform="translate(1.000000, 0.000000)">
<path d="M234.602907,47.0181121 L228.907729,67.1993038 L247.249783,57.1465713 C244.58596,52.2621928 240.040498,48.5689338 234.602907,47.0181121 Z" id="Fill-1" fill="#46AEDA" sketch:type="MSShapeGroup"></path>
<path d="M202.455755,33.4002509 C200.002399,30.9359747 196.022371,30.9375523 193.569015,33.4002509 L192.458566,34.5156436 C190.00521,36.9783421 190.006781,40.976086 192.458566,43.4403623 L193.641265,44.6267488 C196.159018,40.5690545 199.364715,36.987808 203.090297,34.0391958 L202.455755,33.4002509 Z" id="Fill-2" fill="#46AEDA" sketch:type="MSShapeGroup"></path>
<path d="M240.840877,27.223784 C240.850301,27.0881068 240.880143,26.9587402 240.880143,26.8199077 L240.880143,23.6646244 C240.878572,20.1811917 238.067108,17.3556356 234.597542,17.3540579 L223.601419,17.3540579 C220.133424,17.3556356 217.320389,20.1796141 217.320389,23.6646244 L217.320389,26.7646902 C220.821368,25.7802419 224.504543,25.2422661 228.314941,25.2422661 C232.682919,25.2422661 236.890691,25.9427389 240.840877,27.223784" id="Fill-3" fill="#46AEDA" sketch:type="MSShapeGroup"></path>
<path d="M228.760635,41.5528326 C242.54501,41.5528326 253.760635,52.7684576 253.760635,66.5528326 C253.760635,80.3372076 242.54501,91.5528326 228.760635,91.5528326 C214.97626,91.5528326 203.760635,80.3372076 203.760635,66.5528326 C203.760635,52.7684576 214.97626,41.5528326 228.760635,41.5528326 M193.760635,66.5528326 C193.760635,85.8807871 209.427907,101.552833 228.760635,101.552833 C248.093362,101.552833 263.760635,85.8807871 263.760635,66.5528326 C263.760635,47.224878 248.093362,31.5528326 228.760635,31.5528326 C209.427907,31.5528326 193.760635,47.224878 193.760635,66.5528326 Z" id="Fill-4" fill="#46AEDA" sketch:type="MSShapeGroup"></path>
<path d="M68.5829487,99.6564664 C67.1395211,95.8212196 65.7840499,92.0522338 64.5118232,88.3463536 C63.2395965,84.6404734 61.9233915,80.8699099 60.5679203,77.0362407 L20.6200011,77.0362407 L12.6049727,99.6564664 L-0.244517215,99.6564664 C3.14651674,90.2852752 6.32708356,81.617712 9.29718324,73.6506218 C12.2657123,65.6851092 15.168274,58.1234729 18.0127216,50.9688681 C20.8524573,43.811108 23.6733452,36.9751869 26.472244,30.4579493 C29.2711428,23.9407117 32.1972643,17.4881575 35.2506085,11.0987089 L46.5734263,11.0987089 C49.6267705,17.4881575 52.5528919,23.9407117 55.3517907,30.4579493 C58.1506895,36.9751869 60.9700068,43.811108 63.8128838,50.9688681 C66.6526195,58.1234729 69.5567519,65.6851092 72.5268516,73.6506218 C75.4953806,81.617712 78.6759474,90.2852752 82.068552,99.6564664 L68.5829487,99.6564664 L68.5829487,99.6564664 Z M57.0056855,66.8147006 C54.2900312,59.4013626 51.5979366,52.2262485 48.9278311,45.28147 C46.2545843,38.3382692 43.476104,31.6727333 40.5939607,25.2817071 C37.623861,31.6727333 34.8045438,38.3382692 32.1344383,45.28147 C29.4627622,52.2262485 26.8099339,59.4013626 24.1822359,66.8147006 L57.0056855,66.8147006 L57.0056855,66.8147006 Z" id="Fill-5" fill="#0C1724" sketch:type="MSShapeGroup"></path>
<path d="M113.109313,100.932779 C105.815214,100.762393 100.643062,99.1879069 97.5897181,96.2045865 C94.5348033,93.2244215 93.0112725,88.5814222 93.0112725,82.2755886 L93.0112725,2.5352701 L104.83984,0.490646547 L104.83984,80.358754 C104.83984,82.3213402 105.011041,83.9384229 105.34873,85.2163126 C105.689562,86.4926247 106.24086,87.5165141 107.002625,88.2832479 C107.765961,89.0484041 108.785313,89.6242433 110.05754,90.0076102 C111.331337,90.3909771 112.898846,90.7112384 114.763208,90.9668163 L113.109313,100.932779" id="Fill-6" fill="#0C1724" sketch:type="MSShapeGroup"></path>
<path d="M169.468957,93.0098622 C168.452747,93.6945587 166.48001,94.5654169 163.553889,95.630325 C160.627767,96.6952331 157.213173,97.228476 153.311678,97.228476 C149.325368,97.228476 145.571513,96.5879535 142.053257,95.3116414 C138.53343,94.032174 135.458096,92.0522338 132.828828,89.3686654 C130.199559,86.6835193 128.121589,83.3420743 126.594917,79.3380199 C125.069815,75.3339654 124.304909,70.5631771 124.304909,65.025655 C124.304909,60.1696741 125.024267,55.7175694 126.467694,51.6709186 C127.909551,47.6258455 130.00794,44.1313693 132.766002,41.1922229 C135.520922,38.2530766 138.891538,35.9528751 142.879419,34.2916185 C146.865729,32.6303618 151.36093,31.7989447 156.365022,31.7989447 C161.878005,31.7989447 166.690477,32.2059762 170.805581,33.0137287 C174.919114,33.8246365 178.374545,34.5692834 181.173443,35.2492469 L181.173443,94.5449075 C181.173443,104.768025 178.545745,112.178208 173.287208,116.778611 C168.02553,121.379014 160.05448,123.677638 149.367775,123.677638 C145.211835,123.677638 141.289921,123.340023 137.600463,122.658481 C133.911006,121.973785 130.70845,121.16761 127.995937,120.230491 L130.158722,109.879584 C132.531975,110.813548 135.437678,111.646543 138.87269,112.37068 C142.307702,113.09324 145.890355,113.457675 149.622221,113.457675 C156.661875,113.457675 161.728793,112.051997 164.826115,109.239062 C167.921867,106.429282 169.468957,101.95509 169.468957,95.8212196 L169.468957,93.0098622 L169.468957,93.0098622 Z M164.57167,42.7256906 C162.576944,42.429094 159.884849,42.2776404 156.493816,42.2776404 C150.132682,42.2776404 145.233824,44.3680155 141.798812,48.5408776 C138.363799,52.7153174 136.647079,58.2512619 136.647079,65.1518664 C136.647079,68.9871132 137.13241,72.2670301 138.109354,74.9931948 C139.084728,77.7209372 140.399362,79.9753871 142.053257,81.7660104 C143.707152,83.5534783 145.615492,84.875542 147.778277,85.7258908 C149.941063,86.579395 152.168245,87.0037806 154.458253,87.0037806 C157.594841,87.0037806 160.478555,86.557308 163.107824,85.6627852 C165.735522,84.7666847 167.815063,83.7254413 169.341735,82.5327442 L169.341735,43.6848967 C168.152753,43.3441261 166.564825,43.0254425 164.57167,42.7256906 Z" id="Fill-7" fill="#0C1724" sketch:type="MSShapeGroup"></path>
<path d="M296.035098,100.934356 C288.739428,100.762393 283.567276,99.1894845 280.513932,96.2061642 C277.460588,93.2259991 275.933916,88.5814222 275.933916,82.2771662 L275.933916,2.53684774 L287.767195,0.492224188 L287.767195,80.358754 C287.767195,82.3213402 287.935255,83.9384229 288.274515,85.2163126 C288.613776,86.4942023 289.165074,87.5165141 289.929981,88.2832479 C290.691746,89.0499818 291.707957,89.6258209 292.981754,90.0091879 C294.253981,90.3925548 295.82149,90.7112384 297.688993,90.9668163 L296.035098,100.934356" id="Fill-8" fill="#0C1724" sketch:type="MSShapeGroup"></path>
<path d="M316.770823,21.1940376 C314.652016,21.1940376 312.847339,20.4904095 311.366216,19.0863084 C309.880381,17.6790521 309.139034,15.7858821 309.139034,13.3989104 C309.139034,11.0135162 309.880381,9.11719097 311.366216,7.71308992 C312.847339,6.30583359 314.652016,5.60378307 316.770823,5.60378307 C318.891201,5.60378307 320.694308,6.30583359 322.180143,7.71308992 C323.661266,9.11719097 324.405754,11.0135162 324.405754,13.3989104 C324.405754,15.7858821 323.661266,17.6790521 322.180143,19.0863084 C320.694308,20.4904095 318.891201,21.1940376 316.770823,21.1940376 L316.770823,21.1940376 Z M310.920151,33.206201 L322.75186,33.206201 L322.75186,99.6564664 L310.920151,99.6564664 L310.920151,33.206201 Z" id="Fill-9" fill="#0C1724" sketch:type="MSShapeGroup"></path>
<path d="M364.479326,31.5449444 C369.228972,31.5449444 373.235701,32.1649575 376.502653,33.3986733 C379.766465,34.6339667 382.395733,36.380416 384.388889,38.6364435 C386.382044,40.8956263 387.803482,43.5791947 388.651633,46.6887264 C389.498214,49.798258 389.92386,53.2264733 389.92386,56.9749498 L389.92386,98.5079433 C388.906079,98.6783286 387.48464,98.9118196 385.662686,99.2099938 C383.83759,99.5081681 381.781609,99.7842554 379.491601,100.039833 C377.201593,100.295411 374.719965,100.528902 372.04986,100.741884 C369.376613,100.953288 366.725355,101.062145 364.097658,101.062145 C360.364222,101.062145 356.93078,100.678778 353.792621,99.9120444 C350.654462,99.1453105 347.940378,97.9305265 345.65037,96.2708475 C343.360362,94.6095909 341.579245,92.416669 340.307018,89.6889266 C339.034791,86.9627619 338.398678,83.6828449 338.398678,79.8491758 C338.398678,76.1874696 339.140025,73.0337639 340.62586,70.3927918 C342.106983,67.7533974 344.122127,65.6235812 346.668151,64.0033433 C349.212605,62.3862606 352.181134,61.1919859 355.573739,60.425252 C358.964772,59.6585182 362.527007,59.2751513 366.260443,59.2751513 C367.446284,59.2751513 368.677674,59.338257 369.949901,59.4660459 C371.222127,59.5938349 372.431528,59.7673755 373.574961,59.9787795 C374.719965,60.1917611 375.717328,60.3826557 376.56705,60.553041 C377.413631,60.7250039 378.007336,60.8527929 378.346597,60.9364079 L378.346597,57.6138947 C378.346597,55.6544637 378.134559,53.7171198 377.710484,51.7987076 C377.284837,49.881873 376.521501,48.1795977 375.420475,46.6887264 C374.317879,45.197855 372.811625,44.005158 370.903285,43.1090575 C368.994945,42.2161124 366.513318,41.7680621 363.461544,41.7680621 C359.558478,41.7680621 356.147026,42.0457271 353.219334,42.5994793 C350.294783,43.1532315 348.110008,43.7290707 346.668151,44.3238416 L345.268702,34.4840907 C346.795374,33.8041272 349.341398,33.1430953 352.902062,32.5041505 C356.464297,31.863628 360.323385,31.5449444 364.479326,31.5449444 L364.479326,31.5449444 Z M365.497107,91.0946053 C368.296006,91.0946053 370.777633,91.029922 372.940419,90.902133 C375.103204,90.7743441 376.90474,90.5424307 378.346597,90.2000825 L378.346597,70.3927918 C377.496875,69.9684063 376.119415,69.6055487 374.212645,69.3073744 C372.302735,69.0092001 369.992308,68.8577465 367.278224,68.8577465 C365.497107,68.8577465 363.609185,68.9871132 361.617601,69.2426911 C359.624446,69.498269 357.79935,70.0315119 356.147026,70.8392644 C354.49156,71.6501722 353.11253,72.756099 352.011504,74.1633553 C350.908907,75.5674564 350.357609,77.4211853 350.357609,79.7213868 C350.357609,83.9810192 351.71308,86.9406749 354.428734,88.6019315 C357.142818,90.2647658 360.832276,91.0946053 365.497107,91.0946053 L365.497107,91.0946053 Z" id="Fill-10" fill="#0C1724" sketch:type="MSShapeGroup"></path>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 10 KiB

View file

@ -1,2 +1,2 @@
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=maps/form-save.js.map
//# sourceMappingURL=public/assets/js/form-save.js.map

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1 @@
{"version":3,"sources":["resources/assets/js/form-save.js"],"names":["getKeys","keys","formFields","document","querySelectorAll","f","length","parent","getFormElement","key","id","push","elem","nodeName","toLowerCase","parentNode","feature","addEventListener","window","i","store","get","formId","split","getElementById","value","timerId","setInterval","saved","inputs","set","alertify","logPosition","success","forms","form","clearInterval","storedKeys","indexOf","remove"],"mappings":"AA6CA,QAASA,WAGL,IAAK,GAFDC,MACAC,EAAaC,SAASC,iBAAiB,8BAClCC,EAAI,EAAGA,EAAIH,EAAWI,OAAQD,IAAK,CACxC,GAAIE,GAASC,eAAeN,EAAWG,GACvC,IAAIE,KAAW,EAAO,CAClB,GAAIE,GAAMF,EAAOG,GAAK,IAAMR,EAAWG,GAAGK,EAC1CT,GAAKU,KAAKF,IAGlB,MAAOR,GAEX,QAASO,gBAAeI,GACpB,GAAoC,SAAhCA,EAAKC,SAASC,cAA0B,CACxC,GAAIP,GAASK,EAAKG,UAClB,OAAsC,SAAlCR,EAAOM,SAASC,cACTP,EAEAC,eAAeD,GAG1B,OAAO,EAjEf,GAAIS,UACAC,mBAAqBC,OAAOD,iBAC5Bb,mBAAqBD,SAASC,iBAGlC,IAAIY,QAAQC,kBAAoBD,QAAQZ,iBAEpC,IAAK,GADDH,MAAOD,UACFmB,EAAI,EAAGA,EAAIlB,KAAKK,OAAQa,IAC7B,GAAIC,MAAMC,IAAIpB,KAAKkB,IAAK,CACpB,GAAIG,QAASrB,KAAKkB,GAAGI,MAAM,KAAK,EAChCpB,UAASqB,eAAeF,QAAQG,MAAQL,MAAMC,IAAIpB,KAAKkB,IAqBnE,IAAK,GAhBDO,SAAUR,OAAOS,YAAY,WAG7B,IAAK,GAFDC,IAAQ,EACRC,EAAS1B,SAASC,iBAAiB,8BAC9Be,EAAI,EAAGA,EAAIU,EAAOvB,OAAQa,IAAK,CACpC,GAAIV,GAAMD,eAAeqB,EAAOV,IAAIT,GAAK,IAAMmB,EAAOV,GAAGT,EACrDU,OAAMC,IAAIZ,KAASoB,EAAOV,GAAGM,OAA6B,KAApBI,EAAOV,GAAGM,QAChDL,MAAMU,IAAIrB,EAAKoB,EAAOV,GAAGM,OACzBG,GAAQ,GAGZA,KAAU,IACVG,SAASC,YAAY,aACrBD,SAASE,QAAQ,qBAEtB,KACCC,MAAQ/B,SAASC,iBAAiB,QAC7BC,EAAI,EAAGA,EAAI6B,MAAM5B,OAAQD,IAAK,CACnC,GAAI8B,MAAOD,MAAM7B,EACjB8B,MAAKlB,iBAAiB,SAAU,WAC5BC,OAAOkB,cAAcV,QAGrB,KAAK,GAFDJ,GAASa,KAAKzB,GACd2B,EAAajB,MAAMnB,OACdkB,EAAI,EAAGA,EAAIkB,EAAW/B,OAAQa,IAC/BkB,EAAWlB,GAAGmB,QAAQhB,IAAU,GAChCF,MAAMmB,OAAOF,EAAWlB","file":"public/assets/js/form-save.js"}

View file

@ -1,2 +1,2 @@
for(var autolinker=new Autolinker,ytidregex=/watch\?v=([A-Za-z0-9\-_]+)/,spotifyregex=/https\:\/\/play\.spotify\.com\/(.*)\b/,notes=document.querySelectorAll(".e-content"),i=0;i<notes.length;i++){var ytid=notes[i].textContent.match(ytidregex);if(null!==ytid){var yid=ytid[1],yiframe=document.createElement("iframe");yiframe.classList.add("youtube"),yiframe.setAttribute("src","//www.youtube.com/embed/"+yid),yiframe.setAttribute("frameborder",0),yiframe.setAttribute("allowfullscreen","true"),notes[i].appendChild(yiframe)}var spotifyid=notes[i].textContent.match(spotifyregex);if(null!==spotifyid){var sid=spotifyid[1].replace("/",":"),siframe=document.createElement("iframe");siframe.classList.add("spotify"),siframe.setAttribute("src","https://embed.spotify.com/?uri=spotify:"+sid),siframe.setAttribute("frameborder",0),siframe.setAttribute("allowtransparency","true"),notes[i].appendChild(siframe)}var orig=notes[i].innerHTML,linked=autolinker.link(orig);notes[i].innerHTML=linked}
//# sourceMappingURL=maps/links.js.map
//# sourceMappingURL=public/assets/js/links.js.map

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1 @@
{"version":3,"sources":["resources/assets/js/links.js"],"names":["autolinker","Autolinker","ytidregex","spotifyregex","notes","document","querySelectorAll","i","length","ytid","textContent","match","yid","yiframe","createElement","classList","add","setAttribute","appendChild","spotifyid","sid","replace","siframe","orig","innerHTML","linked","link"],"mappings":"AAWA,IAAK,GATDA,YAAa,GAAIC,YAGjBC,UAAY,6BAEZC,aAAe,wCAGfC,MAAQC,SAASC,iBAAiB,cAC7BC,EAAI,EAAGA,EAAIH,MAAMI,OAAQD,IAAK,CAEnC,GAAIE,MAAOL,MAAMG,GAAGG,YAAYC,MAAMT,UACtC,IAAa,OAATO,KAAe,CACf,GAAIG,KAAMH,KAAK,GACXI,QAAUR,SAASS,cAAc,SACrCD,SAAQE,UAAUC,IAAI,WACtBH,QAAQI,aAAa,MAAO,2BAA6BL,KACzDC,QAAQI,aAAa,cAAe,GACpCJ,QAAQI,aAAa,kBAAmB,QACxCb,MAAMG,GAAGW,YAAYL,SAGzB,GAAIM,WAAYf,MAAMG,GAAGG,YAAYC,MAAMR,aAC3C,IAAkB,OAAdgB,UAAoB,CACpB,GAAIC,KAAMD,UAAU,GAAGE,QAAQ,IAAK,KAChCC,QAAUjB,SAASS,cAAc,SACrCQ,SAAQP,UAAUC,IAAI,WACtBM,QAAQL,aAAa,MAAO,0CAA4CG,KACxEE,QAAQL,aAAa,cAAe,GACpCK,QAAQL,aAAa,oBAAqB,QAC1Cb,MAAMG,GAAGW,YAAYI,SAGzB,GAAIC,MAAOnB,MAAMG,GAAGiB,UAChBC,OAASzB,WAAW0B,KAAKH,KAC7BnB,OAAMG,GAAGiB,UAAYC","file":"public/assets/js/links.js"}

View file

@ -1,2 +1,2 @@
var mapDivs=document.querySelectorAll(".map");mapboxgl.accessToken="pk.eyJ1Ijoiam9ubnliYXJuZXMiLCJhIjoiY2l2cDhjYW04MDAwcjJ0cG1uZnhqcm82ayJ9.qA2zeVA-nsoMh9IFrd5KQw";for(var i=0;i<mapDivs.length;i++){var mapDiv=mapDivs[i],latitude=mapDiv.dataset.latitude,longitude=mapDiv.dataset.longitude,el=document.createElement("div");el.classList.add("marker");var mapMenu=document.createElement("div");mapMenu.classList.add("map-menu");var streetsInput=document.createElement("input");streetsInput.setAttribute("id","streets"),streetsInput.setAttribute("type","radio"),streetsInput.setAttribute("name","toggle"),streetsInput.setAttribute("value","streets"),streetsInput.setAttribute("checked","checked"),streetsInput.addEventListener("click",function(){map.setStyle("mapbox://styles/mapbox/streets-v9")});var streetsLabel=document.createElement("label");streetsLabel.setAttribute("for","streets"),streetsLabel.appendChild(document.createTextNode("Streets"));var satelliteInput=document.createElement("input");satelliteInput.setAttribute("id","satellite"),satelliteInput.setAttribute("type","radio"),satelliteInput.setAttribute("name","toggle"),satelliteInput.setAttribute("value","streets"),satelliteInput.addEventListener("click",function(){map.setStyle("mapbox://styles/mapbox/satellite-v9")});var satelliteLabel=document.createElement("label");satelliteLabel.setAttribute("for","satellite"),satelliteLabel.appendChild(document.createTextNode("Satellite")),mapMenu.appendChild(streetsInput),mapMenu.appendChild(streetsLabel),mapMenu.appendChild(satelliteInput),mapMenu.appendChild(satelliteLabel);var map=new mapboxgl.Map({container:mapDiv,style:"mapbox://styles/mapbox/streets-v9",center:[longitude,latitude],zoom:15,scrollZoom:!1});map.addControl(new mapboxgl.NavigationControl),new mapboxgl.Marker(el,{offset:[-10,-20]}).setLngLat([longitude,latitude]).addTo(map),mapDiv.appendChild(mapMenu)}
//# sourceMappingURL=maps/maps.js.map
//# sourceMappingURL=public/assets/js/maps.js.map

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1 @@
{"version":3,"sources":["resources/assets/js/maps.js"],"names":["mapDivs","document","querySelectorAll","mapboxgl","accessToken","i","length","mapDiv","latitude","dataset","longitude","el","createElement","classList","add","mapMenu","streetsInput","setAttribute","addEventListener","map","setStyle","streetsLabel","appendChild","createTextNode","satelliteInput","satelliteLabel","Map","container","style","center","zoom","scrollZoom","addControl","NavigationControl","Marker","offset","setLngLat","addTo"],"mappings":"AAEA,GAAIA,SAAUC,SAASC,iBAAiB,OACxCC,UAASC,YAAc,gGACvB,KAAK,GAAIC,GAAI,EAAGA,EAAIL,QAAQM,OAAQD,IAAK,CACrC,GAAIE,QAASP,QAAQK,GACjBG,SAAWD,OAAOE,QAAQD,SAC1BE,UAAaH,OAAOE,QAAQC,UAC5BC,GAAKV,SAASW,cAAc,MAChCD,IAAGE,UAAUC,IAAI,SACjB,IAAIC,SAAUd,SAASW,cAAc,MACrCG,SAAQF,UAAUC,IAAI,WACtB,IAAIE,cAAef,SAASW,cAAc,QAC1CI,cAAaC,aAAa,KAAM,WAChCD,aAAaC,aAAa,OAAQ,SAClCD,aAAaC,aAAa,OAAQ,UAClCD,aAAaC,aAAa,QAAS,WACnCD,aAAaC,aAAa,UAAW,WACrCD,aAAaE,iBAAiB,QAAS,WACnCC,IAAIC,SAAS,sCAEjB,IAAIC,cAAepB,SAASW,cAAc,QAC1CS,cAAaJ,aAAa,MAAO,WACjCI,aAAaC,YAAYrB,SAASsB,eAAe,WACjD,IAAIC,gBAAiBvB,SAASW,cAAc,QAC5CY,gBAAeP,aAAa,KAAM,aAClCO,eAAeP,aAAa,OAAQ,SACpCO,eAAeP,aAAa,OAAQ,UACpCO,eAAeP,aAAa,QAAS,WACrCO,eAAeN,iBAAiB,QAAS,WACrCC,IAAIC,SAAS,wCAEjB,IAAIK,gBAAiBxB,SAASW,cAAc,QAC5Ca,gBAAeR,aAAa,MAAO,aACnCQ,eAAeH,YAAYrB,SAASsB,eAAe,cACnDR,QAAQO,YAAYN,cACpBD,QAAQO,YAAYD,cACpBN,QAAQO,YAAYE,gBACpBT,QAAQO,YAAYG,eACpB,IAAIN,KAAM,GAAIhB,UAASuB,KACnBC,UAAWpB,OACXqB,MAAO,oCACPC,QAASnB,UAAWF,UACpBsB,KAAM,GACNC,YAAY,GAEhBZ,KAAIa,WAAW,GAAI7B,UAAS8B,mBAC5B,GAAI9B,UAAS+B,OAAOvB,IAAKwB,SAAS,IAAK,MAAOC,WAAW1B,UAAWF,WAAW6B,MAAMlB,KACrFZ,OAAOe,YAAYP","file":"public/assets/js/maps.js"}

View file

@ -1 +0,0 @@
{"version":3,"sources":["form-save.js"],"names":["getKeys","keys","formFields","document","querySelectorAll","f","length","parent","getFormElement","key","id","push","elem","nodeName","toLowerCase","parentNode","feature","addEventListener","window","i","store","get","formId","split","getElementById","value","timerId","setInterval","saved","inputs","set","alertify","logPosition","success","forms","form","clearInterval","storedKeys","indexOf","remove"],"mappings":"AA6CA,QAASA,WAGL,IAAK,GAFDC,MACAC,EAAaC,SAASC,iBAAiB,8BAClCC,EAAI,EAAGA,EAAIH,EAAWI,OAAQD,IAAK,CACxC,GAAIE,GAASC,eAAeN,EAAWG,GACvC,IAAIE,KAAW,EAAO,CAClB,GAAIE,GAAMF,EAAOG,GAAK,IAAMR,EAAWG,GAAGK,EAC1CT,GAAKU,KAAKF,IAGlB,MAAOR,GAEX,QAASO,gBAAeI,GACpB,GAAoC,SAAhCA,EAAKC,SAASC,cAA0B,CACxC,GAAIP,GAASK,EAAKG,UAClB,OAAsC,SAAlCR,EAAOM,SAASC,cACTP,EAEAC,eAAeD,GAG1B,OAAO,EAjEf,GAAIS,UACAC,mBAAqBC,OAAOD,iBAC5Bb,mBAAqBD,SAASC,iBAGlC,IAAIY,QAAQC,kBAAoBD,QAAQZ,iBAEpC,IAAK,GADDH,MAAOD,UACFmB,EAAI,EAAGA,EAAIlB,KAAKK,OAAQa,IAC7B,GAAIC,MAAMC,IAAIpB,KAAKkB,IAAK,CACpB,GAAIG,QAASrB,KAAKkB,GAAGI,MAAM,KAAK,EAChCpB,UAASqB,eAAeF,QAAQG,MAAQL,MAAMC,IAAIpB,KAAKkB,IAqBnE,IAAK,GAhBDO,SAAUR,OAAOS,YAAY,WAG7B,IAAK,GAFDC,IAAQ,EACRC,EAAS1B,SAASC,iBAAiB,8BAC9Be,EAAI,EAAGA,EAAIU,EAAOvB,OAAQa,IAAK,CACpC,GAAIV,GAAMD,eAAeqB,EAAOV,IAAIT,GAAK,IAAMmB,EAAOV,GAAGT,EACrDU,OAAMC,IAAIZ,KAASoB,EAAOV,GAAGM,OAA6B,KAApBI,EAAOV,GAAGM,QAChDL,MAAMU,IAAIrB,EAAKoB,EAAOV,GAAGM,OACzBG,GAAQ,GAGZA,KAAU,IACVG,SAASC,YAAY,aACrBD,SAASE,QAAQ,qBAEtB,KACCC,MAAQ/B,SAASC,iBAAiB,QAC7BC,EAAI,EAAGA,EAAI6B,MAAM5B,OAAQD,IAAK,CACnC,GAAI8B,MAAOD,MAAM7B,EACjB8B,MAAKlB,iBAAiB,SAAU,WAC5BC,OAAOkB,cAAcV,QAGrB,KAAK,GAFDJ,GAASa,KAAKzB,GACd2B,EAAajB,MAAMnB,OACdkB,EAAI,EAAGA,EAAIkB,EAAW/B,OAAQa,IAC/BkB,EAAWlB,GAAGmB,QAAQhB,IAAU,GAChCF,MAAMmB,OAAOF,EAAWlB","file":"../form-save.js","sourcesContent":["/* global alertify, store */\nvar feature = {\n addEventListener : !!window.addEventListener,\n querySelectorAll : !!document.querySelectorAll\n};\n\nif (feature.addEventListener && feature.querySelectorAll) {\n var keys = getKeys();\n for (var i = 0; i < keys.length; i++) {\n if (store.get(keys[i])) {\n var formId = keys[i].split('~')[1];\n document.getElementById(formId).value = store.get(keys[i]);\n }\n }\n}\n\nvar timerId = window.setInterval(function() {\n var saved = false;\n var inputs = document.querySelectorAll('input[type=text], textarea');\n for (var i = 0; i < inputs.length; i++) {\n var key = getFormElement(inputs[i]).id + '~' + inputs[i].id;\n if (store.get(key) !== inputs[i].value && inputs[i].value !== '') {\n store.set(key, inputs[i].value);\n saved = true;\n }\n }\n if (saved === true) {\n alertify.logPosition('top right');\n alertify.success('Auto saved text');\n }\n}, 5000);\nvar forms = document.querySelectorAll('form');\nfor (var f = 0; f < forms.length; f++) {\n var form = forms[f];\n form.addEventListener('submit', function() {\n window.clearInterval(timerId);\n var formId = form.id;\n var storedKeys = store.keys();\n for (var i = 0; i < storedKeys.length; i++) {\n if (storedKeys[i].indexOf(formId) > -1) {\n store.remove(storedKeys[i]);\n }\n }\n });\n}\nfunction getKeys() {\n var keys = [];\n var formFields = document.querySelectorAll('input[type=text], textarea');\n for (var f = 0; f < formFields.length; f++) {\n var parent = getFormElement(formFields[f]);\n if (parent !== false) {\n var key = parent.id + '~' + formFields[f].id;\n keys.push(key);\n }\n }\n return keys;\n}\nfunction getFormElement(elem) {\n if (elem.nodeName.toLowerCase() !== 'body') {\n var parent = elem.parentNode;\n if (parent.nodeName.toLowerCase() === 'form') {\n return parent;\n } else {\n return getFormElement(parent);\n }\n } else {\n return false;\n }\n}\n"]}

View file

@ -1 +0,0 @@
{"version":3,"sources":["links.js"],"names":["autolinker","Autolinker","ytidregex","spotifyregex","notes","document","querySelectorAll","i","length","ytid","textContent","match","yid","yiframe","createElement","classList","add","setAttribute","appendChild","spotifyid","sid","replace","siframe","orig","innerHTML","linked","link"],"mappings":"AAWA,IAAK,GATDA,YAAa,GAAIC,YAGjBC,UAAY,6BAEZC,aAAe,wCAGfC,MAAQC,SAASC,iBAAiB,cAC7BC,EAAI,EAAGA,EAAIH,MAAMI,OAAQD,IAAK,CAEnC,GAAIE,MAAOL,MAAMG,GAAGG,YAAYC,MAAMT,UACtC,IAAa,OAATO,KAAe,CACf,GAAIG,KAAMH,KAAK,GACXI,QAAUR,SAASS,cAAc,SACrCD,SAAQE,UAAUC,IAAI,WACtBH,QAAQI,aAAa,MAAO,2BAA6BL,KACzDC,QAAQI,aAAa,cAAe,GACpCJ,QAAQI,aAAa,kBAAmB,QACxCb,MAAMG,GAAGW,YAAYL,SAGzB,GAAIM,WAAYf,MAAMG,GAAGG,YAAYC,MAAMR,aAC3C,IAAkB,OAAdgB,UAAoB,CACpB,GAAIC,KAAMD,UAAU,GAAGE,QAAQ,IAAK,KAChCC,QAAUjB,SAASS,cAAc,SACrCQ,SAAQP,UAAUC,IAAI,WACtBM,QAAQL,aAAa,MAAO,0CAA4CG,KACxEE,QAAQL,aAAa,cAAe,GACpCK,QAAQL,aAAa,oBAAqB,QAC1Cb,MAAMG,GAAGW,YAAYI,SAGzB,GAAIC,MAAOnB,MAAMG,GAAGiB,UAChBC,OAASzB,WAAW0B,KAAKH,KAC7BnB,OAAMG,GAAGiB,UAAYC","file":"../links.js","sourcesContent":["/* global Autolinker */\n//the autlinker object\nvar autolinker = new Autolinker();\n\n//the youtube regex\nvar ytidregex = /watch\\?v=([A-Za-z0-9\\-_]+)/;\n\nvar spotifyregex = /https\\:\\/\\/play\\.spotify\\.com\\/(.*)\\b/;\n\n//grab the notes and loop through them\nvar notes = document.querySelectorAll('.e-content');\nfor (var i = 0; i < notes.length; i++) {\n //get Youtube ID\n var ytid = notes[i].textContent.match(ytidregex);\n if (ytid !== null) {\n var yid = ytid[1];\n var yiframe = document.createElement('iframe');\n yiframe.classList.add('youtube');\n yiframe.setAttribute('src', '//www.youtube.com/embed/' + yid);\n yiframe.setAttribute('frameborder', 0);\n yiframe.setAttribute('allowfullscreen', 'true');\n notes[i].appendChild(yiframe);\n }\n //get Spotify ID\n var spotifyid = notes[i].textContent.match(spotifyregex);\n if (spotifyid !== null) {\n var sid = spotifyid[1].replace('/', ':');\n var siframe = document.createElement('iframe');\n siframe.classList.add('spotify');\n siframe.setAttribute('src', 'https://embed.spotify.com/?uri=spotify:' + sid);\n siframe.setAttribute('frameborder', 0);\n siframe.setAttribute('allowtransparency', 'true');\n notes[i].appendChild(siframe);\n }\n //now linkify everything\n var orig = notes[i].innerHTML;\n var linked = autolinker.link(orig);\n notes[i].innerHTML = linked;\n}\n"]}

View file

@ -1 +0,0 @@
{"version":3,"sources":["maps.js"],"names":["mapDivs","document","querySelectorAll","mapboxgl","accessToken","i","length","mapDiv","latitude","dataset","longitude","el","createElement","classList","add","mapMenu","streetsInput","setAttribute","addEventListener","map","setStyle","streetsLabel","appendChild","createTextNode","satelliteInput","satelliteLabel","Map","container","style","center","zoom","scrollZoom","addControl","NavigationControl","Marker","offset","setLngLat","addTo"],"mappings":"AAEA,GAAIA,SAAUC,SAASC,iBAAiB,OACxCC,UAASC,YAAc,gGACvB,KAAK,GAAIC,GAAI,EAAGA,EAAIL,QAAQM,OAAQD,IAAK,CACrC,GAAIE,QAASP,QAAQK,GACjBG,SAAWD,OAAOE,QAAQD,SAC1BE,UAAaH,OAAOE,QAAQC,UAC5BC,GAAKV,SAASW,cAAc,MAChCD,IAAGE,UAAUC,IAAI,SACjB,IAAIC,SAAUd,SAASW,cAAc,MACrCG,SAAQF,UAAUC,IAAI,WACtB,IAAIE,cAAef,SAASW,cAAc,QAC1CI,cAAaC,aAAa,KAAM,WAChCD,aAAaC,aAAa,OAAQ,SAClCD,aAAaC,aAAa,OAAQ,UAClCD,aAAaC,aAAa,QAAS,WACnCD,aAAaC,aAAa,UAAW,WACrCD,aAAaE,iBAAiB,QAAS,WACnCC,IAAIC,SAAS,sCAEjB,IAAIC,cAAepB,SAASW,cAAc,QAC1CS,cAAaJ,aAAa,MAAO,WACjCI,aAAaC,YAAYrB,SAASsB,eAAe,WACjD,IAAIC,gBAAiBvB,SAASW,cAAc,QAC5CY,gBAAeP,aAAa,KAAM,aAClCO,eAAeP,aAAa,OAAQ,SACpCO,eAAeP,aAAa,OAAQ,UACpCO,eAAeP,aAAa,QAAS,WACrCO,eAAeN,iBAAiB,QAAS,WACrCC,IAAIC,SAAS,wCAEjB,IAAIK,gBAAiBxB,SAASW,cAAc,QAC5Ca,gBAAeR,aAAa,MAAO,aACnCQ,eAAeH,YAAYrB,SAASsB,eAAe,cACnDR,QAAQO,YAAYN,cACpBD,QAAQO,YAAYD,cACpBN,QAAQO,YAAYE,gBACpBT,QAAQO,YAAYG,eACpB,IAAIN,KAAM,GAAIhB,UAASuB,KACnBC,UAAWpB,OACXqB,MAAO,oCACPC,QAASnB,UAAWF,UACpBsB,KAAM,GACNC,YAAY,GAEhBZ,KAAIa,WAAW,GAAI7B,UAAS8B,mBAC5B,GAAI9B,UAAS+B,OAAOvB,IAAKwB,SAAS,IAAK,MAAOC,WAAW1B,UAAWF,WAAW6B,MAAMlB,KACrFZ,OAAOe,YAAYP","file":"../maps.js","sourcesContent":["/* global mapboxgl */\n//This code runs on page load and looks for <div class=\"map\">, then adds map\nvar mapDivs = document.querySelectorAll('.map');\nmapboxgl.accessToken = 'pk.eyJ1Ijoiam9ubnliYXJuZXMiLCJhIjoiY2l2cDhjYW04MDAwcjJ0cG1uZnhqcm82ayJ9.qA2zeVA-nsoMh9IFrd5KQw';\nfor (var i = 0; i < mapDivs.length; i++) {\n var mapDiv = mapDivs[i];\n var latitude = mapDiv.dataset.latitude;\n var longitude = mapDiv.dataset.longitude;\n var el = document.createElement('div');\n el.classList.add('marker');\n var mapMenu = document.createElement('div');\n mapMenu.classList.add('map-menu');\n var streetsInput = document.createElement('input');\n streetsInput.setAttribute('id', 'streets');\n streetsInput.setAttribute('type', 'radio');\n streetsInput.setAttribute('name', 'toggle');\n streetsInput.setAttribute('value', 'streets');\n streetsInput.setAttribute('checked', 'checked');\n streetsInput.addEventListener('click', function () {\n map.setStyle('mapbox://styles/mapbox/streets-v9');\n });\n var streetsLabel = document.createElement('label');\n streetsLabel.setAttribute('for', 'streets');\n streetsLabel.appendChild(document.createTextNode('Streets'));\n var satelliteInput = document.createElement('input');\n satelliteInput.setAttribute('id', 'satellite');\n satelliteInput.setAttribute('type', 'radio');\n satelliteInput.setAttribute('name', 'toggle');\n satelliteInput.setAttribute('value', 'streets');\n satelliteInput.addEventListener('click', function () {\n map.setStyle('mapbox://styles/mapbox/satellite-v9');\n });\n var satelliteLabel = document.createElement('label');\n satelliteLabel.setAttribute('for', 'satellite');\n satelliteLabel.appendChild(document.createTextNode('Satellite'));\n mapMenu.appendChild(streetsInput);\n mapMenu.appendChild(streetsLabel);\n mapMenu.appendChild(satelliteInput);\n mapMenu.appendChild(satelliteLabel);\n var map = new mapboxgl.Map({\n container: mapDiv,\n style: 'mapbox://styles/mapbox/streets-v9',\n center: [longitude, latitude],\n zoom: 15,\n scrollZoom: false\n });\n map.addControl(new mapboxgl.NavigationControl());\n new mapboxgl.Marker(el, {offset: [-10, -20]}).setLngLat([longitude, latitude]).addTo(map);\n mapDiv.appendChild(mapMenu);\n}\n"]}

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
{"version":3,"sources":["newplace.js"],"names":["getLocation","navigator","geolocation","getCurrentPosition","position","updateForm","coords","latitude","longitude","addMap","inputLatitude","document","querySelector","inputLongitude","value","form","div","createElement","setAttribute","appendChild","L","mapbox","accessToken","map","setView","addLayer","tileLayer","detectRetina","marker","draggable","addTo","on","markerLocation","getLatLng","lat","lng","button","addEventListener","attachEvent"],"mappings":"AASA,QAASA,eACD,eAAiBC,YACjBA,UAAUC,YAAYC,mBAAmB,SAASC,GAC9CC,WAAWD,EAASE,OAAOC,SAAUH,EAASE,OAAOE,WACrDC,OAAOL,EAASE,OAAOC,SAAUH,EAASE,OAAOE,aAK7D,QAASH,YAAWE,EAAUC,GAC1B,GAAIE,GAAgBC,SAASC,cAAc,aACvCC,EAAiBF,SAASC,cAAc,aAC5CF,GAAcI,MAAQP,EACtBM,EAAeC,MAAQN,EAG3B,QAASC,QAAOF,EAAUC,GACtB,GAAIO,GAAOJ,SAASC,cAAc,QAC9BI,EAAML,SAASM,cAAc,MACjCD,GAAIE,aAAa,KAAM,OACvBH,EAAKI,YAAYH,GACjBI,EAAEC,OAAOC,YAAc,wEACvB,IAAIC,GAAMH,EAAEC,OAAOE,IAAI,MAAO,wBACzBC,SAASjB,EAAUC,GAAY,IAC/BiB,SAASL,EAAEC,OAAOK,UAAU,wBACzBC,cAAc,KAElBC,EAASR,EAAEQ,QAAQrB,EAAUC,IAC7BqB,WAAW,IACZC,MAAMP,EACTK,GAAOG,GAAG,UAAW,WACjB,GAAIC,GAAiBJ,EAAOK,WAC5B5B,YAAW2B,EAAeE,IAAKF,EAAeG,OAxCtD,GAAIC,QAASzB,SAASC,cAAc,UAEhCwB,QAAOC,iBACPD,OAAOC,iBAAiB,QAASrC,aAEjCoC,OAAOE,YAAY,UAAWtC","file":"../newplace.js","sourcesContent":["/* global L */\nvar button = document.querySelector('#locate');\n\nif (button.addEventListener) {\n button.addEventListener('click', getLocation);\n} else {\n button.attachEvent('onclick', getLocation);\n}\n\nfunction getLocation() {\n if ('geolocation' in navigator) {\n navigator.geolocation.getCurrentPosition(function(position) {\n updateForm(position.coords.latitude, position.coords.longitude);\n addMap(position.coords.latitude, position.coords.longitude);\n });\n }\n}\n\nfunction updateForm(latitude, longitude) {\n var inputLatitude = document.querySelector('#latitude');\n var inputLongitude = document.querySelector('#longitude');\n inputLatitude.value = latitude;\n inputLongitude.value = longitude;\n}\n\nfunction addMap(latitude, longitude) {\n var form = document.querySelector('form');\n var div = document.createElement('div');\n div.setAttribute('id', 'map');\n form.appendChild(div);\n L.mapbox.accessToken = 'pk.eyJ1Ijoiam9ubnliYXJuZXMiLCJhIjoiVlpndW1EYyJ9.aP9fxAqLKh7lj0LpFh5k1w';\n var map = L.mapbox.map('map', 'jonnybarnes.gnoihnim')\n .setView([latitude, longitude], 15)\n .addLayer(L.mapbox.tileLayer('jonnybarnes.gnoihnim', {\n detectRetina: true\n }));\n var marker = L.marker([latitude, longitude], {\n draggable: true\n }).addTo(map);\n marker.on('dragend', function () {\n var markerLocation = marker.getLatLng();\n updateForm(markerLocation.lat, markerLocation.lng);\n });\n}\n"]}

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
function getLocation(){"geolocation"in navigator&&navigator.geolocation.getCurrentPosition(function(t){updateForm(t.coords.latitude,t.coords.longitude),addMap(t.coords.latitude,t.coords.longitude)})}function updateForm(t,e){var o=document.querySelector("#latitude"),n=document.querySelector("#longitude");o.value=t,n.value=e}function addMap(t,e){var o=document.querySelector("form"),n=document.createElement("div");n.setAttribute("id","map"),o.appendChild(n),L.mapbox.accessToken="pk.eyJ1Ijoiam9ubnliYXJuZXMiLCJhIjoiVlpndW1EYyJ9.aP9fxAqLKh7lj0LpFh5k1w";var a=L.mapbox.map("map","jonnybarnes.gnoihnim").setView([t,e],15).addLayer(L.mapbox.tileLayer("jonnybarnes.gnoihnim",{detectRetina:!0})),i=L.marker([t,e],{draggable:!0}).addTo(a);i.on("dragend",function(){var t=i.getLatLng();updateForm(t.lat,t.lng)})}var button=document.querySelector("#locate");button.addEventListener?button.addEventListener("click",getLocation):button.attachEvent("onclick",getLocation);
//# sourceMappingURL=maps/newplace.js.map
//# sourceMappingURL=public/assets/js/newplace.js.map

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1 @@
{"version":3,"sources":["resources/assets/js/newplace.js"],"names":["getLocation","navigator","geolocation","getCurrentPosition","position","updateForm","coords","latitude","longitude","addMap","inputLatitude","document","querySelector","inputLongitude","value","form","div","createElement","setAttribute","appendChild","L","mapbox","accessToken","map","setView","addLayer","tileLayer","detectRetina","marker","draggable","addTo","on","markerLocation","getLatLng","lat","lng","button","addEventListener","attachEvent"],"mappings":"AASA,QAASA,eACD,eAAiBC,YACjBA,UAAUC,YAAYC,mBAAmB,SAASC,GAC9CC,WAAWD,EAASE,OAAOC,SAAUH,EAASE,OAAOE,WACrDC,OAAOL,EAASE,OAAOC,SAAUH,EAASE,OAAOE,aAK7D,QAASH,YAAWE,EAAUC,GAC1B,GAAIE,GAAgBC,SAASC,cAAc,aACvCC,EAAiBF,SAASC,cAAc,aAC5CF,GAAcI,MAAQP,EACtBM,EAAeC,MAAQN,EAG3B,QAASC,QAAOF,EAAUC,GACtB,GAAIO,GAAOJ,SAASC,cAAc,QAC9BI,EAAML,SAASM,cAAc,MACjCD,GAAIE,aAAa,KAAM,OACvBH,EAAKI,YAAYH,GACjBI,EAAEC,OAAOC,YAAc,wEACvB,IAAIC,GAAMH,EAAEC,OAAOE,IAAI,MAAO,wBACzBC,SAASjB,EAAUC,GAAY,IAC/BiB,SAASL,EAAEC,OAAOK,UAAU,wBACzBC,cAAc,KAElBC,EAASR,EAAEQ,QAAQrB,EAAUC,IAC7BqB,WAAW,IACZC,MAAMP,EACTK,GAAOG,GAAG,UAAW,WACjB,GAAIC,GAAiBJ,EAAOK,WAC5B5B,YAAW2B,EAAeE,IAAKF,EAAeG,OAxCtD,GAAIC,QAASzB,SAASC,cAAc,UAEhCwB,QAAOC,iBACPD,OAAOC,iBAAiB,QAASrC,aAEjCoC,OAAOE,YAAY,UAAWtC","file":"public/assets/js/newplace.js"}

Binary file not shown.

Binary file not shown.

View file

@ -47,6 +47,10 @@ body > .h-card {
border-top: 1px solid grey;
}
footer {
margin-top: 1rem;
}
footer button {
margin-left: 5px;
}

View file

@ -41,7 +41,6 @@
<form action="search" method="get">
<input type="text" name="terms"><button type="submit">Search</button>
</form>
<p class="algolia-credit">Search powered by </p><img class="algolia-image" src="/assets/img/algolia.svg">
<p>The code for <code>{{ env('APP_LONGURL') }}</code> can be found on <a href="https://github.com/jonnybarnes/jonnybarnes.uk">GitHub</a>.</p>
<p>Built with love: <a href="/colophon">Colophon</a></p>
</footer>

View file

@ -6,12 +6,12 @@
</svg>
</a>@endif
@if($facebook_url !== null)<a class="u-syndication" href="{{ $facebook_url }}" title="View note on Facebook">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" preservedAspectRatio="xMinYMin meet" viewBox="0 0 266.893 266.895" class="icon">
<path id="Blue_1_" fill="#3C5A99" d="M248.082,262.307c7.854,0,14.223-6.369,14.223-14.225V18.812
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" preserveAspectRatio="xMinYMin meet" viewBox="0 0 266.893 266.895" class="icon">
<path fill="#3C5A99" d="M248.082,262.307c7.854,0,14.223-6.369,14.223-14.225V18.812
c0-7.857-6.368-14.224-14.223-14.224H18.812c-7.857,0-14.224,6.367-14.224,14.224v229.27c0,7.855,6.366,14.225,14.224,14.225
H248.082z"
/>
<path id="f" fill="#FFFFFF" d="M182.409,262.307v-99.803h33.499l5.016-38.895h-38.515V98.777c0-11.261,3.127-18.935,19.275-18.935
<path fill="#FFFFFF" d="M182.409,262.307v-99.803h33.499l5.016-38.895h-38.515V98.777c0-11.261,3.127-18.935,19.275-18.935
l20.596-0.009V45.045c-3.562-0.474-15.788-1.533-30.012-1.533c-29.695,0-50.025,18.126-50.025,51.413v28.684h-33.585v38.895h33.585
v99.803H182.409z"
/>

1619
yarn.lock

File diff suppressed because it is too large Load diff