Browse Source

updated to v2.3, initial implementation of uniformly scaled presentations (#310)

Hakim El Hattab 11 years ago
parent
commit
d1c74523a4
6 changed files with 23 additions and 20 deletions
  1. 3 16
      css/reveal.css
  2. 0 0
      css/reveal.min.css
  3. 1 1
      grunt.js
  4. 17 1
      js/reveal.js
  5. 1 1
      js/reveal.min.js
  6. 1 1
      package.json

+ 3 - 16
css/reveal.css

@@ -62,17 +62,6 @@ body {
 	text-shadow: none;
 }
 
-@media screen and (max-width: 900px), (max-height: 600px) {
-	.reveal .slides {
-		font-size: 0.82em;
-	}
-}
-
-@media screen and (max-width: 700px), (max-height: 400px) {
-	.reveal .slides {
-		font-size: 0.66em;
-	}
-}
 
 /*********************************************
  * HEADERS
@@ -525,17 +514,15 @@ body {
 	position: relative;
 	width: 100%;
 	height: 100%;
-	min-height: 640px; /* min height + 40 to account for padding */
 }
 
 .reveal .slides {
 	position: absolute;
-	max-width: 900px;
-	min-height: 600px;
-	width: 80%;
+	width: 100%;
+	height: 100%;
 	left: 50%;
 	top: 50%;
-	
+
 	overflow: visible;
 	z-index: 1;
 	text-align: center;

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


+ 1 - 1
grunt.js

@@ -12,7 +12,7 @@ module.exports = function(grunt) {
 		outputCSS: 'css/reveal.min.css',
 
 		meta: {
-			version: '2.2',
+			version: '2.3',
 			banner: 
 				'/*!\n' +
 				' * reveal.js <%= meta.version %> (<%= grunt.template.today("yyyy-mm-dd, HH:MM") %>)\n' +

+ 17 - 1
js/reveal.js

@@ -3,7 +3,7 @@
  * http://lab.hakim.se/reveal-js
  * MIT licensed
  *
- * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
+ * Copyright (C) 2011-2013 Hakim El Hattab, http://hakim.se
  */
 var Reveal = (function(){
 
@@ -16,6 +16,11 @@ var Reveal = (function(){
 
 		// Configurations defaults, can be overridden at initialization time
 		config = {
+
+			width: 1024,
+			height: 768,
+			padding: 0.1,
+
 			// Display controls in the bottom right corner
 			controls: true,
 
@@ -547,6 +552,17 @@ var Reveal = (function(){
 	 */
 	function layout() {
 
+		dom.slides.style.width = config.width + 'px';
+		dom.slides.style.height = config.height + 'px';
+
+		var availableWidth = window.innerWidth - ( window.innerWidth * config.padding * 2 ),
+			availableHeight = window.innerHeight - ( window.innerHeight * config.padding * 2 );
+
+		var scale = Math.min( availableWidth / config.width, availableHeight / config.height );
+
+		// dom.slides.style.WebkitTransform = 'translate(-50%, -50%) scale('+ scale +') translate(50%, 50%)';
+		dom.slides.style.zoom = scale;
+
 		if( config.center ) {
 
 			// Select all slides, vertical and horizontal

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


+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 	"name": "reveal.js",
-	"version": "2.2.0",
+	"version": "2.3.0",
 	"description": "The HTML Presentation Framework",
 	"homepage": "http://lab.hakim.se/reveal-js",
 	"author": {

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