sdoc 1.0.0.rc3 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +12 -11
  3. data/CHANGELOG.md +36 -0
  4. data/Gemfile +1 -1
  5. data/README.md +15 -5
  6. data/Rakefile +0 -2
  7. data/bin/sdoc +1 -1
  8. data/bin/sdoc-merge +1 -1
  9. data/lib/rdoc/discover.rb +1 -1
  10. data/lib/rdoc/generator/template/rails/_context.rhtml +6 -6
  11. data/lib/rdoc/generator/template/rails/_head.rhtml +39 -6
  12. data/lib/rdoc/generator/template/rails/_panel.rhtml +14 -0
  13. data/lib/rdoc/generator/template/rails/class.rhtml +8 -7
  14. data/lib/rdoc/generator/template/rails/file.rhtml +6 -3
  15. data/lib/rdoc/generator/template/rails/index.rhtml +30 -8
  16. data/lib/rdoc/generator/template/rails/resources/css/main.css +19 -4
  17. data/lib/rdoc/generator/template/rails/resources/css/panel.css +16 -11
  18. data/lib/rdoc/generator/template/rails/resources/css/reset.css +0 -0
  19. data/lib/rdoc/generator/template/rails/resources/i/arrow-down-current.svg +8 -0
  20. data/lib/rdoc/generator/template/rails/resources/i/arrow-right-current.svg +8 -0
  21. data/lib/rdoc/generator/template/rails/resources/js/highlight.pack.js +0 -0
  22. data/lib/rdoc/generator/template/rails/resources/js/jquery-3.5.1.min.js +2 -0
  23. data/lib/rdoc/generator/template/rails/resources/js/main.js +22 -6
  24. data/lib/rdoc/generator/template/rails/resources/js/searchdoc.js +25 -6
  25. data/lib/rdoc/generator/template/rails/resources/js/turbolinks.js +6 -0
  26. data/lib/rdoc/generator/template/sdoc/_context.rhtml +5 -5
  27. data/lib/rdoc/generator/template/sdoc/class.rhtml +0 -0
  28. data/lib/rdoc/generator/template/sdoc/file.rhtml +0 -0
  29. data/lib/rdoc/generator/template/sdoc/index.rhtml +0 -0
  30. data/lib/rdoc/generator/template/sdoc/resources/css/main.css +0 -0
  31. data/lib/rdoc/generator/template/sdoc/resources/css/panel.css +0 -0
  32. data/lib/rdoc/generator/template/sdoc/resources/css/reset.css +0 -0
  33. data/lib/rdoc/generator/template/sdoc/resources/i/arrows.png +0 -0
  34. data/lib/rdoc/generator/template/sdoc/resources/i/results_bg.png +0 -0
  35. data/lib/rdoc/generator/template/sdoc/resources/i/tree_bg.png +0 -0
  36. data/lib/rdoc/generator/template/sdoc/resources/js/highlight.pack.js +0 -0
  37. data/lib/rdoc/generator/template/sdoc/resources/js/jquery-1.3.2.min.js +0 -0
  38. data/lib/rdoc/generator/template/sdoc/resources/js/main.js +0 -0
  39. data/lib/rdoc/generator/template/sdoc/resources/js/searchdoc.js +0 -0
  40. data/lib/rdoc/generator/template/sdoc/resources/panel/index.html +0 -0
  41. data/lib/sdoc.rb +0 -2
  42. data/lib/sdoc/generator.rb +19 -80
  43. data/lib/sdoc/github.rb +13 -14
  44. data/lib/sdoc/helpers.rb +1 -1
  45. data/lib/sdoc/templatable.rb +5 -1
  46. data/lib/sdoc/version.rb +1 -1
  47. data/sdoc.gemspec +1 -1
  48. data/spec/helpers_spec.rb +6 -4
  49. data/spec/rdoc_generator_spec.rb +8 -0
  50. metadata +10 -8
  51. data/lib/rdoc/generator/template/rails/resources/js/jquery-1.3.2.min.js +0 -19
  52. data/lib/rdoc/generator/template/rails/resources/panel/index.html +0 -47
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 120a6beabf68f2666569422df6ec1016eed0bd0c
4
- data.tar.gz: 031417023b90f2454f88667848fecd9d681e244a
2
+ SHA256:
3
+ metadata.gz: 44ae55cdc435032ac5559c5ed464d51eeef0cdf3ea60dd011e5780608b4227fe
4
+ data.tar.gz: 330c7f40c26d49868642edc95c0866310bc0f0062311144fde76f1c48f0e0388
5
5
  SHA512:
