xddesigners / silverstripe-narrowcasting
Backend for narrowcasting applications running on RevealJS.
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:silverstripe-vendormodule
Requires
- php: >=5.6.0
- silverstripe/framework: ^4
This package is auto-updated.
Last update: 2024-12-06 19:44:14 UTC
README
Backend for narrowcasting applications running on Reveal JS.
how to install
composer require xddesigners/silverstripe-narrowcasting
Customization
Most of the Reveal JS settings are exposed trough the CMS and can be configured in the SiteConfig. These global settings are inherited by each presentation where you can overwrite these settings as desired.
This module adds the Reveal JS dependency. The added script also checks if the presentation was altered each cycle by fetching the last edit datetime and presentation id. If the presentation was changed it forces a reload.
If you want to hook onto the Reveal JS instance you can access this trough window.Reveal
.
const Reveal = window.Reveal; Reveal.addEventListener('slidechanged', function(event) { // do things on slidechanged });
If you want to include your own instance of Reveal JS you can block the requirements trough the config:
XD\Narrowcasting\Controller\DisplayController: include_requirements: false
You can inject your own js/css by extending the XD\Narrowcasting\Controller\DisplayController
class:
class DisplayControllerExtension extends Extension { public function onAfterInit() { Requirements::javascript(project() . '/client/dist/js/app.js'); Requirements::css(project() . '/client/dist/styles/app.css'); } }