Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs - show latest version on landing page #611

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
31 changes: 26 additions & 5 deletions docs/site/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}


Expand All @@ -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;
Expand Down Expand Up @@ -1300,6 +1320,7 @@ ul {

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

.block-title {
Expand All @@ -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 {
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>

This comment was marked as spam.

<h4 class="latest-release subtle" ng-if="latestRelease">
Latest Release <strong class="white">{{latestRelease}}</strong>

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

{{latestReleasePublishedAt|date}}
</h4>
</div>
</div><!-- end of .container -->
</section><!-- end of .hero-banner -->
Expand Down
10 changes: 9 additions & 1 deletion docs/site/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down