package water.api;
import water.AbstractBuildVersion;
import water.H2O;
/**
 * Summary page referencing all tutorials.
 *
 * @author michal
 */
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";
    String RPackageDocumentationUrl = documentationUrl + "/Ruser/top.html";
    return
    "<div class='container'>"
      + "<div>"
      + "<h1>Get started with H<sub>2</sub>O Tutorials!</h1>"
      + "<p class='text-center'>"
      + "<img src='img/banners/H2O-World-Banner-Product.png' /> "
      + "</p>"
      + "<p class='text-center'>"
      + "<a href='http://h2oworld.eventbrite.com/' class='btn btn-large btn-warning' type='button'>Reserve your spot!</a>"
      + "</p>"
      + "</div>"
    + "<div class='row'>"

    + "<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='" + RPackageDocumentationUrl + "' class='btn btn-primary'>Try it!</a>"
    + "</div>"

    + "<div class='span2 col'>"
    + "  <h2>Random Forest</h2>"
    +   "<p>Random Forest is a classical machine learning method for classification and regression. Learn how to use it with H<sub>2</sub>O for better predictions.</it></p>"
    +   "<a href='/TutorialRFIris.html' class='btn btn-primary'>Try it!</a>"
    + "</div>"

    + "<div class='span2 col'>"
    + "  <h2>GBM</h2>"
    +   "<p>GBM uses gradient boosted trees for classification and regression, and is one of the most powerful machine learning methods in H<sub>2</sub>O.</p>"
    +   "<a href='/TutorialGBM.html' class='btn btn-primary'>Try it!</a>"
    + "</div>"

    + "<div class='span2 col'>"
    +   "<h2>GLM</h2>"
    +   "<p>Generalized linear model is a generalization of linear regression. Experience its unique power and blazing speed on top of H<sub>2</sub>O.</p>"
    +   "<a href='/TutorialGLMProstate.html' class='btn btn-primary'>Try it!</a>"
    + "</div>"

    + "<div class='span2 col'>"
    + "<h2>K-Means</h2>"
    + "<p>Perform clustering analysis with H<sub>2</sub>O. K-means is a highly scalable clustering algorithm for unsupervised learning on big data.</p>"
    +   "<a href='/TutorialKMeans.html' class='btn btn-primary'>Try it!</a>"
    + "</div>"

    + "<div class='span2 col'>"
    + "<h2>Deep Learning</h2>"
    + "<p>H<sub>2</sub>O's distributed Deep Learning gives you the power of deep neural networks for highest accuracy for classification and regression.</p>"
    +   "<a href='/TutorialDeepLearning.html' class='btn btn-primary'>Try it!</a>"
    + "</div>"

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

@@ -686,17 +686,17 @@
 %3C/sub%3EO 
-T
+t
 utorials
@@ -741,123 +741,8 @@
 '%3E%22%0A
-      + %22%3Cimg src='img/banners/H2O-World-Banner-Product.png' /%3E %22%0A      + %22%3C/p%3E%22%0A      + %22%3Cp class='text-center'%3E%22%0A
     
@@ -871,24 +871,139 @@
    + %22%3C/p%3E%22%0A
+      + %22%3Cp class='text-center'%3E%22%0A      + %22%3Cimg src='img/banners/H2O-World-Banner-Product.png' /%3E %22%0A      + %22%3C/p%3E%22%0A
       + %22%3C/d

Move registration button on front page.