Skip to content

Comments

Refactor theme script for embed mode support#241

Open
gilbrotheraway wants to merge 1 commit intokoala73:mainfrom
gilbrotheraway:gilbrotheraway-patch-1
Open

Refactor theme script for embed mode support#241
gilbrotheraway wants to merge 1 commit intokoala73:mainfrom
gilbrotheraway:gilbrotheraway-patch-1

Conversation

@gilbrotheraway
Copy link

@gilbrotheraway gilbrotheraway commented Feb 23, 2026

Enhance theme script to support embed mode so people can embed specific features(map, etc)

Summary

This PR introduces a lightweight "embed mode" to allow external dashboards (like Glance) to embed the application via an iframe without the surrounding UI clutter.

Changes included:

  • Updated the inline theme script in index.html to detect an ?embed=true URL parameter before the first paint.
  • Added CSS to index.html that hides the header, news/data panels, resize handles, and skeleton loaders when the embed-mode class is active on the body.
  • Ensures the map stretches to fill the entire viewport (100vh) for a seamless embedded widget experience.

Type of change

  • Bug fix
  • New feature
  • New data source / feed
  • New map layer
  • Refactor / code cleanup
  • Documentation
  • CI / Build / Infrastructure

Affected areas

  • Map / Globe
  • News panels / RSS feeds
  • AI Insights / World Brief
  • Market Radar / Crypto
  • Desktop app (Tauri)
  • API endpoints (/api/*)
  • Config / Settings
  • Other: index.html (Boot script and critical CSS)

Checklist

  • Tested on worldmonitor.app variant
  • Tested on tech.worldmonitor.app variant (if applicable)
  • New RSS feed domains added to api/rss-proxy.js allowlist (if adding feeds)
  • No API keys or secrets committed
  • TypeScript compiles without errors (npm run typecheck)

Screenshots

(N/A - UI only changes visually when the ?embed=true parameter is present)

Example Glance iframe widget configuration:

- type: iframe
  source: "https://worldmonitor.app/?embed=true&view=global&layers=military,flights,ais"
  height: 450 # adjust to fit your dashboard

Note: You can easily grab the exact view and layers URL string by arranging the map how you want it in your main app, clicking your "Copy Link" header button, and appending &embed=true to it.

Enhance theme script to support embed mode so people can embed specific features(map, etc)
@vercel
Copy link

vercel bot commented Feb 23, 2026

@gilbrotheraway is attempting to deploy a commit to the Elie Team on Vercel.

A member of the Team first needs to authorize it.

@gilbrotheraway
Copy link
Author

@koala73

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant