Sha256: d0e3ca5a2e13cf50357fb7ee227e8536c97e6f00a4957cc67296e765328adaf6
Contents?: true
Size: 1.18 KB
Versions: 2
Compression:
Stored size: 1.18 KB
Contents
- width = (attr? :width) ? (attr :width) : nil - height = (attr? :height) ? (attr :height) : nil / When the stretch class is present, block images will take the most space / they can take. Setting width and height can override that. / We pinned the 100% to height to avoid aspect ratio breakage and since / widescreen monitors are the most popular, chances are that height will / be the biggest constraint - if (has_role? 'stretch') && !((attr? :width) || (attr? :height)) - height = "100%" - unless attributes[1] == 'background' || attributes[1] == 'canvas' .imageblock(id=@id class=roles style=[("text-align: #{attr :align}" if attr? :align),("float: #{attr :float}" if attr? :float)].compact.join('; ')) - if attr? :link a.image href=(attr :link) target=(attr :window) data-preview-link=(bool_data_attr :link_preview) img src=image_uri(attr :target) alt=(attr :alt) width=(width) height=(height) style=((attr? :background) ? "background: #{attr :background}" : nil) - else img src=image_uri(attr :target) alt=(attr :alt) width=(width) height=(height) style=((attr? :background) ? "background: #{attr :background}" : nil) - if title? .title=captioned_title
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
asciidoctor-revealjs-4.0.1 | templates/image.html.slim |
asciidoctor-revealjs-4.0.0 | templates/image.html.slim |