Merge branch 'release/0.0.4'

This commit is contained in:
Jonny Barnes 2016-06-21 13:39:25 +01:00
commit 8ea0f7ecd4
141 changed files with 1860 additions and 1044 deletions

View file

@ -1,5 +1,7 @@
APP_ENV=local APP_ENV=local
APP_KEY=SomeRandomString
APP_DEBUG=true APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_KEY=SomeRandomString APP_KEY=SomeRandomString
APP_TIMEZONE=UTC APP_TIMEZONE=UTC
APP_LANG=en APP_LANG=en

22
.eslintrc.yml Normal file
View file

@ -0,0 +1,22 @@
env:
browser: true
es6: true
extends: 'eslint:recommended'
rules:
indent:
- error
- 4
linebreak-style:
- error
- unix
quotes:
- error
- single
semi:
- error
- always
no-console:
- error
- allow:
- warn
- error

6
.stylelintrc Normal file
View file

@ -0,0 +1,6 @@
{
"extends": "stylelint-config-standard",
"rules": {
"indentation": 4
}
}

View file

@ -27,6 +27,6 @@ class PasswordController extends Controller
*/ */
public function __construct() public function __construct()
{ {
$this->middleware('guest'); $this->middleware($this->guestMiddleware());
} }
} }

View file

