• Stars
    star
    1,717
  • Rank 26,029 (Top 0.6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 13 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Lean, hackable, extensible slide deck framework. Previously known as CSSS.

Inspire.js

Lean, hackable, extensible slide deck framework. Create basic slides by just writing HTML and CSS, do fancy custom stuff with JS, the sky is the limit!

Getting started

  • Copy (and rename) blank.html somewhere
  • Also copy talk.css, theme.css
  • Add Your Own Content
  • Add talk-specific styling to talk.css

Previously known as CSSS.

If you were using CSSS and would rather stay at it, run git checkout v1.0.0 and stay there.

Migrating from CSSS

  • Almost all HTML syntax is the same! The same JS events are still fired. So, very little should break.
  • slideshow.css is now inspire.css
  • slideshow.js is now inspire.js
  • You don't need to run JS to create a slideshow, it is created automatically.
  • The SlideShow JS class is now Inspire
  • The slideshow JS variable is now Inspire
  • Presenter view will not be loaded unless there is at least one class="presenter-notes" item.
  • The CSS Controls plugin is now gone. Use Mavo if you need this functionality.
  • The CSS Snippets plugin is now gone. We will soon add a much better one, extracted based on the live demo script in https://github.com/leaverou/talks.
  • Incrementable is no longer a plugin. Use the separate script from https://github.com/leaverou/incrementable.
  • reusable.css has now been merged into the default theme, theme.css.
  • data-import is now data-insert

API FAQ

Running code after any imports have loaded

await Inspire.importsLoaded;
// code to run after imports have loaded

Note that await needs to be inside an async function otherwise it will error. However, this could just be a self-executing async function.

Running code after a specific plugin has loaded

await Inspire.importsLoaded;
await Inspire.plugins.loaded.PLUGIN_ID.loaded;
// code to run after the plugin with id PLUGIN_ID has loaded and executed

or:

await Inspire.loadPlugin(PLUGIN_ID);
// code to run after the plugin with id PLUGIN_ID has loaded and executed

The second example would load the plugin if it hasn't otherwise been loaded, but if it will never be loaded twice.

Running code when a specific slide is displayed

You can do this via the slidechange hook:

Inspire.hooks.add("slidechange", env => {
	if (Inspire.currentSlide.id === "slide-id") {
		// Code to run
	}
});

or, via an event:

document.addEventListener("slidechange", evt => {
	if (Inspire.currentSlide.id === "slide-id") {
		// Code to run
	}
});

Running code when a specific slide is displayed for the first time

You can do this via the slidechange hook:

Inspire.hooks.add("slidechange", env => {
	if (Inspire.currentSlide.id === "slide-id" && env.firstTime) {
		// Code to run
	}
});

or, via an event:

document.addEventListener("slidechange", evt => {
	if (Inspire.currentSlide.id === "slide-id" && evt.firstTime) {
		// Code to run
	}
});

or:

$("#slide-id").addEventListener("slidechange", evt => {
	// Code to run
}, {once: true});

Running code after a specific slide has been displayed

You can do this via the slidechange hook:

Inspire.hooks.add("slidechange", env => {
	if (env.prevSlide.id === "slide-id") {
		// Code to run
	}
});

or, via an event:

document.addEventListener("slidechange", evt => {
	if (evt.prevSlide.id === "slide-id") {
		// Code to run
	}
});

More Repositories

1

awesomplete

Ultra lightweight, usable, beautiful autocomplete with zero dependencies.
JavaScript
6,931
star
2

prefixfree

Break free from CSS prefix hell!
JavaScript
3,841
star
3

animatable

One property, two values, endless possiblities
HTML
2,580
star
4

bliss

Blissful JavaScript
JavaScript
2,384
star
5

color.js

Color conversion & manipulation library by the editors of the CSS Color specifications
JavaScript
1,581
star
6

css3patterns

The popular CSS3 patterns gallery, now on Github :)
HTML
1,415
star
7

stretchy

Form element autosizing, the way it should be
JavaScript
1,272
star
8

dabblet

An interactive CSS playground
JavaScript
810
star
9

dpi

dpi love - Easily find the DPI/PPI of any screen
JavaScript
748
star
10

