Skip to content

Commit

Permalink
Add R info to Tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
lo5 committed Sep 6, 2014
1 parent 5c3a1ff commit fbc6975
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
12 changes: 9 additions & 3 deletions packaging/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,17 +188,23 @@
var zipPanel = document.getElementById('quickstart-zip');
var rTab = document.getElementById('quickstart-r-tab');
var rPanel = document.getElementById('quickstart-r');
zipTab.onclick = function() {
var showZipTab = function() {
zipPanel.style.display = 'block';
zipTab.className = 'active';
rPanel.style.display = 'none';
rTab.className = '';
}
rTab.onclick = function() {
};
var showRTab = function() {
rPanel.style.display = 'block';
rTab.className = 'active';
zipPanel.style.display = 'none';
zipTab.className = '';
};
zipTab.onclick = showZipTab
rTab.onclick = showRTab
var hash = window.location.hash;
if(hash && hash.indexOf('#R') == 0) {
showRTab();
}
}
<!-- DOM 0 style without jquery -->
Expand Down
14 changes: 13 additions & 1 deletion src/main/java/water/api/Tutorials.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package water.api;

import water.AbstractBuildVersion;
import water.H2O;
/**
* Summary page referencing all tutorials.
*
Expand All @@ -8,6 +9,10 @@
public class Tutorials extends HTMLOnlyRequest {

@Override protected String build(Response response) {
AbstractBuildVersion abv = H2O.getBuildVersion();
String branchName = abv.branchName();
String buildNumber = abv.buildNumber();
String documentationUrl = "http://s3.amazonaws.com/h2o-release/h2o/" + branchName + "/" + buildNumber + "/docs-website/index.html";
return "<div class='container'><div class='hero-unit' style='overflow: hidden'>"
+ "<style scoped='scoped'>"
+ " h2 { font-size:18px; }"
Expand Down Expand Up @@ -49,6 +54,13 @@ public class Tutorials extends HTMLOnlyRequest {
+ "<a href='/TutorialDeepLearning.html' class='btn btn-primary'>Try it!</a>"
+ "</div>"

+ "<div class='span2 col'>"
+ "<h2>Use H<sub>2</sub>O from R</h2>"
+ "<div style='background-color:#006dcc;color:white;background-image:linear-gradient(to bottom,#08c,#04c);text-align:center;font-size:70px;font-weight:bold;height:100px;line-height:100px;border-radius:15px;max-width:110px;margin-bottom:5px'>R</div>"
+ "<p>H<sub>2</sub>O supports both R and R Studio.</p>"
+ "<a href='" + documentationUrl + "#R' class='btn btn-primary'>Try it!</a>"
+ "</div>"

+ "</div>"
+ "</div>";
}
Expand Down

0 comments on commit fbc6975

Please sign in to comment.