Class: Pageflow::Theme
- Inherits:
-
Object
- Object
- Pageflow::Theme
- Defined in:
- lib/pageflow/theme.rb
Instance Attribute Summary collapse
-
#directory_name ⇒ Object
readonly
Returns the value of attribute directory_name.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #change_to_parent_page_at_storyline_boundary? ⇒ Boolean
- #has_home_button? ⇒ Boolean
- #has_overview_button? ⇒ Boolean
- #has_scroll_back_indicator? ⇒ Boolean
- #hide_text_on_swipe? ⇒ Boolean
-
#initialize(name, options = {}) ⇒ Theme
constructor
A new instance of Theme.
- #page_change_by_scrolling? ⇒ Boolean
- #preview_image_path ⇒ Object
- #preview_thumbnail_path ⇒ Object
- #print_logo_path ⇒ Object
- #stylesheet_path ⇒ Object
- #supports_emphasized_pages? ⇒ Boolean
- #supports_hide_logo_on_pages? ⇒ Boolean
- #supports_scroll_indicator_modes? ⇒ Boolean
Constructor Details
#initialize(name, options = {}) ⇒ Theme
Returns a new instance of Theme.
5 6 7 8 9 |
# File 'lib/pageflow/theme.rb', line 5 def initialize(name, = {}) @name = name.to_s @directory_name = name.to_s @options = end |
Instance Attribute Details
#directory_name ⇒ Object (readonly)
Returns the value of attribute directory_name.
3 4 5 |
# File 'lib/pageflow/theme.rb', line 3 def directory_name @directory_name end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/pageflow/theme.rb', line 3 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/pageflow/theme.rb', line 3 def @options end |
Instance Method Details
#change_to_parent_page_at_storyline_boundary? ⇒ Boolean
55 56 57 |
# File 'lib/pageflow/theme.rb', line 55 def change_to_parent_page_at_storyline_boundary? !@options[:no_change_to_parent_page_at_storyline_boundary] end |
#has_home_button? ⇒ Boolean
27 28 29 |
# File 'lib/pageflow/theme.rb', line 27 def !@options[:no_home_button] end |
#has_overview_button? ⇒ Boolean
31 32 33 |
# File 'lib/pageflow/theme.rb', line 31 def !@options[:no_overview_button] end |
#has_scroll_back_indicator? ⇒ Boolean
35 36 37 |
# File 'lib/pageflow/theme.rb', line 35 def has_scroll_back_indicator? !!@options[:scroll_back_indicator] end |
#hide_text_on_swipe? ⇒ Boolean
59 60 61 |
# File 'lib/pageflow/theme.rb', line 59 def hide_text_on_swipe? !@options[:no_hide_text_on_swipe] end |
#page_change_by_scrolling? ⇒ Boolean
51 52 53 |
# File 'lib/pageflow/theme.rb', line 51 def page_change_by_scrolling? !@options[:no_page_change_by_scrolling] end |
#preview_image_path ⇒ Object
15 16 17 |
# File 'lib/pageflow/theme.rb', line 15 def preview_image_path "pageflow/themes/#{name}/preview.png" end |
#preview_thumbnail_path ⇒ Object
19 20 21 |
# File 'lib/pageflow/theme.rb', line 19 def preview_thumbnail_path "pageflow/themes/#{name}/preview_thumbnail.png" end |
#print_logo_path ⇒ Object
23 24 25 |
# File 'lib/pageflow/theme.rb', line 23 def print_logo_path "pageflow/themes/#{name}/logo_print.png" end |
#stylesheet_path ⇒ Object
11 12 13 |
# File 'lib/pageflow/theme.rb', line 11 def stylesheet_path "pageflow/themes/#{name}.css" end |
#supports_emphasized_pages? ⇒ Boolean
43 44 45 |
# File 'lib/pageflow/theme.rb', line 43 def supports_emphasized_pages? !!@options[:emphasized_pages] end |
#supports_hide_logo_on_pages? ⇒ Boolean
47 48 49 |
# File 'lib/pageflow/theme.rb', line 47 def supports_hide_logo_on_pages? !!@options[:hide_logo_option] end |
#supports_scroll_indicator_modes? ⇒ Boolean
39 40 41 |
# File 'lib/pageflow/theme.rb', line 39 def supports_scroll_indicator_modes? !!@options[:scroll_indicator_modes] end |