com web/pres2: Image titles: pres2reveal
| From: | Rasmus Lerdorf | Date: | Tue, 11 Mar 2014 18:09:11 +0000 |
| Subject: | com web/pres2: Image titles: pres2reveal | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-1957@lists.php.net to get a copy of this message | ||
Commit: ea9cb53f68c1360ec548ac5ca09541c577913380
Author: Rasmus Lerdorf <rasmus@php.net> 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) {