Module: Card::Set::All::Html::Frame::HtmlFormat

Extended by:
Card::Set::AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod004-format/all/html/frame.rb

Instance Method Summary collapse

Instance Method Details

#frame(&block) ⇒ Object



16
17
18
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/frame.rb', line 16

def frame &block
  standard_frame(&block)
end

#frame_headerObject



36
37
38
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/frame.rb', line 36

def frame_header
  _render_header
end

#frame_helpObject



40
41
42
43
44
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/frame.rb', line 40

def frame_help
  with_class_up "help-text", "alert alert-info" do
    _render :help
  end
end

#panel(&block) ⇒ Object



46
47
48
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/frame.rb', line 46

def panel &block
  wrap_with :div, class: classy("d0-card-frame"), &block
end

#standard_frame(slot = true, &block) ⇒ Object



20
21
22
23
24
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/frame.rb', line 20

def standard_frame slot=true, &block
  with_frame slot do
    wrap_body(&block) if block_given?
  end
end

#view: flashObject



9
10
11
12
13
14
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/frame.rb', line 9

view :flash, cache: :never, unknown: true, perms: :none do
  flash_notice = params[:flash] || Env.success.flash
  return "" unless flash_notice.present? && focal?

  Array(flash_notice).join "\n"
end

#with_frame(slot = true, header = frame_header, slot_opts = {}) ⇒ Object



26
27
28
29
30
31
32
33
34
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/frame.rb', line 26

def with_frame slot=true, header=frame_header, slot_opts={}
  voo.hide :help
  add_name_context
  wrap slot, slot_opts do
    panel do
      [header, frame_help, render_flash, (yield if block_given?)]
    end
  end
end