From 1fe1d13c600b7dfe421b3b99b833b7d5d1232724 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Thu, 23 Jul 2026 00:18:21 +0200 Subject: Add GPX trail maps to blog posts This adds a trail flow block so posts can include attached GPX files as interactive maps with route display, elevation charts, activity summaries, and start/finish markers. The trail assets are loaded only when needed, keeping the shared templates clean while vendoring the Leaflet dependencies required for offline, self-hosted map rendering. --- flowblocks/markdown.ini | 8 ++++++++ flowblocks/trail.ini | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 flowblocks/markdown.ini create mode 100644 flowblocks/trail.ini (limited to 'flowblocks') diff --git a/flowblocks/markdown.ini b/flowblocks/markdown.ini new file mode 100644 index 0000000..4aa5c3b --- /dev/null +++ b/flowblocks/markdown.ini @@ -0,0 +1,8 @@ +[block] +name = Markdown +button_label = Add text + +[fields.text] +label = Text +type = markdown +description = The written content of this part of the post. diff --git a/flowblocks/trail.ini b/flowblocks/trail.ini new file mode 100644 index 0000000..7529716 --- /dev/null +++ b/flowblocks/trail.ini @@ -0,0 +1,19 @@ +[block] +name = Trail +button_label = Add trail map + +[fields.trail_gpx] +label = Trail GPX file +type = select +source = record.attachments +item_key = {{ this._id }} +item_label = {{ this._id }} +description = Select the GPX file, representing the trail, attached to this blog post. + +[fields.activity_gpx] +label = Activity GPX file +type = select +source = record.attachments +item_key = {{ this._id }} +item_label = {{ this._id }} +description = Select the GPX file, representing the actual activity, attached to this blog post. -- cgit v1.3.1