Bladeren bron

Merge branch 'fade-transition' of https://github.com/joelrbrandt/reveal.js

hakimel 13 jaren geleden
bovenliggende
commit
6a7d0cbcc9
6 gewijzigde bestanden met toevoegingen van 49 en 6 verwijderingen
  1. 1 1
      README.md
  2. 30 0
      css/reveal.css
  3. 0 0
      css/reveal.min.css
  4. 2 1
      index.html
  5. 15 3
      js/reveal.js
  6. 1 1
      js/reveal.min.js

+ 1 - 1
README.md

@@ -92,7 +92,7 @@ Reveal.initialize({
 	rollingLinks: true,
 
 	// Transition style
-	transition: 'default' // default/cube/page/concave/zoom/linear/none
+	transition: 'default' // default/cube/page/concave/zoom/linear/fade/none
 });
 ```
 

+ 30 - 0
css/reveal.css

@@ -1046,6 +1046,36 @@ body {
 	);
 }
 
+/*********************************************
+ * FADE TRANSITION
+ *********************************************/
+
+.reveal.fade .slides section,
+.reveal.fade .slides>section>section {
+    -webkit-transform: none;
+	   -moz-transform: none;
+	    -ms-transform: none;
+	     -o-transform: none;
+	        transform: none;
+
+	-webkit-transition: opacity 0.5s;
+	   -moz-transition: opacity 0.5s;
+	    -ms-transition: opacity 0.5s;
+	     -o-transition: opacity 0.5s;
+	        transition: opacity 0.5s;
+}
+
+
+.reveal.fade.overview .slides section,
+.reveal.fade.overview .slides>section>section,
+.reveal.fade.exit-overview .slides section,
+.reveal.fade.exit-overview .slides>section>section {
+	-webkit-transition: none;
+	   -moz-transition: none;
+	    -ms-transition: none;
+	     -o-transition: none;
+	        transition: none;
+}
 
 /*********************************************
  * NO TRANSITION

File diff suppressed because it is too large
+ 0 - 0
css/reveal.min.css


+ 2 - 1
index.html

@@ -151,6 +151,7 @@
 						<a href="?transition=concave#/transitions">Concave</a> -
 						<a href="?transition=zoom#/transitions">Zoom</a> -
 						<a href="?transition=linear#/transitions">Linear</a> -
+						<a href="?transition=fade#/transitions">Fade</a> -
 						<a href="?transition=none#/transitions">None</a> -
 						<a href="?#/transitions">Default</a>
 					</p>
@@ -354,7 +355,7 @@ function linkify( selector ) {
 				center: true,
 
 				theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
-				transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/none
+				transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/fade/none
 
 				// Optional libraries used to extend on reveal.js
 				dependencies: [

+ 15 - 3
js/reveal.js

@@ -51,11 +51,11 @@ var Reveal = (function(){
 			// Apply a 3D roll to links on hover
 			rollingLinks: true,
 
-			// Transition style (see /css/theme)
+			// Theme (see /css/theme)
 			theme: null,
 
 			// Transition style
-			transition: 'default', // default/cube/page/concave/zoom/linear/none
+			transition: 'default', // default/cube/page/concave/zoom/linear/fade/none
 
 			// Script dependencies to load
 			dependencies: []
@@ -106,6 +106,9 @@ var Reveal = (function(){
 		// A delay used to ativate the overview mode
 		activateOverviewTimeout = 0,
 
+		// A delay used to deativate the overview mode
+		deactivateOverviewTimeout = 0,
+
 		// Holds information about the currently ongoing touch input
 		touch = {
 			startX: 0,
@@ -583,8 +586,9 @@ var Reveal = (function(){
 		if( config.overview ) {
 
 			dom.wrapper.classList.add( 'overview' );
-
+			dom.wrapper.classList.remove( 'exit-overview' );
 			clearTimeout( activateOverviewTimeout );
+			clearTimeout( deactivateOverviewTimeout );
 
 			// Not the pretties solution, but need to let the overview 
 			// class apply first so that slides are measured accurately 
@@ -655,8 +659,16 @@ var Reveal = (function(){
 		if( config.overview ) {
 
 			clearTimeout( activateOverviewTimeout );
+			clearTimeout( deactivateOverviewTimeout );
 
 			dom.wrapper.classList.remove( 'overview' );
+			// Temporarily add a class so that transitions can do different things
+			// depending on whether they are exiting/entering overview, or just
+			// moving from slide to slide
+			dom.wrapper.classList.add( 'exit-overview' );
+			deactivateOverviewTimeout = setTimeout( function () {
+				dom.wrapper.classList.remove( 'exit-overview' );
+			}, 10);
 
 			// Select all slides
 			var slides = toArray( document.querySelectorAll( SLIDES_SELECTOR ) );

File diff suppressed because it is too large
+ 1 - 1
js/reveal.min.js


Some files were not shown because too many files changed in this diff

PANIC: session(release): write data/sessions/7/9/79f43aa6400fe7ed: no space left on device

PANIC

session(release): write data/sessions/7/9/79f43aa6400fe7ed: no space left on device
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/session@v1.0.3/session.go:204 (0xb13e07)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:80 (0x967b75)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:157 (0x9512ee)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:135 (0x951205)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:124 (0x967cc4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:114 (0x967bf6)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/recovery.go:161 (0x15baec4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/logger.go:40 (0x96b257)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:157 (0x9512ee)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:135 (0x951205)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:124 (0x967cc4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/router.go:187 (0x972959)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/router.go:304 (0x973a01)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/macaron.go:218 (0x96c572)
/my/cache/.heroku/go/go1.26.3/go/src/net/http/server.go:3311 (0x85a5cd)
/my/cache/.heroku/go/go1.26.3/go/src/net/http/server.go:2073 (0x837f6f)
/my/cache/.heroku/go/go1.26.3/go/src/runtime/asm_amd64.s:1771 (0x493380)