yard-sketchup 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +15 -15
- data/lib/yard-sketchup/patches/c_base_handler.rb +52 -52
- data/lib/yard-sketchup/stubs/autoload.rb +134 -134
- data/lib/yard-sketchup/templates/changelog/fulldoc/text/setup.rb +44 -44
- data/lib/yard-sketchup/templates/coverage/fulldoc/text/setup.rb +41 -41
- data/lib/yard-sketchup/templates/default/fulldoc/html/css/rubyapi.css +10 -10
- data/lib/yard-sketchup/templates/default/fulldoc/html/css/sketchup.css +141 -141
- data/lib/yard-sketchup/templates/default/fulldoc/html/favicon.ico +0 -0
- data/lib/yard-sketchup/templates/default/fulldoc/html/full_list_object_types.erb +1 -1
- data/lib/yard-sketchup/templates/default/fulldoc/html/images/Ruby.svg +1 -1
- data/lib/yard-sketchup/templates/default/fulldoc/html/images/sketchup-logo.svg +19 -19
- data/lib/yard-sketchup/templates/default/fulldoc/html/images/trimble-logo-white.svg +29 -29
- data/lib/yard-sketchup/templates/default/fulldoc/html/js/sketchup.js +37 -37
- data/lib/yard-sketchup/templates/default/fulldoc/html/setup.rb +75 -75
- data/lib/yard-sketchup/templates/default/layout/html/embed_meta.erb +78 -78
- data/lib/yard-sketchup/templates/default/layout/html/footer.erb +4 -4
- data/lib/yard-sketchup/templates/default/layout/html/headers.erb +15 -15
- data/lib/yard-sketchup/templates/default/layout/html/layout.erb +56 -56
- data/lib/yard-sketchup/templates/default/layout/html/navbar.erb +36 -36
- data/lib/yard-sketchup/templates/default/layout/html/setup.rb +25 -25
- data/lib/yard-sketchup/templates/default/method_details/html/method_signature.erb +25 -25
- data/lib/yard-sketchup/templates/default/method_details/setup.rb +11 -11
- data/lib/yard-sketchup/templates/default/module/html/box_info.erb +37 -37
- data/lib/yard-sketchup/templates/default/module/html/constant_summary.erb +17 -17
- data/lib/yard-sketchup/templates/default/module/html/method_summary.erb +18 -18
- data/lib/yard-sketchup/templates/inheritance/fulldoc/text/setup.rb +54 -54
- data/lib/yard-sketchup/templates/stubs/fulldoc/text/setup.rb +372 -361
- data/lib/yard-sketchup/templates/versions/fulldoc/text/setup.rb +25 -25
- data/lib/yard-sketchup/version.rb +3 -3
- data/lib/yard-sketchup/yard/html_helper.rb +16 -16
- data/lib/yard-sketchup.rb +37 -37
- data/yard-sketchup.gemspec +26 -26
- metadata +7 -7
@@ -1,75 +1,75 @@
|
|
1
|
-
# Helpers:
|
2
|
-
|
3
|
-
# Copy verbatim an asset file to the target output. By default it uses the
|
4
|
-
# same relative path as the source for the target path.
|
5
|
-
def copy(source, target = nil)
|
6
|
-
path = self.class.find_file(source)
|
7
|
-
# puts "copy(#{source}, #{target})"
|
8
|
-
# puts "> path: #{path}"
|
9
|
-
raise ArgumentError, "no file for '#{source}' in #{self.class.path}" unless path
|
10
|
-
target ||= source
|
11
|
-
asset(target, File.binread(path))
|
12
|
-
end
|
13
|
-
|
14
|
-
# Template overrides:
|
15
|
-
|
16
|
-
def javascripts_full_list
|
17
|
-
%w(js/jquery.js js/jquery-migrate.js js/full_list.js js/sketchup.js)
|
18
|
-
end
|
19
|
-
|
20
|
-
require 'rouge'
|
21
|
-
|
22
|
-
def generate_assets
|
23
|
-
super
|
24
|
-
|
25
|
-
# TODO: Can this be part of html_helper.rb ?
|
26
|
-
# IgorPro
|
27
|
-
# Pastie
|
28
|
-
asset('css/rouge.css', Rouge::Themes::IgorPro.render(scope: 'pre.code.cpp'))
|
29
|
-
|
30
|
-
copy('favicon.ico')
|
31
|
-
copy('images/sketchup-logo.svg')
|
32
|
-
copy('images/trimble-logo-white.svg')
|
33
|
-
copy('images/Ruby.svg')
|
34
|
-
end
|
35
|
-
|
36
|
-
# Custom search list grouping the classes in the API into similar groups.
|
37
|
-
# TODO(thomthom): This file is just a stub.
|
38
|
-
|
39
|
-
def generate_object_types_list
|
40
|
-
#@items = options.objects if options.objects
|
41
|
-
@items = [
|
42
|
-
"App Level Classes",
|
43
|
-
"Entity Classes",
|
44
|
-
"Collection Classes",
|
45
|
-
"Geom Classes",
|
46
|
-
"UI Classes",
|
47
|
-
"Observer Classes",
|
48
|
-
"Core Ruby Classes"
|
49
|
-
]
|
50
|
-
@list_title = "Object Index"
|
51
|
-
@list_type = "object_types"
|
52
|
-
|
53
|
-
# optional: the specified stylesheet class
|
54
|
-
# when not specified it will default to the value of @list_type
|
55
|
-
@list_class = "class"
|
56
|
-
|
57
|
-
# Generate the full list html file with named feature_list.html
|
58
|
-
# @note this file must be match the name of the type
|
59
|
-
asset(url_for_list(@list_type), erb(:full_list))
|
60
|
-
end
|
61
|
-
|
62
|
-
|
63
|
-
# See `class_list` in fulldoc/html.
|
64
|
-
def reference_list
|
65
|
-
even_odd = "odd"
|
66
|
-
out = ""
|
67
|
-
@items.each { |item|
|
68
|
-
out << "<li class='#{even_odd}'>"
|
69
|
-
out << "<a class='toggle'></a>"
|
70
|
-
out << item
|
71
|
-
out << "</li>"
|
72
|
-
even_odd = (even_odd == 'even' ? 'odd' : 'even')
|
73
|
-
}
|
74
|
-
out
|
75
|
-
end
|
1
|
+
# Helpers:
|
2
|
+
|
3
|
+
# Copy verbatim an asset file to the target output. By default it uses the
|
4
|
+
# same relative path as the source for the target path.
|
5
|
+
def copy(source, target = nil)
|
6
|
+
path = self.class.find_file(source)
|
7
|
+
# puts "copy(#{source}, #{target})"
|
8
|
+
# puts "> path: #{path}"
|
9
|
+
raise ArgumentError, "no file for '#{source}' in #{self.class.path}" unless path
|
10
|
+
target ||= source
|
11
|
+
asset(target, File.binread(path))
|
12
|
+
end
|
13
|
+
|
14
|
+
# Template overrides:
|
15
|
+
|
16
|
+
def javascripts_full_list
|
17
|
+
%w(js/jquery.js js/jquery-migrate.js js/full_list.js js/sketchup.js)
|
18
|
+
end
|
19
|
+
|
20
|
+
require 'rouge'
|
21
|
+
|
22
|
+
def generate_assets
|
23
|
+
super
|
24
|
+
|
25
|
+
# TODO: Can this be part of html_helper.rb ?
|
26
|
+
# IgorPro
|
27
|
+
# Pastie
|
28
|
+
asset('css/rouge.css', Rouge::Themes::IgorPro.render(scope: 'pre.code.cpp'))
|
29
|
+
|
30
|
+
copy('favicon.ico')
|
31
|
+
copy('images/sketchup-logo.svg')
|
32
|
+
copy('images/trimble-logo-white.svg')
|
33
|
+
copy('images/Ruby.svg')
|
34
|
+
end
|
35
|
+
|
36
|
+
# Custom search list grouping the classes in the API into similar groups.
|
37
|
+
# TODO(thomthom): This file is just a stub.
|
38
|
+
|
39
|
+
def generate_object_types_list
|
40
|
+
#@items = options.objects if options.objects
|
41
|
+
@items = [
|
42
|
+
"App Level Classes",
|
43
|
+
"Entity Classes",
|
44
|
+
"Collection Classes",
|
45
|
+
"Geom Classes",
|
46
|
+
"UI Classes",
|
47
|
+
"Observer Classes",
|
48
|
+
"Core Ruby Classes"
|
49
|
+
]
|
50
|
+
@list_title = "Object Index"
|
51
|
+
@list_type = "object_types"
|
52
|
+
|
53
|
+
# optional: the specified stylesheet class
|
54
|
+
# when not specified it will default to the value of @list_type
|
55
|
+
@list_class = "class"
|
56
|
+
|
57
|
+
# Generate the full list html file with named feature_list.html
|
58
|
+
# @note this file must be match the name of the type
|
59
|
+
asset(url_for_list(@list_type), erb(:full_list))
|
60
|
+
end
|
61
|
+
|
62
|
+
|
63
|
+
# See `class_list` in fulldoc/html.
|
64
|
+
def reference_list
|
65
|
+
even_odd = "odd"
|
66
|
+
out = ""
|
67
|
+
@items.each { |item|
|
68
|
+
out << "<li class='#{even_odd}'>"
|
69
|
+
out << "<a class='toggle'></a>"
|
70
|
+
out << item
|
71
|
+
out << "</li>"
|
72
|
+
even_odd = (even_odd == 'even' ? 'odd' : 'even')
|
73
|
+
}
|
74
|
+
out
|
75
|
+
end
|
@@ -1,78 +1,78 @@
|
|
1
|
-
<% su_site_name = h options.title
|
2
|
-
case object
|
3
|
-
when String
|
4
|
-
if object == "_index.html" || object == "index.html"
|
5
|
-
su_page_url = "https://ruby.sketchup.com/index.html"
|
6
|
-
su_page_title = "Alphabetic Index"
|
7
|
-
su_page_desc = "Alphabetic Index of Files and API Namespaces. This is the main landing page for the SketchUp Ruby API Documentation."
|
8
|
-
else
|
9
|
-
su_page_url = "https://ruby.sketchup.com/"+(object =~ /(.html)\z/ ? object : "#{File.basename(object,'.*')}.html" )
|
10
|
-
su_page_title = (@page_title && !@page_title.empty?) ? (h @page_title) : object.split('.')[0]
|
11
|
-
su_page_desc = "The #{su_page_title} page."
|
12
|
-
end
|
13
|
-
when YARD::CodeObjects::Base # or subclass
|
14
|
-
if object.root?
|
15
|
-
if @file # Generating a YARD::CodeObjects::ExtraFileObject
|
16
|
-
su_page_url = "https://ruby.sketchup.com/file.#{File.basename(@file.filename,'.*')}.html"
|
17
|
-
su_page_title = h @page_title
|
18
|
-
su_page_desc = @file.title
|
19
|
-
elsif h @page_title == "Top Level Namespace"
|
20
|
-
su_page_url = "https://ruby.sketchup.com/top-level-namespace.html"
|
21
|
-
su_page_title = h @page_title
|
22
|
-
su_page_desc = "The Top Level Namespace for Ruby and the SketchUp API, listing global constants, and a summary of toplevel modules and classes."
|
23
|
-
else %>
|
24
|
-
<!-- <%= "YARD Error - (embed_meta.erb) Unknown root object - using site name." %>--><%
|
25
|
-
su_page_title = su_site_name
|
26
|
-
su_page_url = "https://ruby.sketchup.com/"
|
27
|
-
su_page_desc = "#{su_site_name}."
|
28
|
-
end
|
29
|
-
else # Generating a Class or Module page:
|
30
|
-
su_page_url = "https://ruby.sketchup.com/#{@path.gsub('::','/')}.html"
|
31
|
-
su_page_title = h @page_title
|
32
|
-
if object.docstring.blank?
|
33
|
-
if object.is_a?(YARD::CodeObjects::ClassObject)
|
34
|
-
su_page_desc = "The #{@path} class."
|
35
|
-
elsif object.is_a?(YARD::CodeObjects::ModuleObject)
|
36
|
-
su_page_desc = "The #{@path} module."
|
37
|
-
else
|
38
|
-
su_page_desc = "The #{su_page_title} page."
|
39
|
-
end %>
|
40
|
-
<!-- <%= "YARD Warning - Blank docstring, object is: #{object.class.name}" %>--><%
|
41
|
-
else
|
42
|
-
su_page_desc = object.docstring.summary.gsub(/[{}+]/,'')
|
43
|
-
end
|
44
|
-
end # if root object
|
45
|
-
else # object is unexpected type %>
|
46
|
-
<!-- <%= "YARD Error - (embed_meta.erb) Unexpected type: #{object.class.name}" %>--><%
|
47
|
-
su_page_title = su_site_name
|
48
|
-
su_page_url = "https://ruby.sketchup.com/"
|
49
|
-
if object.respond_to?(:docstring)
|
50
|
-
su_page_desc = object.docstring.summary.gsub(/[{}+]/,'')
|
51
|
-
else
|
52
|
-
su_page_desc = "#{su_site_name}."
|
53
|
-
end
|
54
|
-
end
|
55
|
-
su_page_img = "https://ruby.sketchup.com/images/Ruby.svg"
|
56
|
-
%>
|
57
|
-
<!-- GENERIC META PROPERTIES -->
|
58
|
-
<meta name="url" content="<%= su_page_url %>" />
|
59
|
-
<meta name="image" content="<%= su_page_img %>" />
|
60
|
-
<meta name="title" content="<%= su_page_title %>" />
|
61
|
-
<meta name="name" content="<%= su_site_name %>" />
|
62
|
-
<meta name="description" content="<%= su_page_desc %>" />
|
63
|
-
<!-- OPEN GRAPH META PROPERTIES -->
|
64
|
-
<meta property="og:site_name" content="<%= su_site_name %>" />
|
65
|
-
<meta property="og:type" content="website" />
|
66
|
-
<meta property="og:image" content="<%= su_page_img %>" />
|
67
|
-
<meta property="og:image:width" content="60" />
|
68
|
-
<meta property="og:image:height" content="60" />
|
69
|
-
<meta property="og:title" content="<%= su_page_title %>" />
|
70
|
-
<meta property="og:url" content="<%= su_page_url %>" />
|
71
|
-
<meta property="og:description" content="<%= su_page_desc %>" />
|
72
|
-
<!-- TWITTER CARD META PROPERTIES -->
|
73
|
-
<meta name="twitter:card" content="summary" />
|
74
|
-
<meta name="twitter:site" content="@sketchup" />
|
75
|
-
<meta name="twitter:title" content="<%= su_page_title %>" />
|
76
|
-
<meta name="twitter:description" content="<%= su_page_desc %>" />
|
77
|
-
<meta name="twitter:image:src" content="<%= su_page_img %>?s=120" />
|
78
|
-
<meta name="twitter:url" content="<%= su_page_url %>" />
|
1
|
+
<% su_site_name = h options.title
|
2
|
+
case object
|
3
|
+
when String
|
4
|
+
if object == "_index.html" || object == "index.html"
|
5
|
+
su_page_url = "https://ruby.sketchup.com/index.html"
|
6
|
+
su_page_title = "Alphabetic Index"
|
7
|
+
su_page_desc = "Alphabetic Index of Files and API Namespaces. This is the main landing page for the SketchUp Ruby API Documentation."
|
8
|
+
else
|
9
|
+
su_page_url = "https://ruby.sketchup.com/"+(object =~ /(.html)\z/ ? object : "#{File.basename(object,'.*')}.html" )
|
10
|
+
su_page_title = (@page_title && !@page_title.empty?) ? (h @page_title) : object.split('.')[0]
|
11
|
+
su_page_desc = "The #{su_page_title} page."
|
12
|
+
end
|
13
|
+
when YARD::CodeObjects::Base # or subclass
|
14
|
+
if object.root?
|
15
|
+
if @file # Generating a YARD::CodeObjects::ExtraFileObject
|
16
|
+
su_page_url = "https://ruby.sketchup.com/file.#{File.basename(@file.filename,'.*')}.html"
|
17
|
+
su_page_title = h @page_title
|
18
|
+
su_page_desc = @file.title
|
19
|
+
elsif h @page_title == "Top Level Namespace"
|
20
|
+
su_page_url = "https://ruby.sketchup.com/top-level-namespace.html"
|
21
|
+
su_page_title = h @page_title
|
22
|
+
su_page_desc = "The Top Level Namespace for Ruby and the SketchUp API, listing global constants, and a summary of toplevel modules and classes."
|
23
|
+
else %>
|
24
|
+
<!-- <%= "YARD Error - (embed_meta.erb) Unknown root object - using site name." %>--><%
|
25
|
+
su_page_title = su_site_name
|
26
|
+
su_page_url = "https://ruby.sketchup.com/"
|
27
|
+
su_page_desc = "#{su_site_name}."
|
28
|
+
end
|
29
|
+
else # Generating a Class or Module page:
|
30
|
+
su_page_url = "https://ruby.sketchup.com/#{@path.gsub('::','/')}.html"
|
31
|
+
su_page_title = h @page_title
|
32
|
+
if object.docstring.blank?
|
33
|
+
if object.is_a?(YARD::CodeObjects::ClassObject)
|
34
|
+
su_page_desc = "The #{@path} class."
|
35
|
+
elsif object.is_a?(YARD::CodeObjects::ModuleObject)
|
36
|
+
su_page_desc = "The #{@path} module."
|
37
|
+
else
|
38
|
+
su_page_desc = "The #{su_page_title} page."
|
39
|
+
end %>
|
40
|
+
<!-- <%= "YARD Warning - Blank docstring, object is: #{object.class.name}" %>--><%
|
41
|
+
else
|
42
|
+
su_page_desc = object.docstring.summary.gsub(/[{}+]/,'')
|
43
|
+
end
|
44
|
+
end # if root object
|
45
|
+
else # object is unexpected type %>
|
46
|
+
<!-- <%= "YARD Error - (embed_meta.erb) Unexpected type: #{object.class.name}" %>--><%
|
47
|
+
su_page_title = su_site_name
|
48
|
+
su_page_url = "https://ruby.sketchup.com/"
|
49
|
+
if object.respond_to?(:docstring)
|
50
|
+
su_page_desc = object.docstring.summary.gsub(/[{}+]/,'')
|
51
|
+
else
|
52
|
+
su_page_desc = "#{su_site_name}."
|
53
|
+
end
|
54
|
+
end
|
55
|
+
su_page_img = "https://ruby.sketchup.com/images/Ruby.svg"
|
56
|
+
%>
|
57
|
+
<!-- GENERIC META PROPERTIES -->
|
58
|
+
<meta name="url" content="<%= su_page_url %>" />
|
59
|
+
<meta name="image" content="<%= su_page_img %>" />
|
60
|
+
<meta name="title" content="<%= su_page_title %>" />
|
61
|
+
<meta name="name" content="<%= su_site_name %>" />
|
62
|
+
<meta name="description" content="<%= su_page_desc %>" />
|
63
|
+
<!-- OPEN GRAPH META PROPERTIES -->
|
64
|
+
<meta property="og:site_name" content="<%= su_site_name %>" />
|
65
|
+
<meta property="og:type" content="website" />
|
66
|
+
<meta property="og:image" content="<%= su_page_img %>" />
|
67
|
+
<meta property="og:image:width" content="60" />
|
68
|
+
<meta property="og:image:height" content="60" />
|
69
|
+
<meta property="og:title" content="<%= su_page_title %>" />
|
70
|
+
<meta property="og:url" content="<%= su_page_url %>" />
|
71
|
+
<meta property="og:description" content="<%= su_page_desc %>" />
|
72
|
+
<!-- TWITTER CARD META PROPERTIES -->
|
73
|
+
<meta name="twitter:card" content="summary" />
|
74
|
+
<meta name="twitter:site" content="@sketchup" />
|
75
|
+
<meta name="twitter:title" content="<%= su_page_title %>" />
|
76
|
+
<meta name="twitter:description" content="<%= su_page_desc %>" />
|
77
|
+
<meta name="twitter:image:src" content="<%= su_page_img %>?s=120" />
|
78
|
+
<meta name="twitter:url" content="<%= su_page_url %>" />
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div id="footer">
|
2
|
-
Generated by
|
3
|
-
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
4
|
-
</div>
|
1
|
+
<div id="footer">
|
2
|
+
Generated by
|
3
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
4
|
+
</div>
|
@@ -1,15 +1,15 @@
|
|
1
|
-
<meta charset="<%= charset %>">
|
2
|
-
<!-- VIEWPORT -->
|
3
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
4
|
-
<!-- AUTHOR and GENERATOR -->
|
5
|
-
<meta name="author" content="SketchUp Extensibility Team">
|
6
|
-
<meta name="generator" content="YARD https://yardoc.org">
|
7
|
-
<!-- TITLE -->
|
8
|
-
<title><% if object == "_index.html" || object == "index.html" %>
|
9
|
-
Alphabetic Index — <%= h options.title %><% else %>
|
10
|
-
<%= h @page_title %><% if options.title && @page_title != options.title %> — <%= h options.title %><% end %><% end %>
|
11
|
-
</title>
|
12
|
-
<!-- SHORTCUT ICON -->
|
13
|
-
<link rel="shortcut icon" type="image/vnd.microsoft.icon"
|
14
|
-
href="
|
15
|
-
<%= erb(:embed_meta) %>
|
1
|
+
<meta charset="<%= charset %>">
|
2
|
+
<!-- VIEWPORT -->
|
3
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
4
|
+
<!-- AUTHOR and GENERATOR -->
|
5
|
+
<meta name="author" content="SketchUp Extensibility Team">
|
6
|
+
<meta name="generator" content="YARD https://yardoc.org">
|
7
|
+
<!-- TITLE -->
|
8
|
+
<title><% if object == "_index.html" || object == "index.html" %>
|
9
|
+
Alphabetic Index — <%= h options.title %><% else %>
|
10
|
+
<%= h @page_title %><% if options.title && @page_title != options.title %> — <%= h options.title %><% end %><% end %>
|
11
|
+
</title>
|
12
|
+
<!-- SHORTCUT ICON -->
|
13
|
+
<link rel="shortcut icon" type="image/vnd.microsoft.icon"
|
14
|
+
href="https://ruby.sketchup.com/favicon.ico" />
|
15
|
+
<%= erb(:embed_meta) %>
|
@@ -1,56 +1,56 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<%= erb(:headers) %>
|
5
|
-
<!-- STYLESHEETS -->
|
6
|
-
<link rel="stylesheet" type="text/css"
|
7
|
-
href="https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic" />
|
8
|
-
<% stylesheets.each do |stylesheet| %>
|
9
|
-
<link rel="stylesheet" href="<%= url_for(stylesheet) %>" type="text/css" charset="utf-8" />
|
10
|
-
<% end %>
|
11
|
-
<link rel="stylesheet" href="<%= url_for('css/rouge.css') %>" type="text/css" charset="utf-8" />
|
12
|
-
<!-- SCRIPTS -->
|
13
|
-
<%= erb :script_setup %>
|
14
|
-
<% javascripts.each do |javascript| %>
|
15
|
-
<script type="text/javascript" charset="utf-8" src="<%= url_for(javascript) %>"></script>
|
16
|
-
<% end %>
|
17
|
-
<script>
|
18
|
-
// Every time this page is loaded, it sends this action to SketchUp, telling
|
19
|
-
// SketchUp that a new page has loaded that has example snippets that should
|
20
|
-
// be replaced with code editors. Nothing happens if the page is loaded in a
|
21
|
-
// regular browser outside of the SketchUp client.
|
22
|
-
$( document ).ready(function() {
|
23
|
-
if (typeof sketchup == 'object') {
|
24
|
-
sketchup.page_loaded();
|
25
|
-
}
|
26
|
-
});
|
27
|
-
</script>
|
28
|
-
|
29
|
-
</head>
|
30
|
-
<body>
|
31
|
-
|
32
|
-
<%= erb(:navbar) %>
|
33
|
-
|
34
|
-
<div id="su-content">
|
35
|
-
|
36
|
-
<div class="nav_wrap">
|
37
|
-
<iframe id="nav" src="<%= @nav_url %>"></iframe>
|
38
|
-
<div id="resizer"></div>
|
39
|
-
</div>
|
40
|
-
|
41
|
-
<div id="main" tabindex="-1">
|
42
|
-
<div id="header">
|
43
|
-
<%= erb(:breadcrumb) %>
|
44
|
-
<%= erb(:search) %>
|
45
|
-
<div class="clear"></div>
|
46
|
-
</div>
|
47
|
-
|
48
|
-
<div id="content"><%= yieldall %></div>
|
49
|
-
|
50
|
-
<%= erb(:footer) %>
|
51
|
-
</div>
|
52
|
-
|
53
|
-
</div>
|
54
|
-
|
55
|
-
</body>
|
56
|
-
</html>
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<%= erb(:headers) %>
|
5
|
+
<!-- STYLESHEETS -->
|
6
|
+
<link rel="stylesheet" type="text/css"
|
7
|
+
href="https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic" />
|
8
|
+
<% stylesheets.each do |stylesheet| %>
|
9
|
+
<link rel="stylesheet" href="<%= url_for(stylesheet) %>" type="text/css" charset="utf-8" />
|
10
|
+
<% end %>
|
11
|
+
<link rel="stylesheet" href="<%= url_for('css/rouge.css') %>" type="text/css" charset="utf-8" />
|
12
|
+
<!-- SCRIPTS -->
|
13
|
+
<%= erb :script_setup %>
|
14
|
+
<% javascripts.each do |javascript| %>
|
15
|
+
<script type="text/javascript" charset="utf-8" src="<%= url_for(javascript) %>"></script>
|
16
|
+
<% end %>
|
17
|
+
<script>
|
18
|
+
// Every time this page is loaded, it sends this action to SketchUp, telling
|
19
|
+
// SketchUp that a new page has loaded that has example snippets that should
|
20
|
+
// be replaced with code editors. Nothing happens if the page is loaded in a
|
21
|
+
// regular browser outside of the SketchUp client.
|
22
|
+
$( document ).ready(function() {
|
23
|
+
if (typeof sketchup == 'object') {
|
24
|
+
sketchup.page_loaded();
|
25
|
+
}
|
26
|
+
});
|
27
|
+
</script>
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
|
32
|
+
<%= erb(:navbar) %>
|
33
|
+
|
34
|
+
<div id="su-content">
|
35
|
+
|
36
|
+
<div class="nav_wrap">
|
37
|
+
<iframe id="nav" src="<%= @nav_url %>"></iframe>
|
38
|
+
<div id="resizer"></div>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div id="main" tabindex="-1">
|
42
|
+
<div id="header">
|
43
|
+
<%= erb(:breadcrumb) %>
|
44
|
+
<%= erb(:search) %>
|
45
|
+
<div class="clear"></div>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<div id="content"><%= yieldall %></div>
|
49
|
+
|
50
|
+
<%= erb(:footer) %>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
</div>
|
54
|
+
|
55
|
+
</body>
|
56
|
+
</html>
|
@@ -1,36 +1,36 @@
|
|
1
|
-
<!-- SU - start -->
|
2
|
-
<header id="navbar" role="banner" class="navbar navbar-fixed-top navbar-inverse">
|
3
|
-
<div id="api-documentation-header">
|
4
|
-
<div class="navbar-header">
|
5
|
-
<a class="logo navbar-btn pull-left" href="https://developer.sketchup.com" title="Home">
|
6
|
-
<img src="<%= url_for('images/sketchup-logo.svg') %>" alt="SketchUp">
|
7
|
-
</a>
|
8
|
-
<a class="name navbar-brand" href="/en" title="Home">SketchUp Developer Center</a>
|
9
|
-
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
|
10
|
-
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
11
|
-
<span class="sr-only">Toggle navigation</span>
|
12
|
-
<span class="icon-bar"></span>
|
13
|
-
<span class="icon-bar"></span>
|
14
|
-
<span class="icon-bar"></span>
|
15
|
-
</button>
|
16
|
-
</div>
|
17
|
-
<div class="navbar-collapse collapse">
|
18
|
-
<nav role="navigation">
|
19
|
-
<ul class="menu nav navbar-nav">
|
20
|
-
<li class="first leaf"><a href="https://forums.sketchup.com/c/developers">Community</a></li>
|
21
|
-
<li class="leaf"><a href="https://blog.sketchup.com/">SketchUp Blog</a></li>
|
22
|
-
<li class="leaf"><a href="https://www.sketchup.com/download" class="top-menu--download-button">Download</a></li>
|
23
|
-
<li class="last expanded dropdown">
|
24
|
-
<a href="https://www.trimble.com" class="trimble-top-menu-item dropdown-toggle" data-target="#" data-toggle="dropdown"><img src="<%= url_for('images/trimble-logo-white.svg') %>" alt="Trimble"><span class="caret"></span></a>
|
25
|
-
<ul class="dropdown-menu">
|
26
|
-
<li class="first leaf"><a href="https://connect.trimble.com/">Trimble Connect</a></li>
|
27
|
-
<li class="leaf"><a href="https://www.trimble.com/Corporate/About_Trimble.aspx">About Trimble</a></li>
|
28
|
-
<li class="last leaf"><a href="https://buildings.trimble.com/">Trimble Buildings</a></li>
|
29
|
-
</ul>
|
30
|
-
</li>
|
31
|
-
</ul>
|
32
|
-
</nav>
|
33
|
-
</div>
|
34
|
-
</div>
|
35
|
-
</header>
|
36
|
-
<!-- SU - end -->
|
1
|
+
<!-- SU - start -->
|
2
|
+
<header id="navbar" role="banner" class="navbar navbar-fixed-top navbar-inverse">
|
3
|
+
<div id="api-documentation-header">
|
4
|
+
<div class="navbar-header">
|
5
|
+
<a class="logo navbar-btn pull-left" href="https://developer.sketchup.com" title="Home">
|
6
|
+
<img src="<%= url_for('images/sketchup-logo.svg') %>" alt="SketchUp">
|
7
|
+
</a>
|
8
|
+
<a class="name navbar-brand" href="/en" title="Home">SketchUp Developer Center</a>
|
9
|
+
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
|
10
|
+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
11
|
+
<span class="sr-only">Toggle navigation</span>
|
12
|
+
<span class="icon-bar"></span>
|
13
|
+
<span class="icon-bar"></span>
|
14
|
+
<span class="icon-bar"></span>
|
15
|
+
</button>
|
16
|
+
</div>
|
17
|
+
<div class="navbar-collapse collapse">
|
18
|
+
<nav role="navigation">
|
19
|
+
<ul class="menu nav navbar-nav">
|
20
|
+
<li class="first leaf"><a href="https://forums.sketchup.com/c/developers">Community</a></li>
|
21
|
+
<li class="leaf"><a href="https://blog.sketchup.com/">SketchUp Blog</a></li>
|
22
|
+
<li class="leaf"><a href="https://www.sketchup.com/download" class="top-menu--download-button">Download</a></li>
|
23
|
+
<li class="last expanded dropdown">
|
24
|
+
<a href="https://www.trimble.com" class="trimble-top-menu-item dropdown-toggle" data-target="#" data-toggle="dropdown"><img src="<%= url_for('images/trimble-logo-white.svg') %>" alt="Trimble"><span class="caret"></span></a>
|
25
|
+
<ul class="dropdown-menu">
|
26
|
+
<li class="first leaf"><a href="https://connect.trimble.com/">Trimble Connect</a></li>
|
27
|
+
<li class="leaf"><a href="https://www.trimble.com/Corporate/About_Trimble.aspx">About Trimble</a></li>
|
28
|
+
<li class="last leaf"><a href="https://buildings.trimble.com/">Trimble Buildings</a></li>
|
29
|
+
</ul>
|
30
|
+
</li>
|
31
|
+
</ul>
|
32
|
+
</nav>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</header>
|
36
|
+
<!-- SU - end -->
|
@@ -1,25 +1,25 @@
|
|
1
|
-
# Consider if this should simply replace the Classes list.
|
2
|
-
|
3
|
-
=begin
|
4
|
-
TODO(thomthom): Temporarily disabled until we have time to fully implement this.
|
5
|
-
def menu_lists
|
6
|
-
# Load the existing menus
|
7
|
-
super + [ { :type => 'object_types', :title => 'Object Reference', :search_title => 'Object Reference List' } ]
|
8
|
-
end
|
9
|
-
=end
|
10
|
-
|
11
|
-
def javascripts
|
12
|
-
# Using the latest 1.x jQuery from CDN broke the YARD js. For now we must
|
13
|
-
# continue to use the version shipping with the YARD template we use as base.
|
14
|
-
#
|
15
|
-
# UPDATE: jQuery 1.9 removed a number of functions.
|
16
|
-
# GitHub report security warnings for jQuery older than 1.9. In order to
|
17
|
-
# upgrade we vendor jQuery of a newer version (1.x branch) along with their
|
18
|
-
# migration plugin to allow YARD to continue to work.
|
19
|
-
# https://github.com/lsegal/yard/pull/1351
|
20
|
-
%w(js/jquery.js js/jquery-migrate.js js/app.js)
|
21
|
-
end
|
22
|
-
|
23
|
-
def stylesheets
|
24
|
-
%w(css/style.css css/sketchup.css css/rubyapi.css)
|
25
|
-
end
|
1
|
+
# Consider if this should simply replace the Classes list.
|
2
|
+
|
3
|
+
=begin
|
4
|
+
TODO(thomthom): Temporarily disabled until we have time to fully implement this.
|
5
|
+
def menu_lists
|
6
|
+
# Load the existing menus
|
7
|
+
super + [ { :type => 'object_types', :title => 'Object Reference', :search_title => 'Object Reference List' } ]
|
8
|
+
end
|
9
|
+
=end
|
10
|
+
|
11
|
+
def javascripts
|
12
|
+
# Using the latest 1.x jQuery from CDN broke the YARD js. For now we must
|
13
|
+
# continue to use the version shipping with the YARD template we use as base.
|
14
|
+
#
|
15
|
+
# UPDATE: jQuery 1.9 removed a number of functions.
|
16
|
+
# GitHub report security warnings for jQuery older than 1.9. In order to
|
17
|
+
# upgrade we vendor jQuery of a newer version (1.x branch) along with their
|
18
|
+
# migration plugin to allow YARD to continue to work.
|
19
|
+
# https://github.com/lsegal/yard/pull/1351
|
20
|
+
%w(js/jquery.js js/jquery-migrate.js js/app.js)
|
21
|
+
end
|
22
|
+
|
23
|
+
def stylesheets
|
24
|
+
%w(css/style.css css/sketchup.css css/rubyapi.css)
|
25
|
+
end
|