diff --git a/assets/images/icons.png b/assets/images/icons.png
index e09ee647..70f1bcbe 100644
Binary files a/assets/images/icons.png and b/assets/images/icons.png differ
diff --git a/assets/images/icons@2x.png b/assets/images/icons@2x.png
index 6554b777..24dd56c0 100644
Binary files a/assets/images/icons@2x.png and b/assets/images/icons@2x.png differ
diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee
index 24772e51..9dc976bf 100644
--- a/assets/javascripts/templates/pages/about_tmpl.coffee
+++ b/assets/javascripts/templates/pages/about_tmpl.coffee
@@ -100,6 +100,11 @@ credits = [
'2009-2014 Jeremy Ashkenas',
'MIT',
'https://raw.github.com/jashkenas/coffee-script/master/LICENSE'
+ ], [
+ 'Cordova',
+ '2012 The Apache Software Foundation',
+ 'Apache',
+ 'https://raw.githubusercontent.com/apache/cordova-docs/master/LICENSE'
], [
'CSS
DOM
HTML
JavaScript',
'2005-2013 Mozilla Developer Network and individual contributors',
diff --git a/assets/javascripts/templates/pages/news_tmpl.coffee b/assets/javascripts/templates/pages/news_tmpl.coffee
index b46e4d8e..b5977fef 100644
--- a/assets/javascripts/templates/pages/news_tmpl.coffee
+++ b/assets/javascripts/templates/pages/news_tmpl.coffee
@@ -24,7 +24,10 @@ newsItem = (date, news) ->
result
app.news = [
- [ 1404172800000, # July 1, 2014
+ [ 1404518400000, # July 5, 2014
+ """ New Cordova documentation """,
+ ], [
+ 1404172800000, # July 1, 2014
""" New Chai and Sinon documentations """,
], [
1402790400000, # June 15, 2014
diff --git a/assets/stylesheets/application.css.scss b/assets/stylesheets/application.css.scss
index d769758b..4350bf6c 100644
--- a/assets/stylesheets/application.css.scss
+++ b/assets/stylesheets/application.css.scss
@@ -32,6 +32,7 @@
'pages/c',
'pages/chai',
'pages/coffeescript',
+ 'pages/cordova',
'pages/d3',
'pages/ember',
'pages/express',
diff --git a/assets/stylesheets/global/_icons.scss b/assets/stylesheets/global/_icons.scss
index ce8c6eec..1b9ffebb 100644
--- a/assets/stylesheets/global/_icons.scss
+++ b/assets/stylesheets/global/_icons.scss
@@ -4,7 +4,7 @@
width: 1rem;
height: 1rem;
background-image: image-url('icons.png');
- background-size: 5rem 10rem;
+ background-size: 5rem 11rem;
}
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
@@ -61,3 +61,4 @@
._icon-requirejs:before { background-position: -2rem -9rem; }
._icon-chai:before { background-position: -3rem -9rem; }
._icon-sinon:before { background-position: -4rem -9rem; }
+._icon-cordova:before { background-position: 0 -10rem; }
diff --git a/assets/stylesheets/pages/_cordova.scss b/assets/stylesheets/pages/_cordova.scss
new file mode 100644
index 00000000..3667d56e
--- /dev/null
+++ b/assets/stylesheets/pages/_cordova.scss
@@ -0,0 +1,10 @@
+._cordova {
+ padding-left: 1rem;
+
+ > h1, > h2 { margin-left: -1rem; }
+ > h2 { @extend %block-heading; }
+ > h3 { font-size: 1rem; }
+
+ code { @extend %label; }
+ blockquote { @extend %note; }
+}
diff --git a/lib/docs/filters/cordova/clean_html.rb b/lib/docs/filters/cordova/clean_html.rb
new file mode 100644
index 00000000..3564d830
--- /dev/null
+++ b/lib/docs/filters/cordova/clean_html.rb
@@ -0,0 +1,34 @@
+module Docs
+ class Cordova
+ class CleanHtmlFilter < Filter
+ def call
+ if root_page? || slug == 'cordova_events_events.md'
+ css('h1, h2').each do |node|
+ node.name = node.name.sub(/\d/) { |i| i.to_i + 1 }
+ end
+ at_css('h2').name = 'h1' if slug == 'cordova_events_events.md'
+ end
+
+ if root_page?
+ css('li > h3').each do |node|
+ node.name = 'div'
+ end
+ end
+
+ css('hr').remove
+
+ css('a[name]').each do |node|
+ node.parent['id'] = node['name']
+ node.before(node.children).remove
+ end
+
+ # Remove code highlighting
+ css('pre').each do |node|
+ node.content = node.content.remove(/^\ {4,5}/)
+ end
+
+ doc
+ end
+ end
+ end
+end
diff --git a/lib/docs/filters/cordova/entries.rb b/lib/docs/filters/cordova/entries.rb
new file mode 100644
index 00000000..1304f25c
--- /dev/null
+++ b/lib/docs/filters/cordova/entries.rb
@@ -0,0 +1,25 @@
+module Docs
+ class Cordova
+ class EntriesFilter < Docs::EntriesFilter
+ def get_name
+ at_css('h1').content.remove(' Guide')
+ end
+
+ def get_type
+ if subpath.start_with?('guide_platforms')
+ name[/Amazon\ Fire\ OS|Android|BlackBerry|Firefox OS|iOS|Windows/] || 'Platform Guides'
+ else
+ 'Guides'
+ end
+ end
+
+ def additional_entries
+ return [] unless slug == 'cordova_events_events.md'
+
+ css('h2').map do |node|
+ [node.content, node['id'], 'Events']
+ end
+ end
+ end
+ end
+end
diff --git a/lib/docs/scrapers/cordova.rb b/lib/docs/scrapers/cordova.rb
new file mode 100644
index 00000000..eade6e00
--- /dev/null
+++ b/lib/docs/scrapers/cordova.rb
@@ -0,0 +1,21 @@
+module Docs
+ class Cordova < UrlScraper
+ self.name = 'Cordova'
+ self.type = 'cordova'
+ self.version = '3.5.0'
+ self.base_url = 'http://cordova.apache.org/docs/en/3.5.0/'
+ self.root_path = 'index.html'
+
+ html_filters.push 'cordova/clean_html', 'cordova/entries', 'title'
+
+ options[:container] = ->(filter) { filter.root_page? ? '#home' : '#content' }
+ options[:title] = false
+ options[:root_title] = 'Apache Cordova'
+ options[:skip] = %w(_index.html guide_support_index.md.html)
+
+ options[:attribution] = <<-HTML
+ © 2012 The Apache Software Foundation
+ Licensed under the Apache License 2.0.
+ HTML
+ end
+end
diff --git a/public/icons/docs/cordova/16.png b/public/icons/docs/cordova/16.png
new file mode 100644
index 00000000..c6e63625
Binary files /dev/null and b/public/icons/docs/cordova/16.png differ
diff --git a/public/icons/docs/cordova/16@2x.png b/public/icons/docs/cordova/16@2x.png
new file mode 100644
index 00000000..2a5d3732
Binary files /dev/null and b/public/icons/docs/cordova/16@2x.png differ
diff --git a/public/icons/docs/cordova/SOURCE b/public/icons/docs/cordova/SOURCE
new file mode 100644
index 00000000..1a7cbc98
--- /dev/null
+++ b/public/icons/docs/cordova/SOURCE
@@ -0,0 +1 @@
+http://cordova.apache.org/artwork.html