Class: Pageflow::Theme

Inherits:
Object
  • Object
show all
Defined in:
lib/pageflow/theme.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options = {})
  @name = name.to_s
  @directory_name = name.to_s
  @options = options
end

Instance Attribute Details

#directory_nameObject (readonly)

Returns the value of attribute directory_name.



3
4
5
# File 'lib/pageflow/theme.rb', line 3

def directory_name
  @directory_name
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/pageflow/theme.rb', line 3

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/pageflow/theme.rb', line 3

def options
  @options
end

Instance Method Details

#change_to_parent_page_at_storyline_boundary?Boolean

Returns:

  • (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

Returns:

  • (Boolean)


27
28
29
# File 'lib/pageflow/theme.rb', line 27

def has_home_button?
  !@options[:no_home_button]
end

#has_overview_button?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/pageflow/theme.rb', line 31

def has_overview_button?
  !@options[:no_overview_button]
end

#has_scroll_back_indicator?Boolean

Returns:

  • (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

Returns:

  • (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

Returns:

  • (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_pathObject



15
16
17
# File 'lib/pageflow/theme.rb', line 15

def preview_image_path
  "pageflow/themes/#{name}/preview.png"
end

#preview_thumbnail_pathObject



19
20
21
# File 'lib/pageflow/theme.rb', line 19

def preview_thumbnail_path
  "pageflow/themes/#{name}/preview_thumbnail.png"
end


23
24
25
# File 'lib/pageflow/theme.rb', line 23

def print_logo_path
  "pageflow/themes/#{name}/logo_print.png"
end

#stylesheet_pathObject



11
12
13
# File 'lib/pageflow/theme.rb', line 11

def stylesheet_path
  "pageflow/themes/#{name}.css"
end

#supports_emphasized_pages?Boolean

Returns:

  • (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

Returns:

  • (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

Returns:

  • (Boolean)


39
40
41
# File 'lib/pageflow/theme.rb', line 39

def supports_scroll_indicator_modes?
  !!@options[:scroll_indicator_modes]
end