multirange

A tiny polyfill for HTML5 multi-handle sliders
CSS
605
star
11

conic-gradient

Polyfill for conic-gradient() and repeating-conic-gradient()
HTML
486
star
12

rety

Record typing on one or more editors and replay it at will, to simulate live coding
JavaScript
383
star
13

parsel

A tiny, permissive CSS selector parser
TypeScript
361
star
14

md-block

A custom element for rendering stylable (light DOM) Markdown
JavaScript
283
star
15

regexplained

JavaScript
273
star
16

chainvas

Make APIs suck less
HTML
262
star
17

css.land

Hands on CSS demos
HTML
213
star
18

css3test

How does your browser score for its CSS3 support?
JavaScript
211
star
19

nudeui

Lea's kitchen sink of form components. WIP. Try at your own risk or come back later.
JavaScript
197
star
20

HTML5-Progress-polyfill

Polyfill for the HTML5 <progress> element
JavaScript
178
star
21

rgba.php

Script for automatic generation of one pixel alpha-transparent images for non-RGBA browsers to easily emulate RGBA colors in backgrounds
PHP
176
star
22

cubic-bezier

Playground for CSS bezier-based timing functions
JavaScript
169
star
23

markapp

Building apps by authoring HTML
CSS
134
star
24

duoload

Simple, client-side comparison of website loading behavior
CSS
130
star
25

play.csssecrets.io

CSS Secrets Book live demos
CSS
119
star
26

talks

All my talks (move still in progress)
HTML
91
star
27

incrementable

Increment length values in textfields
JavaScript
83
star
28

corner-shape

Play with corner-shape before itโ€™s implemented!
JavaScript
75
star
29

StronglyTyped

A library for strongly typed properties & global variables in JavaScript
JavaScript
70
star
30

css-colors

Share & convert CSS colors
JavaScript
62
star
31

bubbly

[Unfinished] CSS speech bubbles made easy!
JavaScript
50
star
32

whathecolor

CSS
47
star
33

html-syntax-guidelines

47
star
34

css-almanac

Repo for planning & voting on which stats to study
SCSS
33
star
35

forkgasm

Lea & Chrisโ€™ culinary adventures
HTML
32
star
36

talks-list

Automatic talks list, generated from JSON. Unmaintained, use Mavo instead.
JavaScript
29
star
37

chroma-zone

Slides for my talk โ€œThe Chroma Zone: Engineering Color on the Webโ€
CSS
21
star
38

lea.verou.me

Towards a serverless lea.verou.me! WIP, either help out or move along.
JavaScript
17
star
39

htest

Declarative, boilerplate-free unit testing
JavaScript
17
star
40

mavoice

Prioritize features for open source projects
CSS
15
star
41

issue-closing

View issue closing stats for any repo!
HTML
14
star
42

missing-slice

The Missing Slice talk slides
HTML
12
star
43

hci.mit.edu

WIP. Preview:
HTML
12
star
44

tweeplus

Longer tweets, no strings attached.
JavaScript
11
star
45

leaverou.github.io

Just a data repo, I don't intend to put a website here for now
10
star
46

mygraine

A migraine tracker, built with Mavo. Work in progress, come back later.
HTML
9
star
47

bytesizematters

JavaScript
8
star
48

homesearch

A sample Mavo app for people looking for housing to store info about and compare the homes they are trying to decide between
HTML
6
star
49

uist2017

Website for ACM UIST 2017
HTML
6
star
50

feedback

Easily save & share lists of tweets and own your data. Made with Mavo.
HTML
5
star
51

expenses

App to generate summary of expenses, made with Mavo
CSS
4
star
52

my-lifesheets

HTML
4
star
53

rework-utils

Utilities to explore ASTs generated by the Rework CSS parser. Originally written for the Web Almanac.
JavaScript
3
star
54

testlib

Just a test, move along
JavaScript
2
star
55

mv-data

2
star
56

contacts

1
star
57

zoe-eats

Baby food log, made with Mavo
1
star
58

zoelearns.com

JavaScript
1
star
59

website

1
star
60

pathed

Get/set/subset deep objects via readable, extensible paths. WIP.
JavaScript
1
star