Moon WidgetMoon Phase, from magick-components
Today's moon in a tile, with its phase's name: Moon drawn as it looks from the viewer's hemisphere, as from the north unless latitude puts the viewer south of the equator. The phase is worked out in the browser, so the server's HTML draws the unlit disc.
import MoonWidget from "magick-components/astrology/MoonWidget";magick-components is on npm, under MIT (how to install it), and its source is in the app's repository.
<MoonWidget background="/night-sky.jpg" />| Prop | Type | Default | Description |
|---|---|---|---|
background | string | The widget's background image, a URL, drawn to cover; none if omitted. | |
latitude | number | The viewer's latitude in degrees, south negative: south of the equator, the moon is drawn turned as it is seen from there. | |
padding | string | "10px 0 2px 0" | Space around the drawing, inside the background, as CSS padding. |