From 0a23f0e33cb6cc5a4533faf515c5f8f2a098a212 Mon Sep 17 00:00:00 2001 From: Ricky Elrod Date: Wed, 31 Jul 2013 19:41:23 -0400 Subject: [PATCH 1/6] Make more pages validate, this should be most of them. --- _layouts/blog.html | 6 ++---- _layouts/downloadpage.html | 4 ++-- _layouts/page-full-width.html | 6 ++---- _layouts/page-no-toc.html | 6 ++---- _layouts/page.html | 6 ++---- resources/css/main.css | 5 +---- 6 files changed, 11 insertions(+), 22 deletions(-) diff --git a/_layouts/blog.html b/_layouts/blog.html index e2ee496a9..68902b12b 100644 --- a/_layouts/blog.html +++ b/_layouts/blog.html @@ -13,7 +13,7 @@ - +{% include footer.html %} diff --git a/_layouts/downloadpage.html b/_layouts/downloadpage.html index 779297956..af005e32c 100644 --- a/_layouts/downloadpage.html +++ b/_layouts/downloadpage.html @@ -49,7 +49,7 @@ {% endunless %} - + {% for resource in page.resources %} @@ -61,7 +61,7 @@ {% unless page.dont_show_sizes %} {{ resource[4] }} {% endunless %} - + {% endfor %} diff --git a/_layouts/page-full-width.html b/_layouts/page-full-width.html index 3de0b47f8..f974574a0 100644 --- a/_layouts/page-full-width.html +++ b/_layouts/page-full-width.html @@ -13,7 +13,7 @@ - +{% include footer.html %} diff --git a/_layouts/page-no-toc.html b/_layouts/page-no-toc.html index 3982d8b0b..fe8b6f04c 100644 --- a/_layouts/page-no-toc.html +++ b/_layouts/page-no-toc.html @@ -12,7 +12,7 @@ - +{% include footer.html %} diff --git a/_layouts/page.html b/_layouts/page.html index aad0c71ba..ba0eb3c35 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -12,7 +12,7 @@ - +{% include footer.html %} diff --git a/resources/css/main.css b/resources/css/main.css index f24f3b28c..8627b37ef 100755 --- a/resources/css/main.css +++ b/resources/css/main.css @@ -1581,6 +1581,7 @@ h2.twitterhdr > span { /*text-align: center;*/ color: #fff; padding-top: 20px; + margin-top: -50px; } .copyright { @@ -2393,10 +2394,6 @@ code { height: 0; } -.lift-footer { - margin-top: -50px; -} - #page-title { /*font-weight: 100;*/ margin-top: 20px; font-family: 'proxima-nova', sans-serif; font-size: 32px; line-height: 20px; color: #fff; /*color: #2797b7;*/ /*color: #50B8E1;*/ /*color: rgba(7, 54, 66, From 5a7d21ad550796504afc35a97d8d3602ffcdfc48 Mon Sep 17 00:00:00 2001 From: Ricky Elrod Date: Wed, 31 Jul 2013 19:46:45 -0400 Subject: [PATCH 2/6] Fix tag in license.md, see below. - Jekyll was optimizing to which is invalid. - Because it was invalid, browsers (and the validator) were treating it as a start tag. Because of this, when the text of the span was set via javascript, some of the copyright info was being lost. So instead of "Copyright (c) 2002-2013 EPFL, Lausanne, unless otherwise specified. \ All rights reserved." We were seeing just: "Copyright (c) 2002-2013" --- license.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/license.md b/license.md index aaa3f1125..2c8b242ea 100644 --- a/license.md +++ b/license.md @@ -3,7 +3,7 @@ layout: page-no-toc title: Scala License --- -Copyright (c) 2002- EPFL, Lausanne, unless otherwise specified. +Copyright (c) 2002-  EPFL, Lausanne, unless otherwise specified. All rights reserved. This software was developed by the Programming Methods Laboratory of the From 571ee46a19e1f371f5bb0ad4cfbd1c3c2a97c4fe Mon Sep 17 00:00:00 2001 From: Ricky Elrod Date: Wed, 31 Jul 2013 21:44:19 -0400 Subject: [PATCH 3/6] Make hacker-guide valid. --- contribute/hacker-guide.md | 11 +++++------ resources/css/main.css | 5 +++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/contribute/hacker-guide.md b/contribute/hacker-guide.md index 69ed05d25..5e2222327 100644 --- a/contribute/hacker-guide.md +++ b/contribute/hacker-guide.md @@ -39,9 +39,8 @@ Since Martin is the person who submitted the string interpolation Scala Improvem As alluded to earlier, one must also choose an appropriate mailing list. Typically, one would use the scala-internals mailing list, as it is devoted to discussions about the core internal design and implementation of the Scala system. However, since this issue has been discussed previously on the scala-user mailing list, in this example, we post to the [the scala-user mailing list](http://groups.google.com/group/scala-user) about our issue. -
Posting to scala-user
-
-
Response from Martin
+Posting to scala-user +Response from Martin Now that we have the approval of the feature's author, we can get to work! @@ -59,7 +58,7 @@ button in the top right corner of the page. This will create your own copy of ou If you're new to Git, don't be afraid of messing up-- there is no way you can corrupt our repository. -
Fork scala/scala
+Fork scala/scala ### Clone @@ -335,14 +334,14 @@ Now, we must simply submit our proposed patch. Navigate to your branch in GitHub and click the pull request button to submit your patch as a pull request to Scala. If you've never submitted patches to Scala, you will need to sign the contributor license agreement, which [can be done online](http://typesafe.com/contribute/cla/scala) within a few minutes. -
Submit a pull request
+Submit a pull request ### Review After the pull request has been submitted, you need to pick a reviewer (usually the person you've contacted in the beginning of your workflow) and be ready to elaborate and adjust your patch if necessary. In this example, we picked Martin, because we had such a nice chat on the mailing list: -
SAssign the reviewer
+SAssign the reviewer ## Merge diff --git a/resources/css/main.css b/resources/css/main.css index 8627b37ef..3c1886a31 100755 --- a/resources/css/main.css +++ b/resources/css/main.css @@ -2520,3 +2520,8 @@ div#toc ul > li + ul > li { margin-top: 12px; } color: #DC322F; } +.centerclear { + display: block; + margin: 0 auto; + clear: both; +} From bb4dd31f4742c2103ed7d6181a9a35e32377e448 Mon Sep 17 00:00:00 2001 From: Ricky Elrod Date: Wed, 31 Jul 2013 21:44:55 -0400 Subject: [PATCH 4/6] Add a small script to check validation of _site/ --- _tools/validation/Gemfile | 5 +++++ _tools/validation/Gemfile.lock | 18 ++++++++++++++++++ _tools/validation/validation.rb | 23 +++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 _tools/validation/Gemfile create mode 100644 _tools/validation/Gemfile.lock create mode 100644 _tools/validation/validation.rb diff --git a/_tools/validation/Gemfile b/_tools/validation/Gemfile new file mode 100644 index 000000000..6cb4f8ebb --- /dev/null +++ b/_tools/validation/Gemfile @@ -0,0 +1,5 @@ +source 'https://rubygems.org' + +gem 'httparty' +gem 'json' +gem 'paint' diff --git a/_tools/validation/Gemfile.lock b/_tools/validation/Gemfile.lock new file mode 100644 index 000000000..e87a156b8 --- /dev/null +++ b/_tools/validation/Gemfile.lock @@ -0,0 +1,18 @@ +GEM + remote: https://rubygems.org/ + specs: + httparty (0.11.0) + multi_json (~> 1.0) + multi_xml (>= 0.5.2) + json (1.8.0) + multi_json (1.7.7) + multi_xml (0.5.4) + paint (0.8.6) + +PLATFORMS + ruby + +DEPENDENCIES + httparty + json + paint diff --git a/_tools/validation/validation.rb b/_tools/validation/validation.rb new file mode 100644 index 000000000..e349d4143 --- /dev/null +++ b/_tools/validation/validation.rb @@ -0,0 +1,23 @@ +require 'httparty' +require 'json' +require 'paint' + +files = Dir.glob("#{File.dirname(__FILE__)}/../../_site/**/*.html") +files.each do |page| + begin + options = { + :body => File.open(page).read.to_s, + :headers => {'Content-Type' => 'text/html'} + } + r = HTTParty.post('http://validator.nu?out=json&parser=html5&laxtype=yes&level=error', options) + j = JSON.parse(r.response.body) + + if j['messages'].length > 0 + puts Paint["INVALID: #{page}", :red] + else + puts Paint["VALID: #{page}", :green] + end + rescue Exception => e + puts e + end +end From 6ea29ae19794d0f37d326d39c8844ae2c2f5b635 Mon Sep 17 00:00:00 2001 From: Ricky Elrod Date: Wed, 31 Jul 2013 21:47:20 -0400 Subject: [PATCH 5/6] Add shebang and license info --- _tools/validation/validation.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/_tools/validation/validation.rb b/_tools/validation/validation.rb index e349d4143..9ab043763 100644 --- a/_tools/validation/validation.rb +++ b/_tools/validation/validation.rb @@ -1,3 +1,8 @@ +#!/usr/bin/env ruby +# by Ricky Elrod (gh: @CodeBlock) +# Licensed under the same license as the same license as +# the scala/scala-lang repository from which this script originates. + require 'httparty' require 'json' require 'paint' From 339384dab6b90b30e753222f6288eb31f2183d92 Mon Sep 17 00:00:00 2001 From: Ricky Elrod Date: Wed, 31 Jul 2013 21:48:05 -0400 Subject: [PATCH 6/6] +x it --- _tools/validation/validation.rb | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 _tools/validation/validation.rb diff --git a/_tools/validation/validation.rb b/_tools/validation/validation.rb old mode 100644 new mode 100755