Skip to content

Modules

Ondřej Žára edited this page Jun 4, 2013 · 21 revisions

Available modules in V3

To register new module, add Slides.modules.YOURMODULE = YOURCONFIG; to your HTML document. To deactivate a default module, add delete Slides.module.MODULENAME;.

Keyboard control

  • Implements keyboard-based navigation (arrows, PageUp/Down, Space, Backspace, Home/End)
  • Default configuration:
Slides.modules.keyboard = true;

URL

  • Persists current slide number to the URL; implements browser history and permalinks
  • Default configuration:
Slides.modules.url = true;

Title

  • Creates and updates browser window title
  • Default configuration:
Slides.modules.title = "(%n) %t";
  • Available template replacements:
    • %t = Presentation title
    • %s = Current slide's title
    • %n = Current slide's number
    • %c = Total slide count

Progress

  • Maintains an element with progress information and adjust its width
  • Progress node will be appended to a parent node specified by a CSS selector
  • Default configuration:
Slides.modules.progress = {
  template: "%n/%c",
  parent: "footer"
};

Time

  • Maintains an element and adjust its width based on an expected presentation duration
  • Time node will be appended to a parent node specified by a CSS selector
  • Default configuration:
Slides.modules.time = {
  length: 10*60*1000,
  parent: "footer"
};

Skin

  • Applies a stylesheet
  • Default configuration:
Slides.modules.skin = "default";

Language

  • Toggles content with respect to a currently selected language (use the "L" key)
  • Shows/hides elements with lang=xx attribute
  • Default configuration:
Slides.modules.language = ["en"];

Transition

  • Uses animated transition effect when switching slides
  • Default configuration:
Slides.modules.transition = "horizontal";
  • Available transitions: none vertical horizontal blend corner

Overview

  • Adds support for an overview mode (use the "O" key)
  • Default configuration:
Slides.modules.overview = true;

Help

  • Adds support for a help popup (use the "?" key)
  • Default configuration:
Slides.modules.help = true;

Fontsize

  • Adds support for switching font size (hit "B"igger, "S"maller, "N"ormal)
  • Default configuration:
Slides.modules.fontsize = {
  sizes: ["100%" ,"120%", "150%", "200%", "250%", "350%"],
  normal: "150%"
};

Syntax

  • Implements syntax highlighting
  • Put code in code[data-syntax=xx] HTML
  • Default configuration:
Slides.modules.syntax = true;

Window

  • Offers a Presenter's window on a second monitor
  • Displays metadata (current slide index, remaining time, comments (if available), next slide title)
  • Default configuration:
Slides.modules.window = true;

Touch

  • Implements support for touch-based control
  • Tap left/right part of screen; swipe horizontally/vertically; pinch to adjust font size
  • Default configuration:
Slides.modules.touch = {
  tap: true,
  swipe: true,
  pinch: true
};
Clone this wiki locally