6
- metadata.gz: ba5f3f336a41df54bb8354d422c01a7a7b039f9924f24563dfb0577b7540cb0ba131c239ab3d074bd2acc136adc05b7fdcc616a0d0409c525dcc1c1f18f62447
7
- data.tar.gz: f405fc8f95d5c64fbcb0686b30f790dca1374f70d066dfde434425aa9e0a76131acf1898b8c86b0443a8f5bde3cd01498e6f7ea225d39080526ead3008cd7410
6
+ metadata.gz: 3caf8b5bf5bee61514ebb8be5f6013097ca77396ca19cd6f60c7226612ae55e6f2e86d1ec9b59a74b5f367574bc229497c82655713eee60735b979454ec1e850
7
+ data.tar.gz: 0b5265d770ef7db8bc448ca68843076d00bb22d5ef7d43cc43dbc587fe80177fc2aa725b99864907e80898110639541b718857b040eccc832e93a6fc95e8ca5f
@@ -1,29 +1,30 @@
1
1
  language: ruby
2
2
  cache: bundler
3
3
  before_install:
4
- - gem install bundler
4
+ - gem update --system || gem update --system 2.7.8
5
+ - gem install bundler || gem install bundler -v 1.17.3
5
6
  rvm:
6
7
  - 1.9.3
7
8
  - 2.0.0
8
9
  - 2.1.0
9
- - 2.2.0
10
- - 2.3.0
11
- - 2.4.0
10
+ - 2.2.10
11
+ - 2.3.7
12
+ - 2.4.4
13
+ - 2.5.1
14
+ - 2.6.0
12
15
  - ruby-head
13
- - jruby-19mode
14
16
  - jruby-head
15
17
  matrix:
16
18
  allow_failures:
17
19
  - env: rdoc=master
18
20
  - rvm: jruby-head
19
21
  include:
20
- - { rvm: 1.9.3, env: rdoc=master }
21
- - { rvm: 2.0.0, env: rdoc=master }
22
- - { rvm: 2.1.0, env: rdoc=master }
23
- - { rvm: 2.2.0, env: rdoc=master }
24
- - { rvm: 2.3.0, env: rdoc=master }
22
+ - { rvm: 2.2.10, env: rdoc=master }
23
+ - { rvm: 2.3.7, env: rdoc=master }
24
+ - { rvm: 2.4.4, env: rdoc=master }
25
+ - { rvm: 2.5.1, env: rdoc=master }
26
+ - { rvm: 2.6.0, env: rdoc=master }
25
27
  - { rvm: ruby-head, env: rdoc=master }
26
- - { rvm: jruby-19mode, env: rdoc=master }
27
28
  - { rvm: jruby-head, env: rdoc=master }
28
29
  notifications:
29
30
  email:
@@ -1,3 +1,39 @@
1
+ 2.0.2
2
+ =====
3
+
4
+ * Remove accidental rack inclusion in gemspec
5
+
6
+ 2.0.1
7
+ =====
8
+
9
+ * #142 Fix arrow icons for selected panel items
10
+ * #141 Always use only one metatag for keywords
11
+ * #140 Use h2 instead of h1 for banner header
12
+
13
+ 2.0.0
14
+ =====
15
+
16
+ * #137 Replace frames based implementation with a css
17
+ * #132 Deprecate safe_level of ERB.new in Ruby 2.6
18
+
19
+ 1.1.0
20
+ =====
21
+
22
+ * #138 - Fix panel header overflow on Chrome
23
+ * 39e6cae9 - Display version using `-v` or `--version` flags
24
+
25
+ 1.0.0
26
+ =====
27
+
28
+ * #110 - Strip out HTML tags from search results description
29
+ * #109 - Add basic SEO tags
30
+ * #108 - Tiny refresh of the Rails theme
31
+ * e6f02b91 - Remove the jQuery effect library
32
+ * 73ace366 - Remove the `--without-search` option
33
+ * b1d429f2 - Produce HTML 5 output
34
+ * 38d06095 - Support only RDoc 5 and up
35
+ * #96 - Require at least Ruby 1.9.3
36
+
1
37
  0.4.2
