com web/pres2: tweaks: display.php pres2reveal reveal.js

[email protected] (Rasmus Lerdorf) Mon, 09 May 2016 17:49:14 +0000
Newsgroups php.pres
Message-ID <[email protected]>
Commit:    7eecf8ff34ecf774137142a07e1cd3c2376814dc
Author:    Rasmus Lerdorf <[email protected]>         Mon, 9 May 2016 10:49:04 -0700
Parents:   cd2807b0842ea2a23d13a1eb5bd43c2b0fd517da
Branches:  master

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

Log:
tweaks

Changed paths:
  M  display.php
  M  pres2reveal
  M  reveal.js


Diff:
diff --git a/display.php b/display.php
index b1daf50..763d477 100644
--- a/display.php
+++ b/display.php
@@ -1718,7 +1718,7 @@ class pdf extends display {
                 switch($example->type) {
                     case 'genimage':
                         $fn = tempnam("/tmp","pres2");
-                        $img = file_get_contents("http://".$_SERVER['HTTP_HOST']."/".$this->baseDir.$this->slideDir.$example->filename,"r");
+                        $img = file_get_contents("http://".$_SERVER['HTTP_HOST']."/".$this->baseDir.$this->slideDir.$example->filename);
                         $fp_out = fopen($fn,"wb");
                         fwrite($fp_out,$img);
                         fclose($fp_out);
diff --git a/pres2reveal b/pres2reveal
index 8ceb44f..c22bedb 100755
--- a/pres2reveal
+++ b/pres2reveal
@@ -59,7 +59,7 @@ foreach($slide as $sld) {
 			case 'literal':
 			case 'example':
 				$fnc ="render_$k";
-				if(is_array(e)) {
+				if(is_array($e)) {
 					foreach($e as $ee) {
 						$slides .= $fnc($ee);
 					}
@@ -138,7 +138,7 @@ function render_link($link) {
     } else {
 		$text = $link['href'];
 	}
-	return "\t\t<div align=\"{$link['align']}\" style=\"font-size: {$link['fontsize']}; color: {$link['textcolor']}; margin-left: {$link['marginleft']}; margin-right: {$link['marginright']}; margin-top: {$link['margintop']}; margin-bottom: {$link['marginbottom']};\">{$link['leader']}<a href=\"{$link['href']}\" target=\"{$link['target']}\">".markup_text($text)."</a></div><br />\n";
+	return "\t\t<div align=\"{$link['align']}\" style=\"font-size: {$link['fontsize']}; color: {$link['textcolor']}; text-align: {$link['align']}; margin-left: {$link['marginleft']}; margin-right: {$link['marginright']}; margin-top: {$link['margintop']}; margin-bottom: {$link['marginbottom']};\">{$link['leader']}<a href=\"{$link['href']}\" target=\"{$link['target']}\">".markup_text($text)."</a></div>\n";
 }
 
 function render_list($e) {
@@ -161,6 +161,8 @@ function render_list($e) {
 		$text = markup_text((string)$v);
 		if(!empty($v['fontsize'])) $style .= "font-size: ".$v['fontsize'].';';
 		if(!empty($v['lineheight'])) $style .= "line-height: ".$v['lineheight'].';';
+		if(!empty($v['marginleft'])) $style .= "margin-left: ".$v['marginleft'].';';
+		if(!empty($v['type'])) $style .= "list-style-type: ".$v['type'].';';
 		if(!empty($style)) $style = " style=\"$style\"";
 		$ret .= "\t\t\t<li$style>$text</li>\n";
 	}
diff --git a/reveal.js b/reveal.js
index 9a89e39..539e774 160000
--- a/reveal.js
+++ b/reveal.js
@@ -1 +1 @@
-Subproject commit 9a89e39367dda0d39a618c9672df59b95b7eb3a8
+Subproject commit 539e774d31f91676bcc3f75e28168921cd27d819