img: Support hspace and vspace attributes.
parent
9923f5db65
commit
d7cfcef54a
|
@ -156,14 +156,18 @@ sub preprocess (@) {
|
|||
$imgurl="$config{url}/$imglink";
|
||||
}
|
||||
|
||||
my $attrs='';
|
||||
foreach my $attr (qw{alt title class id hspace vspace}) {
|
||||
if (exists $params{$attr}) {
|
||||
$attrs.=" $attr=\"$params{$attr}\"";
|
||||
}
|
||||
}
|
||||
|
||||
my $imgtag='<img src="'.$imgurl.
|
||||
'" width="'.$dwidth.
|
||||
'" height="'.$dheight.'"'.
|
||||
(exists $params{alt} ? ' alt="'.$params{alt}.'"' : '').
|
||||
(exists $params{title} ? ' title="'.$params{title}.'"' : '').
|
||||
(exists $params{class} ? ' class="'.$params{class}.'"' : '').
|
||||
$attrs.
|
||||
(exists $params{align} && ! exists $params{caption} ? ' align="'.$params{align}.'"' : '').
|
||||
(exists $params{id} ? ' id="'.$params{id}.'"' : '').
|
||||
' />';
|
||||
|
||||
my $link;
|
||||
|
|
|
@ -3,6 +3,7 @@ ikiwiki (3.20100611) UNRELEASED; urgency=low
|
|||
* openid: Add openid_realm and openid_cgiurl configuration options,
|
||||
useful in a few edge case setups.
|
||||
* attachment: Show files from underlay in attachments list.
|
||||
* img: Support hspace and vspace attributes.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Fri, 11 Jun 2010 13:39:15 -0400
|
||||
|
||||
|
|
|
@ -18,7 +18,8 @@ making the image smaller than the specified size. You can also specify only
|
|||
the width or the height, and the other value will be calculated based on
|
||||
it: "200x", "x200"
|
||||
|
||||
You can also pass `alt`, `title`, `class`, `align` and `id` parameters.
|
||||
You can also pass `alt`, `title`, `class`, `align`, `id`, `hspace`, and
|
||||
`vspace` parameters.
|
||||
These are passed through unchanged to the html img tag. If you include a
|
||||
`caption` parameter, the caption will be displayed centered beneath the image.
|
||||
|
||||
|
|
Loading…
Reference in New Issue