diff --git a/assets/images/icons.png b/assets/images/icons.png index 2b84306a..c58499ee 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 555fb5b4..6e2407f5 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 14be4541..24097cf2 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -93,6 +93,11 @@ credits = [ '2005-2013 Mozilla Developer Network and individual contributors', 'CC BY-SA', 'http://creativecommons.org/licenses/by-sa/2.5/' + ], [ + 'D3.js', + '2014 Michael Bostock', + 'BSD', + 'https://raw.github.com/mbostock/d3/master/LICENSE' ], [ 'Ember.js', '2014 Yehuda Katz, Tom Dale and Ember.js contributors', diff --git a/assets/javascripts/templates/pages/news_tmpl.coffee b/assets/javascripts/templates/pages/news_tmpl.coffee index f1a0c47c..83068f6c 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 = [ - [ 1390003200000, # January 18, 2013 + [ 1390089600000, # January 19, 2013 + """ New D3.js documentation """, + ], [ + 1390003200000, # January 18, 2013 """ DevDocs is now available as a Firefox web app (currently requires Aurora). """, ], [ 1389484800000, # January 12, 2013 diff --git a/assets/javascripts/views/pages/d3.coffee b/assets/javascripts/views/pages/d3.coffee new file mode 100644 index 00000000..f66891e2 --- /dev/null +++ b/assets/javascripts/views/pages/d3.coffee @@ -0,0 +1,6 @@ +#= require views/pages/base + +class app.views.D3Page extends app.views.BasePage + afterRender: -> + @highlightCode @findAll('.highlight > pre'), 'javascript' + return diff --git a/assets/stylesheets/application.css.scss b/assets/stylesheets/application.css.scss index 23711d0b..cba47101 100644 --- a/assets/stylesheets/application.css.scss +++ b/assets/stylesheets/application.css.scss @@ -29,6 +29,7 @@ @import 'pages/angular', 'pages/coffeescript', + 'pages/d3', 'pages/ember', 'pages/jquery', 'pages/git', diff --git a/assets/stylesheets/global/_icons.scss b/assets/stylesheets/global/_icons.scss index 897d5224..21bb45f9 100644 --- a/assets/stylesheets/global/_icons.scss +++ b/assets/stylesheets/global/_icons.scss @@ -45,3 +45,4 @@ ._icon-git:before { background-position: -1rem -6rem; } ._icon-redis:before { background-position: -2rem -6rem; } ._icon-postgresql:before { background-position: -3rem -6rem; } +._icon-d3:before { background-position: -4rem -6rem; } diff --git a/assets/stylesheets/pages/_d3.scss b/assets/stylesheets/pages/_d3.scss new file mode 100644 index 00000000..0d34d1d9 --- /dev/null +++ b/assets/stylesheets/pages/_d3.scss @@ -0,0 +1,6 @@ +._d3 { + > h2 { @extend %block-heading; } + > h3, > h4 { font-size: 1rem; } + > h6 { @extend %block-label, %label-blue; } + code { @extend %label; } +} diff --git a/lib/docs/filters/d3/clean_html.rb b/lib/docs/filters/d3/clean_html.rb new file mode 100644 index 00000000..61554ce1 --- /dev/null +++ b/lib/docs/filters/d3/clean_html.rb @@ -0,0 +1,42 @@ +module Docs + class D3 + class CleanHtmlFilter < Filter + def call + css('#gollum-footer', '.markdown-body > blockquote:first-child', '.anchor').remove + + # Replace #head with