tree: 33f4279be9da5376cf29a97916b5ee6e92d37901 [path history] [tgz]
  1. LICENSE
  2. plugin.js
  3. README.md
  4. style.css
  5. VERSION
inst/reveal.js-5.1.0/plugin/customcontrols/README.md

Custom controls

This plugin allows to add responsive custom controls to reveal.js which allow arbitrary positioning, layout, and behaviour of the controls.

Check out the demo

Setup

To use the plugin include

<!-- Font awesome is used by several plugins -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/js/all.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<!-- Custom controls plugin -->
<script src="https://cdn.jsdelivr.net/npm/reveal.js-plugins@latest/customcontrols/plugin.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/reveal.js-plugins@latest/customcontrols/style.css">

to the header of your presentation and configure reveal.js and the plugin by

Reveal.initialize({
  customcontrols: {
    // add configuration here
  },
  // ...
  plugins: [ RevealCustomControls ],
  // ...
});

Configuration

The plugin can be configured by adding custom controls and changing the layout of the slide number, e.g., by:

Reveal.initialize({
	// ...
  customcontrols: {
    controls: [
      {
        id: 'toggle-overview',
        title: 'Toggle overview (O)',
        icon: '<i class="fa fa-th"></i>',
        action: 'Reveal.toggleOverview();'
      }
    ]
  },
  // ...

});

The id and title are optional. The configuration should be self explaining and any number of controls can be added. The style file can be altered to control the layout and responsiveness of the custom controls.

License

MIT licensed

Copyright (C) 2023 Asvin Goel