Adjust mobile index ordering and update push notification message defaults
This commit is contained in:
parent
6343ebf654
commit
1f53c448e6
3 changed files with 13 additions and 6 deletions
11
index.php
11
index.php
|
|
@ -257,12 +257,20 @@ $headerTitles = [
|
||||||
'Many Voices of Life',
|
'Many Voices of Life',
|
||||||
'Many Views of Life',
|
'Many Views of Life',
|
||||||
'Modern Vagabond Log',
|
'Modern Vagabond Log',
|
||||||
|
'Motorcycle Wanderlust Log',
|
||||||
|
'Mapped Wanderings Log',
|
||||||
|
'Miles Beyond Reason',
|
||||||
|
'Miles Beyond Reality',
|
||||||
'Motion, Velocity & Lunacy',
|
'Motion, Velocity & Lunacy',
|
||||||
|
'Miles, Wind & Luck',
|
||||||
'Maps, Villages & Legends',
|
'Maps, Villages & Legends',
|
||||||
|
'Multi-Vision Log',
|
||||||
|
'Multi-Vista Log',
|
||||||
'Mutable View Log',
|
'Mutable View Log',
|
||||||
'Mistakes, Victories & Lessons',
|
'Mistakes, Victories & Lessons',
|
||||||
'Mostly Verified Legends',
|
'Mostly Verified Legends',
|
||||||
'Mostly Vague Logistics',
|
'Mostly Vague Logistics',
|
||||||
|
'Marginally Viable Leadership',
|
||||||
'Mileage Versus Luck',
|
'Mileage Versus Luck',
|
||||||
'Mechanical Violence Log',
|
'Mechanical Violence Log',
|
||||||
'Moderately Violent Leisure',
|
'Moderately Violent Leisure',
|
||||||
|
|
@ -303,7 +311,6 @@ $siteHeaderTitle = $headerTitles[array_rand($headerTitles)];
|
||||||
.meta a:hover{text-decoration:underline}
|
.meta a:hover{text-decoration:underline}
|
||||||
@media (max-width:900px){
|
@media (max-width:900px){
|
||||||
.video-row-head-mobile{display:block;grid-column:1 / -1;margin:0 0 .05rem}
|
.video-row-head-mobile{display:block;grid-column:1 / -1;margin:0 0 .05rem}
|
||||||
.video-row-head-mobile .meta{display:none}
|
|
||||||
.video-row-head-mobile .description-teaser{margin:.25rem 0 .3rem}
|
.video-row-head-mobile .description-teaser{margin:.25rem 0 .3rem}
|
||||||
#videos .video-wrapper{grid-column:1 / -1}
|
#videos .video-wrapper{grid-column:1 / -1}
|
||||||
#videos .video-info{grid-column:1 / -1}
|
#videos .video-info{grid-column:1 / -1}
|
||||||
|
|
@ -349,11 +356,11 @@ $siteHeaderTitle = $headerTitles[array_rand($headerTitles)];
|
||||||
<time class="created-at" datetime="<?=h(date('c', filemtime($v)))?>"><?=h(date('d.m.Y H:i', filemtime($v)))?></time>
|
<time class="created-at" datetime="<?=h(date('c', filemtime($v)))?>"><?=h(date('d.m.Y H:i', filemtime($v)))?></time>
|
||||||
<div class="video-row-head video-row-head-mobile">
|
<div class="video-row-head video-row-head-mobile">
|
||||||
<h2 class="video-row-title"><?=h($m['title'])?></h2>
|
<h2 class="video-row-title"><?=h($m['title'])?></h2>
|
||||||
<?php if(!empty($m['teaser'])): ?><p class="description-teaser description-teaser-mobile"><?=h((string)$m['teaser'])?></p><?php endif; ?>
|
|
||||||
<p class="meta">
|
<p class="meta">
|
||||||
<span><a href="<?=h($dateFilterUrl)?>"><?=h($m['date'])?></a></span>
|
<span><a href="<?=h($dateFilterUrl)?>"><?=h($m['date'])?></a></span>
|
||||||
<?php if(!empty($m['location'])): ?><span><a href="<?=h($locFilterUrl)?>"><?=h($m['location'])?></a></span><?php endif; ?>
|
<?php if(!empty($m['location'])): ?><span><a href="<?=h($locFilterUrl)?>"><?=h($m['location'])?></a></span><?php endif; ?>
|
||||||
</p>
|
</p>
|
||||||
|
<?php if(!empty($m['teaser'])): ?><p class="description-teaser description-teaser-mobile"><?=h((string)$m['teaser'])?></p><?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="video-wrapper">
|
<div class="video-wrapper">
|
||||||
<video controls controlsList="nodownload" oncontextmenu="return false" preload="metadata" src="<?=h($url)?>"<?= $posterUrl !== '' ? ' poster="'.h($posterUrl).'"' : '' ?>></video>
|
<video controls controlsList="nodownload" oncontextmenu="return false" preload="metadata" src="<?=h($url)?>"<?= $posterUrl !== '' ? ' poster="'.h($posterUrl).'"' : '' ?>></video>
|
||||||
|
|
|
||||||
|
|
@ -175,7 +175,7 @@ function try_send_show_notification($articleRefOrJob, $jobdir, $mvlog_root = nul
|
||||||
|
|
||||||
$payload = json_encode([
|
$payload = json_encode([
|
||||||
'title' => $articleTitle,
|
'title' => $articleTitle,
|
||||||
'body' => 'New MVLog article is now visible',
|
'body' => 'New aticle @ MVL!',
|
||||||
'url' => $filterUrl,
|
'url' => $filterUrl,
|
||||||
'tag' => "mvlog-show-{$identity}",
|
'tag' => "mvlog-show-{$identity}",
|
||||||
], JSON_UNESCAPED_UNICODE);
|
], JSON_UNESCAPED_UNICODE);
|
||||||
|
|
|
||||||
6
sw.js
6
sw.js
|
|
@ -1,9 +1,9 @@
|
||||||
self.addEventListener('push', event => {
|
self.addEventListener('push', event => {
|
||||||
let data = {};
|
let data = {};
|
||||||
try { data = event.data ? event.data.json() : {}; } catch (e) { data = { title: 'MVLog', body: event.data ? event.data.text() : 'New video published' }; }
|
try { data = event.data ? event.data.json() : {}; } catch (e) { data = { title: 'MVL', body: event.data ? event.data.text() : 'New article @ MVL!' }; }
|
||||||
const title = data.title || 'MVLog';
|
const title = data.title || 'MVL';
|
||||||
const options = {
|
const options = {
|
||||||
body: data.body || 'New video published',
|
body: data.body || 'New article @ MVL!',
|
||||||
icon: 'assets/img/moto_travel.png',
|
icon: 'assets/img/moto_travel.png',
|
||||||
badge: 'assets/img/moto_travel.png',
|
badge: 'assets/img/moto_travel.png',
|
||||||
data: { url: data.url || './' },
|
data: { url: data.url || './' },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue