Class: Precious::Views::Layout
Constant Summary
RouteHelpers::ROUTES
Precious::Views::LocaleHelpers::NO_METHOD_MESSAGE, Precious::Views::LocaleHelpers::YAML_VARIABLE_REGEXP
Instance Attribute Summary collapse
Instance Method Summary
collapse
first_path_available, template_file, template_priority_path, template_priority_path=
included, #octicon, #rocticon, #rocticon_css
#clean_url, included, #page_route, parse_routes
included, #sprockets_asset_path, #sprockets_image_path, #sprockets_javascript_tag, #sprockets_stylesheet_tag
#t
Methods included from AppHelpers
#extract_page_dir
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
13
14
15
|
# File 'lib/gollum/views/layout.rb', line 13
def name
@name
end
|
#path ⇒ Object
Returns the value of attribute path.
13
14
15
|
# File 'lib/gollum/views/layout.rb', line 13
def path
@path
end
|
Instance Method Details
#base_url ⇒ Object
40
41
42
|
# File 'lib/gollum/views/layout.rb', line 40
def base_url
@base_url
end
|
#critic_markup ⇒ Object
72
73
74
|
# File 'lib/gollum/views/layout.rb', line 72
def critic_markup
@critic_markup
end
|
#css ⇒ Object
64
65
66
|
# File 'lib/gollum/views/layout.rb', line 64
def css @css
end
|
#custom_css ⇒ Object
48
49
50
|
# File 'lib/gollum/views/layout.rb', line 48
def custom_css
clean_url(custom_path, "custom.css")
end
|
#custom_js ⇒ Object
52
53
54
|
# File 'lib/gollum/views/layout.rb', line 52
def custom_js
clean_url(custom_path, "custom.js")
end
|
#custom_path ⇒ Object
44
45
46
|
# File 'lib/gollum/views/layout.rb', line 44
def custom_path
@base_url
end
|
#escaped_name ⇒ Object
28
29
30
|
# File 'lib/gollum/views/layout.rb', line 28
def escaped_name
CGI.escape(@name)
end
|
#has_path ⇒ Object
36
37
38
|
# File 'lib/gollum/views/layout.rb', line 36
def has_path
!@path.nil?
end
|
#history ⇒ Object
89
90
91
|
# File 'lib/gollum/views/layout.rb', line 89
def history
false
end
|
#js ⇒ Object
68
69
70
|
# File 'lib/gollum/views/layout.rb', line 68
def js @js
end
|
#latest_changes ⇒ Object
97
98
99
|
# File 'lib/gollum/views/layout.rb', line 97
def latest_changes
false
end
|
#mathjax_config_path ⇒ Object
56
57
58
|
# File 'lib/gollum/views/layout.rb', line 56
def mathjax_config_path
page_route(@mathjax_config)
end
|
#mathjax_js ⇒ Object
60
61
62
|
# File 'lib/gollum/views/layout.rb', line 60
def mathjax_js
"#{page_route('gollum/assets/mathjax/MathJax.js')}?config=TeX-AMS-MML_HTMLorMML"
end
|
#overview ⇒ Object
93
94
95
|
# File 'lib/gollum/views/layout.rb', line 93
def overview
false
end
|
#partial(name) ⇒ Object
Method should track lib/mustache.rb from Mustache project.
18
19
20
21
22
23
24
25
26
|
# File 'lib/gollum/views/layout.rb', line 18
def partial(name)
path = self.class.first_path_available(name)
begin
File.read(path)
rescue
raise if raise_on_context_miss?
""
end
end
|
#per_page_uploads ⇒ Object
76
77
78
|
# File 'lib/gollum/views/layout.rb', line 76
def per_page_uploads
@per_page_uploads
end
|
#search ⇒ Object
85
86
87
|
# File 'lib/gollum/views/layout.rb', line 85
def search
false
end
|
#show_local_time ⇒ Object
80
81
82
|
# File 'lib/gollum/views/layout.rb', line 80
def show_local_time
@show_local_time ? 'true' : 'false'
end
|
#title ⇒ Object
32
33
34
|
# File 'lib/gollum/views/layout.rb', line 32
def title
"Home"
end
|