Sha256: 50359e8e2fe71bd02b7a4299457a502db5d11d6c33ebdfacdce15c844cae5fad

Contents?: true

Size: 771 Bytes

Versions: 10

Compression:

Stored size: 771 Bytes

Contents

format :html do
  def show view, args
    content = send show_method, view, args
    show_full_page? ? wrap_with_html_page(content) : content
  end

  def show_method
    "show_#{show_layout? ? :with : :without}_page_layout"
  end

  def show_without_page_layout view, args
    @main = true if params[:is_main] || args[:main]
    args.delete(:layout)
    view ||= args[:home_view] || :open # default_nest_view
    render! view, args
  end

  def show_full_page?
    !Env.ajax?
  end

  wrapper :html_page do
    <<-HTML.strip_heredoc
      <!DOCTYPE HTML>
      <html class="h-100">
        <head>
          #{head_content}
        </head>
        #{interior}
      </html>
    HTML
  end

  def head_content
    nest card.rule_card(:head), view: :head_content
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
card-1.99.5 mod/standard/set/all/rich_html/show.rb
card-1.99.4 mod/standard/set/all/rich_html/show.rb
card-1.99.3 mod/standard/set/all/rich_html/show.rb
card-1.99.2 mod/standard/set/all/rich_html/show.rb
card-1.99.1 mod/standard/set/all/rich_html/show.rb
card-1.99.0 mod/standard/set/all/rich_html/show.rb
card-1.98.3 mod/standard/set/all/rich_html/show.rb
card-1.98.2 mod/standard/set/all/rich_html/show.rb
card-1.98.1 mod/standard/set/all/rich_html/show.rb
card-1.98.0 mod/standard/set/all/rich_html/show.rb