diff --git a/.ignore b/.ignore new file mode 100644 index 0000000..c6a2292 --- /dev/null +++ b/.ignore @@ -0,0 +1,5 @@ +.git/ +.github/ +screenshots/ +mock-data.yml +README.md diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index db9e88b..0000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,10 +0,0 @@ -repos: - - repo: https://github.com/astral-sh/ruff-pre-commit - # Ruff version. - rev: v0.9.0 - hooks: - # Run the linter. - - id: ruff - args: [--fix] - # Run the formatter. - - id: ruff-format diff --git a/.sqlfluff b/.sqlfluff deleted file mode 100644 index 02e9b24..0000000 --- a/.sqlfluff +++ /dev/null @@ -1,11 +0,0 @@ -[sqlfluff] -exclude_rules = L016,L039,L031,L034 - -# Data Types - -extended_capitalisation_policy = lower -# Comma separated list of words to ignore for this rule - -ignore_words = None - -ignore_words_regex = None diff --git a/README.md b/README.md index 41905a0..366839d 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,56 @@ -# GitHub Blueprint +# Earthquakes Near This Screen — Screenly Edge App -Blueprint for GitHub repos. +A map centred on the screen's own location. The nearest earthquake is called out +— magnitude, place, distance, direction, how long ago — with a dashed line from +the screen to it. One quake, not a scatter of them: nothing else is marked. +Nothing moves and nothing animates; the feed is refetched every five minutes. -## Usage +The map runs full bleed and the type sits on it in glass panels: the same paper a +shade down, blurred, with a hairline edge, so the coastlines still read through +them. A screen with no location set says exactly that instead of guessing — the +map and the readout are hidden and it asks for a location. -```bash -$ rsync -aP .github /path/to/repo/ -``` +Two files: `screenly.yml` and `index.html`. No libraries, no build step, no web +fonts, nothing fetched but the data, one setting (miles or kilometres). Data +from the public USGS feed, all magnitudes, past 7 days. + +## How the map works + +The map inlined in `index.html` is a flat (equirectangular) world drawn from +public-domain Natural Earth outlines, so placing a point is arithmetic rather +than a mapping library: +longitude is a fraction across the view, latitude a fraction down. The view is a +window on it, centred on the screen and sized to hold the ten nearest quakes, +though only the closest is marked — never narrower than about 900 miles across. +It is stretched horizontally by 1/cos(latitude) so distances read correctly, +and the graticule is drawn from the same window. -## Repo Configuration +Tectonic plate boundaries are drawn over it as dashed red lines, from the plate +data that was already in this repo. They are the reason the quake sits where it +does. -* Default branch should be `master` -* If relevant, `production` is used as the production branc h -* Branch protection should be enabled on master and production with: - * `Require a pull request before merging`, `Require approvals` and `Require review from Code Owners` - * `Require status checks to pass before merging` +Every size on the page is a multiple of one unit — a hundredth of the screen's +width, or of its height scaled to 16:9, whichever is smaller — so the layout +fills the screen whatever its shape, without clipping or letterboxing. The map +window is fitted to the screen's real aspect ratio, not an assumed one. -## Code Owner +Needs a player: the coordinates, the location name, the units setting and the +CORS proxy all come from the injected `screenly.js` bridge, so it will not run +in a plain browser. The bridge hands the coordinates over as strings — they are +converted on the way in, because `+` on a string silently poisons every sum +downstream. -Adjust `.github/CODEOWNERS` to the squad that owns the repo. \ No newline at end of file +The app holds the screen until it has something to say. `ready_signal: true` +in the manifest stops the player showing the page the moment it loads, and +the app calls `screenly.signalReadyForRendering()` once the first feed +request has settled — so the previous asset stays up through the fetch +instead of the screen flashing a panel of dashes. It signals whether that +fetch succeeded or failed; a player that is never told holds the playlist for +sixty seconds and then abandons the build. A screen with no location has +nothing to wait for and signals straight away. + +## Deploy + +```bash +screenly edge-app deploy +``` diff --git a/index.html b/index.html new file mode 100644 index 0000000..13c6613 --- /dev/null +++ b/index.html @@ -0,0 +1,312 @@ + + +