README.adoc

February 22, 2016 ยท View on GitHub

= bespoke-fullscreen Dan Allen https://github.com/mojavelinux // Settings: :idprefix: :idseparator: - :experimental: ifdef::env-github[:badges:] // Variables: :release-version: v1.0.0 // URIs: :uri-raw-file-base: https://raw.githubusercontent.com/opendevise/bespoke-fullscreen/{release-version}

ifdef::badges[] image:https://img.shields.io/npm/v/bespoke-fullscreen.svg[npm package, link=https://www.npmjs.com/package/bespoke-fullscreen] image:https://img.shields.io/travis/opendevise/bespoke-fullscreen/master.svg[Build Status (Travis CI), link=https://travis-ci.org/opendevise/bespoke-fullscreen] endif::[]

Toggles fullscreen mode when either the kbd:[f] or kbd:[F11] key is pressed in a http://markdalgleish.com/projects/bespoke.js[Bespoke.js] presentation. Delegates to the native fullscreen mechanism of the browser.

TIP: If you have form elements in your slides, use the https://github.com/markdalgleish/bespoke-forms[bespoke-forms] plugin to prevent the fullscreen toggle from being triggered when typing kbd:[f] inside a form input or editable region.

== Example

http://opendevise.github.io/bespoke-fullscreen[View the demo] online.

This repository includes a demo folder that shows this plugin in action. To view it locally, you first need to clone this repository:

$ git clone https://github.com/opendevise/bespoke-fullscreen && cd bespoke-fullscreen

Next, install the dependencies inside the project folder using npm:

$ npm install

Finally, visit the file [path]demo/index.html in your browser to see the plugin in action.

== Download

Download the {uri-raw-file-base}/dist/bespoke-fullscreen.min.js[production mode version] or the {uri-raw-file-base}/dist/bespoke-fullscreen.js[development mode version], or use a package manager.

=== npm

$ npm install bespoke-fullscreen

=== Bower

$ bower install bespoke-fullscreen

== Usage

This plugin is shipped in a https://github.com/umdjs/umd[UMD format], meaning it is available as a CommonJS/AMD module or as a browser global.

For example, when using CommonJS modules:

var bespoke = require('bespoke'),
  fullscreen = require('bespoke-fullscreen');

bespoke.from('.deck', [
  fullscreen()
]);

When using a browser global:

bespoke.from('.deck', [
  bespoke.plugins.fullscreen()
]);

== License

http://en.wikipedia.org/wiki/MIT_License[MIT License]