Unified · Split
Binary file not shown.
Binary file not shown.
| @@ -1,6 +1,6 @@ | |||
| 1 | [ | 1 | [ |
| 2 | [ "2014-12-21", | 2 | [ "2014-12-21", |
| 3 | "New <a href=\"/react/\">React</a>, <a href=\"/rethinkdb/\">RethinkDB</a> and <a href=\"/socketio/\">Socket.IO</a> documentations" | 3 | "New <a href=\"/react/\">React</a>, <a href=\"/rethinkdb/\">RethinkDB</a>, <a href=\"/socketio/\">Socket.IO</a> and <a href=\"/modernizr/\">Modernizr</a> documentations" |
| 4 | ], [ | 4 | ], [ |
| 5 | "2014-11-30", | 5 | "2014-11-30", |
| 6 | "New <a href=\"/phpunit/\">PHPUnit</a> and <a href=\"/nokogiri/\">Nokogiri</a> documentations" | 6 | "New <a href=\"/phpunit/\">PHPUnit</a> and <a href=\"/nokogiri/\">Nokogiri</a> documentations" |
| @@ -208,6 +208,11 @@ credits = [ · 207 unmodified lines | |||
| 208 | '2014 MaxCDN', | 208 | '2014 MaxCDN', |
| 209 | 'MIT', | 209 | 'MIT', |
| 210 | 'https://raw.githubusercontent.com/MaxCDN/api-docs/master/LICENSE' | 210 | 'https://raw.githubusercontent.com/MaxCDN/api-docs/master/LICENSE' |
| 211 | ], [ | ||
| 212 | 'Modernizr', | ||
| 213 | '2009-2014 Modernizr', | ||
| 214 | 'MIT', | ||
| 215 | 'http://modernizr.com/license/' | ||
| 211 | ], [ | 216 | ], [ |
| 212 | 'Moment.js', | 217 | 'Moment.js', |
| 213 | '2011-2014 Tim Wood, Iskren Chernev, Moment.js contributors', | 218 | '2011-2014 Tim Wood, Iskren Chernev, Moment.js contributors', |
| @@ -0,0 +1,4 @@ | |||
| 1 | #= require views/pages/base | ||
| 2 | #= require views/pages/requirejs | ||
| 3 | |||
| 4 | app.views.ModernizrPage = app.views.RequirejsPage | ||
| @@ -49,6 +49,7 @@ · 48 unmodified lines | |||
| 49 | 'pages/markdown', | 49 | 'pages/markdown', |
| 50 | 'pages/maxcdn', | 50 | 'pages/maxcdn', |
| 51 | 'pages/mdn', | 51 | 'pages/mdn', |
| 52 | 'pages/modernizr', | ||
| 52 | 'pages/moment', | 53 | 'pages/moment', |
| 53 | 'pages/mongoose', | 54 | 'pages/mongoose', |
| 54 | 'pages/nginx', | 55 | 'pages/nginx', |
| @@ -147,6 +147,8 @@ td { · 146 unmodified lines | |||
| 147 | 147 | ||
| 148 | + td { border-left: 1px solid $boxBorderLight; } | 148 | + td { border-left: 1px solid $boxBorderLight; } |
| 149 | tr:last-child > & { border-bottom: 0; } | 149 | tr:last-child > & { border-bottom: 0; } |
| 150 | |||
| 151 | > pre:last-child, > p:last-child, > ul:last-child, > ol:last-child { margin-bottom: 0; } | ||
| 150 | } | 152 | } |
| 151 | 153 | ||
| 152 | input { | 154 | input { |
| @@ -75,3 +75,4 @@ · 74 unmodified lines | |||
| 75 | ._icon-rethinkdb:before { background-position: 0 -12rem; } | 75 | ._icon-rethinkdb:before { background-position: 0 -12rem; } |
| 76 | ._icon-react:before { background-position: -1rem -12rem; } | 76 | ._icon-react:before { background-position: -1rem -12rem; } |
| 77 | ._icon-socketio:before { background-position: -2rem -12rem; } | 77 | ._icon-socketio:before { background-position: -2rem -12rem; } |
| 78 | ._icon-modernizr:before { background-position: -3rem -12rem; } | ||
| @@ -0,0 +1,8 @@ | |||
| 1 | ._modernizr { | ||
| 2 | h2 { @extend %block-heading; } | ||
| 3 | h3 { @extend %block-label, %label-blue; } | ||
| 4 | h4 { font-size: 1em; } | ||
| 5 | |||
| 6 | code { @extend %label; } | ||
| 7 | blockquote { @extend %note; } | ||
| 8 | } | ||
| @@ -0,0 +1,21 @@ | |||
| 1 | module Docs | ||
| 2 | class Modernizr | ||
| 3 | class CleanHtmlFilter < Filter | ||
| 4 | def call | ||
| 5 | css('pre').each do |node| | ||
| 6 | node.content = node.content | ||
| 7 | end | ||
| 8 | |||
| 9 | css('> div', '> section').each do |node| | ||
| 10 | node.before(node.children).remove | ||
| 11 | end | ||
| 12 | |||
| 13 | css('h3, h4').each do |node| | ||
| 14 | node.name = node.name.sub(/\d/) { |i| i.to_i - 1 } | ||
| 15 | end | ||
| 16 | |||
| 17 | doc | ||
| 18 | end | ||
| 19 | end | ||
| 20 | end | ||
| 21 | end | ||
| @@ -0,0 +1,36 @@ | |||
| 1 | module Docs | ||
| 2 | class Modernizr | ||
| 3 | class EntriesFilter < Docs::EntriesFilter | ||
| 4 | def additional_entries | ||
| 5 | entries = [] | ||
| 6 | |||
| 7 | css('h3[id]').each do |node| | ||
| 8 | next unless name = node.content.strip[/\AModernizr\.\w+\(\)/] | ||
| 9 | entries << [name, node['id'], 'Modernizr'] | ||
| 10 | end | ||
| 11 | |||
| 12 | css('section[id]').each do |node| | ||
| 13 | next unless heading = node.at_css('h3') | ||
| 14 | next unless name = heading.content.strip[/\A(Modernizr\.)?\w+\(\)/] | ||
| 15 | |||
| 16 | heading['id'] = node['id'] | ||
| 17 | node.remove_attribute('id') | ||
| 18 | |||
| 19 | name.prepend('Modernizr.') unless name.start_with?('Modernizr') | ||
| 20 | entries << [name, heading['id'], 'Modernizr'] | ||
| 21 | end | ||
| 22 | |||
| 23 | css('h4[id^="features-"] + table').each do |table| | ||
| 24 | type = table.previous_element.content.strip | ||
| 25 | type << ' features' unless type.end_with?('features') | ||
| 26 | |||
| 27 | table.css('tbody th[id]').each do |node| | ||
| 28 | entries << [node.content, node['id'], type] | ||
| 29 | end | ||
| 30 | end | ||
| 31 | |||
| 32 | entries | ||
| 33 | end | ||
| 34 | end | ||
| 35 | end | ||
| 36 | end | ||
| @@ -0,0 +1,19 @@ | |||
| 1 | module Docs | ||
| 2 | class Modernizr < UrlScraper | ||
| 3 | self.name = 'Modernizr' | ||
| 4 | self.type = 'modernizr' | ||
| 5 | self.version = '2.8.3' | ||
| 6 | self.base_url = 'http://modernizr.com/docs/' | ||
| 7 | |||
| 8 | html_filters.push 'modernizr/entries', 'modernizr/clean_html', 'title' | ||
| 9 | |||
| 10 | options[:title] = 'Modernizr' | ||
| 11 | options[:container] = '#documentation' | ||
| 12 | options[:skip_links] = true | ||
| 13 | |||
| 14 | options[:attribution] = <<-HTML | ||
| 15 | © 2009–2014 Modernizr<br> | ||
| 16 | Licensed under the MIT License. | ||
| 17 | HTML | ||
| 18 | end | ||
| 19 | end | ||
Binary file not shown.
Binary file not shown.
| @@ -0,0 +1 @@ | |||
| 1 | https://github.com/Modernizr/Modernizr/tree/master/media | ||