From 654e90df89f96c58d5d604b0ea3f4b4ddf306125 Mon Sep 17 00:00:00 2001 From: Ophir Lojkine Date: Sat, 28 Nov 2026 23:46:30 +0000 Subject: [PATCH] Fix embedded page URLs and credit the map tiles --- examples/official-site/sqlpage/migrations/10_map.sql | 5 +++-- .../sqlpage/migrations/31_card_docs_update.sql | 4 ++-- examples/official-site/sqlpage/migrations/63_modal.sql | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/examples/official-site/sqlpage/migrations/10_map.sql b/examples/official-site/sqlpage/migrations/10_map.sql index 8ef4693b0..33a6bbe4b 100644 --- a/examples/official-site/sqlpage/migrations/10_map.sql +++ b/examples/official-site/sqlpage/migrations/10_map.sql @@ -205,7 +205,7 @@ Showing how to place a marker on a map. Useful for basic location displays like This example demonstrates using topographic map tiles, custom marker styling, and clickable markers that link to external content - perfect for educational or tourism applications. -It uses [GeoJSON](https://en.wikipedia.org/wiki/GeoJSON) to display polygons and lines. +The [GeoJSON](https://en.wikipedia.org/wiki/GeoJSON) feature here is a single point. Its coordinates are `[longitude, latitude]`; the top-level `latitude` and `longitude` set the map''s initial center. - You can generate GeoJSON data from PostGIS geometries using the [`ST_AsGeoJSON`](https://postgis.net/docs/ST_AsGeoJSON.html) function. - In spatialite, you can use the [`AsGeoJSON`](https://www.gaia-gis.it/gaia-sins/spatialite-sql-5.1.0.html#p3misc) function. @@ -216,7 +216,8 @@ It uses [GeoJSON](https://en.wikipedia.org/wiki/GeoJSON) to display polygons and { "icon": "peace", "size": 20, "link": "https://en.wikipedia.org/wiki/Nelson_Mandela", - "geojson": "{\"type\":\"Feature\", \"properties\": { \"title\":\"Mvezo, Birth Place of Nelson Mandela\" }, \"geometry\": { \"type\":\"Point\", \"coordinates\": [28.49, -31.96] }}"}]' + "geojson": "{\"type\":\"Feature\", \"properties\": { \"title\":\"Mvezo, Birth Place of Nelson Mandela\" }, \"geometry\": { \"type\":\"Point\", \"coordinates\": [28.49, -31.96] }}"}, + {"component": "text", "contents_md": "Map data: [© OpenStreetMap contributors](https://www.openstreetmap.org/copyright), SRTM. Map style: [© OpenTopoMap](https://opentopomap.org/) ([CC BY-SA](https://creativecommons.org/licenses/by-sa/3.0/))."}]' ) ), ( diff --git a/examples/official-site/sqlpage/migrations/31_card_docs_update.sql b/examples/official-site/sqlpage/migrations/31_card_docs_update.sql index 25e79b5f2..3046dcd7d 100644 --- a/examples/official-site/sqlpage/migrations/31_card_docs_update.sql +++ b/examples/official-site/sqlpage/migrations/31_card_docs_update.sql @@ -81,10 +81,10 @@ INSERT INTO example(component, description, properties) VALUES {"title": "Blue card", "color": "blue", "width": 6, "background_color": "blue-lt", "description": "The Blue Card facilitates migration of foreigners to Europe.", "icon":"currency-euro" }, {"title": "Green card", "color": "green", "background_color": "green-lt", "description": "Welcome to the United States of America !", "icon":"user-dollar" } ]')), - ('card', 'Cards with remote content', + ('card', 'The first card embeds a SQLPage chart as a page fragment. The second embeds a video player in an iframe with its own `height` and `allow` attributes.', json('[ {"component":"card", "title":"Card with embedded remote content", "columns": 2}, - {"title": "Embedded Chart", "embed": "/examples/chart.sql?_sqlpage_embed" }, + {"title": "Embedded Chart", "embed": "/examples/chart.sql" }, {"title": "Embedded Video", "embed": "https://www.youtube.com/embed/mXdgmSdaXkg", "allow": "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share", "embed_mode": "iframe", "height": "350" } ]')); diff --git a/examples/official-site/sqlpage/migrations/63_modal.sql b/examples/official-site/sqlpage/migrations/63_modal.sql index 308e40e61..0d03337ec 100644 --- a/examples/official-site/sqlpage/migrations/63_modal.sql +++ b/examples/official-site/sqlpage/migrations/63_modal.sql @@ -35,14 +35,14 @@ INSERT INTO example(component, description, properties) VALUES ]') ), ('modal', - 'Example of modal form content', + 'The button opens the dialog by its `id`. `embed` loads the form from another SQLPage file without its surrounding page shell.', json('[ { "component":"modal", "id":"my_embed_form_modal", - "title":"Embeded form content", + "title":"Embedded form", "large":true, - "embed":"/examples/form.sql?_sqlpage_embed" + "embed":"/examples/form.sql" }, {"component": "button"}, {"title":"Open a modal with a form","link":"#my_embed_form_modal"}