hanna-nouveau 1.0.2 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/LICENSE +1 -0
- data/README.rdoc +5 -9
- data/Rakefile +3 -2
- data/VERSION +1 -1
- data/lib/hanna-nouveau/template_files/class_index.erb +4 -0
- data/lib/hanna-nouveau/template_files/file_index.erb +9 -0
- data/lib/hanna-nouveau/template_files/index.erb +15 -0
- data/lib/hanna-nouveau/template_files/layout.erb +34 -0
- data/lib/hanna-nouveau/template_files/method_index.erb +11 -0
- data/lib/hanna-nouveau/template_files/method_list.erb +58 -0
- data/lib/hanna-nouveau/template_files/method_search.js +41 -59
- data/lib/hanna-nouveau/template_files/page.erb +48 -0
- data/lib/hanna-nouveau/template_files/sections.erb +92 -0
- data/lib/hanna-nouveau/template_files/styles.css +347 -0
- data/lib/hanna-nouveau.rb +50 -48
- metadata +22 -49
- data/Gemfile +0 -3
- data/lib/hanna-nouveau/template_files/class_index.haml +0 -3
- data/lib/hanna-nouveau/template_files/file_index.haml +0 -12
- data/lib/hanna-nouveau/template_files/index.haml +0 -11
- data/lib/hanna-nouveau/template_files/layout.haml +0 -34
- data/lib/hanna-nouveau/template_files/method_index.haml +0 -13
- data/lib/hanna-nouveau/template_files/method_list.haml +0 -56
- data/lib/hanna-nouveau/template_files/page.haml +0 -48
- data/lib/hanna-nouveau/template_files/prototype-1.6.0.3.js +0 -4320
- data/lib/hanna-nouveau/template_files/sections.haml +0 -88
- data/lib/hanna-nouveau/template_files/styles.sass +0 -370
@@ -1,11 +0,0 @@
|
|
1
|
-
!!! Frameset
|
2
|
-
%html{ "xml:lang" => "en", :lang => "en", :xmlns => "http://www.w3.org/1999/xhtml" }
|
3
|
-
%head
|
4
|
-
%title= @options.title
|
5
|
-
%meta{ :content => "text/html; charset=#{@options.charset}", "http-equiv" => "Content-Type" }
|
6
|
-
%frameset{ :cols => "20%, *", :border => "1", :frameborder => "1", :bordercolor => "gray" }
|
7
|
-
%frameset{ :rows => "15%, 35%, 50%" }
|
8
|
-
%frame{ :name => "Files", :title => "Files", :src => "fr_file_index.html" }
|
9
|
-
%frame{ :name => "Classes", :src => "fr_class_index.html" }
|
10
|
-
%frame{ :name => "Methods", :src => "fr_method_index.html" }
|
11
|
-
%frame{ :name => "docwin", :src => @main_page_uri }=""
|
@@ -1,34 +0,0 @@
|
|
1
|
-
!!! strict
|
2
|
-
- index = values[:list_title]
|
3
|
-
%html{ :lang => "en" }
|
4
|
-
%head
|
5
|
-
%title= values[:title]
|
6
|
-
%meta{ 'http-equiv' => "Content-Type", :content => "text/html; charset=#{@options.charset}" }
|
7
|
-
%link{ :rel => "stylesheet", :href => values[:stylesheet], :type => "text/css", :media => "screen" }
|
8
|
-
- unless index
|
9
|
-
:javascript
|
10
|
-
function popupCode(url) {
|
11
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
12
|
-
}
|
13
|
-
|
14
|
-
function toggleCode(id) {
|
15
|
-
var code = document.getElementById(id)
|
16
|
-
|
17
|
-
code.style.display = code.style.display != 'block' ? 'block' : 'none'
|
18
|
-
return true
|
19
|
-
}
|
20
|
-
|
21
|
-
// Make codeblocks hidden by default
|
22
|
-
document.writeln('<' + 'style type="text/css">.method .source pre { display: none }<\/style>')
|
23
|
-
- else
|
24
|
-
%base{ :target => 'docwin' }/
|
25
|
-
|
26
|
-
%body{ :class => index ? 'list' : 'page' }
|
27
|
-
- if index
|
28
|
-
#index= yield
|
29
|
-
- else
|
30
|
-
#wrapper{ :class => values[:classmod] ? 'class' : 'file' }
|
31
|
-
= yield
|
32
|
-
#footer-push
|
33
|
-
#footer
|
34
|
-
= link_to '<strong>Hanna Nouveau</strong> RDoc template', 'https://github.com/rdoc/hanna-nouveau'
|
@@ -1,13 +0,0 @@
|
|
1
|
-
%h1= values[:list_title]
|
2
|
-
|
3
|
-
%script{:type => 'text/javascript'}
|
4
|
-
= File.read(File.join(@templatedir, "prototype-1.6.0.3.js"))
|
5
|
-
= build_javascript_search_index(values[:methods] + values[:attributes])
|
6
|
-
= File.read(File.join(@templatedir, "method_search.js"))
|
7
|
-
%form{:onsubmit => 'return performSearch()'}
|
8
|
-
%input{:type => 'text', :id => 'search', :class => 'untouched', :value => 'Enter search terms...'}
|
9
|
-
%ol#search-results{ :class => 'methods', :style => 'display: none' }
|
10
|
-
|
11
|
-
%ol#index-entries{ :class => 'methods' }
|
12
|
-
- (values[:attributes] + values[:methods]).uniq.each do |entry|
|
13
|
-
%li= link_to_method entry, [classfile(entry.parent), entry.aref].join('#')
|
@@ -1,56 +0,0 @@
|
|
1
|
-
- entry = values[:entry]
|
2
|
-
- sections = values[:sections].keys if values.has_key?(:sections)
|
3
|
-
- methods = entry.method_list + entry.attributes
|
4
|
-
- unless methods.empty?
|
5
|
-
#method-list
|
6
|
-
%h2 Methods
|
7
|
-
- %w[attr attr_accessor attr_reader attr_writer class instance].each do |type|
|
8
|
-
- (RDoc::VISIBILITIES rescue RDoc::Context::VISIBILITIES).each do |vis|
|
9
|
-
-# FIXME ugly
|
10
|
-
- list = methods.reject { |x| x.respond_to?(:is_alias_for) && x.is_alias_for }.select { |x| x.visibility == vis && x.type == type.to_s }.sort
|
11
|
-
- unless list.empty?
|
12
|
-
- type_result = ""
|
13
|
-
- if type =~ /^attr_/
|
14
|
-
- type_result += type.sub(/^attr_/, '').capitalize
|
15
|
-
- else
|
16
|
-
- type_result += type.capitalize
|
17
|
-
- type_result = "#{vis.to_s.capitalize} #{type_result}"
|
18
|
-
%h3= type_result
|
19
|
-
%ol
|
20
|
-
- list.each do |method|
|
21
|
-
- if method.respond_to?(:aref)
|
22
|
-
- if method.name.to_s.empty? && method.call_seq
|
23
|
-
%li= link_to method.call_seq.gsub(/<br\s*\/?>/, "").split(/[\r\n]+/).map{ |s| s.split(/([({]+|\[\{|\s+(#?=>|→)\s+)/).first.sub(/^[A-Za-z0-9_:]+\./, "").sub(/\s+=\s+.*/, "=").strip }.uniq.join("<br />\n"), '#' + method.aref
|
24
|
-
- else
|
25
|
-
%li= link_to method.name, '#' + method.aref
|
26
|
-
- elsif method.respond_to?(:html_name)
|
27
|
-
%li= link_to method.name, "#method-#{method.html_name}"
|
28
|
-
- else
|
29
|
-
%li= method.name
|
30
|
-
|
31
|
-
- if entry.requires or sections or entry.includes
|
32
|
-
#context
|
33
|
-
- unless entry.requires.empty?
|
34
|
-
#requires
|
35
|
-
%h2 Required files
|
36
|
-
%ol
|
37
|
-
- entry.requires.each do |req|
|
38
|
-
%li= req.name
|
39
|
-
|
40
|
-
- if sections && (sections.length > 1 || sections.first.title.to_s != '')
|
41
|
-
#contents
|
42
|
-
%h2 Contents
|
43
|
-
%ol
|
44
|
-
- sections.sort_by{|s| s.title.to_s}.each do |section|
|
45
|
-
%li= link_to section.title, "##{section.aref}"
|
46
|
-
|
47
|
-
- unless entry.includes.empty?
|
48
|
-
#includes
|
49
|
-
%h2 Included modules
|
50
|
-
%ol
|
51
|
-
- entry.includes.each do |inc|
|
52
|
-
- if (mod = inc.module).is_a?(String)
|
53
|
-
%li= inc.name
|
54
|
-
- else
|
55
|
-
%li= link_to inc.name, entry.aref_to(mod.path)
|
56
|
-
|
@@ -1,48 +0,0 @@
|
|
1
|
-
- file_page = !values[:classmod]
|
2
|
-
- title_in_description = values[:entry].description && values[:entry].description =~ /^\s*<h1>/m
|
3
|
-
|
4
|
-
.header
|
5
|
-
- title = capture_haml do
|
6
|
-
- if file_page
|
7
|
-
= values[:file].name
|
8
|
-
- else
|
9
|
-
%span.type= values[:classmod]
|
10
|
-
= values[:entry].full_name
|
11
|
-
- if title_in_description
|
12
|
-
.name= title
|
13
|
-
- else
|
14
|
-
%h1.name= title
|
15
|
-
|
16
|
-
- if file_page
|
17
|
-
.paths
|
18
|
-
= values[:file].relative_name
|
19
|
-
- else
|
20
|
-
%ol.paths
|
21
|
-
- values[:entry].in_files.each_with_index do |file, index|
|
22
|
-
%li{ :class => index > 0 ? 'other' : nil }
|
23
|
-
-# FIXME cleanup
|
24
|
-
= link_to file.full_name, Pathname.new(file.path).relative_path_from(Pathname.new(values[:entry].path).dirname)
|
25
|
-
- if values[:entry].in_files.size > 1
|
26
|
-
%li
|
27
|
-
%a.show{ :href => '#', :onclick => 'this.parentNode.parentNode.className += " expanded"; this.parentNode.removeChild(this); return false' } show all
|
28
|
-
|
29
|
-
- if !file_page && values[:entry].type == "class"
|
30
|
-
.parent
|
31
|
-
Superclass:
|
32
|
-
- if values[:entry].superclass.kind_of?(String) || !values[:entry].superclass
|
33
|
-
%strong= values[:entry].superclass
|
34
|
-
- else
|
35
|
-
%strong= link_to values[:entry].superclass.name, Pathname.new(class_dir) + Pathname.new(values[:entry].superclass.path).relative_path_from(Pathname.new values[:entry].path)
|
36
|
-
|
37
|
-
|
38
|
-
- if values[:entry].respond_to?(:last_modified) and values[:entry].last_modified
|
39
|
-
.last-update
|
40
|
-
Last Update:
|
41
|
-
%span.datetime= values[:entry].last_modified
|
42
|
-
|
43
|
-
#content
|
44
|
-
#text
|
45
|
-
- if values[:description]
|
46
|
-
#description~ sanitize_code_blocks frame_link values[:description]
|
47
|
-
|
48
|
-
= frame_link yield
|