Class: Weaver::NavPage
- Inherits:
-
StructuredPage
- Object
- Page
- StructuredPage
- Weaver::NavPage
- Defined in:
- lib/weaver/page_types/nav_page.rb
Overview
Pages with navigation menus
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Page
#favicon_name, #favicon_type, #onload_scripts, #scripts
Instance Method Summary collapse
- #brand(text, link = '/') ⇒ Object
-
#initialize(title, global_settings, options, &block) ⇒ NavPage
constructor
A new instance of NavPage.
- #menu(&block) ⇒ Object
Methods inherited from StructuredPage
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) ⇒ NavPage
Returns a new instance of NavPage.
7 8 9 10 |
# File 'lib/weaver/page_types/nav_page.rb', line 7 def initialize(title, global_settings, , &block) super = Menu.new end |
Instance Method Details
#brand(text, link = '/') ⇒ Object
16 17 18 19 |
# File 'lib/weaver/page_types/nav_page.rb', line 16 def brand(text, link = '/') @brand = text @brand_link = link end |
#menu(&block) ⇒ Object
12 13 14 |
# File 'lib/weaver/page_types/nav_page.rb', line 12 def (&block) .instance_eval(&block) end |