diff --git a/assets/javascripts/views/pages/simple.coffee b/assets/javascripts/views/pages/simple.coffee
index 281ff308..6bb21226 100644
--- a/assets/javascripts/views/pages/simple.coffee
+++ b/assets/javascripts/views/pages/simple.coffee
@@ -36,6 +36,7 @@ app.views.RethinkdbPage =
app.views.RubydocPage =
app.views.SinonPage =
app.views.SocketioPage =
+app.views.SphinxPage =
app.views.SphinxSimplePage =
app.views.TensorflowPage =
app.views.TypescriptPage =
diff --git a/assets/javascripts/views/pages/sphinx.coffee b/assets/javascripts/views/pages/sphinx.coffee
deleted file mode 100644
index faecdd71..00000000
--- a/assets/javascripts/views/pages/sphinx.coffee
+++ /dev/null
@@ -1,8 +0,0 @@
-#= require views/pages/base
-
-class app.views.SphinxPage extends app.views.BasePage
- prepare: ->
- @highlightCode @findAll('pre.python'), 'python'
- @highlightCode @findAll('pre.markup'), 'markup'
- @highlightCode @findAll('pre.php'), 'php'
- return
diff --git a/assets/stylesheets/pages/_sphinx.scss b/assets/stylesheets/pages/_sphinx.scss
index 19784588..14abecf5 100644
--- a/assets/stylesheets/pages/_sphinx.scss
+++ b/assets/stylesheets/pages/_sphinx.scss
@@ -2,15 +2,24 @@
h2, h3 { @extend %block-heading; }
h4 { font-size: 1em; }
> dl:not(.docutils) > dt { @extend %block-label, %label-blue; }
- dl > dl > dt { @extend %block-label; }
+ dd > dl:not(.docutils) > dt { @extend %block-label; }
dt + dt { margin-top: -.5em; }
- .note, .admonition, .versionadded, .versionchanged, .deprecated-removed { @extend %note; }
+ .note, .admonition, div.versionadded, div.versionchanged, .deprecated-removed, .deprecated { @extend %note; }
+
.important { @extend %note-orange; }
- .warning, .deprecated-removed { @extend %note-red; }
- .versionmodified { font-weight: bold; }
+ .warning, .deprecated-removed, .deprecated { @extend %note-red; }
+
+ .versionmodified, span.title {
+ display: block;
+ font-weight: bold;
+ }
+
+ p > code, li > code, dd > code, .docutils > dt > code { @extend %label; }
- p > code, li > code, dd > code { @extend %label; }
+ ul.simple { margin: 1em 0; }
+
+ h2 > a, h3 > a, dt[id] > a.external { float: right; }
.admonition-title {
float: left;
@@ -20,15 +29,13 @@
&:after { content: ':'; }
}
- .admonition > dl {
+ .admonition > dl, .admonition > ul {
clear: left;
margin: 0;
}
.admonition-title + dl { padding-top: .5em; }
- ul.simple { margin: 1em 0; }
-
- h2 > a, h3 > a, dt[id] > a.external { float: right; }
+ td > div { margin: 0 !important; }
}
._sphinx {
diff --git a/lib/docs/filters/ansible/clean_html.rb b/lib/docs/filters/ansible/clean_html.rb
index 2aa4a4aa..f24d0d01 100644
--- a/lib/docs/filters/ansible/clean_html.rb
+++ b/lib/docs/filters/ansible/clean_html.rb
@@ -4,14 +4,6 @@ module Docs
def call
@doc = at_css('#page-content')
- css('blockquote > div > pre:first-child:last-child', 'blockquote > div > ul:first-child:last-child').each do |node|
- node.ancestors('blockquote').first.before(node).remove
- end
-
- css('a > em').each do |node|
- node.before(node.children).remove
- end
-
doc
end
end
diff --git a/lib/docs/filters/cmake/clean_html.rb b/lib/docs/filters/cmake/clean_html.rb
index e2c82fef..795ed75f 100644
--- a/lib/docs/filters/cmake/clean_html.rb
+++ b/lib/docs/filters/cmake/clean_html.rb
@@ -2,8 +2,6 @@ module Docs
class Cmake
class CleanHtmlFilter < Filter
def call
- css('.headerlink', '#contents .topic-title').remove
-
if root_page?
css('#release-notes', '#index-and-search').remove
@@ -12,38 +10,6 @@ module Docs
end
end
- css('.contents > ul.simple > li:first-child:last-child').each do |node|
- node.parent.before(node.at_css('> ul'))
- node.remove
- end
-
- css('.toc-backref', '.toctree-wrapper', '.contents', 'span.pre', 'pre a > code').each do |node|
- node.before(node.children).remove
- end
-
- css('div[class*="highlight-"]').each do |node|
- pre = node.at_css('pre')
- pre.content = pre.content
- node.replace(pre)
- end
-
- css('span[id]:empty').each do |node|
- node.next_element['id'] = node['id']
- node.remove
- end
-
- css('.section').each do |node|
- if node['id']
- if node.first_element_child['id']
- node.element_children[1]['id'] = node['id']
- else
- node.first_element_child['id'] = node['id']
- end
- end
-
- node.before(node.children).remove
- end
-
doc
end
end
diff --git a/lib/docs/filters/codeigniter/clean_html.rb b/lib/docs/filters/codeigniter/clean_html.rb
deleted file mode 100644
index 7621ad81..00000000
--- a/lib/docs/filters/codeigniter/clean_html.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-module Docs
- class Codeigniter
- class CleanHtmlFilter < Filter
- def call
- css('.headerlink').remove
-
- css('h1', 'h2', 'h3', 'h4', 'h5', 'pre').each do |node|
- node.content = node.content
- end
-
- css('div[class^="highlight-"]').each do |node|
- node.content = node.content.strip
- node.name = 'pre'
- node['class'] = 'php' if node['class'].include?('highlight-ci')
- end
-
- css('table').each do |node|
- node.remove_attribute 'border'
- node.remove_attribute 'cellpadding'
- end
-
- css('.section').each do |node|
- node.first_element_child['id'] = node['id'] if node['id']
- node.before(node.children).remove
- end
-
- doc
- end
- end
- end
-end
diff --git a/lib/docs/filters/codeigniter/entries.rb b/lib/docs/filters/codeigniter/entries.rb
index 55c1a39a..d841feab 100644
--- a/lib/docs/filters/codeigniter/entries.rb
+++ b/lib/docs/filters/codeigniter/entries.rb
@@ -2,7 +2,9 @@ module Docs
class Codeigniter
class EntriesFilter < Docs::EntriesFilter
def get_name
- at_css('h1').content.strip
+ name = at_css('h1').content.strip
+ name.remove! "\u{00B6}"
+ name
end
def get_type
diff --git a/lib/docs/filters/django/clean_html.rb b/lib/docs/filters/django/clean_html.rb
index 0e50c7aa..30a0d9e9 100644
--- a/lib/docs/filters/django/clean_html.rb
+++ b/lib/docs/filters/django/clean_html.rb
@@ -4,43 +4,6 @@ module Docs
def call
@doc = at_css('.yui-g')
- css('.section', 'a > em').each do |node|
- node.before(node.children).remove
- end
-
- css('tt', 'span.pre').each do |node|
- node.name = 'code'
- node.content = node.content
- node.remove_attribute 'class'
- end
-
- css('.headerlink').each do |node|
- id = node['href'][1..-1]
- node.parent['id'] ||= id
- doc.at_css("span##{id}").try(:remove)
- node.remove
- end
-
- css('h1', 'h2', 'h3', 'dt').each do |node|
- links = node.css('a').remove
- node.content = node.content
- node << links
- end
-
- css('div[class^="highlight-"]').each do |node|
- node.name = 'pre'
- node['class'] = node['data-language'] = case node['class']
- when 'highlight-python', 'highlight-default' then 'python'
- when 'highlight-html+django' then 'markup'
- else ''
- end
- node.content = node.at_css('pre').content
- end
-
- css('code > code').each do |node|
- node.before(node.children).remove
- end
-
doc
end
end
diff --git a/lib/docs/filters/matplotlib/clean_html.rb b/lib/docs/filters/matplotlib/clean_html.rb
deleted file mode 100644
index d1a2b812..00000000
--- a/lib/docs/filters/matplotlib/clean_html.rb
+++ /dev/null
@@ -1,67 +0,0 @@
-module Docs
- class Matplotlib
- class CleanHtmlFilter < Filter
- def call
- css('.headerlink', 'hr').remove
-
- css('.toc-backref', '.toctree-wrapper', '.contents', 'span.pre', 'pre a > code').each do |node|
- node.before(node.children).remove
- end
-
- css('div[class*="highlight-"]').each do |node|
- pre = node.at_css('pre')
- pre.content = pre.content
- pre['data-language'] = node['class'][/highlight\-(\w+)/, 1]
- node.replace(pre)
- end
-
- css('span[id]:empty').each do |node|
- node.next_element['id'] = node['id']
- node.remove
- end
-
- css('.section').each do |node|
- if node['id']
- if node.first_element_child['id']
- node.element_children[1]['id'] = node['id']
- else
- node.first_element_child['id'] = node['id']
- end
- end
-
- node.before(node.children).remove
- end
-
- css('h2 > a > code').each do |node|
- node.parent.before(node.content).remove
- end
-
- css('dt[id]').each do |node|
- node.inner_html = "#{node.content.strip}
"
- end
-
- css('li > p:first-child:last-child').each do |node|
- node.before(node.children).remove
- end
-
- css('table[border]').each do |node|
- node.remove_attribute 'border'
- end
-
- css('code[class]').each do |node|
- node.remove_attribute 'class'
- end
-
- css('h1').each do |node|
- node.content = node.content
- end
-
- css('p.rubric').each do |node|
- node.name = 'h4'
- end
-
- doc
- end
- end
- end
-end
diff --git a/lib/docs/filters/numpy/clean_html.rb b/lib/docs/filters/numpy/clean_html.rb
index 19a19b83..a01a5e1b 100644
--- a/lib/docs/filters/numpy/clean_html.rb
+++ b/lib/docs/filters/numpy/clean_html.rb
@@ -4,60 +4,6 @@ module Docs
def call
@doc = at_css('#spc-section-body')
- css('colgroup').remove
-
- css('.section', 'a > em', 'dt > tt', 'dt > em', 'dt > big', 'tbody').each do |node|
- node.before(node.children).remove
- end
-
- css('.headerlink').each do |node|
- id = node['href'][1..-1]
- node.parent['id'] ||= id
- doc.at_css("span##{id}").try(:remove)
- node.remove
- end
-
- css('tt', 'span.pre').each do |node|
- node.name = 'code'
- node.content = node.content
- node.remove_attribute 'class'
- end
-
- css('h1', 'h2', 'h3').each do |node|
- node.content = node.content
- end
-
- css('p.rubric').each do |node|
- node.name = 'h4'
- end
-
- css('blockquote > div:first-child:last-child').each do |node|
- node.parent.before(node.parent.children).remove
- node.before(node.children).remove
- end
-
- css('.admonition-example').each do |node|
- title = node.at_css('.admonition-title')
- title.name = 'h4'
- title.remove_attribute 'class'
- node.before(node.children).remove
- end
-
- css('em.xref').each do |node|
- node.name = 'code'
- end
-
- css('div[class*="highlight-"]').each do |node|
- node.content = node.content.strip
- node.name = 'pre'
- node['data-language'] = node['class'][/highlight\-(\w+)/, 1]
- node['class'] = node['data-language'] # tmp
- end
-
- css('table[border]').each do |node|
- node.remove_attribute 'border'
- end
-
doc
end
end
diff --git a/lib/docs/filters/python/clean_html.rb b/lib/docs/filters/python/clean_html.rb
index 2d018a5e..db474da8 100644
--- a/lib/docs/filters/python/clean_html.rb
+++ b/lib/docs/filters/python/clean_html.rb
@@ -4,21 +4,6 @@ module Docs
def call
@doc = at_css '.body'
- css('> .section').each do |node|
- node.before(node.children).remove
- end
-
- # Clean inline code elements
-
- css('tt.literal').each do |node|
- node.before(node.children).remove
- end
-
- css('tt', 'span.pre').each do |node|
- node.name = 'code'
- node.remove_attribute 'class'
- end
-
root_page? ? root : other
doc
@@ -26,14 +11,9 @@ module Docs
def root
at_css('h1').content = 'Python'
- css('> p').remove
end
def other
- css('.headerlink', 'hr').remove
-
- # Clean headings
-
css('h1').each do |node|
node.content = node.content.sub!(/\A[\d\.]+/) do |str|
rgx = /\A#{str}/
@@ -43,32 +23,7 @@ module Docs
end
css('h2', 'h3', 'h4').each do |node|
- node.css('a').each do |link|
- link.before(link.children).remove
- end
- node.child.content = node.child.content.remove @levelRegexp
- end
-
- css('dt').each do |node|
- node.content = node.content
- end
-
- # Remove blockquotes
- css('blockquote').each do |node|
- node.before(node.children).remove
- end
-
- # Remove code highlighting
- css('[class*="highlight-python"]').each do |node|
- pre = node.at_css('pre')
- pre.content = pre.content
- pre['class'] = 'python'
- node.replace(pre)
- end
-
- # Remove