Sha256: 6b56df1d0d42a81bd6c17ae78814bc17c12c40b5ab35404869f8a5112be5116a
Contents?: true
Size: 1.11 KB
Versions: 8
Compression:
Stored size: 1.11 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) 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
8 entries across 8 versions & 1 rubygems