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)


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

def change_to_parent_page_at_storyline_boundary?
  !@options[:no_change_to_parent_page_at_storyline_boundary]
end

#has_home_button?Boolean

Returns:

  • (Boolean)


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

def has_home_button?
  !@options[:no_home_button]
end

#has_overview_button?Boolean

Returns:

  • (Boolean)


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

def has_overview_button?
  !@options[:no_overview_button]
end

#has_scroll_back_indicator?Boolean

Returns:

  • (Boolean)


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

def has_scroll_back_indicator?
  !!@options[:scroll_back_indicator]
end

#hide_text_on_swipe?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/pageflow/theme.rb', line 43

def hide_text_on_swipe?
  !@options[:no_hide_text_on_swipe]
end

#page_change_by_scrolling?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/pageflow/theme.rb', line 35

def page_change_by_scrolling?
  !@options[:no_page_change_by_scrolling]
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)


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

def supports_emphasized_pages?
  !!@options[:emphasized_pages]
end

#supports_scroll_indicator_modes?Boolean

Returns:

  • (Boolean)


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

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