Re: two captions for a image block
Posted by
mojavelinux on
Dec 11, 2018; 11:39pm
URL: https://discuss.asciidoctor.org/two-captions-for-a-image-block-tp6638p6647.html
You won't be able to use that template as a base since it relies on a helper. It's probably best to start from scratch using the slim reference I sent.
You probably want something like:
.imageblock
.content
.upper-title = attr('upper-caption')
img src=image_uri(attr 'target')
.title = captioned_title
You can build from there.
Cheers,
-Dan
On Tue, Dec 11, 2018 at 4:19 PM al-asciidoctor [via Asciidoctor :: Discussion] <
[hidden email]> wrote:
Thanks I have now installed both.
I have copied the content from https://github.com/asciidoctor/asciidoctor-backends/blob/master/slim/html5/block_image.html.slim to my template and adopted it with `upper-caption: (attr :upper-caption)`
The block looks like this
[[abbildung_01]]
.lower text
image::KOPIE-extracted-media/media/image1.png[align=center,title-align=center,upper-caption="upper-text"]
= block_with_title({class: 'imageblock', style: (style_value text_align: (attr :align), float: (attr :float), upper-caption: (attr :upper-caption))}, :bottom)
I have also copied the asciidoctor-1.5.8\data\stylesheets\asciidoctor-default.css and added the follwing line but I'm sure that's wrong.
.imageblock>.upper-caption{margin-bottom:0}
As I don't know what's the syntax to tell slim/html to put the upper-caption before the .content.
--