Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.git/
.github/
screenshots/
mock-data.yml
README.md
10 changes: 0 additions & 10 deletions .pre-commit-config.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions .sqlfluff

This file was deleted.

63 changes: 49 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
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
```
312 changes: 312 additions & 0 deletions index.html

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions pyrightconfig.json

This file was deleted.

57 changes: 0 additions & 57 deletions ruff.toml

This file was deleted.

28 changes: 28 additions & 0 deletions screenly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
syntax: manifest_v1
id: 01KZ77RN8V1GWCGTYG53HP1V0T
description: Calls out the earthquakes around this screen on a map centred on its own location.
author: Will Cornforth
homepage_url: https://earthquake.usgs.gov
categories:
- Dashboards
entrypoint:
type: file
Comment thread
Copilot marked this conversation as resolved.
uri: index.html
ready_signal: true
settings:
units:
type: string
default_value: miles
title: Distance units
optional: true
help_text:
properties:
help_text: Units for the distances in the labels.
options:
- label: Miles
value: miles
- label: Kilometres
value: km
type: select
schema_version: 1
Loading