Merge branch 'release/0.0.14.11'

This commit is contained in:
Jonny Barnes 2016-10-24 22:40:43 +01:00
commit 82c81dd844
52 changed files with 749 additions and 98 deletions

View file

@ -283,7 +283,7 @@ class NotesController extends Controller
*
* @param float The latitude
* @param float The longitude
* @return string The location name
* @return string The location HTML
*/
public function reverseGeoCode(float $latitude, float $longitude): string
{
@ -303,7 +303,7 @@ class NotesController extends Controller
]);
$json = json_decode($response->getBody());
if (isset($json->address->town)) {
$address = $json->address->town . ', ' . $json->address->country;
$address = '<span class="p-locality">' . $json->address->town . '</span>, <span class="p-country-name">' . $json->address->country . '</span>';
Cache::forever($latlng, $address);
return $address;
@ -315,14 +315,15 @@ class NotesController extends Controller
return $address;
}
if (isset($json->address->county)) {
$address = $json->address->county . ', ' . $json->reversegeocode->country;
$address = '<span class="p-region">' . $json->address->county . '</span>, <span class="p-country-name">' . $json->address->country . '</span>';
Cache::forever($latlng, $address);
return $address;
}
Cache::forever($latlng, $json->address->country);
$adress = '<span class="p-country-name">' . $json->address->country . '</span>';
Cache::forever($latlng, $address);
return $json->reversegeocode->addressparts->country;
return $address;
});
}
}

View file

@ -1,26 +0,0 @@
{
"name": "jbuk-frontend",
"description": "",
"main": "",
"authors": [
"Jonny Barnes <jonny@jonnybarnes.uk>"
],
"license": "CC0-1.0",
"homepage": "https://github.com/jonnybarnes/jonnybarnes.uk",
"moduleType": [],
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"fetch": "~1.0",
"alertify.js": "alertifyjs#~1.0.5",
"store2": "~2.3.2",
"Autolinker.js": "~1.0",
"marked": "^0.3.6",
"sanitize-css": "^4.1.0"
}
}

View file

@ -1,5 +1,11 @@
# Changelog
## Version 0.0.14.11 (2016-1024)
- Having used `yarn` for npm packages, we now also use it for bower packages
- Update typekit sri hash
- Hide co-ordinates, in data tags, we want them to be read by machines, but not humans
- Use `h-card` for “places”, and`h-adr` for reverse lookup location name
## Version 0.0.14.10 (2016-10-21)
- Fix: Trying to get brid.gy markup compatibility

View file

@ -35,5 +35,9 @@ class NotesTableSeeder extends Seeder
mkdir(public_path() . '/assets/profile-images/aaronparecki.com', 0755);
copy(base_path() . '/tests/aaron.png', public_path() . '/assets/profile-images/aaronparecki.com/image');
}
$noteWithCoords = App\Note::create([
'note' => 'Note from somehwere',
'location' => '53.499,-2.379'
]);
}
}

View file

