Unified · Split
Binary file not shown.
Binary file not shown.
| @@ -1,7 +1,7 @@ | |||
| 1 | [ | 1 | [ |
| 2 | [ | 2 | [ |
| 3 | "2015-11-22", | 3 | "2015-11-22", |
| 4 | "New documentation: <a href=\"/dojo/\">Dojo</a>" | 4 | "New documentations: <a href=\"/dojo/\">Dojo</a> and <a href=\"/flow/\">Flow</a>" |
| 5 | ], [ | 5 | ], [ |
| 6 | "2015-11-08", | 6 | "2015-11-08", |
| 7 | "New documentations: <a href=\"/elixir/\">Elixir</a> and <a href=\"/vagrant/\">Vagrant</a>" | 7 | "New documentations: <a href=\"/elixir/\">Elixir</a> and <a href=\"/vagrant/\">Vagrant</a>" |
| @@ -325,7 +325,7 @@ credits = [ · 324 unmodified lines | |||
| 325 | 'MIT', | 325 | 'MIT', |
| 326 | 'https://raw.githubusercontent.com/kriskowal/q/v1/LICENSE' | 326 | 'https://raw.githubusercontent.com/kriskowal/q/v1/LICENSE' |
| 327 | ], [ | 327 | ], [ |
| 328 | 'React, React Native', | 328 | 'React, React Native, Flow', |
| 329 | '2013-2015 Facebook Inc.', | 329 | '2013-2015 Facebook Inc.', |
| 330 | 'CC BY', | 330 | 'CC BY', |
| 331 | 'https://raw.githubusercontent.com/facebook/react/master/LICENSE-docs' | 331 | 'https://raw.githubusercontent.com/facebook/react/master/LICENSE-docs' |
| @@ -119,3 +119,4 @@ · 118 unmodified lines | |||
| 119 | ._icon-elixir:before { background-position: -4rem -9rem; @extend %darkIconFix !optional; } | 119 | ._icon-elixir:before { background-position: -4rem -9rem; @extend %darkIconFix !optional; } |
| 120 | ._icon-vagrant:before { background-position: -5rem -9rem; } | 120 | ._icon-vagrant:before { background-position: -5rem -9rem; } |
| 121 | ._icon-dojo:before { background-position: -6rem -9rem; } | 121 | ._icon-dojo:before { background-position: -6rem -9rem; } |
| 122 | ._icon-flow:before { background-position: -7rem -9rem; } | ||
| @@ -3,7 +3,7 @@ · 2 unmodified lines | |||
| 3 | > h3 { @extend %block-label, %label-blue; } | 3 | > h3 { @extend %block-label, %label-blue; } |
| 4 | > h4 { @extend %block-label; } | 4 | > h4 { @extend %block-label; } |
| 5 | 5 | ||
| 6 | code { @extend %label; } | 6 | p code { @extend %label; } |
| 7 | blockquote { @extend %note; } | 7 | blockquote { @extend %note; } |
| 8 | 8 | ||
| 9 | span.platform { float: right; } | 9 | span.platform { float: right; } |
| @@ -2,7 +2,7 @@ module Docs · 1 unmodified line | |||
| 2 | class React | 2 | class React |
| 3 | class CleanHtmlFilter < Filter | 3 | class CleanHtmlFilter < Filter |
| 4 | def call | 4 | def call |
| 5 | @doc = at_css('.inner-content') | 5 | @doc = at_css('.inner-content, article.withtoc') |
| 6 | 6 | ||
| 7 | if root_page? | 7 | if root_page? |
| 8 | at_css('h1').content = context[:root_title] | 8 | at_css('h1').content = context[:root_title] |
| @@ -16,10 +16,14 @@ module Docs · 7 unmodified lines | |||
| 16 | 16 | ||
| 17 | css('.highlight').each do |node| | 17 | css('.highlight').each do |node| |
| 18 | node.name = 'pre' | 18 | node.name = 'pre' |
| 19 | node['data-lang'] = node.at_css('[data-lang]')['data-lang'] | 19 | node['data-lang'] = node.at_css('[data-lang]').try(:[], 'data-lang') || 'js' |
| 20 | node.content = node.content | 20 | node.content = node.content |
| 21 | end | 21 | end |
| 22 | 22 | ||
| 23 | css('table.highlighttable').each do |node| | ||
| 24 | node.replace(node.at_css('pre.highlight')) | ||
| 25 | end | ||
| 26 | |||
| 23 | css('.prism').each do |node| | 27 | css('.prism').each do |node| |
| 24 | node.name = 'pre' | 28 | node.name = 'pre' |
| 25 | node['data-lang'] = node['class'][/(?<=language\-)(\w+)/] | 29 | node['data-lang'] = node['class'][/(?<=language\-)(\w+)/] |
| @@ -18,8 +18,8 @@ module Docs · 17 unmodified lines | |||
| 18 | end | 18 | end |
| 19 | 19 | ||
| 20 | def get_type | 20 | def get_type |
| 21 | link = at_css('.nav-docs-section .active') | 21 | link = at_css('.nav-docs-section .active, .toc .active') |
| 22 | section = link.ancestors('.nav-docs-section').first | 22 | section = link.ancestors('.nav-docs-section, section').first |
| 23 | type = section.at_css('h3').content.strip | 23 | type = section.at_css('h3').content.strip |
| 24 | type = REPLACE_TYPES[type] || type | 24 | type = REPLACE_TYPES[type] || type |
| 25 | type += ": #{name}" if type == 'Components' | 25 | type += ": #{name}" if type == 'Components' |
| @@ -0,0 +1,22 @@ | |||
| 1 | module Docs | ||
| 2 | class Flow < React | ||
| 3 | self.type = 'react' | ||
| 4 | self.version = '0.18' | ||
| 5 | self.base_url = 'http://flowtype.org/docs/' | ||
| 6 | self.root_path = 'about-flow.html' | ||
| 7 | self.links = { | ||
| 8 | home: 'http://flowtype.org/', | ||
| 9 | code: 'https://github.com/facebook/flow' | ||
| 10 | } | ||
| 11 | |||
| 12 | options[:container] = '.content' | ||
| 13 | options[:root_title] = 'Flow Documentation' | ||
| 14 | options[:only_patterns] = nil | ||
| 15 | options[:skip] = %w(coming-soon.html) | ||
| 16 | |||
| 17 | options[:attribution] = <<-HTML | ||
| 18 | © 2013–2015 Facebook Inc.<br> | ||
| 19 | Licensed under the BSD License. | ||
| 20 | HTML | ||
| 21 | end | ||
| 22 | end | ||
Binary file not shown.
Binary file not shown.