Unified · Split
Binary file not shown.
Binary file not shown.
| @@ -100,6 +100,11 @@ credits = [ · 99 unmodified lines | ||
| 100 | 100 | '2009-2014 Jeremy Ashkenas', |
| 101 | 101 | 'MIT', |
| 102 | 102 | 'https://raw.github.com/jashkenas/coffee-script/master/LICENSE' |
| 103 | + ], [ | |
| 104 | + 'Cordova', | |
| 105 | + '2012 The Apache Software Foundation', | |
| 106 | + 'Apache', | |
| 107 | + 'https://raw.githubusercontent.com/apache/cordova-docs/master/LICENSE' | |
| 103 | 108 | ], [ |
| 104 | 109 | 'CSS<br>DOM<br>HTML<br>JavaScript', |
| 105 | 110 | '2005-2013 Mozilla Developer Network and individual contributors', |
| @@ -24,7 +24,10 @@ newsItem = (date, news) -> · 23 unmodified lines | ||
| 24 | 24 | result |
| 25 | 25 | |
| 26 | 26 | app.news = [ |
| 27 | − [ 1404172800000, # July 1, 2014 | |
| 27 | + [ 1404518400000, # July 5, 2014 | |
| 28 | + """ New <a href="/cordova/">Cordova</a> documentation """, | |
| 29 | + ], [ | |
| 30 | + 1404172800000, # July 1, 2014 | |
| 28 | 31 | """ New <a href="/chai/">Chai</a> and <a href="/sinon/">Sinon</a> documentations """, |
| 29 | 32 | ], [ |
| 30 | 33 | 1402790400000, # June 15, 2014 |
| @@ -32,6 +32,7 @@ · 31 unmodified lines | ||
| 32 | 32 | 'pages/c', |
| 33 | 33 | 'pages/chai', |
| 34 | 34 | 'pages/coffeescript', |
| 35 | + 'pages/cordova', | |
| 35 | 36 | 'pages/d3', |
| 36 | 37 | 'pages/ember', |
| 37 | 38 | 'pages/express', |
| @@ -4,7 +4,7 @@ · 3 unmodified lines | ||
| 4 | 4 | width: 1rem; |
| 5 | 5 | height: 1rem; |
| 6 | 6 | background-image: image-url('icons.png'); |
| 7 | − background-size: 5rem 10rem; | |
| 7 | + background-size: 5rem 11rem; | |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) { |
| @@ -61,3 +61,4 @@ · 50 unmodified lines | ||
| 61 | 61 | ._icon-requirejs:before { background-position: -2rem -9rem; } |
| 62 | 62 | ._icon-chai:before { background-position: -3rem -9rem; } |
| 63 | 63 | ._icon-sinon:before { background-position: -4rem -9rem; } |
| 64 | +._icon-cordova:before { background-position: 0 -10rem; } | |
| @@ -0,0 +1,10 @@ | ||
| 1 | +._cordova { | |
| 2 | + padding-left: 1rem; | |
| 3 | + | |
| 4 | + > h1, > h2 { margin-left: -1rem; } | |
| 5 | + > h2 { @extend %block-heading; } | |
| 6 | + > h3 { font-size: 1rem; } | |
| 7 | + | |
| 8 | + code { @extend %label; } | |
| 9 | + blockquote { @extend %note; } | |
| 10 | +} | |
| @@ -0,0 +1,34 @@ | ||
| 1 | +module Docs | |
| 2 | + class Cordova | |
| 3 | + class CleanHtmlFilter < Filter | |
| 4 | + def call | |
| 5 | + if root_page? || slug == 'cordova_events_events.md' | |
| 6 | + css('h1, h2').each do |node| | |
| 7 | + node.name = node.name.sub(/\d/) { |i| i.to_i + 1 } | |
| 8 | + end | |
| 9 | + at_css('h2').name = 'h1' if slug == 'cordova_events_events.md' | |
| 10 | + end | |
| 11 | + | |
| 12 | + if root_page? | |
| 13 | + css('li > h3').each do |node| | |
| 14 | + node.name = 'div' | |
| 15 | + end | |
| 16 | + end | |
| 17 | + | |
| 18 | + css('hr').remove | |
| 19 | + | |
| 20 | + css('a[name]').each do |node| | |
| 21 | + node.parent['id'] = node['name'] | |
| 22 | + node.before(node.children).remove | |
| 23 | + end | |
| 24 | + | |
| 25 | + # Remove code highlighting | |
| 26 | + css('pre').each do |node| | |
| 27 | + node.content = node.content.remove(/^\ {4,5}/) | |
| 28 | + end | |
| 29 | + | |
| 30 | + doc | |
| 31 | + end | |
| 32 | + end | |
| 33 | + end | |
| 34 | +end | |
| @@ -0,0 +1,25 @@ | ||
| 1 | +module Docs | |
| 2 | + class Cordova | |
| 3 | + class EntriesFilter < Docs::EntriesFilter | |
| 4 | + def get_name | |
| 5 | + at_css('h1').content.remove(' Guide') | |
| 6 | + end | |
| 7 | + | |
| 8 | + def get_type | |
| 9 | + if subpath.start_with?('guide_platforms') | |
| 10 | + name[/Amazon\ Fire\ OS|Android|BlackBerry|Firefox OS|iOS|Windows/] || 'Platform Guides' | |
| 11 | + else | |
| 12 | + 'Guides' | |
| 13 | + end | |
| 14 | + end | |
| 15 | + | |
| 16 | + def additional_entries | |
| 17 | + return [] unless slug == 'cordova_events_events.md' | |
| 18 | + | |
| 19 | + css('h2').map do |node| | |
| 20 | + [node.content, node['id'], 'Events'] | |
| 21 | + end | |
| 22 | + end | |
| 23 | + end | |
| 24 | + end | |
| 25 | +end | |
| @@ -0,0 +1,21 @@ | ||
| 1 | +module Docs | |
| 2 | + class Cordova < UrlScraper | |
| 3 | + self.name = 'Cordova' | |
| 4 | + self.type = 'cordova' | |
| 5 | + self.version = '3.5.0' | |
| 6 | + self.base_url = 'http://cordova.apache.org/docs/en/3.5.0/' | |
| 7 | + self.root_path = 'index.html' | |
| 8 | + | |
| 9 | + html_filters.push 'cordova/clean_html', 'cordova/entries', 'title' | |
| 10 | + | |
| 11 | + options[:container] = ->(filter) { filter.root_page? ? '#home' : '#content' } | |
| 12 | + options[:title] = false | |
| 13 | + options[:root_title] = 'Apache Cordova' | |
| 14 | + options[:skip] = %w(_index.html guide_support_index.md.html) | |
| 15 | + | |
| 16 | + options[:attribution] = <<-HTML | |
| 17 | + © 2012 The Apache Software Foundation<br> | |
| 18 | + Licensed under the Apache License 2.0. | |
| 19 | + HTML | |
| 20 | + end | |
| 21 | +end | |
Binary file not shown.
Binary file not shown.
| @@ -0,0 +1 @@ | ||
| 1 | +http://cordova.apache.org/artwork.html | |