2
38
  =====
3
39
 
data/Gemfile CHANGED
@@ -7,5 +7,5 @@ gem "minitest"
7
7
  gem "hoe"
8
8
 
9
9
  if ENV["rdoc"] == "master"
10
- gem "rdoc", :github => "rdoc/rdoc"
10
+ gem "rdoc", :github => "ruby/rdoc"
11
11
  end
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # SDoc
2
2
 
3
- [![Build Status](https://travis-ci.org/zzak/sdoc.png?branch=master)](https://travis-ci.org/zzak/sdoc)
3
+ [![Build Status](https://travis-ci.org/zzak/sdoc.svg?branch=master)](https://travis-ci.org/zzak/sdoc)
4
4
 
5
5
  **Powering http://api.rubyonrails.org/**
6
6
 
@@ -62,9 +62,9 @@ require 'sdoc' # and use your RDoc task the same way you used it before
62
62
  require 'rdoc/task' # ensure this file is also required in order to use `RDoc::Task`
63
63
 
64
64
  RDoc::Task.new do |rdoc|
65
- rdoc.rdoc_dir = 'doc/rdoc' # name of output directory
66
- rdoc.generator = 'sdoc' # explictly set the sdoc generator
67
- rdoc.template = 'rails' # template used on api.rubyonrails.org
65
+ rdoc.rdoc_dir = 'doc/rdoc' # name of output directory
66
+ rdoc.options << '--format=sdoc' # explictly set the sdoc generator
67
+ rdoc.template = 'rails' # template used on api.rubyonrails.org
68
68
  end
69
69
  ```
70
70
 
@@ -78,7 +78,7 @@ Alternatively you can pass this command a path to the project you wish to compil
78
78
 
79
79
  As mentioned before, SDoc is built on top of the RDoc project.
80
80
 
81
- If you notice any bugs in the output of your documentation, it may be RDoc's fault and should be [reported upstream](https://github.com/rdoc/rdoc/issues/new).
81
+ If you notice any bugs in the output of your documentation, it may be RDoc's fault and should be [reported upstream](https://github.com/ruby/rdoc/issues/new).
82
82
 
83
83
  An example of an SDoc bug would be:
84
84
 
@@ -90,6 +90,16 @@ Please feel free to still report issues here for both projects, especially if yo
90
90
 
91
91
  As maintainer of both projects, I'll see if I can identify the root of the cause :bow: :bow: :bow:
92
92
 
93
+ ## Contributing
94
+
95
+ If you'd like to contribute you can generate the Rails documentation by running:
96
+
97
+ ```bash
98
+ rake test:rails
99
+ ```
100
+
101
+ This task will generate documentation for the Rails master branch.
102
+ Since the task doesn't do any file filtering it contains a lot of extra pages.
93
103
 
94
104
  ### Who?
95
105
 
data/Rakefile CHANGED
@@ -1,5 +1,3 @@
1
- require 'rubygems'
2
-
3
1
  require 'bundler'
4
2
  Bundler::GemHelper.install_tasks
5
3
 
data/bin/sdoc CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env ruby -KU
1
+ #!/usr/bin/env ruby
2
2
  require 'sdoc'
3
3
 
4
4
  begin
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env ruby -KU
1
+ #!/usr/bin/env ruby
2
2
  require File.dirname(__FILE__) + '/../lib/sdoc' # add extensions
3
3
  require 'sdoc/merge'
4
4
 
@@ -1,5 +1,5 @@
1
1
  begin
2
- gem 'rdoc', '~> 5.0'
2
+ gem 'rdoc', '>= 5.0'
3
3
  require File.join(File.dirname(__FILE__), '/../sdoc')
4
4
  rescue Gem::LoadError
5
5
  end
@@ -103,7 +103,7 @@
103
103
  <!-- Section constants -->
104
104
  <div class="sectiontitle">Constants</div>
105
105
  <table border='0' cellpadding='5'>
106
- <% context.each_constant do |const| %>
106
+ <% constants.each do |const| %>
107
107
  <tr valign='top'>
108
108
  <td class="attr-name"><%= h const.name %></td>
109
109
  <td>=</td>
@@ -182,7 +182,7 @@
182
182
  <% end %>
183
183
 
184
184
  <% if method.token_stream %>
185
- <% markup = method.sdoc_markup_code %>
185
+ <% markup = method.markup_code %>
186
186
  <div class="sourcecode">
187
187
  <%
188
188
  # generate github link
@@ -209,8 +209,8 @@
209
209
  </div>
210
210
  <% end %>
211
211
  </div>
212
- <% end #methods.each %>
213
- <% end #visibilities.each %>
214
- <% end #context.methods_by_type %>
215
- <% end #context.each_section %>
212
+ <% end %><%# methods.each %>
213
+ <% end %><%# visibilities.each %>
214
+ <% end %><%# context.methods_by_type %>
215
+ <% end %><%# context.each_section %>
216
216
  </div>
@@ -1,6 +1,39 @@
1
- <link rel="stylesheet" href="<%= "#{rel_prefix}/css/reset.css" %>" type="text/css" media="screen" />
2
- <link rel="stylesheet" href="<%= "#{rel_prefix}/css/main.css" %>" type="text/css" media="screen" />
3
- <link rel="stylesheet" href="<%= "#{rel_prefix}/css/github.css" %>" type="text/css" media="screen" />
4
- <script src="<%= "#{rel_prefix}/js/jquery-1.3.2.min.js" %>" type="text/javascript" charset="utf-8"></script>
5
- <script src="<%= "#{rel_prefix}/js/main.js" %>" type="text/javascript" charset="utf-8"></script>
6
- <script src="<%= "#{rel_prefix}/js/highlight.pack.js" %>" type="text/javascript" charset="utf-8"></script>
1
+ <%
2
+ # Turbolinks does not consider relative urls similar, resulting in page
3
+ # reloads and losing the context of the panel. Emptying the rel_prefix makes
4
+ # asset paths absolute. This breaks opening the docs locally. Maybe all
5
+ # generated docs should be in the same folder?
6
+ rel_prefix = ''
7
+ %>
8
+ <link rel="stylesheet" href="<%= "#{rel_prefix}/css/reset.css" %>" type="text/css" media="screen" data-turbolinks-track="reload" />
9
+ <link rel="stylesheet" href="<%= "#{rel_prefix}/css/panel.css" %>" type="text/css" media="screen" data-turbolinks-track="reload" />
10
+ <link rel="stylesheet" href="<%= "#{rel_prefix}/css/main.css" %>" type="text/css" media="screen" data-turbolinks-track="reload" />
11
+ <link rel="stylesheet" href="<%= "#{rel_prefix}/css/github.css" %>" type="text/css" media="screen" data-turbolinks-track="reload" />
12
+ <script src="<%= "#{rel_prefix}/js/jquery-3.5.1.min.js" %>" type="text/javascript" charset="utf-8" data-turbolinks-track="reload"></script>
13
+ <script src="<%= "#{rel_prefix}/js/main.js" %>" type="text/javascript" charset="utf-8" data-turbolinks-track="reload"></script>
14
+ <script src="<%= "#{rel_prefix}/js/highlight.pack.js" %>" type="text/javascript" charset="utf-8" data-turbolinks-track="reload"></script>
15
+ <script src="<%= rel_prefix %>/js/turbolinks.js" type="text/javascript" charset="utf-8" data-turbolinks-track="reload"></script>
16
+ <script src="<%= rel_prefix %>/js/search_index.js" type="text/javascript" charset="utf-8" data-turbolinks-track="reload"></script>
17
+ <script src="<%= rel_prefix %>/js/searcher.js" type="text/javascript" charset="utf-8" data-turbolinks-track="reload"></script>
18
+ <script src="<%= rel_prefix %>/panel/tree.js" type="text/javascript" charset="utf-8" data-turbolinks-track="reload"></script>
19
+ <script src="<%= rel_prefix %>/js/searchdoc.js" type="text/javascript" charset="utf-8" data-turbolinks-track="reload"></script>
20
+ <script type="text/javascript" charset="utf-8">
21
+ document.addEventListener("turbolinks:load", function() {
22
+ // Only initialize panel if not yet initialized
23
+ if(!$('#panel .tree ul li').length) {
24
+ $('#links').hide();
25
+ var panel = new Searchdoc.Panel($('#panel'), search_data, tree, '<%= rel_prefix %>/');
26
+ $('#search').focus();
27
+ var s = window.location.search.match(/\?q=([^&]+)/);
28
+ if (s) {
29
+ s = decodeURIComponent(s[1]).replace(/\+/g, ' ');
30
+ if (s.length > 0) {
31
+ $('#search').val(s);
32
+ panel.search(s, true);
33
+ }
34
+ }
35
+ panel.toggle(<%= tree_keys %>);
36
+ }
37
+ })
38
+ </script>
39
+
@@ -0,0 +1,14 @@
1
+ <div class="panel panel_tree" id="panel" data-turbolinks-permanent>
2
+ <div class="header">
3
+ <input type="text" placeholder="Search for a class, method, ..." autosave="searchdoc" results="10" id="search" autocomplete="off" />
4
+ </div>
5
+ <div class="tree">
6
+ <ul>
7
+ </ul>
8
+ </div>
9
+ <div class="result">
10
+ <ul>
11
+ </ul>
12
+ </div>
13
+ <a href="links.html" id="links">index</a>
14
+ </div>
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <title><%= h klass.full_name %></title>
5
5
  <meta charset="<%= @options.charset %>" />
6
- <%= include_template '_head.rhtml', {:rel_prefix => rel_prefix} %>
6
+ <%= include_template '_head.rhtml', {:rel_prefix => rel_prefix, :tree_keys => klass.full_name.split('::') } %>
7
7
 
8
8
  <meta property="og:title" value="<%= klass.full_name %>">
9
9
 
@@ -13,18 +13,18 @@
13
13
  <meta property="og:description" content="<%= human_desc %>">
14
14
  <% end %>
15
15
 
16
- <meta name="keywords" content="<%= klass.full_name %> class">
17
- <% unless klass.method_list.empty? %>
18
- <meta name="keywords" content="<%= klass.method_list.map(&:name).join(", ") %>">
19
- <% end %>
16
+ <meta name="keywords" content="<%= klass.full_name %> class, <%= klass.method_list.map(&:name).join(", ") %>">
20
17
  </head>
21
18
 
22
19
  <body>
20
+
21
+ <%= include_template '_panel.rhtml' %>
22
+
23
23
  <div class="banner">
24
24
  <% if ENV['HORO_PROJECT_NAME'] %>
25
25
  <span><%= ERB::Util.html_escape(ENV['HORO_PROJECT_NAME']) %> <%= ERB::Util.html_escape(ENV['HORO_PROJECT_VERSION']) %></span><br />
26
26
  <% end %>
27
- <h1>
27
+ <h2>
28
28
  <span class="type"><%= klass.module? ? 'Module' : 'Class' %></span>
29
29
  <%= h klass.full_name %>
30
30
  <% if klass.type == 'class' %>
@@ -36,13 +36,14 @@
36
36
  <% end %>
37
37
  </span>
38
38
  <% end %>
39
- </h1>
39
+ </h2>
40
40
  <ul class="files">
41
41
  <% klass.in_files.each do |file| %>
42
42
  <li><a href="<%= "#{rel_prefix}/#{h file.path}" %>"><%= h file.absolute_name %></a></li>
43
43
  <% end %>
44
44
  </ul>
45
45
  </div>
46
+
46
47
  <div id="bodyContent">
47
48
  <%= include_template '_context.rhtml', {:context => klass, :rel_prefix => rel_prefix} %>
48
49
  </div>
@@ -3,17 +3,20 @@
3
3
  <head>
4
4
  <title><%= h file.name %></title>
5
5
  <meta charset="<%= @options.charset %>" />
6
- <%= include_template '_head.rhtml', {:rel_prefix => rel_prefix} %>
6
+ <%= include_template '_head.rhtml', {:rel_prefix => rel_prefix, :tree_keys => [] } %>
7
7
  </head>
8
8
 
9
9
  <body>
10
+
11
+ <%= include_template '_panel.rhtml' %>
12
+
10
13
  <div class="banner">
11
14
  <% if ENV['HORO_PROJECT_NAME'] %>
12
15
  <span><%= ERB::Util.html_escape(ENV['HORO_PROJECT_NAME']) %> <%= ERB::Util.html_escape(ENV['HORO_PROJECT_VERSION']) %></span><br />
13
16
  <% end %>
14
- <h1>
17
+ <h2>
15
18
  <%= h file.name %>
16
- </h1>
19
+ </h2>
17
20
  <ul class="files">
18
21
  <%
19
22
  github = github_url(file.relative_name) if options.github
@@ -1,11 +1,33 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
5
  <head>
4
- <meta charset="<%= @options.charset %>">
5
- <title><%= @options.title %></title>
6
+ <title><%= h index.name %></title>
7
+ <meta http-equiv="Content-Type" content="text/html; charset=<%= @options.charset %>" />
8
+ <%= include_template '_head.rhtml', {:rel_prefix => rel_prefix, tree_keys: []} %>
6
9
  </head>
7
- <frameset cols="300,*" frameborder="1" border="1" bordercolor="#999999" framespacing="1">
8
- <frame src="panel/index.html" title="Search" name="panel" />
9
- <frame src="<%= index_path %>" name="docwin" />
10
- </frameset>
10
+
11
+ <body>
12
+
13
+ <%= include_template '_panel.rhtml' %>
14
+
15
+ <div class="banner">
16
+ <% if ENV['HORO_PROJECT_NAME'] %>
17
+ <span><%= ERB::Util.html_escape(ENV['HORO_PROJECT_NAME']) %> <%= ERB::Util.html_escape(ENV['HORO_PROJECT_VERSION']) %></span><br />
18
+ <% end %>
19
+ <h2>
20
+ <%= h index.name %>
21
+ </h2>
22
+ <ul class="files">
23
+ <li><%= h index.relative_name %></li>
24
+ <li>Last modified: <%= index.last_modified %></li>
25
+ </ul>
26
+ </div>
27
+
28
+ <div id="bodyContent">
29
+ <%= include_template '_context.rhtml', {:context => index } %>
30
+ </div>
31
+ </body>
11
32
  </html>
33
+
@@ -7,6 +7,10 @@ body {
7
7
  line-height: 1.25em;
8
8
  }
9
9
 
10
+ .banner, #bodyContent {
11
+ margin-left: 300px;
12
+ }
13
+
10
14
  a:link, a:active, a:visited, a:hover {
11
15
  color: #CC0000;
12
16
  text-decoration: none;
@@ -121,20 +125,20 @@ ol li
121
125
  padding: 1em;
122
126
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
123
127
  }
124
- .banner h1
128
+ .banner h2
125
129
  {
126
130
  font-size: 1.2em;
127
131
  margin: 0;
128
132
  }
129
133
 
130
- .banner h1 .type
134
+ .banner h2 .type
131
135
  {
132
136
  font-size: 0.833em;
133
137
  display:block;
134
138
  }
135
139
 
136
- .banner h1 .type,
137
- .banner h1 .parent
140
+ .banner h2 .type,
141
+ .banner h2 .parent
138
142
  {
139
143
  color: #CCC;
140
144
  }
@@ -193,6 +197,7 @@ pre
193
197
  margin: 2em;
194
198
  margin-left: 3.5em;
195
199
  margin-right: 3.5em;
200
+ max-width: 980px;
196
201
  }
197
202
 
198
203
 
@@ -361,3 +366,13 @@ tt {
361
366
  animation-name: highlight;
362
367
  animation-duration: 1s;
363
368
  }
369
+
370
+ p code {
371
+ background: #eeeeee;
372
+ border-radius: 2px;
373
+ border: 1px solid #dddddd;
374
+ font-family: Consolas, Menlo, Courier, monospace;
375
+ font-size: 14px;
376
+ margin-bottom: 1px;
377
+ padding: 0 5px;
378
+ }
@@ -1,15 +1,15 @@
1
1
  /* Panel (begin) */
2
2
  .panel
3
3
  {
4
- position: absolute;
5
- width: 100%;
4
+ position: fixed;
5
+ width: 300px;
6
6
  height: 100%;
7
- top: 0;
8
- left: 0;
9
7
  background: #FFF;
10
8
  z-index: 2;
11
9
  font-family: "Helvetica Neue", "Arial", sans-serif;
12
10
  overflow-x: hidden;
11
+ border-right: 1px #ccc solid;
12
+ line-height: 1;
13
13
  }
14
14
 
15
15
  .panel_tree .results,
@@ -25,10 +25,11 @@
25
25
  background-position: 5px;
26
26
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
27
27
  height: 40px;
28
- width: 100%;
29
- position: absolute;
28
+ width: 300px;
29
+ position: fixed;
30
30
  left: 0; top: 0;
31
31
  z-index: 300;
32
+ overflow-x: hidden;
32
33
  }
33
34
 
34
35
  .panel .header input
@@ -51,9 +52,9 @@
51
52
  /* Results (begin) */
52
53
  .panel .result
53
54
  {
54
- position: absolute;
55
- top: 40px;
55
+ position: relative;
56
56
  bottom: 0;
57
+ top: 40px;
57
58
  left: 0;
58
59
  width: 100%;
59
60
  overflow-y: scroll;
@@ -73,6 +74,7 @@
73
74
  overflow: hidden;
74
75
  padding: 4px 10px 0 10px;
75
76
  cursor: pointer;
77
+ margin: 0;
76
78
  }
77
79
 
78
80
  .panel .result ul li:nth-child(2n) {
@@ -84,6 +86,7 @@
84
86
  font-size: 13px;
85
87
  font-weight: normal;
86
88
  color: #333;
89
+ margin-top: 0;
87
90
  margin-bottom: 2px;
88
91
  white-space: nowrap;
89
92
  }
@@ -216,7 +219,7 @@
216
219
  .panel .tree
217
220
  {
218
221
  background: white;
219
- position: absolute;
222
+ position: relative;
220
223
  top: 40px;
221
224
  bottom: 0;
222
225
  left: 0;
@@ -238,6 +241,7 @@
238
241
  overflow: hidden;
239
242
  height: 30px;
240
243
  line-height: 100%;
244
+ margin: 0;
241
245
  }
242
246
 
243
247
 
@@ -273,6 +277,7 @@
273
277
  font-size: 13px;
274
278
  font-weight: normal;
275
279
  color: #000;
280
+ margin-top: 0;
276
281
  margin-bottom: 2px;
277
282
  white-space: nowrap;
278
283
  }
@@ -315,13 +320,13 @@
315
320
 
316
321
  .panel .tree ul li.current .icon
317
322
  {
318
- background: url(../i/arrow-right.svg);
323
+ background: url(../i/arrow-down-current.svg);
319
324
  background-size: 10px;
320
325
  }
321
326
 
322
327
  .panel .tree ul li.current.closed .icon
323
328
  {
324
- background: url(../i/arrow-down.svg);
329
+ background: url(../i/arrow-right-current.svg);
325
330
  background-size: 10px;
326
331
  }
327
332