Download the PHP package scottboms/moon-phases without Composer
On this page you can find all versions of the php package scottboms/moon-phases. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download scottboms/moon-phases
More information about scottboms/moon-phases
Files in scottboms/moon-phases
Package moon-phases
Short Description Moon Phases for Kirby.
License MIT
Homepage https://github.com/scottboms/kirby-moon-phases
Informations about the package moon-phases
Moon Phases for Kirby
A Kirby 5 plugin that provides moon phase information as a custom Panel Section (type: moon-phases) and to templates using Template Methods ($site->moonPhases() and helpers.
Features
- Current moon phase name
- Number of days until the next full moon
- Number of days until the next new moon
- API-backed phase/illumination percentage data (ipgeolocation.io astronomy endpoint)
- Configurable cache
- Customize SVG icons for moon phases (built-in preset or custom file map)
Requirements
- Kirby 5.x
- ipgeolocation.io API key
Installation
Kirby CLI
Git Submodule
Copy and Paste
- Download the contents of this repository as a Zip file.
- Rename the extracted folder to
moon-phasesand copy it into thesite/plugins/directory in your Kirby project.
Configuration
Site Config
In site/config/config.php:
Section
The plugin's custom Panel Section can be added to a blueprint and adopts any defined configuration options.
Template Usage
You can use the following site helper methods in your templates. Use 1 or 0 to set the precision level of the values returned. moonIllumination() returns a percentage value, so 0 means whole-percent rounding.
$site->moonPhaseIcon() returns an SVG string you can render in templates.
Convenience Snippet
A convenience snippet is provided to provide a simple HTML structure to wrap the above values and can be added to any template using:
Disclaimer
This plugin is provided "as is" with no guarantee. Use it at your own risk and always test before using it in a production environment. If you identify an issue, typo, etc, please create a new issue so I can investigate.