Class: Weaver::StructuredPage
- Defined in:
- lib/weaver/page_types/structured_page.rb
Overview
Page that uses columns and rows
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Page
#favicon_name, #favicon_type, #onload_scripts, #scripts
Instance Method Summary collapse
- #header(&block) ⇒ Object
-
#initialize(title, global_settings, options, &block) ⇒ StructuredPage
constructor
A new instance of StructuredPage.
- #row(options = {}, &block) ⇒ Object
Methods inherited from Page
#background, #create_anchor, #generate, #on_page_load, #request_css, #request_js, #root, #set_favicon_path, #set_favicon_type, #top, #write_script_once
Constructor Details
#initialize(title, global_settings, options, &block) ⇒ StructuredPage
Returns a new instance of StructuredPage.
6 7 8 9 |
# File 'lib/weaver/page_types/structured_page.rb', line 6 def initialize(title, global_settings, , &block) @rows = [] super end |
Instance Method Details
#header(&block) ⇒ Object
11 12 13 |
# File 'lib/weaver/page_types/structured_page.rb', line 11 def header(&block) row(class: 'wrapper white-bg page-heading', &block) end |
#row(options = {}, &block) ⇒ Object
15 16 17 18 19 |
# File 'lib/weaver/page_types/structured_page.rb', line 15 def row( = {}, &block) r = Row.new(self, @anchors, ) r.instance_eval(&block) @rows << r end |