Fix story scrolly text rendering; story/trip blueprint media upload

Scrolly-section text never rendered: the inline Scrollama block ran before
the main.js bundle published window.scrollama, so it always hit its guard
and the panel text stayed display:none, leaving a blank column beside the
pinned image. Defer to DOMContentLoaded, and build the step panels before
the scrollama check so a missing bundle costs the animation, not the text.

Also fixes an invalid calc(-(...)) that dropped the mobile scrolly offset,
and drops the duplicate inline back-to-top in favour of main.js's version
(which pushes a history entry).

Blueprint changes carried over from an earlier session: story.yaml and
trip.yaml now extend the default page form so both can upload media.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-29 23:12:45 +02:00
co-authored by Claude Opus 5
parent 0ebb770bc7
commit e81c73a9ba
4 changed files with 104 additions and 49 deletions
+20 -14
View File
@@ -1,5 +1,13 @@
title: 'Trip'
# Inherits Grav's default page form — this is what supplies the page-media
# uploader (used for cover images and GPX files), plus the standard Options and
# Advanced tabs. Without it the form is standalone and can only *select*
# existing media, never upload any.
'@extends':
type: default
context: blueprints://pages
form:
fields:
tabs:
@@ -8,6 +16,7 @@ form:
fields:
content:
ordering@: 0
type: tab
title: Content
fields:
@@ -21,7 +30,15 @@ form:
type: markdown
label: Description
# Inherited from the default blueprint; relabelled because this is
# also where GPX files and cover images get uploaded.
header.media_order:
type: pagemedia
label: Images and GPX files
help: 'Upload cover images and .gpx route files here. GPX tracks are auto-detected on the map — no manual linking. The Cover Image field below picks from what is uploaded here.'
trip:
ordering@: 1
type: tab
title: Trip
fields:
@@ -78,17 +95,6 @@ form:
'manual': 'Manual — force connect only'
'intelligent_gpx': 'Intelligent GPX — suppress where route is covered'
publishing:
type: tab
title: Publishing
fields:
header.published:
type: toggle
label: Published
highlight: 1
default: 1
options:
1: 'Yes'
0: 'No'
validate:
type: bool
# No Publishing tab — it held only the Published toggle, which now comes
# from the inherited Options tab. Defining it here too would render two
# toggles bound to the same header key.