Skip to content

Commit

Permalink
Merge pull request #611 from stephenplusplus/spp--docs-show-latest-ve…
Browse files Browse the repository at this point in the history
…rsion

docs - show latest version on landing page
  • Loading branch information
ryanseys committed May 19, 2015
2 parents 05af19d + 2032f6e commit aa71a71
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/site/components/how-to-get-help/how-to-get-help.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="how-to-get-help--container subtle padding">
<div class="how-to-get-help--container subtle-bg padding">
<h1 class="warning">I still need help!</h1>

<p>
Expand Down
41 changes: 36 additions & 5 deletions docs/site/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,29 @@ ul {
margin-bottom: 10px;
}

.subtle {
background-color: #f8f8f8;
.subtle-bg {
background-color: #f8f8f8;
}

.warning {
color: #DB4437;
color: #DB4437;
}

.subtle--blue {
color: #A0C2F4;
}

.subtle {
color: #f8f8f8;
}

.white {
color: #fff;
}

.white:after {
color: #fff !important;
}

/* Header
========================================================================== */
Expand All @@ -250,6 +265,21 @@ ul {
color: #fff;
}

.hero-banner .quote-box--supplementary {
text-align: center;
}

.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;
Expand Down Expand Up @@ -1304,6 +1334,7 @@ ul {

.quote-box--supplementary {
float: right;
width: 46%;
}

.block-title {
Expand All @@ -1318,8 +1349,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 {
Expand Down
7 changes: 5 additions & 2 deletions docs/site/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ <h1>gcloud</h1>
</div>

<div class="quote-box--supplementary">
<h2>One-line npm install</h2>
<pre>$ npm install --save gcloud</pre>
<pre><code class="subtle--blue">$</code> npm install <code class="subtle--blue">--save</code> <strong>gcloud</strong></pre>
<h4 class="latest-release subtle" ng-if="latestRelease">
Latest Release <a ng-href="{{latestRelease.link}}" class="latest-release--link white">{{latestRelease.name}}</a>
{{latestRelease.date|date}}
</h4>
</div>
</div><!-- end of .container -->
</section><!-- end of .hero-banner -->
Expand Down
13 changes: 12 additions & 1 deletion docs/site/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,19 @@ 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 = {
name: latestRelease.tag_name,
date: new Date(latestRelease.published_at),
link: latestRelease.html_url
};
});
})
.run(function($rootScope, $location, versions) {
'use strict';
Expand Down

0 comments on commit aa71a71

Please sign in to comment.