@ -27,22 +27,22 @@ gulp.task('js-assets', function () {
.pipe(gulp.dest('./public/assets/js'));
});
gulp.task('bower', function () {
gulp.task('frontend', function () {
//copy JS files
gulp.src([
'bower_components/fetch/fetch.js',
'bower_components/alertify.js/dist/js/alertify.js',
'bower_components/store2/dist/store2.min.js',
'bower_components/Autolinker.js/dist/Autolinker.min.js',
'bower_components/marked/marked.min.js',
'node_modules/whatwg-fetch/fetch.js',
'node_modules/alertify.js/dist/js/alertify.js',
'node_modules/store2/dist/store2.min.js',
'node_modules/autolinker/dist/Autolinker.min.js',
'node_modules/marked/marked.min.js',
])
.pipe(gulp.dest('public/assets/bower/'));
.pipe(gulp.dest('public/assets/frontend/'));
//copy CSS files
gulp.src([
'bower_components/alertify.js/dist/css/alertify.css',
'bower_components/sanitize-css/sanitize.css',
'node_modules/alertify.js/dist/css/alertify.css',
'node_modules/sanitize.css/sanitize.css',
])
.pipe(gulp.dest('public/assets/bower/'));
.pipe(gulp.dest('public/assets/frontend/'));
});
gulp.task('compress', function () {
@ -61,18 +61,18 @@ gulp.task('compress', function () {
.pipe(brotli.compress({mode: 1, quality: 11}))
.pipe(gulp.dest('public/assets/js/'));
//bower components
gulp.src('public/assets/bower/*.css')
gulp.src('public/assets/frontend/*.css')
.pipe(zopfli({ format: 'gzip', append: true }))
.pipe(gulp.dest('public/assets/bower/'));
gulp.src('public/assets/bower/*.js')
.pipe(gulp.dest('public/assets/frontend/'));
gulp.src('public/assets/frontend/*.js')
.pipe(zopfli({ format: 'gzip', append: true }))
.pipe(gulp.dest('public/assets/bower/'));
.pipe(gulp.dest('public/assets/frontend/'));
gulp.src('public/assets/bower/*.css')
.pipe(brotli.compress({mode: 1, quality: 11}))
.pipe(gulp.dest('public/assets/bower/'));
.pipe(gulp.dest('public/assets/frontend/'));
gulp.src('public/assets/bower/*.js')
.pipe(brotli.compress({mode: 1, quality: 11}))
.pipe(gulp.dest('public/assets/bower/'));
.pipe(gulp.dest('public/assets/frontend/'));
//prism
gulp.src('public/assets/prism/*.css')
.pipe(zopfli({ format: 'gzip', append: true }))

View file

@ -27,5 +27,13 @@
},
"pre-commit": [
"lint-staged"
]
],
"dependencies": {
"alertify.js": "^1.0.12",
"autolinker": "^1.2.0",
"marked": "^0.3.6",
"sanitize.css": "^4.1.0",
"store2": "^2.3.2",
"whatwg-fetch": "^1.0.0"
}
}

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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.

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -26,7 +26,7 @@ Edit Article « Admin CP
@section('scripts')
@parent
<script src="/assets/bower/marked.min.js"></script>
<script src="/assets/frontend/marked.min.js"></script>
<script>
var preview = document.createElement('div');
preview.classList.add('preview');

View file

@ -29,7 +29,7 @@ New Article « Admin CP
@section('scripts')
@parent
<script src="/assets/bower/marked.min.js"></script>
<script src="/assets/frontend/marked.min.js"></script>
<script>
var preview = document.createElement('div');
preview.classList.add('preview');
@ -41,9 +41,9 @@ New Article « Admin CP
preview.innerHTML = marked(markdown);
}, 5000);
</script>
<script src="/assets/bower/store2.min.js"></script>
<script src="/assets/bower/alertify.js"></script>
<script src="/assets/frontend/store2.min.js"></script>
<script src="/assets/frontend/alertify.js"></script>
<script src="/assets/js/form-save.js"></script>
<link rel="stylesheet" href="/assets/bower/alertify.css">
<link rel="stylesheet" href="/assets/frontend/alertify.css">
@stop

View file

@ -25,9 +25,9 @@ New Note « Admin CP
@include('templates.mapbox-links')
<script src="/assets/js/newnote.js"></script>
<script src="/assets/bower/store2.min.js"></script>
<script src="/assets/bower/alertify.js"></script>
<script src="/assets/frontend/store2.min.js"></script>
<script src="/assets/frontend/alertify.js"></script>
<script src="/assets/js/form-save.js"></script>
<link rel="stylesheet" href="/assets/bower/alertify.css">
<link rel="stylesheet" href="/assets/frontend/alertify.css">
@stop

View file

@ -21,7 +21,7 @@ Notes « Jonny Barnes
@section('scripts')
@include('templates.mapbox-links')
<script src="/assets/bower/Autolinker.min.js"></script>
<script src="/assets/frontend/Autolinker.min.js"></script>
<script src="/assets/js/links.js"></script>
<script src="/assets/js/maps.js"></script>

View file

@ -4,7 +4,7 @@
<meta charset="UTF-8">
<title>@if (App::environment() == 'local'){!! "[testing] -"!!}@endif @yield('title')</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="/assets/bower/sanitize.css">
<link rel="stylesheet" href="/assets/frontend/sanitize.css">
<link rel="stylesheet" href="/assets/css/global.css">
<link rel="openid.server" href="https://indieauth.com/openid">
<link rel="openid.delegate" href="https://jonnybarnes.uk">
@ -30,7 +30,7 @@
<main>
@yield('content')
</main>
<script src="https://use.typekit.net/kmb3cdb.js" integrity="sha384-0dhd7OudcM5zfMelBVFKeuV+wz6Y3xYrssP9G2sYBCDnCKWmcaAl9oqYzmhiSO7k" crossorigin="anonymous"></script>
<script src="https://use.typekit.net/kmb3cdb.js" integrity="sha384-RwBRSXqm+z0+RE6M8Mke3nQ6yWmZv3+DBu36h/9JOE2s2qXm+MaDa6l8E2NIgJvD" crossorigin="anonymous"></script>
<script>try{Typekit.load({ async: true });}catch(e){}</script>
@section('scripts')
<!--scripts go here when needed-->

View file

@ -34,11 +34,11 @@ New Note « Jonny Barnes
@section('scripts')
@include('templates.mapbox-links')
<script src="/assets/bower/fetch.js"></script>
<script src="/assets/bower/store2.min.js"></script>
<script src="/assets/bower/alertify.js"></script>
<script src="/assets/frontend/fetch.js"></script>
<script src="/assets/frontend/store2.min.js"></script>
<script src="/assets/frontend/alertify.js"></script>
<script src="/assets/js/form-save.js"></script>
<script src="/assets/js/newnote.js"></script>
<link rel="stylesheet" href="/assets/bower/alertify.css">
<link rel="stylesheet" href="/assets/frontend/alertify.css">
@stop

View file

@ -33,7 +33,7 @@
@section('scripts')
@include('templates.mapbox-links')
<script src="/assets/bower/Autolinker.min.js"></script>
<script src="/assets/frontend/Autolinker.min.js"></script>
<script src="/assets/js/links.js"></script>
<script src="/assets/js/maps.js"></script>

View file

@ -16,7 +16,8 @@
</div>
<div class="note-metadata">
<a class="u-url" href="/notes/{{ $note->nb60id }}"><time class="dt-published" datetime="{{ $note->iso8601_time }}">{{ $note->human_time }}</time></a>@if($note->client_name) via <a class="client" href="{{ $note->client_id }}">{{ $note->client_name }}</a>@endif
@if($note->address)in <span class="p-location"><span class="p-name">@if($note->placeLink)<a href="{{ $note->placeLink }}">@endif{{ $note->address }}@if($note->placeLink)</a>@endif</span> <span class="coordinates">(<span class="p-latitude">{{ $note->latitude }}</span>, <span class="p-longitude">{{ $note->longitude }}</span>)</span></span>@endif
@if($note->placeLink)in <span class="p-location h-card"><a class="p-name u-url" href="{{ $note->placeLink }}">{{ $note->address }}</a><data class="p-latitude" value="{{ $note->latitude }}"><data class="p-longitude" value="{{ $note->latitude }}"></span>
@elseif($note->address)in <span class="p-location h-adr">{!! $note->address !!}<data class="p-latitude" value="{{ $note->latitude }}"><data class="p-longitude" value="{{ $note->longitude }}"></span>@endif
@if($note->replies > 0)Replies: {{ $note->replies }}@endif
@if($note->tweet_id)@include('templates.social-links', ['tweet_id' => $note->tweet_id, 'nb60id' => $note->nb60id])@endif
@if ($note->placeLink)

701
yarn.lock

File diff suppressed because it is too large Load diff