diff --git a/assets/images/icons.png b/assets/images/icons.png index 2151678c..3a1b610b 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 7c49ad21..2ba54e2f 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 169ff080..fa13ae6c 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -115,6 +115,11 @@ credits = [ '2005-2014 Linus Torvalds and others', 'GPLv2', 'https://raw.github.com/git/git/master/COPYING' + ], [ + 'Go', + 'Google, Inc.', + 'CC BY', + 'http://creativecommons.org/licenses/by/3.0/' ], [ 'HTTP', '1999 The Internet Society', diff --git a/assets/javascripts/templates/pages/news_tmpl.coffee b/assets/javascripts/templates/pages/news_tmpl.coffee index 5580f168..454d4f5e 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 = [ - [ 1396137600000, # March 30, 2014 + [ 1396742400000, # April 6, 2014 + """ New Go documentation """, + ], [ + 1396137600000, # March 30, 2014 """ New C++ documentation """, ], [ 1394928000000, # March 16, 2014 diff --git a/assets/javascripts/views/pages/go.coffee b/assets/javascripts/views/pages/go.coffee new file mode 100644 index 00000000..50443179 --- /dev/null +++ b/assets/javascripts/views/pages/go.coffee @@ -0,0 +1,6 @@ +#= require views/pages/base + +class app.views.GoPage extends app.views.BasePage + afterRender: -> + @highlightCode @findAll('pre'), 'go' + return diff --git a/assets/stylesheets/application.css.scss b/assets/stylesheets/application.css.scss index 33e74c4c..6409e2a1 100644 --- a/assets/stylesheets/application.css.scss +++ b/assets/stylesheets/application.css.scss @@ -33,6 +33,7 @@ 'pages/coffeescript', 'pages/d3', 'pages/ember', + 'pages/go', 'pages/jquery', 'pages/knockout', 'pages/git', diff --git a/assets/stylesheets/global/_icons.scss b/assets/stylesheets/global/_icons.scss index 29902127..bf2ee16c 100644 --- a/assets/stylesheets/global/_icons.scss +++ b/assets/stylesheets/global/_icons.scss @@ -52,3 +52,4 @@ %icon-path { background-position: -3rem -7rem; } ._icon-yii:before { background-position: -4rem -7rem; } ._icon-cpp:before { background-position: 0 -8rem; } +._icon-go:before { background-position: -1rem -8rem; } diff --git a/assets/stylesheets/pages/_go.scss b/assets/stylesheets/pages/_go.scss new file mode 100644 index 00000000..08c19bf9 --- /dev/null +++ b/assets/stylesheets/pages/_go.scss @@ -0,0 +1,7 @@ +._go { + padding-left: 1rem; + + h1, h2, #short-nav, table.dir { margin-left: -1rem; } + h2 { @extend %block-heading; } + h3 { @extend %block-label, %label-blue; } +} diff --git a/lib/docs/filters/go/clean_html.rb b/lib/docs/filters/go/clean_html.rb new file mode 100644 index 00000000..90aa288e --- /dev/null +++ b/lib/docs/filters/go/clean_html.rb @@ -0,0 +1,46 @@ +module Docs + class Go + class CleanHtmlFilter < Filter + def call + if root_page? + at_css('h1').content = 'Go Programming Language' + + # Remove empty columns + css('tr:first-child + tr', 'th:first-child + th', 'td:first-child + td').remove + + # Remove links to unscraped pages + css('td + td:empty').each do |node| + node.previous_element.content = node.previous_element.content + end + end + + css('#plusone', '#nav', '.pkgGopher', '#footer', '.collapsed').remove + + # Remove triangle character + css('h2', '.exampleHeading').each do |node| + node.content = node.content.sub("\u25BE", '') + node.name = 'h2' + end + + # Turn
\1' + end + end +end diff --git a/public/icons/docs/go/16.png b/public/icons/docs/go/16.png new file mode 100644 index 00000000..cf988777 Binary files /dev/null and b/public/icons/docs/go/16.png differ diff --git a/public/icons/docs/go/16@2x.png b/public/icons/docs/go/16@2x.png new file mode 100644 index 00000000..d3394cad Binary files /dev/null and b/public/icons/docs/go/16@2x.png differ diff --git a/public/icons/docs/go/SOURCE b/public/icons/docs/go/SOURCE new file mode 100644 index 00000000..d39f1c78 --- /dev/null +++ b/public/icons/docs/go/SOURCE @@ -0,0 +1 @@ +http://golang.org/doc/gopher/