Merge branch 'release/0.4.2'
This commit is contained in:
commit
ba3d9ff97f
37 changed files with 7431 additions and 245 deletions
|
@ -53,10 +53,10 @@ class Article extends Model
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMainAttribute($value)
|
||||
public function getHtmlAttribute()
|
||||
{
|
||||
$markdown = new CommonMarkConverter();
|
||||
$html = $markdown->convertToHtml($value);
|
||||
$html = $markdown->convertToHtml($this->main);
|
||||
//change <pre><code>[lang] ~> <pre><code data-language="lang">
|
||||
$match = '/<pre><code>\[(.*)\]\n/';
|
||||
$replace = '<pre><code class="language-$1">';
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Services\IndieAuthService;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use IndieAuth\Client as IndieClient;
|
||||
use GuzzleHttp\Client as GuzzleClient;
|
||||
use Illuminate\Http\{Request, Response};
|
||||
|
@ -184,44 +183,6 @@ class MicropubClientController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* We make a request to the micropub endpoint requesting syndication targets
|
||||
* and store them in the session.
|
||||
*
|
||||
* @todo better handling of response regarding mp-syndicate-to
|
||||
* and syndicate-to
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Routing\Redirector redirect
|
||||
*/
|
||||
public function refreshSyndicationTargets(Request $request)
|
||||
{
|
||||
$domain = $request->session()->get('me');
|
||||
$token = $request->session()->get('token');
|
||||
$micropubEndpoint = $this->indieAuthService->discoverMicropubEndpoint($domain, $this->indieClient);
|
||||
if (! $micropubEndpoint) {
|
||||
return redirect(route('micropub-client'))->with('error', 'Unable to determine micropub API endpoint');
|
||||
}
|
||||
|
||||
try {
|
||||
$response = $this->guzzleClient->get($micropubEndpoint, [
|
||||
'headers' => ['Authorization' => 'Bearer ' . $token],
|
||||
'query' => ['q' => 'syndicate-to'],
|
||||
]);
|
||||
} catch (\GuzzleHttp\Exception\BadResponseException $e) {
|
||||
return redirect(route('micropub-client'))->with(
|
||||
'error',
|
||||
'Bad response when refreshing syndication targets'
|
||||
);
|
||||
}
|
||||
$body = (string) $response->getBody();
|
||||
$syndication = $this->parseSyndicationTargets($body);
|
||||
|
||||
$request->session()->put('syndication', $syndication);
|
||||
|
||||
return redirect(route('micropub-client'));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method performs the actual POST request.
|
||||
*
|
||||
|
@ -418,8 +379,6 @@ class MicropubClientController extends Controller
|
|||
'query' => ['q' => $query],
|
||||
]);
|
||||
} catch (\GuzzleHttp\Exception\BadResponseException $e) {
|
||||
Log::info($e->getResponse()->getBody());
|
||||
|
||||
return response()->json([
|
||||
'error' => true,
|
||||
'error_description' => 'The endpoint ' . $micropubEndpoint . ' returned a non-good response',
|
||||
|
|
|
@ -26,11 +26,12 @@ class NoteService
|
|||
);
|
||||
|
||||
if (array_key_exists('location', $data) && $data['location'] !== null && $data['location'] !== 'no-location') {
|
||||
if (substr($data['location'], 0, strlen(config('app.url'))) == config('app.url')) {
|
||||
//uri of form http://host/places/slug, we want slug so chop off start
|
||||
//that’s the app’s url plus `/places/`
|
||||
$slug = mb_substr($location, mb_strlen(config('app.url')) + 8);
|
||||
$place = Place::where('slug', '=', $slug)->first();
|
||||
if (starts_with($data['location'], config('app.url'))) {
|
||||
//uri of form http://host/places/slug, we want slug
|
||||
//get the URL path, then take last part, we can hack with basename
|
||||
//as path looks like file path.
|
||||
$slug = basename(parse_url($data['location'], PHP_URL_PATH));
|
||||
$place = Place::where('slug', $slug)->first();
|
||||
$note->place()->associate($place);
|
||||
}
|
||||
if (substr($data['location'], 0, 4) == 'geo:') {
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
# Changelog
|
||||
|
||||
## Version 0.4.2 (2017-03-24)
|
||||
- fixed issue#47, only the slug was being sent by client, which was messing up endpoint code
|
||||
- minor changes to es6 code, bet lint-staged working again
|
||||
- Make processed article content its own fake attribute, articles can now be uploaded as a file
|
||||
|
||||
## Version 0.4.1 (2017-03-18)
|
||||
- Improve HTML Purification, target=blank rel-nofollow and rel-noopener should
|
||||
now be added to external links
|
||||
|
|
|
@ -33,7 +33,8 @@
|
|||
"jakub-onderka/php-parallel-lint": "^0.9.2",
|
||||
"laravel/dusk": "^1.0",
|
||||
"mockery/mockery": "0.9.*",
|
||||
"phpunit/phpunit": "~5.7"
|
||||
"phpunit/phpunit": "~5.7",
|
||||
"sebastian/phpcpd": "^3.0"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
|
|
216
composer.lock
generated
216
composer.lock
generated
|
@ -4,26 +4,26 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "3a440750c3e5403668fd82dbe7c54de0",
|
||||
"content-hash": "7cfa8f05a76283f45a0f1a30d00ecbad",
|
||||
"packages": [
|
||||
{
|
||||
"name": "aws/aws-sdk-php",
|
||||
"version": "3.24.4",
|
||||
"version": "3.24.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||
"reference": "2823e0a0742505f655b0cb3bcdb10844f60e6078"
|
||||
"reference": "f062d7ea2123fe2aefef91da855c10ef8ff3af1c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2823e0a0742505f655b0cb3bcdb10844f60e6078",
|
||||
"reference": "2823e0a0742505f655b0cb3bcdb10844f60e6078",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/f062d7ea2123fe2aefef91da855c10ef8ff3af1c",
|
||||
"reference": "f062d7ea2123fe2aefef91da855c10ef8ff3af1c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"guzzlehttp/guzzle": "^5.3.1|^6.2.1",
|
||||
"guzzlehttp/promises": "~1.0",
|
||||
"guzzlehttp/psr7": "^1.3.1, !=1.4.0",
|
||||
"guzzlehttp/psr7": "^1.4.1",
|
||||
"mtdowling/jmespath.php": "~2.2",
|
||||
"php": ">=5.5"
|
||||
},
|
||||
|
@ -84,7 +84,7 @@
|
|||
"s3",
|
||||
"sdk"
|
||||
],
|
||||
"time": "2017-03-14T00:56:44+00:00"
|
||||
"time": "2017-03-23T22:17:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "barnabywalters/mf-cleaner",
|
||||
|
@ -980,16 +980,16 @@
|
|||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "1.4.1",
|
||||
"version": "1.4.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "0d6c7ca039329247e4f0f8f8f6506810e8248855"
|
||||
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/0d6c7ca039329247e4f0f8f8f6506810e8248855",
|
||||
"reference": "0d6c7ca039329247e4f0f8f8f6506810e8248855",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
|
||||
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1041,7 +1041,7 @@
|
|||
"uri",
|
||||
"url"
|
||||
],
|
||||
"time": "2017-02-27T10:51:17+00:00"
|
||||
"time": "2017-03-20T17:10:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "indieauth/client",
|
||||
|
@ -1405,16 +1405,16 @@
|
|||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v5.4.15",
|
||||
"version": "v5.4.16",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "ecc6468b8af30b77566a8519ce8898740ef691d7"
|
||||
"reference": "6cf379ec34d08bcdc9c7183e369a8fdf04ade80d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/ecc6468b8af30b77566a8519ce8898740ef691d7",
|
||||
"reference": "ecc6468b8af30b77566a8519ce8898740ef691d7",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/6cf379ec34d08bcdc9c7183e369a8fdf04ade80d",
|
||||
"reference": "6cf379ec34d08bcdc9c7183e369a8fdf04ade80d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1530,7 +1530,7 @@
|
|||
"framework",
|
||||
"laravel"
|
||||
],
|
||||
"time": "2017-03-02T14:41:40+00:00"
|
||||
"time": "2017-03-21T19:34:41+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/scout",
|
||||
|
@ -1779,16 +1779,16 @@
|
|||
},
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "1.0.36",
|
||||
"version": "1.0.37",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem.git",
|
||||
"reference": "d9c1698582dfbfbd092ec9c5c3325f862cdb3297"
|
||||
"reference": "78b5cc4feb61a882302df4fbaf63b7662e5e4ccd"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/d9c1698582dfbfbd092ec9c5c3325f862cdb3297",
|
||||
"reference": "d9c1698582dfbfbd092ec9c5c3325f862cdb3297",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/78b5cc4feb61a882302df4fbaf63b7662e5e4ccd",
|
||||
"reference": "78b5cc4feb61a882302df4fbaf63b7662e5e4ccd",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1858,7 +1858,7 @@
|
|||
"sftp",
|
||||
"storage"
|
||||
],
|
||||
"time": "2017-03-18T16:02:30+00:00"
|
||||
"time": "2017-03-22T15:43:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem-aws-s3-v3",
|
||||
|
@ -2585,16 +2585,16 @@
|
|||
},
|
||||
{
|
||||
"name": "psy/psysh",
|
||||
"version": "v0.8.2",
|
||||
"version": "v0.8.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/bobthecow/psysh.git",
|
||||
"reference": "97113db4107a4126bef933b60fea6dbc9f615d41"
|
||||
"reference": "1dd4bbbc64d71e7ec075ffe82b42d9e096dc8d5e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/97113db4107a4126bef933b60fea6dbc9f615d41",
|
||||
"reference": "97113db4107a4126bef933b60fea6dbc9f615d41",
|
||||
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/1dd4bbbc64d71e7ec075ffe82b42d9e096dc8d5e",
|
||||
"reference": "1dd4bbbc64d71e7ec075ffe82b42d9e096dc8d5e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2654,7 +2654,7 @@
|
|||
"interactive",
|
||||
"shell"
|
||||
],
|
||||
"time": "2017-03-01T00:13:29+00:00"
|
||||
"time": "2017-03-19T21:40:44+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ramsey/uuid",
|
||||
|
@ -3861,34 +3861,37 @@
|
|||
},
|
||||
{
|
||||
"name": "facebook/webdriver",
|
||||
"version": "1.3.0",
|
||||
"version": "1.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/facebook/php-webdriver.git",
|
||||
"reference": "77300c4ab2025d4316635f592ec849ca7323bd8c"
|
||||
"reference": "3ea034c056189e11c0ce7985332a9f4b5b2b5db2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/facebook/php-webdriver/zipball/77300c4ab2025d4316635f592ec849ca7323bd8c",
|
||||
"reference": "77300c4ab2025d4316635f592ec849ca7323bd8c",
|
||||
"url": "https://api.github.com/repos/facebook/php-webdriver/zipball/3ea034c056189e11c0ce7985332a9f4b5b2b5db2",
|
||||
"reference": "3ea034c056189e11c0ce7985332a9f4b5b2b5db2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-curl": "*",
|
||||
"ext-zip": "*",
|
||||
"php": "^5.5 || ~7.0",
|
||||
"symfony/process": "^2.8 || ^3.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^1.11",
|
||||
"friendsofphp/php-cs-fixer": "^2.0",
|
||||
"php-mock/php-mock-phpunit": "^1.1",
|
||||
"phpunit/phpunit": "4.6.* || ~5.0",
|
||||
"satooshi/php-coveralls": "^1.0",
|
||||
"squizlabs/php_codesniffer": "^2.6"
|
||||
},
|
||||
"suggest": {
|
||||
"phpdocumentor/phpdocumentor": "2.*"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-community": "1.5-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Facebook\\WebDriver\\": "lib/"
|
||||
|
@ -3898,7 +3901,7 @@
|
|||
"license": [
|
||||
"Apache-2.0"
|
||||
],
|
||||
"description": "A PHP client for WebDriver",
|
||||
"description": "A PHP client for Selenium WebDriver",
|
||||
"homepage": "https://github.com/facebook/php-webdriver",
|
||||
"keywords": [
|
||||
"facebook",
|
||||
|
@ -3906,7 +3909,7 @@
|
|||
"selenium",
|
||||
"webdriver"
|
||||
],
|
||||
"time": "2017-01-13T15:48:08+00:00"
|
||||
"time": "2017-03-22T10:56:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "fzaninotto/faker",
|
||||
|
@ -4731,16 +4734,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "5.7.16",
|
||||
"version": "5.7.17",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "dafc78e2a7d12139b0e97078d1082326bd09363d"
|
||||
"reference": "68752b665d3875f9a38a357e3ecb35c79f8673bf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/dafc78e2a7d12139b0e97078d1082326bd09363d",
|
||||
"reference": "dafc78e2a7d12139b0e97078d1082326bd09363d",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/68752b665d3875f9a38a357e3ecb35c79f8673bf",
|
||||
"reference": "68752b665d3875f9a38a357e3ecb35c79f8673bf",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4809,7 +4812,7 @@
|
|||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2017-03-15T13:02:34+00:00"
|
||||
"time": "2017-03-19T16:52:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit-mock-objects",
|
||||
|
@ -5148,6 +5151,45 @@
|
|||
],
|
||||
"time": "2016-11-19T08:54:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/finder-facade",
|
||||
"version": "1.2.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/finder-facade.git",
|
||||
"reference": "2a6f7f57efc0aa2d23297d9fd9e2a03111a8c0b9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/finder-facade/zipball/2a6f7f57efc0aa2d23297d9fd9e2a03111a8c0b9",
|
||||
"reference": "2a6f7f57efc0aa2d23297d9fd9e2a03111a8c0b9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"symfony/finder": "~2.3|~3.0",
|
||||
"theseer/fdomdocument": "~1.3"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "FinderFacade is a convenience wrapper for Symfony's Finder component.",
|
||||
"homepage": "https://github.com/sebastianbergmann/finder-facade",
|
||||
"time": "2016-02-17T07:02:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/global-state",
|
||||
"version": "1.1.1",
|
||||
|
@ -5245,6 +5287,56 @@
|
|||
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
|
||||
"time": "2017-02-18T15:18:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/phpcpd",
|
||||
"version": "3.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpcpd.git",
|
||||
"reference": "d7006078b75a34c9250831c3453a2e256a687615"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpcpd/zipball/d7006078b75a34c9250831c3453a2e256a687615",
|
||||
"reference": "d7006078b75a34c9250831c3453a2e256a687615",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.6|^7.0",
|
||||
"phpunit/php-timer": "^1.0.6",
|
||||
"sebastian/finder-facade": "^1.1",
|
||||
"sebastian/version": "^2.0",
|
||||
"symfony/console": "^3.0"
|
||||
},
|
||||
"bin": [
|
||||
"phpcpd"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Copy/Paste Detector (CPD) for PHP code.",
|
||||
"homepage": "https://github.com/sebastianbergmann/phpcpd",
|
||||
"time": "2017-02-05T07:48:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/recursion-context",
|
||||
"version": "2.0.0",
|
||||
|
@ -5438,6 +5530,46 @@
|
|||
"homepage": "https://symfony.com",
|
||||
"time": "2017-03-07T16:47:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "theseer/fdomdocument",
|
||||
"version": "1.6.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/theseer/fDOMDocument.git",
|
||||
"reference": "d9ad139d6c2e8edf5e313ffbe37ff13344cf0684"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/theseer/fDOMDocument/zipball/d9ad139d6c2e8edf5e313ffbe37ff13344cf0684",
|
||||
"reference": "d9ad139d6c2e8edf5e313ffbe37ff13344cf0684",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-dom": "*",
|
||||
"lib-libxml": "*",
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Arne Blankerts",
|
||||
"email": "arne@blankerts.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.",
|
||||
"homepage": "https://github.com/theseer/fDOMDocument",
|
||||
"time": "2015-05-27T22:58:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "webmozart/assert",
|
||||
"version": "1.2.0",
|
||||
|
|
12
compress
Normal file → Executable file
12
compress
Normal file → Executable file
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/zsh
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
echo "compressing app.css and prism files"
|
||||
zopfli ./public/assets/css/app.css
|
||||
zopfli ./public/assets/prism/prism.css
|
||||
zopfli ./public/assets/prism/prism.js
|
||||
zopfli --i1000 ./public/assets/css/app.css
|
||||
zopfli --i1000 ./public/assets/prism/prism.css
|
||||
zopfli --i1000 ./public/assets/prism/prism.js
|
||||
bro --force --quality 11 --input ./public/assets/css/app.css --output ./public/assets/css/app.css.br
|
||||
bro --force --quality 11 --input ./public/assets/prism/prism.css --output ./public/assets/prism/prism.css.br
|
||||
bro --force --quality 11 --input ./public/assets/prism/prism.js --output ./public/assets/prism/prism.js.br
|
||||
|
@ -11,13 +11,13 @@ bro --force --quality 11 --input ./public/assets/prism/prism.js --output ./publi
|
|||
echo "compressing js assets"
|
||||
for file in ./public/assets/js/*.js
|
||||
do
|
||||
zopfli $file
|
||||
zopfli --i1000 $file
|
||||
bro --force --quality 11 --input $file --output $file.br
|
||||
done
|
||||
|
||||
echo "compressing frontend assets"
|
||||
for file in ./public/assets/frontend/*.css
|
||||
do
|
||||
zopfli $file
|
||||
zopfli --i1000 $file
|
||||
bro --force --quality 11 --input $file --output $file.br
|
||||
done
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
"scripts": {
|
||||
"lint-staged": "lint-staged",
|
||||
"stylelint-staged": "stylelint --syntax=scss",
|
||||
"eslint-staged": "eslint",
|
||||
"sass": "sassc --style compressed --sourcemap resources/assets/sass/app.scss public/assets/css/app.css",
|
||||
"postcss": "postcss --use autoprefixer --autoprefixer.browsers \"> 5%\" --output public/assets/css/app.css public/assets/css/app.css",
|
||||
"make:css": "npm run sass && npm run postcss",
|
||||
|
@ -38,8 +37,8 @@
|
|||
"uglifyjs": "for f in ./public/assets/js/*.js; do uglifyjs $f --screw-ie8 --in-source-map $f.map --source-map $f.map --source-map-url /assets/js/`basename $f`.map --output $f; done"
|
||||
},
|
||||
"lint-staged": {
|
||||
"eslint-staged": "resources/assets/es6/*.js",
|
||||
"stylelint-staged": "resources/assets/sass/**/*.scss"
|
||||
"resources/assets/es6/*.js": "eslint",
|
||||
"resources/assets/sass/**/*.scss": "stylelint-staged"
|
||||
},
|
||||
"pre-commit": [
|
||||
"lint-staged"
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,2 +1,133 @@
|
|||
(function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:false,exports:{}};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.l=true;return module.exports}__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.i=function(value){return value};__webpack_require__.d=function(exports,name,getter){if(!__webpack_require__.o(exports,name)){Object.defineProperty(exports,name,{configurable:false,enumerable:true,get:getter})}};__webpack_require__.n=function(module){var getter=module&&module.__esModule?function getDefault(){return module["default"]}:function getModuleExports(){return module};__webpack_require__.d(getter,"a",getter);return getter};__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)};__webpack_require__.p="";return __webpack_require__(__webpack_require__.s=18)})({18:function(module,exports,__webpack_require__){"use strict";var youtubeRegex=/watch\?v=([A-Za-z0-9\-_]+)\b/;var spotifyRegex=/https\:\/\/play\.spotify\.com\/(.*)\b/;var notes=document.querySelectorAll(".e-content");var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=notes[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var note=_step.value;var ytid=note.textContent.match(youtubeRegex);if(ytid){var ytcontainer=document.createElement("div");ytcontainer.classList.add("container");var ytiframe=document.createElement("iframe");ytiframe.classList.add("youtube");ytiframe.setAttribute("src","https://www.youtube.com/embed/"+ytid[1]);ytiframe.setAttribute("frameborder",0);ytiframe.setAttribute("allowfullscreen","true");ytcontainer.appendChild(ytiframe);note.appendChild(ytcontainer)}var spotifyid=note.textContent.match(spotifyRegex);if(spotifyid){var sid=spotifyid[1].replace("/",":");var siframe=document.createElement("iframe");siframe.classList.add("spotify");siframe.setAttribute("src","https://embed.spotify.com/?uri=spotify:"+sid);siframe.setAttribute("frameborder",0);siframe.setAttribute("allowtransparency","true");note.appendChild(siframe)}}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}}});
|
||||
//# sourceMappingURL=/assets/js/links.js.map
|
||||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
/******/
|
||||
/******/ // identity function for calling harmony imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 12);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ 12:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
//links.js
|
||||
|
||||
var youtubeRegex = /watch\?v=([A-Za-z0-9\-_]+)\b/;
|
||||
var spotifyRegex = /https\:\/\/play\.spotify\.com\/(.*)\b/;
|
||||
|
||||
var notes = document.querySelectorAll('.e-content');
|
||||
|
||||
var _iteratorNormalCompletion = true;
|
||||
var _didIteratorError = false;
|
||||
var _iteratorError = undefined;
|
||||
|
||||
try {
|
||||
for (var _iterator = notes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
||||
var note = _step.value;
|
||||
|
||||
var ytid = note.textContent.match(youtubeRegex);
|
||||
if (ytid) {
|
||||
var ytcontainer = document.createElement('div');
|
||||
ytcontainer.classList.add('container');
|
||||
var ytiframe = document.createElement('iframe');
|
||||
ytiframe.classList.add('youtube');
|
||||
ytiframe.setAttribute('src', 'https://www.youtube.com/embed/' + ytid[1]);
|
||||
ytiframe.setAttribute('frameborder', 0);
|
||||
ytiframe.setAttribute('allowfullscreen', 'true');
|
||||
ytcontainer.appendChild(ytiframe);
|
||||
note.appendChild(ytcontainer);
|
||||
}
|
||||
var spotifyid = note.textContent.match(spotifyRegex);
|
||||
if (spotifyid) {
|
||||
var sid = spotifyid[1].replace('/', ':');
|
||||
var siframe = document.createElement('iframe');
|
||||
siframe.classList.add('spotify');
|
||||
siframe.setAttribute('src', 'https://embed.spotify.com/?uri=spotify:' + sid);
|
||||
siframe.setAttribute('frameborder', 0);
|
||||
siframe.setAttribute('allowtransparency', 'true');
|
||||
note.appendChild(siframe);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
_didIteratorError = true;
|
||||
_iteratorError = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_iteratorNormalCompletion && _iterator.return) {
|
||||
_iterator.return();
|
||||
}
|
||||
} finally {
|
||||
if (_didIteratorError) {
|
||||
throw _iteratorError;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
//# sourceMappingURL=links.js.map
|
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -1,2 +1,89 @@
|
|||
(function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:false,exports:{}};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.l=true;return module.exports}__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.i=function(value){return value};__webpack_require__.d=function(exports,name,getter){if(!__webpack_require__.o(exports,name)){Object.defineProperty(exports,name,{configurable:false,enumerable:true,get:getter})}};__webpack_require__.n=function(module){var getter=module&&module.__esModule?function getDefault(){return module["default"]}:function getModuleExports(){return module};__webpack_require__.d(getter,"a",getter);return getter};__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)};__webpack_require__.p="";return __webpack_require__(__webpack_require__.s=21)})({21:function(module,exports,__webpack_require__){"use strict";var _paq=_paq||[];_paq.push(["trackPageView"]);_paq.push(["enableLinkTracking"]);_paq.push(["setTrackerUrl","https://analytics.jmb.lv/piwik.php"]);_paq.push(["setSiteId","1"])}});
|
||||
//# sourceMappingURL=/assets/js/piwik.js.map
|
||||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
/******/
|
||||
/******/ // identity function for calling harmony imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 18);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ 18:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
// Piwik in its own js file to allow usage with a CSP policy
|
||||
|
||||
var _paq = _paq || [];
|
||||
// tracker methods like "setCustomDimension" should be called before "trackPageView"
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
_paq.push(['setTrackerUrl', 'https://analytics.jmb.lv/piwik.php']);
|
||||
_paq.push(['setSiteId', '1']);
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
//# sourceMappingURL=piwik.js.map
|
Binary file not shown.
Binary file not shown.
|
@ -1 +1 @@
|
|||
{"version":3,"sources":["webpack:/webpack/bootstrap 24cf952e7b9c5a5d4532?f9c7*","webpack:///piwik.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","getDefault","getModuleExports","object","property","prototype","hasOwnProperty","p","s","21","_paq","push"],"mappings":"mBACA,GAAAA,oBAGA,SAAAC,qBAAAC,UAGA,GAAAF,iBAAAE,UACA,MAAAF,kBAAAE,UAAAC,OAGA,IAAAC,QAAAJ,iBAAAE,WACAG,EAAAH,SACAI,EAAA,MACAH,WAIAI,SAAAL,UAAAM,KAAAJ,OAAAD,QAAAC,OAAAA,OAAAD,QAAAF,oBAGAG,QAAAE,EAAA,IAGA,OAAAF,QAAAD,QAKAF,oBAAAQ,EAAAF,OAGAN,qBAAAS,EAAAV,gBAGAC,qBAAAI,EAAA,SAAAM,OAA2C,MAAAA,OAG3CV,qBAAAW,EAAA,SAAAT,QAAAU,KAAAC,QACA,IAAAb,oBAAAc,EAAAZ,QAAAU,MAAA,CACAG,OAAAC,eAAAd,QAAAU,MACAK,aAAA,MACAC,WAAA,KACAC,IAAAN,UAMAb,qBAAAoB,EAAA,SAAAjB,QACA,GAAAU,QAAAV,QAAAA,OAAAkB,WACA,QAAAC,cAA2B,MAAAnB,QAAA,YAC3B,QAAAoB,oBAAiC,MAAApB,QACjCH,qBAAAW,EAAAE,OAAA,IAAAA,OACA,OAAAA,QAIAb,qBAAAc,EAAA,SAAAU,OAAAC,UAAsD,MAAAV,QAAAW,UAAAC,eAAApB,KAAAiB,OAAAC,UAGtDzB,qBAAA4B,EAAA,EAGA,OAAA5B,qBAAAA,oBAAA6B,EAAA,OAAAC,GAAA,SAAA3B,OAAAD,QAAAF,qBAAA,YC9DA,IAAI+B,MAAOA,QAEXA,MAAKC,MAAM,iBACXD,MAAKC,MAAM,sBACXD,MAAKC,MAAM,gBAAiB,sCAC5BD,MAAKC,MAAM,YAAa","file":"./public/assets/js/piwik.js","sourceRoot":"","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 21);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 24cf952e7b9c5a5d4532","// Piwik in its own js file to allow usage with a CSP policy\n\nvar _paq = _paq || [];\n// tracker methods like \"setCustomDimension\" should be called before \"trackPageView\"\n_paq.push(['trackPageView']);\n_paq.push(['enableLinkTracking']);\n_paq.push(['setTrackerUrl', 'https://analytics.jmb.lv/piwik.php']);\n_paq.push(['setSiteId', '1']);\n\n\n\n// WEBPACK FOOTER //\n// ./piwik.js"]}
|
||||
{"version":3,"sources":["webpack:///webpack/bootstrap 0d56878049caba29cc1d?60c9*","webpack:///./piwik.js"],"names":["_paq","push"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;;;AChEA;;AAEA,IAAIA,OAAOA,QAAQ,EAAnB;AACA;AACAA,KAAKC,IAAL,CAAU,CAAC,eAAD,CAAV;AACAD,KAAKC,IAAL,CAAU,CAAC,oBAAD,CAAV;AACAD,KAAKC,IAAL,CAAU,CAAC,eAAD,EAAkB,oCAAlB,CAAV;AACAD,KAAKC,IAAL,CAAU,CAAC,WAAD,EAAc,GAAd,CAAV,E","file":"piwik.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 18);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0d56878049caba29cc1d","// Piwik in its own js file to allow usage with a CSP policy\n\nvar _paq = _paq || [];\n// tracker methods like \"setCustomDimension\" should be called before \"trackPageView\"\n_paq.push(['trackPageView']);\n_paq.push(['enableLinkTracking']);\n_paq.push(['setTrackerUrl', 'https://analytics.jmb.lv/piwik.php']);\n_paq.push(['setSiteId', '1']);\n\n\n\n// WEBPACK FOOTER //\n// ./piwik.js"],"sourceRoot":""}
|
Binary file not shown.
Binary file not shown.
|
@ -25,7 +25,7 @@ const makeOptionsForForm = (map, position, places = null) => {
|
|||
for (let place of places) {
|
||||
let parsedCoords = parseLocation(place.location);
|
||||
let option = document.createElement('option');
|
||||
option.setAttribute('value', place.slug);
|
||||
option.setAttribute('value', place.uri);
|
||||
option.dataset.latitude = parsedCoords.latitude;
|
||||
option.dataset.longitude = parsedCoords.longitude;
|
||||
option.appendChild(document.createTextNode(place.name));
|
||||
|
|
|
@ -73,61 +73,6 @@ export default function makeNewPlaceForm(map) {
|
|||
form.appendChild(newPlaceLatitudeDiv);
|
||||
form.appendChild(newPlaceLongitudeDiv);
|
||||
form.appendChild(newPlaceSubmit);
|
||||
//the event listener for the new place form
|
||||
/*placeSubmit.addEventListener('click', function () {
|
||||
//create the form data to send
|
||||
var formData = new FormData();
|
||||
formData.append('place-name', document.querySelector('#place-name').value);
|
||||
formData.append('place-description', document.querySelector('#place-description').value);
|
||||
formData.append('place-latitude', document.querySelector('#place-latitude').value);
|
||||
formData.append('place-longitude', document.querySelector('#place-longitude').value);
|
||||
//post the new place
|
||||
fetch('/micropub/places', {
|
||||
//send cookies with the request
|
||||
credentials: 'same-origin',
|
||||
method: 'post',
|
||||
body: formData
|
||||
})
|
||||
.then(function (response) {
|
||||
return response.json();
|
||||
})
|
||||
.then(function (placeJson) {
|
||||
if (placeJson.error === true) {
|
||||
throw new Error(placeJson.error_description);
|
||||
}
|
||||
//remove un-needed form elements
|
||||
//iterate through labels and remove parent div elements
|
||||
var labels = document.querySelectorAll('.place-label');
|
||||
for (var i = 0; i < labels.length; ++i) {
|
||||
form.removeChild(labels[i].parentNode);
|
||||
}
|
||||
form.removeChild(document.querySelector('#place-submit'));
|
||||
var newPlaceButton = document.querySelector('#create-new-place');
|
||||
//in order to remove a DOM Node, you need to run removeChild on the parent Node
|
||||
newPlaceButton.parentNode.removeChild(newPlaceButton);
|
||||
//add place marker
|
||||
var newOption = document.createElement('option');
|
||||
newOption.setAttribute('value', placeJson.uri);
|
||||
newOption.appendChild(document.createTextNode(placeJson.name));
|
||||
newOption.dataset.latitude = placeJson.latitude;
|
||||
newOption.dataset.longitude = placeJson.longitude;
|
||||
selectEl.appendChild(newOption);
|
||||
var newPlaceMarkerIcon = document.createElement('div');
|
||||
newPlaceMarkerIcon.classList.add('marker');
|
||||
new mapboxgl.Marker(newPlaceMarkerIcon, {offset: [-10, -20]}).setLngLat([placeJson.longitude, placeJson.latitude]).addTo(map);
|
||||
map.flyTo({center: [placeJson.longitude, placeJson.latitude]});
|
||||
|
||||
newPlaceMarkerIcon.addEventListener('click', function () {
|
||||
map.flyTo({center: [placeJson.longitude, placeJson.latitude]});
|
||||
selectPlace(placeJson.uri);
|
||||
});
|
||||
//make selected
|
||||
selectPlace(placeJson.uri);
|
||||
}).catch(function (placeError) {
|
||||
alertify.reset();
|
||||
alertify.error(placeError);
|
||||
});
|
||||
});*/
|
||||
});
|
||||
|
||||
return newLocationButton;
|
||||
|
|
|
@ -8,7 +8,7 @@ Admin CP
|
|||
<h1>Hello {{ $name }}!</h1>
|
||||
|
||||
<h2>Articles</h2>
|
||||
<p>You can either <a href="/admin/articles/create">create</a> new blog posts, or <a href="/admin/articles/">edit</a> them.<p>
|
||||
<p>You can either <a href="/admin/blog/create">create</a> new blog posts, or <a href="/admin/blog/">edit</a> them.<p>
|
||||
|
||||
<h2>Notes</h2>
|
||||
<p>You can either <a href="/admin/notes/create">create</a> new notes, or <a href="/admin/notes/">edit</a> them.<p>
|
||||
|
|
|
@ -23,7 +23,7 @@ Articles «
|
|||
<span class="post-info">Posted <time class="dt-published" title="{{ $article->tooltip_time }}" datetime="{{ $article->w3c_time }}">{{ $article->human_time }}</time> - <a title="Permalink" href="{{ $article->link }}">⚓</a></span>
|
||||
</header>
|
||||
<div class="e-content">
|
||||
{!! $article['main'] !!}
|
||||
{!! $article->html !!}
|
||||
</div>
|
||||
</article>
|
||||
@endforeach
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
{{ strip_tags($article->title) }} «
|
||||
{{ strip_tags($article->title) }} «
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
@ -13,7 +13,7 @@
|
|||
<span class="post-info">Posted <time class="dt-published" title="{{ $article->tooltip_time }}" datetime="{{ $article->w3c_time }}">{{ $article->human_time }}</time> - <a title="Permalink" href="{{ $article->link }}">⚓</a></span>
|
||||
</header>
|
||||
<div class="e-content">
|
||||
{!! $article->main !!}
|
||||
{!! $article->html !!}
|
||||
</div>
|
||||
</article>
|
||||
@stop
|
||||
|
|
|
@ -110,7 +110,6 @@ Route::group(['domain' => config('url.longurl')], function () {
|
|||
Route::post('micropub', 'MicropubClientController@store')->name('micropub-client-post');
|
||||
Route::get('micropub/config', 'MicropubClientController@config')->name('micropub-config');
|
||||
Route::get('micropub/query-endpoint', 'MicropubClientController@queryEndpoint')->name('micropub-query-action');
|
||||
//Route::get('micropub/refresh-syndication-targets', 'MicropubClientController@refreshSyndicationTargets');
|
||||
Route::get('micropub/places', 'MicropubClientController@nearbyPlaces');
|
||||
Route::post('micropub/places', 'MicropubClientController@newPlace');
|
||||
Route::post('micropub/media', 'MicropubClientController@processMedia')->name('process-media');
|
||||
|
|
75
yarn.lock
75
yarn.lock
|
@ -972,8 +972,8 @@ camelcase@^3.0.0:
|
|||
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a"
|
||||
|
||||
caniuse-db@^1.0.30000639:
|
||||
version "1.0.30000639"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000639.tgz#5982f70a54352adaf8901a772d2c68ca24f501aa"
|
||||
version "1.0.30000640"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000640.tgz#7b7fd3cf13c0d9d41f8754b577b202113e2be7ca"
|
||||
|
||||
capture-stack-trace@^1.0.0:
|
||||
version "1.0.0"
|
||||
|
@ -1353,8 +1353,8 @@ ecc-jsbn@~0.1.1:
|
|||
jsbn "~0.1.0"
|
||||
|
||||
electron-to-chromium@^1.2.6, electron-to-chromium@^1.2.7:
|
||||
version "1.2.7"
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.2.7.tgz#4f748061407e478c76256d04496972b71f647407"
|
||||
version "1.2.8"
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.2.8.tgz#22c2e6200d350da27d6050db7e3f6f85d18cf4ed"
|
||||
|
||||
elegant-spinner@^1.0.1:
|
||||
version "1.0.1"
|
||||
|
@ -1498,8 +1498,8 @@ evp_bytestokey@^1.0.0:
|
|||
create-hash "^1.1.1"
|
||||
|
||||
execa@^0.6.0:
|
||||
version "0.6.2"
|
||||
resolved "https://registry.yarnpkg.com/execa/-/execa-0.6.2.tgz#04e9e38dec6b8e770cf0fb6cf7ef945260c67bbb"
|
||||
version "0.6.3"
|
||||
resolved "https://registry.yarnpkg.com/execa/-/execa-0.6.3.tgz#57b69a594f081759c69e5370f0d17b9cb11658fe"
|
||||
dependencies:
|
||||
cross-spawn "^5.0.1"
|
||||
get-stream "^3.0.0"
|
||||
|
@ -1857,8 +1857,8 @@ home-or-tmp@^2.0.0:
|
|||
os-tmpdir "^1.0.1"
|
||||
|
||||
hosted-git-info@^2.1.4:
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.3.1.tgz#ac439421605f0beb0ea1349de7d8bb28e50be1dd"
|
||||
version "2.4.1"
|
||||
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.4.1.tgz#4b0445e41c004a8bd1337773a4ff790ca40318c8"
|
||||
|
||||
http-signature@~1.1.0:
|
||||
version "1.1.1"
|
||||
|
@ -2059,9 +2059,9 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0:
|
|||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
||||
|
||||
isexe@^1.1.1:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0"
|
||||
isexe@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
||||
|
||||
isobject@^2.0.0:
|
||||
version "2.1.0"
|
||||
|
@ -2389,15 +2389,15 @@ miller-rabin@^4.0.0:
|
|||
bn.js "^4.0.0"
|
||||
brorand "^1.0.1"
|
||||
|
||||
mime-db@~1.26.0:
|
||||
version "1.26.0"
|
||||
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.26.0.tgz#eaffcd0e4fc6935cf8134da246e2e6c35305adff"
|
||||
mime-db@~1.27.0:
|
||||
version "1.27.0"
|
||||
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1"
|
||||
|
||||
mime-types@^2.1.12, mime-types@~2.1.7:
|
||||
version "2.1.14"
|
||||
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.14.tgz#f7ef7d97583fcaf3b7d282b6f8b5679dab1e94ee"
|
||||
version "2.1.15"
|
||||
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed"
|
||||
dependencies:
|
||||
mime-db "~1.26.0"
|
||||
mime-db "~1.27.0"
|
||||
|
||||
minimalistic-assert@^1.0.0:
|
||||
version "1.0.0"
|
||||
|
@ -3339,9 +3339,9 @@ snyk@^1.14.3:
|
|||
url "^0.11.0"
|
||||
uuid "^3.0.1"
|
||||
|
||||
source-list-map@~0.1.7:
|
||||
version "0.1.8"
|
||||
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106"
|
||||
source-list-map@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-1.0.1.tgz#cc1fc17122ae0a51978024c2cc0f8c35659026b8"
|
||||
|
||||
source-map-support@^0.4.2:
|
||||
version "0.4.14"
|
||||
|
@ -3642,13 +3642,14 @@ typedarray@^0.0.6, typedarray@~0.0.5:
|
|||
version "0.0.6"
|
||||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||
|
||||
uglify-js@^2.7.5:
|
||||
version "2.8.14"
|
||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.14.tgz#25b15d1af39b21752ee33703adbf432e8bc8f77d"
|
||||
uglify-js@^2.8.5:
|
||||
version "2.8.15"
|
||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.15.tgz#835dd4cd5872554756e6874508d0d0561704d94d"
|
||||
dependencies:
|
||||
source-map "~0.5.1"
|
||||
uglify-to-browserify "~1.0.0"
|
||||
yargs "~3.10.0"
|
||||
optionalDependencies:
|
||||
uglify-to-browserify "~1.0.0"
|
||||
|
||||
uglify-to-browserify@~1.0.0:
|
||||
version "1.0.2"
|
||||
|
@ -3803,7 +3804,7 @@ vt-pbf@^2.0.2:
|
|||
point-geometry "0.0.0"
|
||||
vector-tile "^1.1.3"
|
||||
|
||||
watchpack@^1.2.0:
|
||||
watchpack@^1.3.1:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.3.1.tgz#7d8693907b28ce6013e7f3610aa2a1acf07dad87"
|
||||
dependencies:
|
||||
|
@ -3817,16 +3818,16 @@ webStorage@^1.2.2:
|
|||
dependencies:
|
||||
gr-event-dispatcher "^1.1.1"
|
||||
|
||||
webpack-sources@^0.1.4:
|
||||
version "0.1.5"
|
||||
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.1.5.tgz#aa1f3abf0f0d74db7111c40e500b84f966640750"
|
||||
webpack-sources@^0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.2.0.tgz#fea93ba840f16cdd3f246f0ee95f88a9492c69fb"
|
||||
dependencies:
|
||||
source-list-map "~0.1.7"
|
||||
source-list-map "^1.0.1"
|
||||
source-map "~0.5.3"
|
||||
|
||||
webpack@^2.2.0:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/webpack/-/webpack-2.2.1.tgz#7bb1d72ae2087dd1a4af526afec15eed17dda475"
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/webpack/-/webpack-2.3.1.tgz#55bce8baffe7c1f9dc3029adc048643b448318a8"
|
||||
dependencies:
|
||||
acorn "^4.0.4"
|
||||
acorn-dynamic-import "^2.0.0"
|
||||
|
@ -3844,9 +3845,9 @@ webpack@^2.2.0:
|
|||
source-map "^0.5.3"
|
||||
supports-color "^3.1.0"
|
||||
tapable "~0.2.5"
|
||||
uglify-js "^2.7.5"
|
||||
watchpack "^1.2.0"
|
||||
webpack-sources "^0.1.4"
|
||||
uglify-js "^2.8.5"
|
||||
watchpack "^1.3.1"
|
||||
webpack-sources "^0.2.0"
|
||||
yargs "^6.0.0"
|
||||
|
||||
webworkify@^1.4.0:
|
||||
|
@ -3862,10 +3863,10 @@ which-module@^1.0.0:
|
|||
resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f"
|
||||
|
||||
which@1.2.x, which@^1.2.10, which@^1.2.9:
|
||||
version "1.2.12"
|
||||
resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192"
|
||||
version "1.2.14"
|
||||
resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5"
|
||||
dependencies:
|
||||
isexe "^1.1.1"
|
||||
isexe "^2.0.0"
|
||||
|
||||
wide-align@^1.1.0:
|
||||
version "1.1.0"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue