com web/pres2: Tweak the layout a bit: pres2reveal reveal_tem plate.php

[email protected] (Rasmus Lerdorf) Mon, 25 May 2015 23:55:12 +0000
Newsgroups php.pres
Message-ID <[email protected]>
Commit:    99236af3cf4e2468516dc9afe4e3e0c2ebbb3326
Author:    Rasmus Lerdorf <[email protected]>         Mon, 25 May 2015 16:55:12 -0700
Parents:   b8b94cdd8856a0067e3add9b68f0b387f946ab28
Branches:  master

Link:       http://git.php.net/?p=web/pres2.git;a=commitdiff;h=99236af3cf4e2468516dc9afe4e3e0c2ebbb3326

Log:
Tweak the layout a bit

Changed paths:
  M  pres2reveal
  M  reveal_template.php


Diff:
diff --git a/pres2reveal b/pres2reveal
index f20fcfb..8ceb44f 100755
--- a/pres2reveal
+++ b/pres2reveal
@@ -81,6 +81,9 @@ foreach($slide as $sld) {
 					$slides .= "\t\t</section>\n";
 					$slides .= "<section id=\"{$e['section']}\">\n";
 				}
+                if(empty($e['section']) && !empty($e['lines'])) {
+                    $slides .= str_repeat("<br/>\n", (int)$e['lines']);
+                }
 				break;
 		}
 	}
@@ -98,8 +101,12 @@ function render_image($e) {
 	if(!empty($e['title'])) {
 		$ret .= "<p>{$e['title']}</p>\n";
 	}
+    $align="";
+    if(!empty($e['align'])) {
+        $align = "align=\"{$e['align']}\"";
+    }
 	$ret .= <<<EOB
-		<img src="/{$slide_path}/{$e[filename]}" width="{$e[width]}" height="{$e[height]}">
+		<img src="/{$slide_path}/{$e[filename]}" $align width="{$e[width]}" height="{$e[height]}">
 
 EOB;
 	return $ret;
diff --git a/reveal_template.php b/reveal_template.php
index a5c052b..9085c06 100644
--- a/reveal_template.php
+++ b/reveal_template.php
@@ -35,6 +35,16 @@
                 color: black;
                 -webkit-text-size-adjust: none;
         }
+
+        .reveal code.shell {
+            display: block;
+            overflow-x: auto;
+            padding: 0.5em;
+            background: #000;
+            color: #ddd;
+			line-height: 120%;
+            -webkit-text-size-adjust: none;
+        }
         /* Left-align h3 and h4 if they are p elements */
         h3.p {
                 text-align: left;
@@ -63,6 +73,7 @@
 			line-height: 200%;
             -webkit-text-size-adjust: none;
 		}
+
         </style>
 
 		 <!-- Printing and PDF exports -->
@@ -119,6 +130,8 @@
 				progress: true,
 				history: true,
 				center: true,
+				width: 1024,
+				height: 768,
 
 				transition: 'slide', // none/fade/slide/convex/concave/zoom
 				transitionSpeed: 'fast',