Adjust mobile index ordering and update push notification message defaults

This commit is contained in:
hbrain 2026-06-01 08:50:09 +02:00
parent 6343ebf654
commit 1f53c448e6
3 changed files with 13 additions and 6 deletions

View file

@ -257,12 +257,20 @@ $headerTitles = [
'Many Voices of Life',
'Many Views of Life',
'Modern Vagabond Log',
'Motorcycle Wanderlust Log',
'Mapped Wanderings Log',
'Miles Beyond Reason',
'Miles Beyond Reality',
'Motion, Velocity & Lunacy',
'Miles, Wind & Luck',
'Maps, Villages & Legends',
'Multi-Vision Log',
'Multi-Vista Log',
'Mutable View Log',
'Mistakes, Victories & Lessons',
'Mostly Verified Legends',
'Mostly Vague Logistics',
'Marginally Viable Leadership',
'Mileage Versus Luck',
'Mechanical Violence Log',
'Moderately Violent Leisure',
@ -303,7 +311,6 @@ $siteHeaderTitle = $headerTitles[array_rand($headerTitles)];
.meta a:hover{text-decoration:underline}
@media (max-width:900px){
.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}
#videos .video-wrapper{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>
<div class="video-row-head video-row-head-mobile">
<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">
<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; ?>
</p>
<?php if(!empty($m['teaser'])): ?><p class="description-teaser description-teaser-mobile"><?=h((string)$m['teaser'])?></p><?php endif; ?>
</div>
<div class="video-wrapper">
<video controls controlsList="nodownload" oncontextmenu="return false" preload="metadata" src="<?=h($url)?>"<?= $posterUrl !== '' ? ' poster="'.h($posterUrl).'"' : '' ?>></video>

View file

@ -175,7 +175,7 @@ function try_send_show_notification($articleRefOrJob, $jobdir, $mvlog_root = nul
$payload = json_encode([
'title' => $articleTitle,
'body' => 'New MVLog article is now visible',
'body' => 'New aticle @ MVL!',
'url' => $filterUrl,
'tag' => "mvlog-show-{$identity}",
], JSON_UNESCAPED_UNICODE);

6
sw.js
View file

@ -1,9 +1,9 @@
self.addEventListener('push', event => {
let data = {};
try { data = event.data ? event.data.json() : {}; } catch (e) { data = { title: 'MVLog', body: event.data ? event.data.text() : 'New video published' }; }
const title = data.title || 'MVLog';
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 || 'MVL';
const options = {
body: data.body || 'New video published',
body: data.body || 'New article @ MVL!',
icon: 'assets/img/moto_travel.png',
badge: 'assets/img/moto_travel.png',
data: { url: data.url || './' },