com web/pres2: Image titles: pres2reveal

[email protected] (Rasmus Lerdorf)
Newsgroups php.pres
Message-ID <[email protected]>
Commit:    ea9cb53f68c1360ec548ac5ca09541c577913380
Author:    Rasmus Lerdorf <[email protected]>         Tue, 11 Mar 2014 11:09:11 -0700
Parents:   764319cc67153c4a5851b2b07be3712c97074f97
Branches:  master

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

Log:
Image titles

Changed paths:
  M  pres2reveal


Diff:
diff --git a/pres2reveal b/pres2reveal
index 98b518c..1f50272 100755
--- a/pres2reveal
+++ b/pres2reveal
@@ -91,10 +91,15 @@ include $reveal_template;
 
 function render_image($e) {
 	global $slide_path;
-	return <<<EOB
+	$ret = '';
+	if(!empty($e['title'])) {
+		$ret .= "<p>{$e['title']}</p>\n";
+	}
+	$ret .= <<<EOB
 		<img src="/{$slide_path}/{$e[filename]}" width="{$e[width]}" height="{$e[height]}">
 
 EOB;
+	return $ret;
 }
 
 function render_blurb($e) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.