From ca6afe0a0c1f72b7e77d8f98fb22d077050677c3 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 19 May 2015 14:41:40 -0400 Subject: [PATCH 1/2] docs - show latest version on landing page --- .../how-to-get-help/how-to-get-help.html | 2 +- docs/site/css/main.css | 31 ++++++++++++++++--- docs/site/home.html | 7 +++-- docs/site/home.js | 10 +++++- 4 files changed, 41 insertions(+), 9 deletions(-) diff --git a/docs/site/components/how-to-get-help/how-to-get-help.html b/docs/site/components/how-to-get-help/how-to-get-help.html index f4fedc729f6..fa7ca6bbe90 100644 --- a/docs/site/components/how-to-get-help/how-to-get-help.html +++ b/docs/site/components/how-to-get-help/how-to-get-help.html @@ -1,4 +1,4 @@ -
+

I still need help!

diff --git a/docs/site/css/main.css b/docs/site/css/main.css index bd9edf37d43..44f4abd4226 100755 --- a/docs/site/css/main.css +++ b/docs/site/css/main.css @@ -227,12 +227,24 @@ ul { margin: 10px 0; } -.subtle { - background-color: #f8f8f8; +.subtle-bg { + background-color: #f8f8f8; } .warning { - color: #DB4437; + color: #DB4437; +} + +.subtle--blue { + color: #A0C2F4; +} + +.subtle { + color: #f8f8f8; +} + +.white { + color: #fff; } @@ -245,6 +257,14 @@ ul { color: #fff; } +.hero-banner .quote-box--supplementary { + text-align: center; +} + +.hero-banner .latest-release { + margin-top: 10px; +} + .page-header { position: relative; padding: 1em; @@ -1300,6 +1320,7 @@ ul { .quote-box--supplementary { float: right; + width: 46%; } .block-title { @@ -1314,8 +1335,8 @@ ul { padding-bottom: 0; } - .hero-banner .col-right { - padding-top: 3.6em; + .hero-banner .quote-box--supplementary { + padding-top: 6.2em; } .hero-banner h1 { diff --git a/docs/site/home.html b/docs/site/home.html index 474740caa44..b486a12b73d 100755 --- a/docs/site/home.html +++ b/docs/site/home.html @@ -15,8 +15,11 @@

gcloud

-

One-line npm install

-
$ npm install --save gcloud
+
$ npm install --save gcloud
+

+ Latest Release {{latestRelease}} + {{latestReleasePublishedAt|date}} +

diff --git a/docs/site/home.js b/docs/site/home.js index 43371f61f91..ada8fd9fc0d 100644 --- a/docs/site/home.js +++ b/docs/site/home.js @@ -21,8 +21,16 @@ angular controller: 'HomeCtrl' }); }) - .controller('HomeCtrl', function() { + .controller('HomeCtrl', function($scope, $http) { 'use strict'; + + $http.get('https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/releases') + .then(function(releases) { + var latestRelease = releases.data[0]; + + $scope.latestRelease = latestRelease.tag_name; + $scope.latestReleasePublishedAt = new Date(latestRelease.published_at); + }); }) .run(function($rootScope, $location, versions) { 'use strict'; From 2032f6e610562efac94412422c5ee486907eb763 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 19 May 2015 16:29:50 -0400 Subject: [PATCH 2/2] link to github --- docs/site/css/main.css | 12 +++++++++++- docs/site/home.html | 4 ++-- docs/site/home.js | 7 +++++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/docs/site/css/main.css b/docs/site/css/main.css index 44f4abd4226..0cc451311ca 100755 --- a/docs/site/css/main.css +++ b/docs/site/css/main.css @@ -247,6 +247,9 @@ ul { color: #fff; } +.white:after { + color: #fff !important; +} /* Header ========================================================================== */ @@ -261,10 +264,17 @@ ul { text-align: center; } -.hero-banner .latest-release { +.latest-release { margin-top: 10px; } +.latest-release--link { + color: #fff; + font-weight: bold; + margin-left: 5px; + margin-right: 5px; +} + .page-header { position: relative; padding: 1em; diff --git a/docs/site/home.html b/docs/site/home.html index b486a12b73d..741ed589e2e 100755 --- a/docs/site/home.html +++ b/docs/site/home.html @@ -17,8 +17,8 @@

gcloud

$ npm install --save gcloud

- Latest Release {{latestRelease}} - {{latestReleasePublishedAt|date}} + Latest Release {{latestRelease.name}} + {{latestRelease.date|date}}

diff --git a/docs/site/home.js b/docs/site/home.js index ada8fd9fc0d..13309a89ea3 100644 --- a/docs/site/home.js +++ b/docs/site/home.js @@ -28,8 +28,11 @@ angular .then(function(releases) { var latestRelease = releases.data[0]; - $scope.latestRelease = latestRelease.tag_name; - $scope.latestReleasePublishedAt = new Date(latestRelease.published_at); + $scope.latestRelease = { + name: latestRelease.tag_name, + date: new Date(latestRelease.published_at), + link: latestRelease.html_url + }; }); }) .run(function($rootScope, $location, versions) {