diff --git a/assets/images/icons.png b/assets/images/icons.png
index ab0eaf7c..8b054317 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 48e2828a..df16b36d 100644
Binary files a/assets/images/icons@2x.png and b/assets/images/icons@2x.png differ
diff --git a/assets/javascripts/news.json b/assets/javascripts/news.json
index 7cb5d3ec..a9364fa3 100644
--- a/assets/javascripts/news.json
+++ b/assets/javascripts/news.json
@@ -1,7 +1,7 @@
[
[
"2015-11-22",
- "New documentation: Dojo"
+ "New documentations: Dojo and Flow"
], [
"2015-11-08",
"New documentations: Elixir and Vagrant"
diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee
index 9229442c..c2c51db6 100644
--- a/assets/javascripts/templates/pages/about_tmpl.coffee
+++ b/assets/javascripts/templates/pages/about_tmpl.coffee
@@ -325,7 +325,7 @@ credits = [
'MIT',
'https://raw.githubusercontent.com/kriskowal/q/v1/LICENSE'
], [
- 'React, React Native',
+ 'React, React Native, Flow',
'2013-2015 Facebook Inc.',
'CC BY',
'https://raw.githubusercontent.com/facebook/react/master/LICENSE-docs'
diff --git a/assets/stylesheets/global/_icons.scss b/assets/stylesheets/global/_icons.scss
index 0995380f..5414aec4 100644
--- a/assets/stylesheets/global/_icons.scss
+++ b/assets/stylesheets/global/_icons.scss
@@ -119,3 +119,4 @@
._icon-elixir:before { background-position: -4rem -9rem; @extend %darkIconFix !optional; }
._icon-vagrant:before { background-position: -5rem -9rem; }
._icon-dojo:before { background-position: -6rem -9rem; }
+._icon-flow:before { background-position: -7rem -9rem; }
diff --git a/assets/stylesheets/pages/_react.scss b/assets/stylesheets/pages/_react.scss
index 1b7c6740..22ca64e6 100644
--- a/assets/stylesheets/pages/_react.scss
+++ b/assets/stylesheets/pages/_react.scss
@@ -3,7 +3,7 @@
> h3 { @extend %block-label, %label-blue; }
> h4 { @extend %block-label; }
- code { @extend %label; }
+ p code { @extend %label; }
blockquote { @extend %note; }
span.platform { float: right; }
diff --git a/lib/docs/filters/react/clean_html.rb b/lib/docs/filters/react/clean_html.rb
index 25b3b8bb..40d8e93b 100644
--- a/lib/docs/filters/react/clean_html.rb
+++ b/lib/docs/filters/react/clean_html.rb
@@ -2,7 +2,7 @@ module Docs
class React
class CleanHtmlFilter < Filter
def call
- @doc = at_css('.inner-content')
+ @doc = at_css('.inner-content, article.withtoc')
if root_page?
at_css('h1').content = context[:root_title]
@@ -16,10 +16,14 @@ module Docs
css('.highlight').each do |node|
node.name = 'pre'
- node['data-lang'] = node.at_css('[data-lang]')['data-lang']
+ node['data-lang'] = node.at_css('[data-lang]').try(:[], 'data-lang') || 'js'
node.content = node.content
end
+ css('table.highlighttable').each do |node|
+ node.replace(node.at_css('pre.highlight'))
+ end
+
css('.prism').each do |node|
node.name = 'pre'
node['data-lang'] = node['class'][/(?<=language\-)(\w+)/]
diff --git a/lib/docs/filters/react/entries.rb b/lib/docs/filters/react/entries.rb
index d1002e70..938bda5e 100644
--- a/lib/docs/filters/react/entries.rb
+++ b/lib/docs/filters/react/entries.rb
@@ -18,8 +18,8 @@ module Docs
end
def get_type
- link = at_css('.nav-docs-section .active')
- section = link.ancestors('.nav-docs-section').first
+ link = at_css('.nav-docs-section .active, .toc .active')
+ section = link.ancestors('.nav-docs-section, section').first
type = section.at_css('h3').content.strip
type = REPLACE_TYPES[type] || type
type += ": #{name}" if type == 'Components'
diff --git a/lib/docs/scrapers/flow.rb b/lib/docs/scrapers/flow.rb
new file mode 100644
index 00000000..6859cea2
--- /dev/null
+++ b/lib/docs/scrapers/flow.rb
@@ -0,0 +1,22 @@
+module Docs
+ class Flow < React
+ self.type = 'react'
+ self.version = '0.18'
+ self.base_url = 'http://flowtype.org/docs/'
+ self.root_path = 'about-flow.html'
+ self.links = {
+ home: 'http://flowtype.org/',
+ code: 'https://github.com/facebook/flow'
+ }
+
+ options[:container] = '.content'
+ options[:root_title] = 'Flow Documentation'
+ options[:only_patterns] = nil
+ options[:skip] = %w(coming-soon.html)
+
+ options[:attribution] = <<-HTML
+ © 2013–2015 Facebook Inc.
+ Licensed under the BSD License.
+ HTML
+ end
+end
diff --git a/public/icons/docs/flow/16.png b/public/icons/docs/flow/16.png
new file mode 100644
index 00000000..c6e99872
Binary files /dev/null and b/public/icons/docs/flow/16.png differ
diff --git a/public/icons/docs/flow/16@2x.png b/public/icons/docs/flow/16@2x.png
new file mode 100644
index 00000000..9513b351
Binary files /dev/null and b/public/icons/docs/flow/16@2x.png differ