Class: Dedalus::PatternLibrary::ApplicationTemplate

Inherits:
Template show all
Defined in:
lib/dedalus/pattern_library/templates/app_template.rb

Instance Attribute Summary collapse

Attributes inherited from Element

#background_color, #color, #height, #height_percent, #margin, #offset, #padding, #position, #shown, #width, #width_percent, #z_order

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Element

#big_font, #code_font, #draw_bounding_box, #font, #huge_font, #initialize, #record?, #tiny_font, #view, #window

Constructor Details

This class inherits a constructor from Dedalus::Element

Instance Attribute Details

#current_entry_nameObject

Returns the value of attribute current_entry_name.



4
5
6
# File 'lib/dedalus/pattern_library/templates/app_template.rb', line 4

def current_entry_name
  @current_entry_name
end

#library_itemsObject

Returns the value of attribute library_items.



5
6
7
# File 'lib/dedalus/pattern_library/templates/app_template.rb', line 5

def library_items
  @library_items
end

#library_nameObject

Returns the value of attribute library_name.



4
5
6
# File 'lib/dedalus/pattern_library/templates/app_template.rb', line 4

def library_name
  @library_name
end

#library_section_tabsObject

Returns the value of attribute library_section_tabs.



4
5
6
# File 'lib/dedalus/pattern_library/templates/app_template.rb', line 4

def library_section_tabs
  @library_section_tabs
end

#library_sectionsObject

Returns the value of attribute library_sections.



5
6
7
# File 'lib/dedalus/pattern_library/templates/app_template.rb', line 5

def library_sections
  @library_sections
end

Class Method Details

.descriptionObject



37
38
39
# File 'lib/dedalus/pattern_library/templates/app_template.rb', line 37

def self.description
  "pattern library template"
end

.example_dataObject



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/dedalus/pattern_library/templates/app_template.rb', line 21

def self.example_data
  {
    library_name: "Ipsum Librarum",
    library_sections: [ {
      title: "Welcome",
      subtitle: "Fake section",
      color: 'blue',
      show_table: false,
      items: []
    } ], #, LibraryEntry.example_data ],
    library_section_tabs: [ LibrarySectionTab.example_data ],
    library_items: [], # LibraryItemExample.example_data ],
    current_entry_name: 'Welcome'
  }
end

Instance Method Details

#layoutObject



13
14
15
16
17
18
19
# File 'lib/dedalus/pattern_library/templates/app_template.rb', line 13

def layout
  [
    app_header,
    [ sidebar, yield ],
    app_footer
  ]
end

#showObject



7
8
9
10
11
# File 'lib/dedalus/pattern_library/templates/app_template.rb', line 7

def show
  layout do
    library_page
  end
end