@ -19,7 +19,7 @@ class NotesController extends Controller
*/ */
public function showNotes() public function showNotes()
{ {
$notes = Note::orderBy('id', 'desc')->with('webmentions', 'place')->simplePaginate(10); $notes = Note::orderBy('id', 'desc')->with('webmentions', 'place', 'media')->simplePaginate(10);
foreach ($notes as $note) { foreach ($notes as $note) {
$replies = 0; $replies = 0;
foreach ($note->webmentions as $webmention) { foreach ($note->webmentions as $webmention) {

View file

@ -41,7 +41,7 @@ class NoteService
if ($request->hasFile('photo')) { if ($request->hasFile('photo')) {
$files = $request->file('photo'); $files = $request->file('photo');
foreach ($files as $file) { foreach ($files as $file) {
$note->addMedia($file)->toMediaLibraryOnDisk('images', 's3'); $note->addMedia($file)->toMediaLibrary('images', 's3');
} }
} }

View file

@ -6,7 +6,7 @@
"Jonny Barnes <jonny@jonnybarnes.uk>" "Jonny Barnes <jonny@jonnybarnes.uk>"
], ],
"license": "CC0-1.0", "license": "CC0-1.0",
"homepage": "https://github.com/jonnybarnes/jbl5", "homepage": "https://github.com/jonnybarnes/jonnybarnes.uk",
"moduleType": [], "moduleType": [],
"ignore": [ "ignore": [
"**/.*", "**/.*",

View file

@ -1,5 +1,13 @@
# Changelog # Changelog
## Version 0.0.4 (2016-06-21)
- Move bower components into their own subdir
- Move my js into `resources/`, apply an eslint pre-commit hook
- Better guplfile, next thing is to add cleanup of old compressed files
- Update `spatie/laravel-medialibrary` to v4, tweak associated code
- Merge in upstream changes
- Add a stylelint lint-staged hook
## Version 0.0.3 (2013-06-09) ## Version 0.0.3 (2013-06-09)
- Better tag normalization code organisation - Better tag normalization code organisation
- Remove `jonnybarnes/unicode-tools` dependency and clean up relevant code - Remove `jonnybarnes/unicode-tools` dependency and clean up relevant code

View file

@ -18,7 +18,7 @@
"indieauth/client": "~0.1", "indieauth/client": "~0.1",
"ezyang/htmlpurifier": "~4.6", "ezyang/htmlpurifier": "~4.6",
"league/commonmark": "^0.13.0", "league/commonmark": "^0.13.0",
"spatie/laravel-medialibrary": "^3.5", "spatie/laravel-medialibrary": "^4.0",
"league/flysystem-aws-s3-v3": "^1.0", "league/flysystem-aws-s3-v3": "^1.0",
"phaza/laravel-postgis": "~3.1", "phaza/laravel-postgis": "~3.1",
"lcobucci/jwt": "^3.1" "lcobucci/jwt": "^3.1"

205
composer.lock generated
View file

@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "ae25cd7787df367a650bf7dc2fa74227", "hash": "e17d58f5ff05d8a71261984fb22e0757",
"content-hash": "7982802429d5fe540f528ec69c3d84d2", "content-hash": "875c8207087b92da0cffdf369815dd27",
"packages": [ "packages": [
{ {
"name": "anahkiasen/underscore-php", "name": "anahkiasen/underscore-php",
@ -59,16 +59,16 @@
}, },
{ {
"name": "aws/aws-sdk-php", "name": "aws/aws-sdk-php",
"version": "3.18.16", "version": "3.18.18",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/aws/aws-sdk-php.git", "url": "https://github.com/aws/aws-sdk-php.git",
"reference": "5b959dda467752d4db8fa41fe9bbce85cabbe81e" "reference": "68b9d0b7e007782bc0f2633cdf5a4a6bf08aaafc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/5b959dda467752d4db8fa41fe9bbce85cabbe81e", "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/68b9d0b7e007782bc0f2633cdf5a4a6bf08aaafc",
"reference": "5b959dda467752d4db8fa41fe9bbce85cabbe81e", "reference": "68b9d0b7e007782bc0f2633cdf5a4a6bf08aaafc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -135,7 +135,7 @@
"s3", "s3",
"sdk" "sdk"
], ],
"time": "2016-06-07 21:16:15" "time": "2016-06-14 20:35:03"
}, },
{ {
"name": "barnabywalters/mf-cleaner", "name": "barnabywalters/mf-cleaner",
@ -1131,16 +1131,16 @@
}, },
{ {
"name": "laravel/framework", "name": "laravel/framework",
"version": "v5.2.36", "version": "v5.2.39",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/framework.git", "url": "https://github.com/laravel/framework.git",
"reference": "236d7c0c5b67a2348ac7831391031d93000de3ab" "reference": "c2a77050269b4e03bd9a735a9f24e573a7598b8a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/236d7c0c5b67a2348ac7831391031d93000de3ab", "url": "https://api.github.com/repos/laravel/framework/zipball/c2a77050269b4e03bd9a735a9f24e573a7598b8a",
"reference": "236d7c0c5b67a2348ac7831391031d93000de3ab", "reference": "c2a77050269b4e03bd9a735a9f24e573a7598b8a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1256,7 +1256,7 @@
"framework", "framework",
"laravel" "laravel"
], ],
"time": "2016-06-06 15:18:48" "time": "2016-06-17 19:25:12"
}, },
{ {
"name": "lcobucci/jwt", "name": "lcobucci/jwt",
@ -1318,16 +1318,16 @@
}, },
{ {
"name": "league/commonmark", "name": "league/commonmark",
"version": "0.13.3", "version": "0.13.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/thephpleague/commonmark.git", "url": "https://github.com/thephpleague/commonmark.git",
"reference": "35816f39eb2498484fbb7b1495633a976ee1a8de" "reference": "83f8210427fb01f671e272bb8d44b4ed3a94d459"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/35816f39eb2498484fbb7b1495633a976ee1a8de", "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/83f8210427fb01f671e272bb8d44b4ed3a94d459",
"reference": "35816f39eb2498484fbb7b1495633a976ee1a8de", "reference": "83f8210427fb01f671e272bb8d44b4ed3a94d459",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1383,7 +1383,7 @@
"markdown", "markdown",
"parser" "parser"
], ],
"time": "2016-05-21 18:41:30" "time": "2016-06-14 14:49:29"
}, },
{ {
"name": "league/flysystem", "name": "league/flysystem",
@ -1517,34 +1517,33 @@
}, },
{ {
"name": "league/glide", "name": "league/glide",
"version": "0.3.6", "version": "1.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/thephpleague/glide.git", "url": "https://github.com/thephpleague/glide.git",
"reference": "e45a4b536924956e1b20f5d023800557d466eda7" "reference": "4218b548401ff3a8f602e2c3f78849a381b2c1bf"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/thephpleague/glide/zipball/e45a4b536924956e1b20f5d023800557d466eda7", "url": "https://api.github.com/repos/thephpleague/glide/zipball/4218b548401ff3a8f602e2c3f78849a381b2c1bf",
"reference": "e45a4b536924956e1b20f5d023800557d466eda7", "reference": "4218b548401ff3a8f602e2c3f78849a381b2c1bf",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"intervention/image": "~2.1", "intervention/image": "^2.1",
"league/flysystem": "~1.0", "league/flysystem": "^1.0",
"php": ">=5.4", "php": "^5.4 | ^7.0",
"symfony/http-foundation": "~2.3|~3.0", "psr/http-message": "^1.0"
"symfony/http-kernel": "~2.3|~3.0"
}, },
"require-dev": { "require-dev": {
"mockery/mockery": "~0.9", "mockery/mockery": "~0.9",
"phpunit/php-token-stream": ">=1.3.0", "phpunit/php-token-stream": "^1.4",
"phpunit/phpunit": "~4.4" "phpunit/phpunit": "~4.4"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "0.3-dev" "dev-master": "1.0-dev"
} }
}, },
"autoload": { "autoload": {
@ -1564,7 +1563,7 @@
} }
], ],
"description": "Wonderfully easy on-demand image manipulation library with an HTTP based API.", "description": "Wonderfully easy on-demand image manipulation library with an HTTP based API.",
"homepage": "https://github.com/thephpleague/glide", "homepage": "http://glide.thephpleague.com",
"keywords": [ "keywords": [
"ImageMagick", "ImageMagick",
"editing", "editing",
@ -1575,7 +1574,7 @@
"manipulation", "manipulation",
"processing" "processing"
], ],
"time": "2016-01-25 13:35:12" "time": "2016-06-13 14:45:28"
}, },
{ {
"name": "martinbean/laravel-sluggable-trait", "name": "martinbean/laravel-sluggable-trait",
@ -2106,16 +2105,16 @@
}, },
{ {
"name": "predis/predis", "name": "predis/predis",
"version": "v1.1.0", "version": "v1.1.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nrk/predis.git", "url": "https://github.com/nrk/predis.git",
"reference": "0e17edbefb50c6cbd1acc4a6f6ef06399deb1af2" "reference": "f0210e38881631afeafb56ab43405a92cafd9fd1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nrk/predis/zipball/0e17edbefb50c6cbd1acc4a6f6ef06399deb1af2", "url": "https://api.github.com/repos/nrk/predis/zipball/f0210e38881631afeafb56ab43405a92cafd9fd1",
"reference": "0e17edbefb50c6cbd1acc4a6f6ef06399deb1af2", "reference": "f0210e38881631afeafb56ab43405a92cafd9fd1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2152,7 +2151,7 @@
"predis", "predis",
"redis" "redis"
], ],
"time": "2016-06-01 22:06:21" "time": "2016-06-16 16:22:20"
}, },
{ {
"name": "psr/http-message", "name": "psr/http-message",
@ -2395,31 +2394,31 @@
}, },
{ {
"name": "spatie/laravel-glide", "name": "spatie/laravel-glide",
"version": "2.3.3", "version": "3.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/spatie/laravel-glide.git", "url": "https://github.com/spatie/laravel-glide.git",
"reference": "06bcfb85464a1202dfaa7494d1b1600c88c418e5" "reference": "9a5f8cac9ed2246b41afd6aa1f2b3034a6aa9ba4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-glide/zipball/06bcfb85464a1202dfaa7494d1b1600c88c418e5", "url": "https://api.github.com/repos/spatie/laravel-glide/zipball/9a5f8cac9ed2246b41afd6aa1f2b3034a6aa9ba4",
"reference": "06bcfb85464a1202dfaa7494d1b1600c88c418e5", "reference": "9a5f8cac9ed2246b41afd6aa1f2b3034a6aa9ba4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"illuminate/support": "5.*", "illuminate/support": "5.*",
"league/glide": "0.3.*", "league/glide": "^1.0",
"php": ">=5.4.0" "php": "^7.0"
}, },
"require-dev": { "require-dev": {
"codeception/codeception": "2.*", "orchestra/testbench": "^3.2",
"mockery/mockery": "~0.9.3" "phpunit/phpunit": "5.*"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
"psr-0": { "psr-4": {
"Spatie\\Glide": "src/" "Spatie\\Glide\\": "src/"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@ -2432,22 +2431,22 @@
"email": "freek@spatie.be" "email": "freek@spatie.be"
} }
], ],
"description": "A Glide Service Provider for Laravel", "description": "Easily convert images with Glide",
"homepage": "https://github.com/spatie/laravel-glide", "homepage": "https://github.com/spatie/laravel-glide",
"time": "2016-05-13 14:56:07" "time": "2016-05-05 15:35:48"
}, },
{ {
"name": "spatie/laravel-medialibrary", "name": "spatie/laravel-medialibrary",
"version": "3.18.0", "version": "4.2.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/spatie/laravel-medialibrary.git", "url": "https://github.com/spatie/laravel-medialibrary.git",
"reference": "e7a0a564707b29e22c4e03c815d455de515bc230" "reference": "3499014e3b2de852f1e5f4bd4006e4031dd49daa"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/e7a0a564707b29e22c4e03c815d455de515bc230", "url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/3499014e3b2de852f1e5f4bd4006e4031dd49daa",
"reference": "e7a0a564707b29e22c4e03c815d455de515bc230", "reference": "3499014e3b2de852f1e5f4bd4006e4031dd49daa",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2455,16 +2454,16 @@
"illuminate/console": "~5.1.16|~5.2.0", "illuminate/console": "~5.1.16|~5.2.0",
"illuminate/database": "~5.1.16|~5.2.0", "illuminate/database": "~5.1.16|~5.2.0",
"illuminate/support": "~5.1.16|~5.2.0", "illuminate/support": "~5.1.16|~5.2.0",
"php": "^5.5|^7.0", "php": "^7.0",
"spatie/laravel-glide": "^2.2.4", "spatie/laravel-glide": "^3.0.0",
"spatie/pdf-to-image": "^1.0.1", "spatie/pdf-to-image": "^1.0.1",
"spatie/string": "^2.0" "spatie/string": "^2.0.0"
}, },
"require-dev": { "require-dev": {
"doctrine/dbal": "^2.5.2", "doctrine/dbal": "^2.5.2",
"mockery/mockery": "^0.9.4", "mockery/mockery": "^0.9.4",
"orchestra/testbench": "^3.0", "orchestra/testbench": "^3.0",
"phpunit/phpunit": "^4.0", "phpunit/phpunit": "^5.0.0",
"scrutinizer/ocular": "^1.1" "scrutinizer/ocular": "^1.1"
}, },
"type": "library", "type": "library",
@ -2494,7 +2493,7 @@
"media", "media",
"spatie" "spatie"
], ],
"time": "2016-06-02 11:45:10" "time": "2016-06-03 11:06:43"
}, },
{ {
"name": "spatie/pdf-to-image", "name": "spatie/pdf-to-image",
@ -2771,16 +2770,16 @@
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v3.1.0", "version": "v3.1.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/event-dispatcher.git", "url": "https://github.com/symfony/event-dispatcher.git",
"reference": "0343b2cedd0edb26cdc791212a8eb645c406018b" "reference": "f5b7563f67779c6d3d5370e23448e707c858df3e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/0343b2cedd0edb26cdc791212a8eb645c406018b", "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f5b7563f67779c6d3d5370e23448e707c858df3e",
"reference": "0343b2cedd0edb26cdc791212a8eb645c406018b", "reference": "f5b7563f67779c6d3d5370e23448e707c858df3e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2827,7 +2826,7 @@
], ],
"description": "Symfony EventDispatcher Component", "description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2016-04-12 18:27:47" "time": "2016-06-06 11:42:41"
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
@ -3519,16 +3518,16 @@
}, },
{ {
"name": "vlucas/phpdotenv", "name": "vlucas/phpdotenv",
"version": "v2.2.1", "version": "v2.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/vlucas/phpdotenv.git", "url": "https://github.com/vlucas/phpdotenv.git",
"reference": "63f37b9395e8041cd4313129c08ece896d06ca8e" "reference": "9ca5644c536654e9509b9d257f53c58630eb2a6a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/63f37b9395e8041cd4313129c08ece896d06ca8e", "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/9ca5644c536654e9509b9d257f53c58630eb2a6a",
"reference": "63f37b9395e8041cd4313129c08ece896d06ca8e", "reference": "9ca5644c536654e9509b9d257f53c58630eb2a6a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3540,7 +3539,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.2-dev" "dev-master": "2.3-dev"
} }
}, },
"autoload": { "autoload": {
@ -3565,7 +3564,7 @@
"env", "env",
"environment" "environment"
], ],
"time": "2016-04-15 10:48:49" "time": "2016-06-14 14:14:52"
} }
], ],
"packages-dev": [ "packages-dev": [
@ -4054,22 +4053,22 @@
}, },
{ {
"name": "phpdocumentor/reflection-docblock", "name": "phpdocumentor/reflection-docblock",
"version": "3.0.2", "version": "3.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "45ada3e3fd09789fbfbd6d65b3f0901f0030dc61" "reference": "9270140b940ff02e58ec577c237274e92cd40cdd"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/45ada3e3fd09789fbfbd6d65b3f0901f0030dc61", "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd",
"reference": "45ada3e3fd09789fbfbd6d65b3f0901f0030dc61", "reference": "9270140b940ff02e58ec577c237274e92cd40cdd",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.5", "php": ">=5.5",
"phpdocumentor/reflection-common": "^1.0@dev", "phpdocumentor/reflection-common": "^1.0@dev",
"phpdocumentor/type-resolver": "^0.1.5", "phpdocumentor/type-resolver": "^0.2.0",
"webmozart/assert": "^1.0" "webmozart/assert": "^1.0"
}, },
"require-dev": { "require-dev": {
@ -4095,20 +4094,20 @@
} }
], ],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"time": "2016-06-06 06:44:13" "time": "2016-06-10 09:48:41"
}, },
{ {
"name": "phpdocumentor/type-resolver", "name": "phpdocumentor/type-resolver",
"version": "0.1.8", "version": "0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git", "url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "9891754231e55d42f0d16988ffb799af39f31a12" "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9891754231e55d42f0d16988ffb799af39f31a12", "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443",
"reference": "9891754231e55d42f0d16988ffb799af39f31a12", "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4117,7 +4116,7 @@
}, },
"require-dev": { "require-dev": {
"mockery/mockery": "^0.9.4", "mockery/mockery": "^0.9.4",
"phpunit/phpunit": "^5.2" "phpunit/phpunit": "^5.2||^4.8.24"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@ -4142,7 +4141,7 @@
"email": "me@mikevanriel.com" "email": "me@mikevanriel.com"
} }
], ],
"time": "2016-03-28 10:02:29" "time": "2016-06-10 07:14:17"
}, },
{ {
"name": "phpspec/prophecy", "name": "phpspec/prophecy",
@ -4452,16 +4451,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "5.4.2", "version": "5.4.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "f5726a0262e5f74f8e9cf03128798b64160c441d" "reference": "2f1fc94b77ea6418bd6a06c64a1dac0645fbce59"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f5726a0262e5f74f8e9cf03128798b64160c441d", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2f1fc94b77ea6418bd6a06c64a1dac0645fbce59",
"reference": "f5726a0262e5f74f8e9cf03128798b64160c441d", "reference": "2f1fc94b77ea6418bd6a06c64a1dac0645fbce59",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4480,7 +4479,7 @@
"phpunit/phpunit-mock-objects": "^3.2", "phpunit/phpunit-mock-objects": "^3.2",
"sebastian/comparator": "~1.1", "sebastian/comparator": "~1.1",
"sebastian/diff": "~1.2", "sebastian/diff": "~1.2",
"sebastian/environment": "~1.3", "sebastian/environment": "^1.3 || ^2.0",
"sebastian/exporter": "~1.2", "sebastian/exporter": "~1.2",
"sebastian/global-state": "~1.0", "sebastian/global-state": "~1.0",
"sebastian/object-enumerator": "~1.0", "sebastian/object-enumerator": "~1.0",
@ -4488,6 +4487,9 @@
"sebastian/version": "~1.0|~2.0", "sebastian/version": "~1.0|~2.0",
"symfony/yaml": "~2.1|~3.0" "symfony/yaml": "~2.1|~3.0"
}, },
"conflict": {
"phpdocumentor/reflection-docblock": "3.0.2"
},
"suggest": { "suggest": {
"phpunit/php-invoker": "~1.1" "phpunit/php-invoker": "~1.1"
}, },
@ -4523,20 +4525,20 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2016-06-03 09:59:50" "time": "2016-06-16 06:01:15"
}, },
{ {
"name": "phpunit/phpunit-mock-objects", "name": "phpunit/phpunit-mock-objects",
"version": "3.2.1", "version": "3.2.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
"reference": "0dc8fd8e87e0366c22b6c25d1f43c4e2e66847b3" "reference": "b13d0d9426ced06958bd32104653526a6c998a52"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/0dc8fd8e87e0366c22b6c25d1f43c4e2e66847b3", "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/b13d0d9426ced06958bd32104653526a6c998a52",
"reference": "0dc8fd8e87e0366c22b6c25d1f43c4e2e66847b3", "reference": "b13d0d9426ced06958bd32104653526a6c998a52",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4582,7 +4584,7 @@
"mock", "mock",
"xunit" "xunit"
], ],
"time": "2016-06-04 05:52:19" "time": "2016-06-12 07:37:26"
}, },
{ {
"name": "sebastian/code-unit-reverse-lookup", "name": "sebastian/code-unit-reverse-lookup",
@ -4797,16 +4799,16 @@
}, },
{ {
"name": "sebastian/exporter", "name": "sebastian/exporter",
"version": "1.2.1", "version": "1.2.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git", "url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "7ae5513327cb536431847bcc0c10edba2701064e" "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4",
"reference": "7ae5513327cb536431847bcc0c10edba2701064e", "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4814,12 +4816,13 @@
"sebastian/recursion-context": "~1.0" "sebastian/recursion-context": "~1.0"
}, },
"require-dev": { "require-dev": {
"ext-mbstring": "*",
"phpunit/phpunit": "~4.4" "phpunit/phpunit": "~4.4"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.2.x-dev" "dev-master": "1.3.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -4859,7 +4862,7 @@
"export", "export",
"exporter" "exporter"
], ],
"time": "2015-06-21 07:55:53" "time": "2016-06-17 09:04:28"
}, },
{ {
"name": "sebastian/global-state", "name": "sebastian/global-state",
@ -5207,16 +5210,16 @@
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
"version": "v3.1.0", "version": "v3.1.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/yaml.git", "url": "https://github.com/symfony/yaml.git",
"reference": "eca51b7b65eb9be6af88ad7cc91685f1556f5c9a" "reference": "c5a7e7fc273c758b92b85dcb9c46149ccda89623"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/eca51b7b65eb9be6af88ad7cc91685f1556f5c9a", "url": "https://api.github.com/repos/symfony/yaml/zipball/c5a7e7fc273c758b92b85dcb9c46149ccda89623",
"reference": "eca51b7b65eb9be6af88ad7cc91685f1556f5c9a", "reference": "c5a7e7fc273c758b92b85dcb9c46149ccda89623",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -5252,7 +5255,7 @@
], ],
"description": "Symfony Yaml Component", "description": "Symfony Yaml Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2016-05-26 21:46:24" "time": "2016-06-14 11:18:07"
}, },
{ {
"name": "webmozart/assert", "name": "webmozart/assert",

View file

@ -121,6 +121,8 @@ return [
'log' => env('APP_LOG', 'single'), 'log' => env('APP_LOG', 'single'),
'log_level' => env('APP_LOG_LEVEL', 'debug'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Autoloaded Service Providers | Autoloaded Service Providers

View file

@ -11,6 +11,8 @@ return [
| framework when an event needs to be broadcast. You may set this to | framework when an event needs to be broadcast. You may set this to
| any of the connections defined in the "connections" array below. | any of the connections defined in the "connections" array below.
| |
| Supported: "pusher", "redis", "log"
|
*/ */
'default' => env('BROADCAST_DRIVER', 'pusher'), 'default' => env('BROADCAST_DRIVER', 'pusher'),

View file

@ -11,6 +11,8 @@ return [
| using this caching library. This connection is used when another is | using this caching library. This connection is used when another is
| not explicitly specified when executing a given caching function. | not explicitly specified when executing a given caching function.
| |
| Supported: "apc", "array", "database", "file", "memcached", "redis"
|
*/ */
'default' => env('CACHE_DRIVER', 'file'), 'default' => env('CACHE_DRIVER', 'file'),

View file

@ -19,6 +19,10 @@ return [
'secret' => env('MAILGUN_SECRET'), 'secret' => env('MAILGUN_SECRET'),
], ],
'mandrill' => [
'secret' => env('MANDRILL_SECRET'),
],
'ses' => [ 'ses' => [
'key' => env('SES_KEY'), 'key' => env('SES_KEY'),
'secret' => env('SES_SECRET'), 'secret' => env('SES_SECRET'),

View file

@ -16,50 +16,31 @@ var elixir = require('laravel-elixir');
elixir(function(mix) { elixir(function(mix) {
mix.sass('global.scss', 'public/assets/css'); mix.sass('global.scss', 'public/assets/css');
mix.copy('resources/assets/js', 'public/assets/js');
mix.version([ mix.version([
//hand-made css
'assets/css/global.css', 'assets/css/global.css',
'assets/css/projects.css', 'assets/css/projects.css',
'assets/css/alertify.css', //hand-made js
'assets/css/sanitize.min.css',
'assets/css/prism.css',
'assets/js/form-save.js', 'assets/js/form-save.js',
'assets/js/links.js', 'assets/js/links.js',
'assets/js/maps.js', 'assets/js/maps.js',
'assets/js/newplace.js', 'assets/js/newplace.js',
'assets/js/newnote.js', 'assets/js/newnote.js',
'assets/js/fetch.js', //bower components
'assets/js/alertify.js', 'assets/bower/alertify.css',
'assets/js/store2.min.js', 'assets/bower/sanitize.css',
'assets/js/Autolinker.min.js', 'assets/bower/fetch.js',
'assets/js/marked.min.js', 'assets/bower/alertify.js',
'assets/js/prism.js', 'assets/bower/store2.min.js',
'assets/bower/Autolinker.min.js',
'assets/bower/marked.min.js',
//prism
'assets/prism/prism.js',
'assets/prism/prism.css',
]); ]);
}); });
gulp.task('gzip-built-css', function() {
return gulp.src('public/build/assets/css/*.css')
.pipe(zopfli({ format: 'gzip', append: true }))
.pipe(gulp.dest('public/build/assets/css/'));
});
gulp.task('br-built-css', function() {
return gulp.src('public/build/assets/css/*.css')
.pipe(brotli.compress({mode: 1, quality: 11}))
.pipe(gulp.dest('public/build/assets/css/'));
});
gulp.task('gzip-built-js', function() {
return gulp.src('public/build/assets/js/*.js')
.pipe(zopfli({ format: 'gzip', append: true }))
.pipe(gulp.dest('public/build/assets/js/'));
});
gulp.task('br-built-js', function() {
return gulp.src('public/build/assets/js/*.js')
.pipe(brotli.compress({mode: 1, quality: 11}))
.pipe(gulp.dest('public/build/assets/js/'));
});
gulp.task('bower', function() { gulp.task('bower', function() {
//copy JS files //copy JS files
gulp.src([ gulp.src([
@ -69,13 +50,54 @@ gulp.task('bower', function() {
'bower_components/Autolinker.js/dist/Autolinker.min.js', 'bower_components/Autolinker.js/dist/Autolinker.min.js',
'bower_components/marked/marked.min.js', 'bower_components/marked/marked.min.js',
]) ])
.pipe(gulp.dest('public/assets/js/')); .pipe(gulp.dest('public/assets/bower/'));
//copy CSS files //copy CSS files
gulp.src([ gulp.src([
'bower_components/alertify.js/dist/css/alertify.css', 'bower_components/alertify.js/dist/css/alertify.css',
'bower_components/sanitize-css/dist/sanitize.min.css', 'bower_components/sanitize-css/sanitize.css',
]) ])
.pipe(gulp.dest('public/assets/css/')); .pipe(gulp.dest('public/assets/bower/'));
}); });
gulp.task('compress', ['gzip-built-css', 'br-built-css', 'gzip-built-js', 'br-built-js']); gulp.task('compress', function () {
//hand-made css
gulp.src('public/build/assets/css/*.css')
.pipe(zopfli({ format: 'gzip', append: true }))
.pipe(gulp.dest('public/build/assets/css/'));
gulp.src('public/build/assets/css/*.css')
.pipe(brotli.compress({mode: 1, quality: 11}))
.pipe(gulp.dest('public/build/assets/css/'));
//hand-made js
gulp.src('public/build/assets/js/*.js')
.pipe(zopfli({ format: 'gzip', append: true }))
.pipe(gulp.dest('public/build/assets/js/'));
gulp.src('public/build/assets/js/*.js')
.pipe(brotli.compress({mode: 1, quality: 11}))
.pipe(gulp.dest('public/build/assets/js/'));
//bower components
gulp.src('public/build/assets/bower/*.css')
.pipe(zopfli({ format: 'gzip', append: true }))
.pipe(gulp.dest('public/build/assets/bower/'));
gulp.src('public/build/assets/bower/*.js')
.pipe(zopfli({ format: 'gzip', append: true }))
.pipe(gulp.dest('public/build/assets/bower/'));
gulp.src('public/build/assets/bower/*.css')
.pipe(brotli.compress({mode: 1, quality: 11}))
.pipe(gulp.dest('public/build/assets/bower/'));
gulp.src('public/build/assets/bower/*.js')
.pipe(brotli.compress({mode: 1, quality: 11}))
.pipe(gulp.dest('public/build/assets/bower/'));
//prism
gulp.src('public/build/assets/prism/*.css')
.pipe(zopfli({ format: 'gzip', append: true }))
.pipe(gulp.dest('public/build/assets/prism/'));
gulp.src('public/build/assets/prism/*.js')
.pipe(zopfli({ format: 'gzip', append: true }))
.pipe(gulp.dest('public/build/assets/prism/'));
gulp.src('public/build/assets/prism/*.css')
.pipe(brotli.compress({mode: 1, quality: 11}))
.pipe(gulp.dest('public/build/assets/prism/'));
gulp.src('public/build/assets/prism/*.js')
.pipe(brotli.compress({mode: 1, quality: 11}))
.pipe(gulp.dest('public/build/assets/prism/'));
});

View file

@ -1,17 +1,30 @@
{ {
"name": "jbuk-frontend", "name": "jbuk-frontend",
"version": "0.0.1", "version": "0.0.1",
"repository": "https://github.com/jonnybarnes/jbl5", "repository": "https://github.com/jonnybarnes/jonnybarnes.uk",
"license": "CC0-1.0", "license": "CC0-1.0",
"devDependencies": { "devDependencies": {
"gulp": "~3.9", "gulp": "~3.9",
"gulp-brotli": "^1.0.1", "gulp-brotli": "^1.0.1",
"gulp-zopfli": "^1.0.0", "gulp-zopfli": "^1.0.0",
"laravel-elixir": "^5.0.0" "laravel-elixir": "^6.0.0-2",
"lint-staged": "^1.0.1",
"pre-commit": "^1.1.3",
"stylelint": "^6.6.0",
"stylelint-config-standard": "^9.0.0"
}, },
"private": true, "private": true,
"scripts": { "scripts": {
"prod": "gulp --production", "prod": "gulp --production",
"dev": "gulp watch" "dev": "gulp watch",
} "lint-staged": "lint-staged",
"stylelint-staged": "stylelint --syntax=scss"
},
"lint-staged": {
"eslint": "resources/assets/js/*.js",
"stylelint-staged": "resources/assets/sass/**/*.scss"
},
"pre-commit": [
"lint-staged"
]
} }

10
public/assets/bower/Autolinker.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
public/assets/bower/alertify.css vendored Normal file
View file

@ -0,0 +1 @@
.alertify-logs>*{padding:12px 24px;color:#fff;box-shadow:0 2px 5px 0 rgba(0,0,0,.2);border-radius:1px}.alertify-logs>*,.alertify-logs>.default{background:rgba(0,0,0,.8)}.alertify-logs>.error{background:rgba(244,67,54,.8)}.alertify-logs>.success{background:rgba(76,175,80,.9)}.alertify{position:fixed;background-color:rgba(0,0,0,.3);left:0;right:0;top:0;bottom:0;width:100%;height:100%;z-index:1}.alertify.hide{opacity:0;pointer-events:none}.alertify,.alertify.show{box-sizing:border-box;transition:all .33s cubic-bezier(.25,.8,.25,1)}.alertify,.alertify *{box-sizing:border-box}.alertify .dialog{padding:12px}.alertify .alert,.alertify .dialog{width:100%;margin:0 auto;position:relative;top:50%;transform:translateY(-50%)}.alertify .alert>*,.alertify .dialog>*{width:400px;max-width:95%;margin:0 auto;text-align:center;padding:12px;background:#fff;box-shadow:0 2px 4px -1px rgba(0,0,0,.14),0 4px 5px 0 rgba(0,0,0,.098),0 1px 10px 0 rgba(0,0,0,.084)}.alertify .alert .msg,.alertify .dialog .msg{padding:12px;margin-bottom:12px;margin:0;text-align:left}.alertify .alert input:not(.form-control),.alertify .dialog input:not(.form-control){margin-bottom:15px;width:100%;font-size:100%;padding:12px}.alertify .alert input:not(.form-control):focus,.alertify .dialog input:not(.form-control):focus{outline-offset:-2px}.alertify .alert nav,.alertify .dialog nav{text-align:right}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button),.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button){background:transparent;box-sizing:border-box;color:rgba(0,0,0,.87);position:relative;outline:0;border:0;display:inline-block;-ms-flex-align:center;-ms-grid-row-align:center;align-items:center;padding:0 6px;margin:6px 8px;line-height:36px;min-height:36px;white-space:nowrap;min-width:88px;text-align:center;text-transform:uppercase;font-size:14px;text-decoration:none;cursor:pointer;border:1px solid transparent;border-radius:2px}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):active,.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):hover,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):active,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):hover{background-color:rgba(0,0,0,.05)}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):focus,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):focus{border:1px solid rgba(0,0,0,.1)}.alertify .alert nav button.btn,.alertify .dialog nav button.btn{margin:6px 4px}.alertify-logs{position:fixed;z-index:1}.alertify-logs.bottom,.alertify-logs:not(.top){bottom:16px}.alertify-logs.left,.alertify-logs:not(.right){left:16px}.alertify-logs.left>*,.alertify-logs:not(.right)>*{float:left;transform:translateZ(0);height:auto}.alertify-logs.left>.show,.alertify-logs:not(.right)>.show{left:0}.alertify-logs.left>*,.alertify-logs.left>.hide,.alertify-logs:not(.right)>*,.alertify-logs:not(.right)>.hide{left:-110%}.alertify-logs.right{right:16px}.alertify-logs.right>*{float:right;transform:translateZ(0)}.alertify-logs.right>.show{right:0;opacity:1}.alertify-logs.right>*,.alertify-logs.right>.hide{right:-110%;opacity:0}.alertify-logs.top{top:0}.alertify-logs>*{box-sizing:border-box;transition:all .4s cubic-bezier(.25,.8,.25,1);position:relative;clear:both;backface-visibility:hidden;perspective:1000;max-height:0;margin:0;padding:0;overflow:hidden;opacity:0;pointer-events:none}.alertify-logs>.show{margin-top:12px;opacity:1;max-height:1000px;padding:12px;pointer-events:auto}

File diff suppressed because one or more lines are too long

View file

@ -110,7 +110,7 @@
var support = { var support = {
blob: 'FileReader' in self && 'Blob' in self && (function() { blob: 'FileReader' in self && 'Blob' in self && (function() {
try { try {
new Blob(); new Blob()
return true return true
} catch(e) { } catch(e) {
return false return false
@ -267,7 +267,7 @@
function headers(xhr) { function headers(xhr) {
var head = new Headers() var head = new Headers()
var pairs = xhr.getAllResponseHeaders().trim().split('\n') var pairs = (xhr.getAllResponseHeaders() || '').trim().split('\n')
pairs.forEach(function(header) { pairs.forEach(function(header) {
var split = header.trim().split(':') var split = header.trim().split(':')
var key = split.shift().trim() var key = split.shift().trim()
@ -320,9 +320,9 @@
return new Response(null, {status: status, headers: {location: url}}) return new Response(null, {status: status, headers: {location: url}})
} }
self.Headers = Headers; self.Headers = Headers
self.Request = Request; self.Request = Request
self.Response = Response; self.Response = Response
self.fetch = function(input, init) { self.fetch = function(input, init) {
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
@ -345,7 +345,7 @@
return xhr.getResponseHeader('X-Request-URL') return xhr.getResponseHeader('X-Request-URL')
} }
return; return
} }
xhr.onload = function() { xhr.onload = function() {
@ -360,7 +360,7 @@
headers: headers(xhr), headers: headers(xhr),
url: responseURL() url: responseURL()
} }
var body = 'response' in xhr ? xhr.response : xhr.responseText; var body = 'response' in xhr ? xhr.response : xhr.responseText
resolve(new Response(body, options)) resolve(new Response(body, options))
} }
@ -368,6 +368,10 @@
reject(new TypeError('Network request failed')) reject(new TypeError('Network request failed'))
} }
xhr.ontimeout = function() {
reject(new TypeError('Network request failed'))
}
xhr.open(request.method, request.url, true) xhr.open(request.method, request.url, true)
if (request.credentials === 'include') { if (request.credentials === 'include') {

352
public/assets/bower/sanitize.css vendored Normal file
View file

@ -0,0 +1,352 @@
/*! sanitize.css v3.3.0 | CC0 1.0 Public Domain | github.com/10up/sanitize.css */
/* Latest tested: Android 6, Chrome 48, Edge 13, Firefox 44, Internet Explorer 11, iOS 9, Opera 35, Safari 9, Windows Phone 8.1 */
/*
* Normalization
*/
abbr[title] {
text-decoration: underline; /* Chrome 48+, Edge 12+, Internet Explorer 11-, Safari 9+ */
text-decoration: underline dotted; /* Firefox 40+ */
}
audio:not([controls]) {
display: none; /* Chrome 44-, iOS 8+, Safari 9+ */
}
b,
strong {
font-weight: bolder; /* Edge 12+, Safari 6.2+, and Chrome 18+ */
}
button {
-webkit-appearance: button; /* iOS 8+ */
overflow: visible; /* Internet Explorer 11- */
}
button,
input {
}
button::-moz-focus-inner, input::-moz-focus-inner {
border: 0;/* Firefox 4+ */
padding: 0;/* Firefox 4+ */
}
button:-moz-focusring, input:-moz-focusring {
outline: 1px dotted ButtonText;/* Firefox 4+ */
}
button,
select {
text-transform: none; /* Firefox 40+, Internet Explorer 11- */
}
details {
display: block; /* Edge 12+, Firefox 40+, Internet Explorer 11-, Windows Phone 8.1+ */
}
html {
-ms-overflow-style: -ms-autohiding-scrollbar; /* Edge 12+, Internet Explorer 11- */
overflow-y: scroll; /* All browsers without overlaying scrollbars */
-webkit-text-size-adjust: 100%; /* iOS 8+, Windows Phone 8.1+ */
}
hr {
overflow: visible; /* Internet Explorer 11-, Edge 12+ */
}
input {
-webkit-border-radius: 0 /* iOS 8+ */
}
input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button;/* iOS 8+ */
}
input[type="number"] {
width: auto;/* Firefox 36+ */
}
input[type="search"] {
-webkit-appearance: textfield;/* Chrome 45+, Safari 9+ */
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;/* Chrome 45+, Safari 9+ */
}
main {
display: block; /* Android 4.3-, Internet Explorer 11-, Windows Phone 8.1+ */
}
pre {
overflow: auto; /* Internet Explorer 11- */
}
progress {
display: inline-block; /* Internet Explorer 11-, Windows Phone 8.1+ */
}
summary {
display: block; /* Firefox 40+, Internet Explorer 11-, Windows Phone 8.1+ */
}
svg:not(:root) {
overflow: hidden; /* Internet Explorer 11- */
}
template {
display: none; /* Android 4.3-, Internet Explorer 11-, iOS 7-, Safari 7-, Windows Phone 8.1+ */
}
textarea {
overflow: auto; /* Edge 12+, Internet Explorer 11- */
}
[hidden] {
display: none; /* Internet Explorer 10- */
}
/*
* Universal inheritance
*/
*,
:before,
:after {
box-sizing: inherit;
}
* {
font-size: inherit;
line-height: inherit;
}
:before,
:after {
text-decoration: inherit;
vertical-align: inherit;
}
button,
input,
select,
textarea {
font-family: inherit;
font-style: inherit;
font-weight: inherit;
}
/*
* Opinionated defaults
*/
/* specify the margin and padding of all elements */
* {
margin: 0;
padding: 0;
}
/* specify the border style and width of all elements */
*,
:before,
:after {
border-style: solid;
border-width: 0;
}
/* remove the tapping delay from clickable elements */
a,
area,
button,
input,
label,
select,
textarea,
[tabindex] {
-ms-touch-action: manipulation;
touch-action: manipulation;
}
/* specify the standard appearance of selects */
select {
-moz-appearance: none; /* Firefox 40+ */
-webkit-appearance: none /* Chrome 45+ */
}
select::-ms-expand {
display: none;/* Edge 12+, Internet Explorer 11- */
}
select::-ms-value {
color: currentColor;/* Edge 12+, Internet Explorer 11- */
}
/* use current current as the default fill of svg elements */
svg {
fill: currentColor;
}
/* specify the progress cursor of updating elements */
[aria-busy="true"] {
cursor: progress;
}
/* specify the pointer cursor of trigger elements */
[aria-controls] {
cursor: pointer;
}
/* specify the unstyled cursor of disabled, not-editable, or otherwise inoperable elements */
[aria-disabled] {
cursor: default;
}
/* specify the style of visually hidden yet accessible elements */
[hidden][aria-hidden="false"] {
clip: rect(0 0 0 0);
display: inherit;
position: absolute
}
[hidden][aria-hidden="false"]:focus {
clip: auto;
}
/*
* Configurable defaults
*/
/* specify the background repeat of all elements */
* {
background-repeat: no-repeat;
}
/* specify the root styles of the document */
:root {
background-color: #ffffff;
box-sizing: border-box;
color: #000000;
cursor: default;
font: 100%/1.5 sans-serif;
}
/* specify the text decoration of anchors */
a {
text-decoration: none;
}
/* specify the alignment of media elements */
audio,
canvas,
iframe,
img,
svg,
video {
vertical-align: middle;
}
/* specify the coloring of form elements */
button,
input,
select,
textarea {
background-color: transparent;
color: inherit;
}
/* specify the minimum height of form elements */
button,
[type="button"],
[type="date"],
[type="datetime"],
[type="datetime-local"],
[type="email"],
[type="month"],
[type="number"],
[type="password"],
[type="reset"],
[type="search"],
[type="submit"],
[type="tel"],
[type="text"],
[type="time"],
[type="url"],
[type="week"],
select,
textarea {
min-height: 1.5em;
}
/* specify the font family of code elements */
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
}
/* specify the list style of nav lists */
nav ol,
nav ul {
list-style: none;
}
/* specify the font size of small elements */
small {
font-size: 75%;
}
/* specify the border styling of tables */
table {
border-collapse: collapse;
border-spacing: 0;
}
/* specify the resizability of textareas */
textarea {
resize: vertical;
}
/* specify the background color, font color, and drop shadow of text selections */
::-moz-selection {
background-color: #b3d4fc; /* required when declaring ::selection */
color: #ffffff;
text-shadow: none;
}
::selection {
background-color: #b3d4fc; /* required when declaring ::selection */
color: #ffffff;
text-shadow: none;
}

View file

@ -1 +0,0 @@
.alertify-logs>*{padding:12px 24px;color:#fff;box-shadow:0 2px 5px 0 rgba(0,0,0,.2);border-radius:1px}.alertify-logs>*,.alertify-logs>.default{background:rgba(0,0,0,.8)}.alertify-logs>.error{background:rgba(244,67,54,.8)}.alertify-logs>.success{background:rgba(76,175,80,.9)}.alertify{position:fixed;background-color:rgba(0,0,0,.3);left:0;right:0;top:0;bottom:0;width:100%;height:100%;z-index:2}.alertify.hide{opacity:0;pointer-events:none}.alertify,.alertify.show{box-sizing:border-box;transition:all .33s cubic-bezier(.25,.8,.25,1)}.alertify,.alertify *{box-sizing:border-box}.alertify .dialog{padding:12px}.alertify .alert,.alertify .dialog{width:100%;margin:0 auto;position:relative;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.alertify .alert>*,.alertify .dialog>*{width:400px;max-width:95%;margin:0 auto;text-align:center;padding:12px;background:#fff;box-shadow:0 2px 4px -1px rgba(0,0,0,.14),0 4px 5px 0 rgba(0,0,0,.098),0 1px 10px 0 rgba(0,0,0,.084)}.alertify .alert .msg,.alertify .dialog .msg{padding:12px;margin-bottom:12px;margin:0;text-align:left}.alertify .alert input:not(.form-control),.alertify .dialog input:not(.form-control){margin-bottom:15px;width:100%;font-size:100%;padding:12px}.alertify .alert input:not(.form-control):focus,.alertify .dialog input:not(.form-control):focus{outline-offset:-2px}.alertify .alert nav,.alertify .dialog nav{text-align:right}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button),.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button){background:transparent;box-sizing:border-box;color:rgba(0,0,0,.87);position:relative;outline:0;border:0;display:inline-block;-webkit-align-items:center;-ms-flex-align:center;-ms-grid-row-align:center;align-items:center;padding:0 6px;margin:6px 8px;line-height:36px;min-height:36px;white-space:nowrap;min-width:88px;text-align:center;text-transform:uppercase;font-size:14px;text-decoration:none;cursor:pointer;border:1px solid transparent;border-radius:2px}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):active,.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):hover,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):active,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):hover{background-color:rgba(0,0,0,.05)}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):focus,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):focus{border:1px solid rgba(0,0,0,.1)}.alertify .alert nav button.btn,.alertify .dialog nav button.btn{margin:6px 4px}.alertify-logs{position:fixed;z-index:1}.alertify-logs.bottom,.alertify-logs:not(.top){bottom:16px}.alertify-logs.left,.alertify-logs:not(.right){left:16px}.alertify-logs.left>*,.alertify-logs:not(.right)>*{float:left;-webkit-transform:translateZ(0);transform:translateZ(0);height:auto}.alertify-logs.left>.show,.alertify-logs:not(.right)>.show{left:0}.alertify-logs.left>*,.alertify-logs.left>.hide,.alertify-logs:not(.right)>*,.alertify-logs:not(.right)>.hide{left:-110%}.alertify-logs.right{right:16px}.alertify-logs.right>*{float:right;-webkit-transform:translateZ(0);transform:translateZ(0)}.alertify-logs.right>.show{right:0;opacity:1}.alertify-logs.right>*,.alertify-logs.right>.hide{right:-110%;opacity:0}.alertify-logs.top{top:0}.alertify-logs>*{box-sizing:border-box;transition:all .4s cubic-bezier(.25,.8,.25,1);position:relative;clear:both;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000;perspective:1000;max-height:0;margin:0;padding:0;overflow:hidden;opacity:0;pointer-events:none}.alertify-logs>.show{margin-top:12px;opacity:1;max-height:1000px;padding:12px;pointer-events:auto}

View file

@ -7,15 +7,14 @@ html {
html { html {
box-sizing: border-box; } box-sizing: border-box; }
*, *:before, *:after { *,
*::before,
*::after {
box-sizing: inherit; } box-sizing: inherit; }
#topheader { #topheader {
display: -webkit-flex; display: -webkit-box;
display: -ms-flexbox;
display: flex; display: flex;
-webkit-flex-flow: row;
-ms-flex-flow: row;
flex-flow: row; } flex-flow: row; }
#topheader a { #topheader a {
@ -30,10 +29,10 @@ nav {
.note { .note {
background-color: #eee8d5; background-color: #eee8d5;
box-shadow: 0 0 10px 2px #93a1a1; box-shadow: 0 0 10px 2px #93a1a1;
padding: 0.5em 0.5em; padding: 0.5em;
margin-top: 1em; } margin-top: 1em; }
.note:after { .note::after {
content: " "; content: " ";
display: block; display: block;
height: 0; height: 0;
@ -63,7 +62,7 @@ nav {
margin-left: 2em; margin-left: 2em;
margin-right: 2em; margin-right: 2em;
font-size: 0.8em; font-size: 0.8em;
padding: 0.5em 0.5em; } padding: 0.5em; }
.reply-to { .reply-to {
margin-left: 2em; margin-left: 2em;
@ -83,7 +82,6 @@ nav {
white-space: nowrap; } white-space: nowrap; }
.mini-h-card img { .mini-h-card img {
height: 1.26em;
display: inline; display: inline;
border-radius: 2px; border-radius: 2px;
vertical-align: text-bottom; } vertical-align: text-bottom; }
@ -205,10 +203,14 @@ fieldset {
min-width: 0; min-width: 0;
width: 100%; } width: 100%; }
input[type="text"], input[type="file"], textarea { input[type="text"],
input[type="file"],
textarea {
width: 100%; } width: 100%; }
input, button, textarea { input,
button,
textarea {
-webkit-appearance: none; -webkit-appearance: none;
-moz-appearance: none; -moz-appearance: none;
background-color: #002b36; background-color: #002b36;
@ -217,6 +219,7 @@ input, button, textarea {
border-radius: 4px; } border-radius: 4px; }
button:hover { button:hover {
-webkit-transition: 0.5s ease-in-out;
transition: 0.5s ease-in-out; transition: 0.5s ease-in-out;
background-color: #fdf6e3; background-color: #fdf6e3;
color: #002b36; } color: #002b36; }

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -1,424 +0,0 @@
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS and IE text size adjust after device orientation change,
* without disabling user zoom.
*/
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/**
* Remove default margin.
*/
body {
margin: 0;
}
/* HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined for any HTML5 element in IE 8/9.
* Correct `block` display not defined for `details` or `summary` in IE 10/11
* and Firefox.
* Correct `block` display not defined for `main` in IE 11.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block;
}
/**
* 1. Correct `inline-block` display not defined in IE 8/9.
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
*/
audio,
canvas,
progress,
video {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
}
/**
* Prevent modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Address `[hidden]` styling not present in IE 8/9/10.
* Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
*/
[hidden],
template {
display: none;
}
/* Links
========================================================================== */
/**
* Remove the gray background color from active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* Improve readability of focused elements when they are also in an
* active/hover state.
*/
a:active,
a:hover {
outline: 0;
}
/* Text-level semantics
========================================================================== */
/**
* Address styling not present in IE 8/9/10/11, Safari, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/**
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
*/
b,
strong {
font-weight: bold;
}
/**
* Address styling not present in Safari and Chrome.
*/
dfn {
font-style: italic;
}
/**
* Address variable `h1` font-size and margin within `section` and `article`
* contexts in Firefox 4+, Safari, and Chrome.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/**
* Address styling not present in IE 8/9.
*/
mark {
background: #ff0;
color: #000;
}
/**
* Address inconsistent and variable font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/* Embedded content
========================================================================== */
/**
* Remove border when inside `a` element in IE 8/9/10.
*/
img {
border: 0;
}
/**
* Correct overflow not hidden in IE 9/10/11.
*/
svg:not(:root) {
overflow: hidden;
}
/* Grouping content
========================================================================== */
/**
* Address margin not present in IE 8/9 and Safari.
*/
figure {
margin: 1em 40px;
}
/**
* Address differences between Firefox and other browsers.
*/
hr {
box-sizing: content-box;
height: 0;
}
/**
* Contain overflow in all browsers.
*/
pre {
overflow: auto;
}
/**
* Address odd `em`-unit font size rendering in all browsers.
*/
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
/* Forms
========================================================================== */
/**
* Known limitation: by default, Chrome and Safari on OS X allow very limited
* styling of `select`, unless a `border` property is set.
*/
/**
* 1. Correct color not being inherited.
* Known issue: affects color of disabled elements.
* 2. Correct font properties not being inherited.
* 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
*/
button,
input,
optgroup,
select,
textarea {
color: inherit; /* 1 */
font: inherit; /* 2 */
margin: 0; /* 3 */
}
/**
* Address `overflow` set to `hidden` in IE 8/9/10/11.
*/
button {
overflow: visible;
}
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
* Correct `select` style inheritance in Firefox.
*/
button,
select {
text-transform: none;
}
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
*/
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
}
/**
* Re-set default cursor for disabled elements.
*/
button[disabled],
html input[disabled] {
cursor: default;
}
/**
* Remove inner padding and border in Firefox 4+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
input {
line-height: normal;
}
/**
* It's recommended that you don't attempt to style these elements.
* Firefox's implementation doesn't respect box-sizing, padding, or width.
*
* 1. Address box sizing set to `content-box` in IE 8/9/10.
* 2. Remove excess padding in IE 8/9/10.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
* `font-size` values of the `input`, it causes the cursor style of the
* decrement button to change from `default` to `text`.
*/
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Address `appearance` set to `searchfield` in Safari and Chrome.
* 2. Address `box-sizing` set to `border-box` in Safari and Chrome.
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
box-sizing: content-box; /* 2 */
}
/**
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
* Safari (but not Chrome) clips the cancel button when the search input has
* padding (and `textfield` appearance).
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct `color` not being inherited in IE 8/9/10/11.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/
legend {
border: 0; /* 1 */
padding: 0; /* 2 */
}
/**
* Remove default vertical scrollbar in IE 8/9/10/11.
*/
textarea {
overflow: auto;
}
/**
* Don't inherit the `font-weight` (applied by a rule above).
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
*/
optgroup {
font-weight: bold;
}
/* Tables
========================================================================== */
/**
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}

View file

@ -1,2 +0,0 @@
/*! sanitize.css v3.2.0 | CC0 1.0 Public Domain | github.com/10up/sanitize.css */audio:not([controls]){display:none}button{-webkit-appearance:button;overflow:visible}details{display:block}html{-ms-overflow-style:-ms-autohiding-scrollbar;overflow-y:scroll;-webkit-text-size-adjust:100%}input{-webkit-border-radius:0}input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button}input[type=number]{width:auto}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}main{display:block}pre{overflow:auto}progress{display:inline-block}small{font-size:75%}summary{display:block}svg:not(:root){overflow:hidden}template{display:none}textarea{overflow:auto}[hidden]{display:none}*,:after,:before{box-sizing:inherit}*{font-size:inherit;line-height:inherit}:after,:before{text-decoration:inherit;vertical-align:inherit}*,:after,:before{border-style:solid;border-width:0}*{background-repeat:no-repeat;margin:0;padding:0}:root{background-color:#fff;box-sizing:border-box;color:#000;cursor:default;font:100%/1.5 sans-serif}a{text-decoration:none}audio,canvas,iframe,img,svg,video{vertical-align:middle}button,input,select,textarea{background-color:transparent;color:inherit;font-family:inherit;font-style:inherit;font-weight:inherit}[type=button],[type=date],[type=datetime-local],[type=datetime],[type=email],[type=month],[type=number],[type=password],[type=reset],[type=search],[type=submit],[type=tel],[type=text],[type=time],[type=url],[type=week],button,select,textarea{min-height:1.5em}code,kbd,pre,samp{font-family:monospace}nav ol,nav ul{list-style:none}select{-moz-appearance:none;-webkit-appearance:none}select::-ms-expand{display:none}select::-ms-value{color:currentColor}table{border-collapse:collapse;border-spacing:0}textarea{resize:vertical}::-moz-selection{background-color:#b3d4fc;color:#fff;text-shadow:none}::selection{background-color:#b3d4fc;color:#fff;text-shadow:none}[aria-busy=true]{cursor:progress}[aria-controls]{cursor:pointer}[aria-disabled]{cursor:default}[hidden][aria-hidden=false]{clip:rect(0 0 0 0);display:inherit;position:absolute}[hidden][aria-hidden=false]:focus{clip:auto}[tabindex],a,area,button,input,label,select,textarea{-ms-touch-action:manipulation;touch-action:manipulation}
/*# sourceMappingURL=sanitize.min.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,69 +1,69 @@
/* global alertify, store */
var feature = { var feature = {
addEventListener : !!window.addEventListener, addEventListener : !!window.addEventListener,
querySelectorAll : !!document.querySelectorAll, querySelectorAll : !!document.querySelectorAll
}; };
if(feature.addEventListener && feature.querySelectorAll) {
this.init(); if (feature.addEventListener && feature.querySelectorAll) {
} var keys = getKeys();
function init() { for (var i = 0; i < keys.length; i++) {
var keys = getKeys(); if (store.get(keys[i])) {
for(var i = 0; i < keys.length; i++) { var formId = keys[i].split('~')[1];
if(store.get(keys[i])) { document.getElementById(formId).value = store.get(keys[i]);
var formId = keys[i].split("~")[1]; }
document.getElementById(formId).value = store.get(keys[i]);
} }
}
} }
var timerId = window.setInterval(function() { var timerId = window.setInterval(function() {
var saved = false; var saved = false;
var inputs = document.querySelectorAll('input[type=text], textarea'); var inputs = document.querySelectorAll('input[type=text], textarea');
for(var i = 0; i < inputs.length; i++) { for (var i = 0; i < inputs.length; i++) {
var key = getFormElement(inputs[i]).id + '~' + inputs[i].id; var key = getFormElement(inputs[i]).id + '~' + inputs[i].id;
if(store.get(key) !== inputs[i].value && inputs[i].value !== "") { if (store.get(key) !== inputs[i].value && inputs[i].value !== '') {
store.set(key, inputs[i].value); store.set(key, inputs[i].value);
saved = true; saved = true;
}
}
if (saved === true) {
alertify.logPosition('top right');
alertify.success('Auto saved text');
} }
}
if(saved === true) {
alertify.logPosition('top right');
alertify.success('Auto saved text');
}
}, 5000); }, 5000);
var forms = document.querySelectorAll('form'); var forms = document.querySelectorAll('form');
for(var f = 0; f < forms.length; f++) { for (var f = 0; f < forms.length; f++) {
var form = forms[f]; var form = forms[f];
form.addEventListener('submit', function() { form.addEventListener('submit', function() {
window.clearInterval(timerId); window.clearInterval(timerId);
var formId = form.id; var formId = form.id;
var storedKeys = store.keys(); var storedKeys = store.keys();
for(var i = 0; i < storedKeys.length; i++) { for (var i = 0; i < storedKeys.length; i++) {
if(storedKeys[i].indexOf(formId) > -1) { if (storedKeys[i].indexOf(formId) > -1) {
store.remove(storedKeys[i]); store.remove(storedKeys[i]);
} }
} }
}); });
} }
function getKeys() { function getKeys() {
var keys = []; var keys = [];
var formFields = document.querySelectorAll('input[type=text], textarea'); var formFields = document.querySelectorAll('input[type=text], textarea');
for(var f = 0; f < formFields.length; f++) { for (var f = 0; f < formFields.length; f++) {
var parent = getFormElement(formFields[f]); var parent = getFormElement(formFields[f]);
if(parent !== false) { if (parent !== false) {
var key = parent.id + '~' + formFields[f].id; var key = parent.id + '~' + formFields[f].id;
keys.push(key); keys.push(key);
}
} }
} return keys;
return keys;
} }
function getFormElement(elem) { function getFormElement(elem) {
if(elem.nodeName.toLowerCase() !== 'body') { if (elem.nodeName.toLowerCase() !== 'body') {
var parent = elem.parentNode; var parent = elem.parentNode;
if(parent.nodeName.toLowerCase() === 'form') { if (parent.nodeName.toLowerCase() === 'form') {
return parent; return parent;
} else {
return getFormElement(parent);
}
} else { } else {
return getFormElement(parent); return false;
} }
} else {
return false;
}
} }

View file

@ -1,3 +1,4 @@
/* global Autolinker */
//the autlinker object //the autlinker object
var autolinker = new Autolinker(); var autolinker = new Autolinker();
@ -6,20 +7,20 @@ var ytidregex = /watch\?v=([A-Za-z0-9\-_]+)/;
//grab the notes and loop through them //grab the notes and loop through them
var notes = document.querySelectorAll('.e-content'); var notes = document.querySelectorAll('.e-content');
for(var i = 0; i < notes.length; i++) { for (var i = 0; i < notes.length; i++) {
//get Youtube ID //get Youtube ID
var ytid = notes[i].textContent.match(ytidregex); var ytid = notes[i].textContent.match(ytidregex);
if(ytid !== null) { if (ytid !== null) {
var id = ytid[1]; var id = ytid[1];
var iframe = document.createElement('iframe'); var iframe = document.createElement('iframe');
iframe.classList.add('youtube'); iframe.classList.add('youtube');
iframe.setAttribute('src', '//www.youtube.com/embed/' + id); iframe.setAttribute('src', '//www.youtube.com/embed/' + id);
iframe.setAttribute('frameborder', 0); iframe.setAttribute('frameborder', 0);
iframe.setAttribute('allowfullscreen', 'true'); iframe.setAttribute('allowfullscreen', 'true');
notes[i].appendChild(iframe); notes[i].appendChild(iframe);
} }
//now linkify everything //now linkify everything
var orig = notes[i].innerHTML; var orig = notes[i].innerHTML;
var linked = autolinker.link(orig); var linked = autolinker.link(orig);
notes[i].innerHTML = linked; notes[i].innerHTML = linked;
} }

View file

@ -1,6 +1,7 @@
/* global L */
//This code runs on page load and looks for <div class="map">, then adds map //This code runs on page load and looks for <div class="map">, then adds map
var mapDivs = document.querySelectorAll('.map'); var mapDivs = document.querySelectorAll('.map');
for(var i = 0; i < mapDivs.length; i++) { for (var i = 0; i < mapDivs.length; i++) {
var mapDiv = mapDivs[i]; var mapDiv = mapDivs[i];
var latitude = mapDiv.dataset.latitude; var latitude = mapDiv.dataset.latitude;
var longitude = mapDiv.dataset.longitude; var longitude = mapDiv.dataset.longitude;
@ -8,8 +9,8 @@ for(var i = 0; i < mapDivs.length; i++) {
var map = L.mapbox.map(mapDiv, 'jonnybarnes.gnoihnim') var map = L.mapbox.map(mapDiv, 'jonnybarnes.gnoihnim')
.setView([latitude, longitude], 15) .setView([latitude, longitude], 15)
.addLayer(L.mapbox.tileLayer('jonnybarnes.gnoihnim', { .addLayer(L.mapbox.tileLayer('jonnybarnes.gnoihnim', {
detectRetina: true, detectRetina: true
})); }));
var marker = L.marker([latitude, longitude]).addTo(map); L.marker([latitude, longitude]).addTo(map);
map.scrollWheelZoom.disable(); map.scrollWheelZoom.disable();
} }

View file

@ -1,3 +1,4 @@
/* global L */
if ('geolocation' in navigator) { if ('geolocation' in navigator) {
var button = document.querySelector('#locate'); var button = document.querySelector('#locate');
if (button.addEventListener) { if (button.addEventListener) {
@ -39,7 +40,7 @@ function addPlaces(latitude, longitude) {
addMap(latitude, longitude); addMap(latitude, longitude);
} }
}).catch(function (err) { }).catch(function (err) {
console.log(err); console.error(err);
}); });
} }
@ -57,11 +58,11 @@ function addMap(latitude, longitude, places) {
var map = L.mapbox.map('map', 'jonnybarnes.gnoihnim') var map = L.mapbox.map('map', 'jonnybarnes.gnoihnim')
.setView([latitude, longitude], 15) .setView([latitude, longitude], 15)
.addLayer(L.mapbox.tileLayer('jonnybarnes.gnoihnim', { .addLayer(L.mapbox.tileLayer('jonnybarnes.gnoihnim', {
detectRetina: true, detectRetina: true
})); }));
//add a marker for the current location //add a marker for the current location
var marker = L.marker([latitude, longitude], { var marker = L.marker([latitude, longitude], {
draggable: true, draggable: true
}).addTo(map); }).addTo(map);
//when the location marker is dragged, if the new place form elements exist //when the location marker is dragged, if the new place form elements exist
//update the lat/lng values //update the lat/lng values
@ -81,13 +82,13 @@ function addMap(latitude, longitude, places) {
var noLocation = document.createElement('option'); var noLocation = document.createElement('option');
noLocation.setAttribute('selected', 'selected'); noLocation.setAttribute('selected', 'selected');
noLocation.setAttribute('value', 'no-location'); noLocation.setAttribute('value', 'no-location');
noLocText = document.createTextNode('Select no location'); var noLocText = document.createTextNode('Select no location');
noLocation.appendChild(noLocText); noLocation.appendChild(noLocText);
selectEl.appendChild(noLocation); selectEl.appendChild(noLocation);
form.insertBefore(selectEl, div); form.insertBefore(selectEl, div);
if (places !== null) { if (places !== null) {
//add the places both to the map and <select> //add the places both to the map and <select>
places.forEach(function (item, index, array) { places.forEach(function (item) {
var option = document.createElement('option'); var option = document.createElement('option');
option.setAttribute('value', item[1]); option.setAttribute('value', item[1]);
var text = document.createTextNode(item[0]); var text = document.createTextNode(item[0]);
@ -106,7 +107,7 @@ function addMap(latitude, longitude, places) {
placeMarker.bindPopup(name, { placeMarker.bindPopup(name, {
closeButton: true closeButton: true
}); });
placeMarker.on('click', function (e) { placeMarker.on('click', function () {
map.panTo([item[2], item[3]]); map.panTo([item[2], item[3]]);
selectPlace(item[1]); selectPlace(item[1]);
}); });
@ -130,7 +131,7 @@ function addMap(latitude, longitude, places) {
//add the form elements //add the form elements
var nameLabel = document.createElement('label'); var nameLabel = document.createElement('label');
nameLabel.setAttribute('for', 'place-name'); nameLabel.setAttribute('for', 'place-name');
nameLabel.classList.add('place-label') nameLabel.classList.add('place-label');
nameLabel.appendChild(document.createTextNode('Place Name:')); nameLabel.appendChild(document.createTextNode('Place Name:'));
var nameEl = document.createElement('input'); var nameEl = document.createElement('input');
nameEl.setAttribute('placeholder', 'Name'); nameEl.setAttribute('placeholder', 'Name');
@ -194,8 +195,16 @@ function addMap(latitude, longitude, places) {
method: 'post', method: 'post',
body: formData body: formData
}) })
.then(status) .then(function (response) {
.then(json) if (response.status >= 200 && response.status < 300) {
return Promise.resolve(response);
} else {
return Promise.reject(new Error(response.statusText));
}
})
.then(function (response) {
return response.json();
})
.then(function (placeJson) { .then(function (placeJson) {
//create the slug from the url //create the slug from the url
var urlParts = placeJson.split('/'); var urlParts = placeJson.split('/');
@ -206,8 +215,8 @@ function addMap(latitude, longitude, places) {
form.removeChild(document.querySelector('#place-latitude')); form.removeChild(document.querySelector('#place-latitude'));
form.removeChild(document.querySelector('#place-longitude')); form.removeChild(document.querySelector('#place-longitude'));
var labels = document.querySelectorAll('.place-label'); var labels = document.querySelectorAll('.place-label');
for (var label of labels) { for (var i = 0; i < labels.length; ++i) {
form.removeChild(label); form.removeChild(labels[i]);
} }
form.removeChild(document.querySelector('#place-submit')); form.removeChild(document.querySelector('#place-submit'));
form.removeChild(document.querySelector('#create-new-place')); form.removeChild(document.querySelector('#create-new-place'));
@ -231,16 +240,16 @@ function addMap(latitude, longitude, places) {
newPlaceMarker.bindPopup(newName, { newPlaceMarker.bindPopup(newName, {
closeButton: true closeButton: true
}); });
newPlaceMarker.on('click', function (e) { newPlaceMarker.on('click', function () {
map.panTo([placeJson['latitude'], placeJson['longitude']]); map.panTo([placeJson['latitude'], placeJson['longitude']]);
selectPlace(slug); selectPlace(slug);
}); });
//make selected //make selected
selectPlace(slug); selectPlace(slug);
}).catch(function (placeError) { }).catch(function (placeError) {
console.log(placeError); console.error(placeError);
}); });
}) });
}); });
form.insertBefore(newLocButton, div); form.insertBefore(newLocButton, div);
} }
@ -270,15 +279,3 @@ function getLongitudeFromMapboxMarker(latlng) {
return location[1]; return location[1];
} }
function status(response) {
if (response.status >= 200 && response.status < 300) {
return Promise.resolve(response);
} else {
return Promise.reject(new Error(response.statusText));
}
}
function json(response) {
return response.json();
}

View file

@ -1,3 +1,4 @@
/* global L */
var button = document.querySelector('#locate'); var button = document.querySelector('#locate');
if (button.addEventListener) { if (button.addEventListener) {
@ -12,8 +13,6 @@ function getLocation() {
updateForm(position.coords.latitude, position.coords.longitude); updateForm(position.coords.latitude, position.coords.longitude);
addMap(position.coords.latitude, position.coords.longitude); addMap(position.coords.latitude, position.coords.longitude);
}); });
} else {
console.log('I need to do something when geoloaction isnt available.');
} }
} }
@ -33,10 +32,10 @@ function addMap(latitude, longitude) {
var map = L.mapbox.map('map', 'jonnybarnes.gnoihnim') var map = L.mapbox.map('map', 'jonnybarnes.gnoihnim')
.setView([latitude, longitude], 15) .setView([latitude, longitude], 15)
.addLayer(L.mapbox.tileLayer('jonnybarnes.gnoihnim', { .addLayer(L.mapbox.tileLayer('jonnybarnes.gnoihnim', {
detectRetina: true, detectRetina: true
})); }));
var marker = L.marker([latitude, longitude], { var marker = L.marker([latitude, longitude], {
draggable: true, draggable: true
}).addTo(map); }).addTo(map);
marker.on('dragend', function () { marker.on('dragend', function () {
var markerLocation = marker.getLatLng(); var markerLocation = marker.getLatLng();

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
.alertify-logs>*{padding:12px 24px;color:#fff;box-shadow:0 2px 5px 0 rgba(0,0,0,.2);border-radius:1px}.alertify-logs>*,.alertify-logs>.default{background:rgba(0,0,0,.8)}.alertify-logs>.error{background:rgba(244,67,54,.8)}.alertify-logs>.success{background:rgba(76,175,80,.9)}.alertify{position:fixed;background-color:rgba(0,0,0,.3);left:0;right:0;top:0;bottom:0;width:100%;height:100%;z-index:1}.alertify.hide{opacity:0;pointer-events:none}.alertify,.alertify.show{box-sizing:border-box;transition:all .33s cubic-bezier(.25,.8,.25,1)}.alertify,.alertify *{box-sizing:border-box}.alertify .dialog{padding:12px}.alertify .alert,.alertify .dialog{width:100%;margin:0 auto;position:relative;top:50%;transform:translateY(-50%)}.alertify .alert>*,.alertify .dialog>*{width:400px;max-width:95%;margin:0 auto;text-align:center;padding:12px;background:#fff;box-shadow:0 2px 4px -1px rgba(0,0,0,.14),0 4px 5px 0 rgba(0,0,0,.098),0 1px 10px 0 rgba(0,0,0,.084)}.alertify .alert .msg,.alertify .dialog .msg{padding:12px;margin-bottom:12px;margin:0;text-align:left}.alertify .alert input:not(.form-control),.alertify .dialog input:not(.form-control){margin-bottom:15px;width:100%;font-size:100%;padding:12px}.alertify .alert input:not(.form-control):focus,.alertify .dialog input:not(.form-control):focus{outline-offset:-2px}.alertify .alert nav,.alertify .dialog nav{text-align:right}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button),.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button){background:transparent;box-sizing:border-box;color:rgba(0,0,0,.87);position:relative;outline:0;border:0;display:inline-block;-ms-flex-align:center;-ms-grid-row-align:center;align-items:center;padding:0 6px;margin:6px 8px;line-height:36px;min-height:36px;white-space:nowrap;min-width:88px;text-align:center;text-transform:uppercase;font-size:14px;text-decoration:none;cursor:pointer;border:1px solid transparent;border-radius:2px}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):active,.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):hover,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):active,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):hover{background-color:rgba(0,0,0,.05)}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):focus,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):focus{border:1px solid rgba(0,0,0,.1)}.alertify .alert nav button.btn,.alertify .dialog nav button.btn{margin:6px 4px}.alertify-logs{position:fixed;z-index:1}.alertify-logs.bottom,.alertify-logs:not(.top){bottom:16px}.alertify-logs.left,.alertify-logs:not(.right){left:16px}.alertify-logs.left>*,.alertify-logs:not(.right)>*{float:left;transform:translateZ(0);height:auto}.alertify-logs.left>.show,.alertify-logs:not(.right)>.show{left:0}.alertify-logs.left>*,.alertify-logs.left>.hide,.alertify-logs:not(.right)>*,.alertify-logs:not(.right)>.hide{left:-110%}.alertify-logs.right{right:16px}.alertify-logs.right>*{float:right;transform:translateZ(0)}.alertify-logs.right>.show{right:0;opacity:1}.alertify-logs.right>*,.alertify-logs.right>.hide{right:-110%;opacity:0}.alertify-logs.top{top:0}.alertify-logs>*{box-sizing:border-box;transition:all .4s cubic-bezier(.25,.8,.25,1);position:relative;clear:both;backface-visibility:hidden;perspective:1000;max-height:0;margin:0;padding:0;overflow:hidden;opacity:0;pointer-events:none}.alertify-logs>.show{margin-top:12px;opacity:1;max-height:1000px;padding:12px;pointer-events:auto}

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

View file

@ -110,7 +110,7 @@
var support = { var support = {
blob: 'FileReader' in self && 'Blob' in self && (function() { blob: 'FileReader' in self && 'Blob' in self && (function() {
try { try {
new Blob(); new Blob()
return true return true
} catch(e) { } catch(e) {
return false return false
@ -267,7 +267,7 @@
function headers(xhr) { function headers(xhr) {
var head = new Headers() var head = new Headers()
var pairs = xhr.getAllResponseHeaders().trim().split('\n') var pairs = (xhr.getAllResponseHeaders() || '').trim().split('\n')
pairs.forEach(function(header) { pairs.forEach(function(header) {
var split = header.trim().split(':') var split = header.trim().split(':')
var key = split.shift().trim() var key = split.shift().trim()
@ -320,9 +320,9 @@
return new Response(null, {status: status, headers: {location: url}}) return new Response(null, {status: status, headers: {location: url}})
} }
self.Headers = Headers; self.Headers = Headers
self.Request = Request; self.Request = Request
self.Response = Response; self.Response = Response
self.fetch = function(input, init) { self.fetch = function(input, init) {
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
@ -345,7 +345,7 @@
return xhr.getResponseHeader('X-Request-URL') return xhr.getResponseHeader('X-Request-URL')
} }
return; return
} }
xhr.onload = function() { xhr.onload = function() {
@ -360,7 +360,7 @@
headers: headers(xhr), headers: headers(xhr),
url: responseURL() url: responseURL()
} }
var body = 'response' in xhr ? xhr.response : xhr.responseText; var body = 'response' in xhr ? xhr.response : xhr.responseText
resolve(new Response(body, options)) resolve(new Response(body, options))
} }
@ -368,6 +368,10 @@
reject(new TypeError('Network request failed')) reject(new TypeError('Network request failed'))
} }
xhr.ontimeout = function() {
reject(new TypeError('Network request failed'))
}
xhr.open(request.method, request.url, true) xhr.open(request.method, request.url, true)
if (request.credentials === 'include') { if (request.credentials === 'include') {

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,352 @@
/*! sanitize.css v3.3.0 | CC0 1.0 Public Domain | github.com/10up/sanitize.css */
/* Latest tested: Android 6, Chrome 48, Edge 13, Firefox 44, Internet Explorer 11, iOS 9, Opera 35, Safari 9, Windows Phone 8.1 */
/*
* Normalization
*/
abbr[title] {
text-decoration: underline; /* Chrome 48+, Edge 12+, Internet Explorer 11-, Safari 9+ */
text-decoration: underline dotted; /* Firefox 40+ */
}
audio:not([controls]) {
display: none; /* Chrome 44-, iOS 8+, Safari 9+ */
}
b,
strong {
font-weight: bolder; /* Edge 12+, Safari 6.2+, and Chrome 18+ */
}
button {
-webkit-appearance: button; /* iOS 8+ */
overflow: visible; /* Internet Explorer 11- */
}
button,
input {
}
button::-moz-focus-inner, input::-moz-focus-inner {
border: 0;/* Firefox 4+ */
padding: 0;/* Firefox 4+ */
}
button:-moz-focusring, input:-moz-focusring {
outline: 1px dotted ButtonText;/* Firefox 4+ */
}
button,
select {
text-transform: none; /* Firefox 40+, Internet Explorer 11- */
}
details {
display: block; /* Edge 12+, Firefox 40+, Internet Explorer 11-, Windows Phone 8.1+ */
}
html {
-ms-overflow-style: -ms-autohiding-scrollbar; /* Edge 12+, Internet Explorer 11- */
overflow-y: scroll; /* All browsers without overlaying scrollbars */
-webkit-text-size-adjust: 100%; /* iOS 8+, Windows Phone 8.1+ */
}
hr {
overflow: visible; /* Internet Explorer 11-, Edge 12+ */
}
input {
-webkit-border-radius: 0 /* iOS 8+ */
}
input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button;/* iOS 8+ */
}
input[type="number"] {
width: auto;/* Firefox 36+ */
}
input[type="search"] {
-webkit-appearance: textfield;/* Chrome 45+, Safari 9+ */
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;/* Chrome 45+, Safari 9+ */
}
main {
display: block; /* Android 4.3-, Internet Explorer 11-, Windows Phone 8.1+ */
}
pre {
overflow: auto; /* Internet Explorer 11- */
}
progress {
display: inline-block; /* Internet Explorer 11-, Windows Phone 8.1+ */
}
summary {
display: block; /* Firefox 40+, Internet Explorer 11-, Windows Phone 8.1+ */
}
svg:not(:root) {
overflow: hidden; /* Internet Explorer 11- */
}
template {
display: none; /* Android 4.3-, Internet Explorer 11-, iOS 7-, Safari 7-, Windows Phone 8.1+ */
}
textarea {
overflow: auto; /* Edge 12+, Internet Explorer 11- */
}
[hidden] {
display: none; /* Internet Explorer 10- */
}
/*
* Universal inheritance
*/
*,
:before,
:after {
box-sizing: inherit;
}
* {
font-size: inherit;
line-height: inherit;
}
:before,
:after {
text-decoration: inherit;
vertical-align: inherit;
}
button,
input,
select,
textarea {
font-family: inherit;
font-style: inherit;
font-weight: inherit;
}
/*
* Opinionated defaults
*/
/* specify the margin and padding of all elements */
* {
margin: 0;
padding: 0;
}
/* specify the border style and width of all elements */
*,
:before,
:after {
border-style: solid;
border-width: 0;
}
/* remove the tapping delay from clickable elements */
a,
area,
button,
input,
label,
select,
textarea,
[tabindex] {
-ms-touch-action: manipulation;
touch-action: manipulation;
}
/* specify the standard appearance of selects */
select {
-moz-appearance: none; /* Firefox 40+ */
-webkit-appearance: none /* Chrome 45+ */
}
select::-ms-expand {
display: none;/* Edge 12+, Internet Explorer 11- */
}
select::-ms-value {
color: currentColor;/* Edge 12+, Internet Explorer 11- */
}
/* use current current as the default fill of svg elements */
svg {
fill: currentColor;
}
/* specify the progress cursor of updating elements */
[aria-busy="true"] {
cursor: progress;
}
/* specify the pointer cursor of trigger elements */
[aria-controls] {
cursor: pointer;
}
/* specify the unstyled cursor of disabled, not-editable, or otherwise inoperable elements */
[aria-disabled] {
cursor: default;
}
/* specify the style of visually hidden yet accessible elements */
[hidden][aria-hidden="false"] {
clip: rect(0 0 0 0);
display: inherit;
position: absolute
}
[hidden][aria-hidden="false"]:focus {
clip: auto;
}
/*
* Configurable defaults
*/
/* specify the background repeat of all elements */
* {
background-repeat: no-repeat;
}
/* specify the root styles of the document */
:root {
background-color: #ffffff;
box-sizing: border-box;
color: #000000;
cursor: default;
font: 100%/1.5 sans-serif;
}
/* specify the text decoration of anchors */
a {
text-decoration: none;
}
/* specify the alignment of media elements */
audio,
canvas,
iframe,
img,
svg,
video {
vertical-align: middle;
}
/* specify the coloring of form elements */
button,
input,
select,
textarea {
background-color: transparent;
color: inherit;
}
/* specify the minimum height of form elements */
button,
[type="button"],
[type="date"],
[type="datetime"],
[type="datetime-local"],
[type="email"],
[type="month"],
[type="number"],
[type="password"],
[type="reset"],
[type="search"],
[type="submit"],
[type="tel"],
[type="text"],
[type="time"],
[type="url"],
[type="week"],
select,
textarea {
min-height: 1.5em;
}
/* specify the font family of code elements */
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
}
/* specify the list style of nav lists */
nav ol,
nav ul {
list-style: none;
}
/* specify the font size of small elements */
small {
font-size: 75%;
}
/* specify the border styling of tables */
table {
border-collapse: collapse;
border-spacing: 0;
}
/* specify the resizability of textareas */
textarea {
resize: vertical;
}
/* specify the background color, font color, and drop shadow of text selections */
::-moz-selection {
background-color: #b3d4fc; /* required when declaring ::selection */
color: #ffffff;
text-shadow: none;
}
::selection {
background-color: #b3d4fc; /* required when declaring ::selection */
color: #ffffff;
text-shadow: none;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1 +0,0 @@
.alertify-logs>*{padding:12px 24px;color:#fff;box-shadow:0 2px 5px 0 rgba(0,0,0,.2);border-radius:1px}.alertify-logs>*,.alertify-logs>.default{background:rgba(0,0,0,.8)}.alertify-logs>.error{background:rgba(244,67,54,.8)}.alertify-logs>.success{background:rgba(76,175,80,.9)}.alertify{position:fixed;background-color:rgba(0,0,0,.3);left:0;right:0;top:0;bottom:0;width:100%;height:100%;z-index:2}.alertify.hide{opacity:0;pointer-events:none}.alertify,.alertify.show{box-sizing:border-box;transition:all .33s cubic-bezier(.25,.8,.25,1)}.alertify,.alertify *{box-sizing:border-box}.alertify .dialog{padding:12px}.alertify .alert,.alertify .dialog{width:100%;margin:0 auto;position:relative;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.alertify .alert>*,.alertify .dialog>*{width:400px;max-width:95%;margin:0 auto;text-align:center;padding:12px;background:#fff;box-shadow:0 2px 4px -1px rgba(0,0,0,.14),0 4px 5px 0 rgba(0,0,0,.098),0 1px 10px 0 rgba(0,0,0,.084)}.alertify .alert .msg,.alertify .dialog .msg{padding:12px;margin-bottom:12px;margin:0;text-align:left}.alertify .alert input:not(.form-control),.alertify .dialog input:not(.form-control){margin-bottom:15px;width:100%;font-size:100%;padding:12px}.alertify .alert input:not(.form-control):focus,.alertify .dialog input:not(.form-control):focus{outline-offset:-2px}.alertify .alert nav,.alertify .dialog nav{text-align:right}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button),.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button){background:transparent;box-sizing:border-box;color:rgba(0,0,0,.87);position:relative;outline:0;border:0;display:inline-block;-webkit-align-items:center;-ms-flex-align:center;-ms-grid-row-align:center;align-items:center;padding:0 6px;margin:6px 8px;line-height:36px;min-height:36px;white-space:nowrap;min-width:88px;text-align:center;text-transform:uppercase;font-size:14px;text-decoration:none;cursor:pointer;border:1px solid transparent;border-radius:2px}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):active,.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):hover,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):active,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):hover{background-color:rgba(0,0,0,.05)}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):focus,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):focus{border:1px solid rgba(0,0,0,.1)}.alertify .alert nav button.btn,.alertify .dialog nav button.btn{margin:6px 4px}.alertify-logs{position:fixed;z-index:1}.alertify-logs.bottom,.alertify-logs:not(.top){bottom:16px}.alertify-logs.left,.alertify-logs:not(.right){left:16px}.alertify-logs.left>*,.alertify-logs:not(.right)>*{float:left;-webkit-transform:translateZ(0);transform:translateZ(0);height:auto}.alertify-logs.left>.show,.alertify-logs:not(.right)>.show{left:0}.alertify-logs.left>*,.alertify-logs.left>.hide,.alertify-logs:not(.right)>*,.alertify-logs:not(.right)>.hide{left:-110%}.alertify-logs.right{right:16px}.alertify-logs.right>*{float:right;-webkit-transform:translateZ(0);transform:translateZ(0)}.alertify-logs.right>.show{right:0;opacity:1}.alertify-logs.right>*,.alertify-logs.right>.hide{right:-110%;opacity:0}.alertify-logs.top{top:0}.alertify-logs>*{box-sizing:border-box;transition:all .4s cubic-bezier(.25,.8,.25,1);position:relative;clear:both;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000;perspective:1000;max-height:0;margin:0;padding:0;overflow:hidden;opacity:0;pointer-events:none}.alertify-logs>.show{margin-top:12px;opacity:1;max-height:1000px;padding:12px;pointer-events:auto}

View file

@ -7,15 +7,14 @@ html {
html { html {
box-sizing: border-box; } box-sizing: border-box; }
*, *:before, *:after { *,
*::before,
*::after {
box-sizing: inherit; } box-sizing: inherit; }
#topheader { #topheader {
display: -webkit-flex; display: -webkit-box;
display: -ms-flexbox;
display: flex; display: flex;
-webkit-flex-flow: row;
-ms-flex-flow: row;
flex-flow: row; } flex-flow: row; }
#topheader a { #topheader a {
@ -30,10 +29,10 @@ nav {
.note { .note {
background-color: #eee8d5; background-color: #eee8d5;
box-shadow: 0 0 10px 2px #93a1a1; box-shadow: 0 0 10px 2px #93a1a1;
padding: 0.5em 0.5em; padding: 0.5em;
margin-top: 1em; } margin-top: 1em; }
.note:after { .note::after {
content: " "; content: " ";
display: block; display: block;
height: 0; height: 0;
@ -63,7 +62,7 @@ nav {
margin-left: 2em; margin-left: 2em;
margin-right: 2em; margin-right: 2em;
font-size: 0.8em; font-size: 0.8em;
padding: 0.5em 0.5em; } padding: 0.5em; }
.reply-to { .reply-to {
margin-left: 2em; margin-left: 2em;
@ -83,7 +82,6 @@ nav {
white-space: nowrap; } white-space: nowrap; }
.mini-h-card img { .mini-h-card img {
height: 1.26em;
display: inline; display: inline;
border-radius: 2px; border-radius: 2px;
vertical-align: text-bottom; } vertical-align: text-bottom; }
@ -205,10 +203,14 @@ fieldset {
min-width: 0; min-width: 0;
width: 100%; } width: 100%; }
input[type="text"], input[type="file"], textarea { input[type="text"],
input[type="file"],
textarea {
width: 100%; } width: 100%; }
input, button, textarea { input,
button,
textarea {
-webkit-appearance: none; -webkit-appearance: none;
-moz-appearance: none; -moz-appearance: none;
background-color: #002b36; background-color: #002b36;
@ -217,6 +219,7 @@ input, button, textarea {
border-radius: 4px; } border-radius: 4px; }
button:hover { button:hover {
-webkit-transition: 0.5s ease-in-out;
transition: 0.5s ease-in-out; transition: 0.5s ease-in-out;
background-color: #fdf6e3; background-color: #fdf6e3;
color: #002b36; } color: #002b36; }

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

View file

@ -1,2 +0,0 @@
/*! sanitize.css v3.2.0 | CC0 1.0 Public Domain | github.com/10up/sanitize.css */audio:not([controls]){display:none}button{-webkit-appearance:button;overflow:visible}details{display:block}html{-ms-overflow-style:-ms-autohiding-scrollbar;overflow-y:scroll;-webkit-text-size-adjust:100%}input{-webkit-border-radius:0}input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button}input[type=number]{width:auto}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}main{display:block}pre{overflow:auto}progress{display:inline-block}small{font-size:75%}summary{display:block}svg:not(:root){overflow:hidden}template{display:none}textarea{overflow:auto}[hidden]{display:none}*,:after,:before{box-sizing:inherit}*{font-size:inherit;line-height:inherit}:after,:before{text-decoration:inherit;vertical-align:inherit}*,:after,:before{border-style:solid;border-width:0}*{background-repeat:no-repeat;margin:0;padding:0}:root{background-color:#fff;box-sizing:border-box;color:#000;cursor:default;font:100%/1.5 sans-serif}a{text-decoration:none}audio,canvas,iframe,img,svg,video{vertical-align:middle}button,input,select,textarea{background-color:transparent;color:inherit;font-family:inherit;font-style:inherit;font-weight:inherit}[type=button],[type=date],[type=datetime-local],[type=datetime],[type=email],[type=month],[type=number],[type=password],[type=reset],[type=search],[type=submit],[type=tel],[type=text],[type=time],[type=url],[type=week],button,select,textarea{min-height:1.5em}code,kbd,pre,samp{font-family:monospace}nav ol,nav ul{list-style:none}select{-moz-appearance:none;-webkit-appearance:none}select::-ms-expand{display:none}select::-ms-value{color:currentColor}table{border-collapse:collapse;border-spacing:0}textarea{resize:vertical}::-moz-selection{background-color:#b3d4fc;color:#fff;text-shadow:none}::selection{background-color:#b3d4fc;color:#fff;text-shadow:none}[aria-busy=true]{cursor:progress}[aria-controls]{cursor:pointer}[aria-disabled]{cursor:default}[hidden][aria-hidden=false]{clip:rect(0 0 0 0);display:inherit;position:absolute}[hidden][aria-hidden=false]:focus{clip:auto}[tabindex],a,area,button,input,label,select,textarea{-ms-touch-action:manipulation;touch-action:manipulation}
/*# sourceMappingURL=sanitize.min.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,69 @@
/* global alertify, store */
var feature = {
addEventListener : !!window.addEventListener,
querySelectorAll : !!document.querySelectorAll
};
if (feature.addEventListener && feature.querySelectorAll) {
var keys = getKeys();
for (var 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]);
}
}
}
var timerId = window.setInterval(function() {
var saved = false;
var inputs = document.querySelectorAll('input[type=text], textarea');
for (var i = 0; i < inputs.length; i++) {
var key = getFormElement(inputs[i]).id + '~' + inputs[i].id;
if (store.get(key) !== inputs[i].value && inputs[i].value !== '') {
store.set(key, inputs[i].value);
saved = true;
}
}
if (saved === true) {
alertify.logPosition('top right');
alertify.success('Auto saved text');
}
}, 5000);
var forms = document.querySelectorAll('form');
for (var f = 0; f < forms.length; f++) {
var form = forms[f];
form.addEventListener('submit', function() {
window.clearInterval(timerId);
var formId = form.id;
var storedKeys = store.keys();
for (var i = 0; i < storedKeys.length; i++) {
if (storedKeys[i].indexOf(formId) > -1) {
store.remove(storedKeys[i]);
}
}
});
}
function getKeys() {
var keys = [];
var formFields = document.querySelectorAll('input[type=text], textarea');
for (var f = 0; f < formFields.length; f++) {
var parent = getFormElement(formFields[f]);
if (parent !== false) {
var key = parent.id + '~' + formFields[f].id;
keys.push(key);
}
}
return keys;
}
function getFormElement(elem) {
if (elem.nodeName.toLowerCase() !== 'body') {
var parent = elem.parentNode;
if (parent.nodeName.toLowerCase() === 'form') {
return parent;
} else {
return getFormElement(parent);
}
} else {
return false;
}
}

Binary file not shown.

Binary file not shown.

View file

@ -1,69 +0,0 @@
var feature = {
addEventListener : !!window.addEventListener,
querySelectorAll : !!document.querySelectorAll,
};
if(feature.addEventListener && feature.querySelectorAll) {
this.init();
}
function init() {
var keys = getKeys();
for(var 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]);
}
}
}
var timerId = window.setInterval(function() {
var saved = false;
var inputs = document.querySelectorAll('input[type=text], textarea');
for(var i = 0; i < inputs.length; i++) {
var key = getFormElement(inputs[i]).id + '~' + inputs[i].id;
if(store.get(key) !== inputs[i].value && inputs[i].value !== "") {
store.set(key, inputs[i].value);
saved = true;
}
}
if(saved === true) {
alertify.logPosition('top right');
alertify.success('Auto saved text');
}
}, 5000);
var forms = document.querySelectorAll('form');
for(var f = 0; f < forms.length; f++) {
var form = forms[f];
form.addEventListener('submit', function() {
window.clearInterval(timerId);
var formId = form.id;
var storedKeys = store.keys();
for(var i = 0; i < storedKeys.length; i++) {
if(storedKeys[i].indexOf(formId) > -1) {
store.remove(storedKeys[i]);
}
}
});
}
function getKeys() {
var keys = [];
var formFields = document.querySelectorAll('input[type=text], textarea');
for(var f = 0; f < formFields.length; f++) {
var parent = getFormElement(formFields[f]);
if(parent !== false) {
var key = parent.id + '~' + formFields[f].id;
keys.push(key);
}
}
return keys;
}
function getFormElement(elem) {
if(elem.nodeName.toLowerCase() !== 'body') {
var parent = elem.parentNode;
if(parent.nodeName.toLowerCase() === 'form') {
return parent;
} else {
return getFormElement(parent);
}
} else {
return false;
}
}

View file

@ -0,0 +1,26 @@
/* global Autolinker */
//the autlinker object
var autolinker = new Autolinker();
//the youtube regex
var ytidregex = /watch\?v=([A-Za-z0-9\-_]+)/;
//grab the notes and loop through them
var notes = document.querySelectorAll('.e-content');
for (var i = 0; i < notes.length; i++) {
//get Youtube ID
var ytid = notes[i].textContent.match(ytidregex);
if (ytid !== null) {
var id = ytid[1];
var iframe = document.createElement('iframe');
iframe.classList.add('youtube');
iframe.setAttribute('src', '//www.youtube.com/embed/' + id);
iframe.setAttribute('frameborder', 0);
iframe.setAttribute('allowfullscreen', 'true');
notes[i].appendChild(iframe);
}
//now linkify everything
var orig = notes[i].innerHTML;
var linked = autolinker.link(orig);
notes[i].innerHTML = linked;
}

Binary file not shown.

Binary file not shown.

View file

@ -1,25 +0,0 @@
//the autlinker object
var autolinker = new Autolinker();
//the youtube regex
var ytidregex = /watch\?v=([A-Za-z0-9\-_]+)/;
//grab the notes and loop through them
var notes = document.querySelectorAll('.e-content');
for(var i = 0; i < notes.length; i++) {
//get Youtube ID
var ytid = notes[i].textContent.match(ytidregex);
if(ytid !== null) {
var id = ytid[1];
var iframe = document.createElement('iframe');
iframe.classList.add('youtube');
iframe.setAttribute('src', '//www.youtube.com/embed/' + id);
iframe.setAttribute('frameborder', 0);
iframe.setAttribute('allowfullscreen', 'true');
notes[i].appendChild(iframe);
}
//now linkify everything
var orig = notes[i].innerHTML;
var linked = autolinker.link(orig);
notes[i].innerHTML = linked;
}

View file

@ -1,6 +1,7 @@
/* global L */
//This code runs on page load and looks for <div class="map">, then adds map //This code runs on page load and looks for <div class="map">, then adds map
var mapDivs = document.querySelectorAll('.map'); var mapDivs = document.querySelectorAll('.map');
for(var i = 0; i < mapDivs.length; i++) { for (var i = 0; i < mapDivs.length; i++) {
var mapDiv = mapDivs[i]; var mapDiv = mapDivs[i];
var latitude = mapDiv.dataset.latitude; var latitude = mapDiv.dataset.latitude;
var longitude = mapDiv.dataset.longitude; var longitude = mapDiv.dataset.longitude;
@ -8,8 +9,8 @@ for(var i = 0; i < mapDivs.length; i++) {
var map = L.mapbox.map(mapDiv, 'jonnybarnes.gnoihnim') var map = L.mapbox.map(mapDiv, 'jonnybarnes.gnoihnim')
.setView([latitude, longitude], 15) .setView([latitude, longitude], 15)
.addLayer(L.mapbox.tileLayer('jonnybarnes.gnoihnim', { .addLayer(L.mapbox.tileLayer('jonnybarnes.gnoihnim', {
detectRetina: true, detectRetina: true
})); }));
var marker = L.marker([latitude, longitude]).addTo(map); L.marker([latitude, longitude]).addTo(map);
map.scrollWheelZoom.disable(); map.scrollWheelZoom.disable();
} }

Binary file not shown.

Binary file not shown.

View file

@ -1,3 +1,4 @@
/* global L */
if ('geolocation' in navigator) { if ('geolocation' in navigator) {
var button = document.querySelector('#locate'); var button = document.querySelector('#locate');
if (button.addEventListener) { if (button.addEventListener) {
@ -39,7 +40,7 @@ function addPlaces(latitude, longitude) {
addMap(latitude, longitude); addMap(latitude, longitude);
} }
}).catch(function (err) { }).catch(function (err) {
console.log(err); console.error(err);
}); });
} }
@ -57,11 +58,11 @@ function addMap(latitude, longitude, places) {
var map = L.mapbox.map('map', 'jonnybarnes.gnoihnim') var map = L.mapbox.map('map', 'jonnybarnes.gnoihnim')
.setView([latitude, longitude], 15) .setView([latitude, longitude], 15)
.addLayer(L.mapbox.tileLayer('jonnybarnes.gnoihnim', { .addLayer(L.mapbox.tileLayer('jonnybarnes.gnoihnim', {
detectRetina: true, detectRetina: true
})); }));
//add a marker for the current location //add a marker for the current location
var marker = L.marker([latitude, longitude], { var marker = L.marker([latitude, longitude], {
draggable: true, draggable: true
}).addTo(map); }).addTo(map);
//when the location marker is dragged, if the new place form elements exist //when the location marker is dragged, if the new place form elements exist
//update the lat/lng values //update the lat/lng values
@ -81,13 +82,13 @@ function addMap(latitude, longitude, places) {
var noLocation = document.createElement('option'); var noLocation = document.createElement('option');
noLocation.setAttribute('selected', 'selected'); noLocation.setAttribute('selected', 'selected');
noLocation.setAttribute('value', 'no-location'); noLocation.setAttribute('value', 'no-location');
noLocText = document.createTextNode('Select no location'); var noLocText = document.createTextNode('Select no location');
noLocation.appendChild(noLocText); noLocation.appendChild(noLocText);
selectEl.appendChild(noLocation); selectEl.appendChild(noLocation);
form.insertBefore(selectEl, div); form.insertBefore(selectEl, div);
if (places !== null) { if (places !== null) {
//add the places both to the map and <select> //add the places both to the map and <select>
places.forEach(function (item, index, array) { places.forEach(function (item) {
var option = document.createElement('option'); var option = document.createElement('option');
option.setAttribute('value', item[1]); option.setAttribute('value', item[1]);
var text = document.createTextNode(item[0]); var text = document.createTextNode(item[0]);
@ -106,7 +107,7 @@ function addMap(latitude, longitude, places) {
placeMarker.bindPopup(name, { placeMarker.bindPopup(name, {
closeButton: true closeButton: true
}); });
placeMarker.on('click', function (e) { placeMarker.on('click', function () {
map.panTo([item[2], item[3]]); map.panTo([item[2], item[3]]);
selectPlace(item[1]); selectPlace(item[1]);
}); });
@ -130,7 +131,7 @@ function addMap(latitude, longitude, places) {
//add the form elements //add the form elements
var nameLabel = document.createElement('label'); var nameLabel = document.createElement('label');
nameLabel.setAttribute('for', 'place-name'); nameLabel.setAttribute('for', 'place-name');
nameLabel.classList.add('place-label') nameLabel.classList.add('place-label');
nameLabel.appendChild(document.createTextNode('Place Name:')); nameLabel.appendChild(document.createTextNode('Place Name:'));
var nameEl = document.createElement('input'); var nameEl = document.createElement('input');
nameEl.setAttribute('placeholder', 'Name'); nameEl.setAttribute('placeholder', 'Name');
@ -194,8 +195,16 @@ function addMap(latitude, longitude, places) {
method: 'post', method: 'post',
body: formData body: formData
}) })
.then(status) .then(function (response) {
.then(json) if (response.status >= 200 && response.status < 300) {
return Promise.resolve(response);
} else {
return Promise.reject(new Error(response.statusText));
}
})
.then(function (response) {
return response.json();
})
.then(function (placeJson) { .then(function (placeJson) {
//create the slug from the url //create the slug from the url
var urlParts = placeJson.split('/'); var urlParts = placeJson.split('/');
@ -206,8 +215,8 @@ function addMap(latitude, longitude, places) {
form.removeChild(document.querySelector('#place-latitude')); form.removeChild(document.querySelector('#place-latitude'));
form.removeChild(document.querySelector('#place-longitude')); form.removeChild(document.querySelector('#place-longitude'));
var labels = document.querySelectorAll('.place-label'); var labels = document.querySelectorAll('.place-label');
for (var label of labels) { for (var i = 0; i < labels.length; ++i) {
form.removeChild(label); form.removeChild(labels[i]);
} }
form.removeChild(document.querySelector('#place-submit')); form.removeChild(document.querySelector('#place-submit'));
form.removeChild(document.querySelector('#create-new-place')); form.removeChild(document.querySelector('#create-new-place'));
@ -231,16 +240,16 @@ function addMap(latitude, longitude, places) {
newPlaceMarker.bindPopup(newName, { newPlaceMarker.bindPopup(newName, {
closeButton: true closeButton: true
}); });
newPlaceMarker.on('click', function (e) { newPlaceMarker.on('click', function () {
map.panTo([placeJson['latitude'], placeJson['longitude']]); map.panTo([placeJson['latitude'], placeJson['longitude']]);
selectPlace(slug); selectPlace(slug);
}); });
//make selected //make selected
selectPlace(slug); selectPlace(slug);
}).catch(function (placeError) { }).catch(function (placeError) {
console.log(placeError); console.error(placeError);
}); });
}) });
}); });
form.insertBefore(newLocButton, div); form.insertBefore(newLocButton, div);
} }
@ -270,15 +279,3 @@ function getLongitudeFromMapboxMarker(latlng) {
return location[1]; return location[1];
} }
function status(response) {
if (response.status >= 200 && response.status < 300) {
return Promise.resolve(response);
} else {
return Promise.reject(new Error(response.statusText));
}
}
function json(response) {
return response.json();
}

Some files were not shown because too many files have changed in this diff Show more