uams-web / aether-passcal
PassCal events on UAMS Statamic sites through a server-rendered tag.
Package info
github.com/UAMS-Web/aether-passcal
Language:JavaScript
Type:statamic-addon
pkg:composer/uams-web/aether-passcal
Requires
- php: ^8.4
- statamic/cms: ^6.35
- symfony/html-sanitizer: ^7.4.24 || ^8.1.12
Requires (Dev)
- cweagans/composer-patches: ^2.0
- driftingly/rector-laravel: ^2.6
- larastan/larastan: ^3.13
- laravel/pint: ^1.32
- orchestra/pest-plugin-testbench: ^5.1
- orchestra/testbench: ^11.3
- pestphp/pest: ^5.3
- pestphp/pest-plugin-phpstan: ^5.2
- rector/rector: ^2.7
- uams-web/patches-orchestra-testbench-core: ^1.3.0
- uams-web/patches-pest-plugin-mutate: ^1.4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
PassCal events on UAMS Statamic sites through a server-rendered tag. PassCal is the UAMS calendar system. The add-on is part of the Aether ecosystem and lives under the UAMSWeb\Aether\Passcal namespace.
Requirements
- PHP 8.4 or later
- Statamic 6.35 or later
Installation
Check the requirements first, then:
composer require uams-web/aether-passcal:^0.1
The service provider is discovered through extra.laravel.providers. To publish the configuration file:
php artisan vendor:publish --tag=aether-passcal-config
Usage
{{ passcal:events group="Get Healthy UAMS" max="5" }}
{{ events }}
<a href="{{ url }}">{{ title }}</a>: {{ date }} {{ date_time }}
{{ /events }}
{{ if no_results }}No upcoming events.{{ /if }}
{{ /passcal:events }}
The events are fetched on the server and cached, so the page does not depend on client JavaScript. A request that fails renders no results. Fields arrive ready to print: date, repeats_until, description, contact_info and online_instructions keep an allowlist of HTML, url, online_url and thumbnail are empty unless they are web addresses, and everything else is encoded. Print the feed's thumbnail markup with {{ thumbnail_html }}; a template cannot use its feed name, thumbnail:html, because Antlers reads the colon as a path. The parameters map to PassCal's feed filters: group, tag, tag_mode, category, audience, start_date, end_date, only_starred, search and max.
| Setting | Environment variable | Default |
|---|---|---|
base_url |
PASSCAL_BASE_URL |
https://calendar.uams.edu |
cache_ttl (seconds) |
PASSCAL_CACHE_TTL |
300 |
Development
Developing against a host application is covered in the development guide, and the Packagist and Marketplace steps in the submission checklist. The gate is composer ci; AGENTS.md lists the commands.
Decisions are recorded in docs/DECISIONS.md.
Support
Report a problem or ask a question in the issue tracker. Report a security problem privately, through the security advisory form. Changes are listed on the releases page.
License
MIT. See LICENSE.