Add contact page/includes and refine header action/logo styling
This commit is contained in:
parent
613d7e15a3
commit
be9da9fe86
7 changed files with 404 additions and 231 deletions
57
index.php
57
index.php
|
|
@ -249,14 +249,22 @@ $headerTitles = [
|
|||
'Mountain Valley Log',
|
||||
'Miles Versus Logic',
|
||||
'Motorcycle Voyage Log',
|
||||
'Mapped Vagabond Log',
|
||||
'Multiple Viewpoints Log',
|
||||
'Multiple Versions of Life',
|
||||
'Motion, Velocity & Luck',
|
||||
'Miles, Views & Life',
|
||||
'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',
|
||||
|
|
@ -276,20 +284,13 @@ $siteHeaderTitle = $headerTitles[array_rand($headerTitles)];
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>MVL</title>
|
||||
|
||||
<meta property="og:title" content="MVL — journal of an unreliable narrator.">
|
||||
<meta property="og:description" content="Motorcycle journeys, videos and stories..">
|
||||
<meta property="og:image" content="http://bubulescu.org/assets/img/moto_travel.png">
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="630">
|
||||
<meta property="og:title" content="MVL">
|
||||
<meta property="og:description" content="journal of an unreliable narrator.">
|
||||
<meta property="og:image" content="https://bubulescu.org/assets/img/moto_travel.png">
|
||||
<meta property="og:url" content="https://bubulescu.org">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content="MVL">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" title="MVLog RSS" href="feed.php">
|
||||
<link rel="icon" type="image/png" href="assets/img/moto_travel.png">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="style.css?v=20260531k">
|
||||
<style>
|
||||
.filter-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.55rem;align-items:center;margin:0 0 .4rem}
|
||||
.filter-input-wrap{position:relative;min-width:0}
|
||||
|
|
@ -325,7 +326,7 @@ $siteHeaderTitle = $headerTitles[array_rand($headerTitles)];
|
|||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header admin-header"><div class="brand-wrap"><a class="header-logo" href="index.php" aria-label="MVLog home"><img src="assets/img/moto_travel.png" alt=""></a><a class="brand" href="index.php"><h1><?=h($siteHeaderTitle)?></h1><p>journal of an<br>unreliable narrator.</p></a></div><button id="push-toggle" class="push-toggle" type="button" hidden aria-label="Notifications" title="Notifications"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 22a2.7 2.7 0 0 0 2.6-2h-5.2A2.7 2.7 0 0 0 12 22Zm7-6V11a7 7 0 0 0-5-6.7V3a2 2 0 0 0-4 0v1.3A7 7 0 0 0 5 11v5l-2 2v1h18v-1l-2-2Z"/></svg></button><a class="rss-link" href="feed.php" aria-label="RSS feed" title="RSS feed"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6.2 17.8a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM2.2 8.7v3.1a10 10 0 0 1 10 10h3.1A13.1 13.1 0 0 0 2.2 8.7Zm0-5.5v3.1a15.5 15.5 0 0 1 15.5 15.5h3.1A18.6 18.6 0 0 0 2.2 3.2Z"/></svg></a></header>
|
||||
<?php include __DIR__ . '/_header.php'; ?>
|
||||
<main>
|
||||
<section id="videos">
|
||||
<form method="get" class="filter-form">
|
||||
|
|
@ -399,36 +400,6 @@ $siteHeaderTitle = $headerTitles[array_rand($headerTitles)];
|
|||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<footer>Bubulescu.Org</footer>
|
||||
<script>
|
||||
(function(){
|
||||
const btn=document.getElementById('push-toggle');
|
||||
if(!btn || !('serviceWorker' in navigator) || !('PushManager' in window) || !('Notification' in window)) return;
|
||||
function b64uToUint8Array(s){ const pad='='.repeat((4-s.length%4)%4); const b64=(s+pad).replace(/-/g,'+').replace(/_/g,'/'); const raw=atob(b64); return Uint8Array.from([...raw].map(c=>c.charCodeAt(0))); }
|
||||
async function state(reg){ const sub=await reg.pushManager.getSubscription(); btn.classList.toggle('active', !!sub); btn.title=sub?'Notifications on':'Notifications'; btn.hidden=false; return sub; }
|
||||
navigator.serviceWorker.register('sw.js').then(async reg=>{
|
||||
const cfg=await fetch('push_config.php',{cache:'no-store'}).then(r=>r.json()).catch(()=>({enabled:false}));
|
||||
if(!cfg.enabled || !cfg.publicKey) return;
|
||||
await state(reg);
|
||||
btn.addEventListener('click', async ()=>{
|
||||
btn.disabled=true;
|
||||
try{
|
||||
let sub=await reg.pushManager.getSubscription();
|
||||
if(sub){
|
||||
return;
|
||||
}else{
|
||||
const perm=await Notification.requestPermission();
|
||||
if(perm!=='granted') return;
|
||||
sub=await reg.pushManager.subscribe({userVisibleOnly:true,applicationServerKey:b64uToUint8Array(cfg.publicKey)});
|
||||
await fetch('push_subscribe.php',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(sub)});
|
||||
}
|
||||
await state(reg);
|
||||
}catch(e){ alert(e.message || 'Could not update notifications'); }
|
||||
finally{ await state(reg); }
|
||||
});
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
<script src="js/map_lightbox.js?v=20260531b" defer></script>
|
||||
<?php include __DIR__ . '/_footer.php'; ?>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue