From 831236890c0d8c4d469cf4eb01b0e7be13de63d5 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 30 Mar 2012 00:13:45 -0400 Subject: [PATCH] now capturing data-state on slides and lifting it to document element classList when slide is open --- README.md | 1 + css/main.css | 23 +++++++++++++++++++++++ index.html | 15 ++++++++++++--- js/reveal.js | 22 ++++++++++++++++++++++ 4 files changed, 58 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1548b90..379aeff 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ Reveal.initialize({ - Delayed updates to URL hash to work around a bug in Chrome - Included a classList polyfill for IE9 - Support for wireless presenter keys +- States can now be applied as classes on the document element by adding data-state on a slide #### 1.1 diff --git a/css/main.css b/css/main.css index 2bff45d..6269d24 100644 --- a/css/main.css +++ b/css/main.css @@ -897,6 +897,29 @@ html { } +/********************************************* + * STATES + *********************************************/ + +.blur body { + +} + +.blur #reveal * { + color: rgba( 255, 255, 255, 0 ); + text-shadow: 0px 0px 5px #fff; + + -webkit-transition: color .8s ease, + text-shadow .8s ease; + -moz-transition: color .8s ease, + text-shadow .8s ease; + -ms-transition: color .8s ease, + text-shadow .8s ease; + -o-transition: color .8s ease, + text-shadow .8s ease; + transition: color .8s ease, + text-shadow .8s ease; +} diff --git a/index.html b/index.html index 9db7802..906376d 100644 --- a/index.html +++ b/index.html @@ -79,7 +79,7 @@

Holistic Overview

- Press SPACE to enter the slide overview. + Press SPACE to enter the slide overview!

@@ -94,7 +94,7 @@
  • Concave
  • - +

    Marvelous Unordered List

    +
    +

    Global State

    +

    + If you set data-state="something" on a slide, "something" + will be added as a class to the document element when the slide is open. Like the "blur" + effect on this slide. +

    +
    +

    Clever Quotes

    @@ -213,7 +222,7 @@ - +