Sha256: a4b38430e7873d2776a15c6d79c2c7e64ccda9843a5340845b64fdf9c104cd83

Contents?: true

Size: 502 Bytes

Versions: 42

Compression:

Stored size: 502 Bytes

Contents

- @image = ::Virgo::Image.find_by(name: @attributes[:name].to_s)

- if @image
  - opts = {}

  - opts.merge!(alt: @image.alt_text) if @image.alt_text.present?

  .image-wrap{class: ('with-caption' if @attributes[:caption].present?), data: {id: @image.id}}
    = image_tag @image.image.url(:content), opts

    - if @attributes[:caption].present?
      .image-caption
        = @attributes[:caption].to_s

    - if @image.credit.present?
      .image-credit
        %span.credit-body= raw @image.credit

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
virgo-0.3.17 app/views/virgo/shortcode_templates/image.haml
virgo-0.3.16 app/views/virgo/shortcode_templates/image.haml
virgo-0.3.15 app/views/virgo/shortcode_templates/image.haml
virgo-0.3.14 app/views/virgo/shortcode_templates/image.haml
virgo-0.3.13 app/views/virgo/shortcode_templates/image.haml
virgo-0.3.12 app/views/virgo/shortcode_templates/image.haml
virgo-0.3.11 app/views/virgo/shortcode_templates/image.haml
virgo-0.3.10 app/views/virgo/shortcode_templates/image.haml
virgo-0.3.9 app/views/virgo/shortcode_templates/image.haml
virgo-0.3.8 app/views/virgo/shortcode_templates/image.haml
virgo-0.3.7 app/views/virgo/shortcode_templates/image.haml
virgo-0.3.6 app/views/virgo/shortcode_templates/image.haml
virgo-0.3.4 app/views/virgo/shortcode_templates/image.haml
virgo-0.3.3 app/views/virgo/shortcode_templates/image.haml
virgo-0.3.2 app/views/virgo/shortcode_templates/image.haml
virgo-0.3.1 app/views/virgo/shortcode_templates/image.haml
virgo-0.3 app/views/virgo/shortcode_templates/image.haml
virgo-0.2.9 app/views/virgo/shortcode_templates/image.haml
virgo-0.2.8 app/views/virgo/shortcode_templates/image.haml
virgo-0.2.7 app/views/virgo/shortcode_templates/image.haml