Sha256: 0d6574d38d7b7bed295d41daf3fb5f35eb3f6710f7e063162a0e458967a13f74

Contents?: true

Size: 1021 Bytes

Versions: 20

Compression:

Stored size: 1021 Bytes

Contents

format :html do
  view :overlay do
    overlay [_render_open_content, render_comment_box]
  end

  def overlay content=nil
    class_up "card-slot", "_overlay d0-card-overlay bg-white", true
    @content_body = true
    frame do
      block_given? ? yield : content
    end
  end

  view :overlay_menu do
    wrap_with :div, class: "btn-group btn-group-sm" do
      [slotify_overlay_link, close_overlay_link]
    end
  end

  def slotify_overlay_link
    overlay_menu_link "external-link-square", card: card
  end

  def close_overlay_link
    overlay_menu_link :close, path: "#", "data-dismiss": "overlay"
  end

  def overlay_menu_link icon, args={}
    add_class args, "border-light text-dark p-1"
    button_link fa_icon(icon, class: "fa-lg"), args.merge(btn_type: "outline-secondary")
  end

  view :overlay_header do
    class_up "d0-card-header", "bg-white text-dark", true
    class_up "d0-card-header-title", "d-flex justify-content-between", true
    header_wrap [_render_title, _render_overlay_menu]
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
card-1.96.8 mod/standard/set/all/rich_html/overlay.rb
card-1.96.7 mod/standard/set/all/rich_html/overlay.rb
card-1.96.6 mod/standard/set/all/rich_html/overlay.rb
card-1.96.5 mod/standard/set/all/rich_html/overlay.rb
card-1.96.4 mod/standard/set/all/rich_html/overlay.rb
card-1.96.3 mod/standard/set/all/rich_html/overlay.rb
card-1.96.2 mod/standard/set/all/rich_html/overlay.rb
card-1.96.1 mod/standard/set/all/rich_html/overlay.rb
card-1.96.0 mod/standard/set/all/rich_html/overlay.rb
card-1.95.3 mod/standard/set/all/rich_html/overlay.rb
card-1.95.2 mod/standard/set/all/rich_html/overlay.rb
card-1.95.1 mod/standard/set/all/rich_html/overlay.rb
card-1.95.0 mod/standard/set/all/rich_html/overlay.rb
card-1.94.1 mod/standard/set/all/rich_html/overlay.rb
card-1.94.0 mod/standard/set/all/rich_html/overlay.rb
card-1.93.13 mod/standard/set/all/rich_html/overlay.rb
card-1.93.12 mod/standard/set/all/rich_html/overlay.rb
card-1.93.11 mod/standard/set/all/rich_html/overlay.rb
card-1.93.10 mod/standard/set/all/rich_html/overlay.rb
card-1.93.9 mod/standard/set/all/rich_html/overlay.rb