Cleaning up the first page

git-svn-id: https://svn.apache.org/repos/asf/servicemix/documentation/trunk@1023790 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index cc85a2a..78c096e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -178,6 +178,7 @@
           </execution>
         </executions>
         <configuration>
+          <warSourceDirectory>${project.build.directory}/webapp</warSourceDirectory>
           <remoteServerId>people.apache.org</remoteServerId>
           <remoteServerUrl>scp://people.apache.org/www/servicemix.apache.org/docs/${servicemix.version}</remoteServerUrl>
         </configuration>
diff --git a/src/main/scala/org/apache/servicemix/documentation/Helper.scala b/src/main/scala/org/apache/servicemix/documentation/Helper.scala
index 8bda958..5705624 100644
--- a/src/main/scala/org/apache/servicemix/documentation/Helper.scala
+++ b/src/main/scala/org/apache/servicemix/documentation/Helper.scala
@@ -17,11 +17,14 @@
  */
 package org.apache.servicemix.documentation
 
+import org.fusesource.scalate.TemplateEngine
+
 /**
  * Helper methods for buildings the templates
  */
 object Helper {
 
+  val SITEGEN_ENGINE = "org.fusesource.scalate.maven.DummyTemplateEngine"
   val TOC = "/toc.ssp"
 
   /**
@@ -31,4 +34,9 @@
     "/" + uri.substring(1).split("/").head + TOC
   }
 
-}
\ No newline at end of file
+  /**
+   * Determine if the given engine is the scalate:sitegen TemplateEngine
+   */
+  def sitegen(engine: TemplateEngine) = (engine.getClass.getName == SITEGEN_ENGINE)
+
+}
diff --git a/src/main/webapp/index.ssp b/src/main/webapp/index.ssp
index 4e8845d..4d5a2a8 100644
--- a/src/main/webapp/index.ssp
+++ b/src/main/webapp/index.ssp
@@ -1,11 +1,53 @@
+<% import org.apache.servicemix.documentation.Helper._ %>
 <% attributes("navigation") = false %>
-<h1>Welcome to the Apache ServiceMix documentation</h1>
 
-If you're new to Apache ServiceMix, we recommend you start here
+<div id="bookpicker">
 
-<h2>Related projects' reference manuals</h2>
-<ul>
-  <li><a href="users-guide/index.html">Apache ServiceMix User's Guide</a></li>
-  <li><a href="commands/index.html">Console commands reference</a></li>
-  <li><a href="karaf/index.html">Apache Karaf</a></li>
-</ul>
\ No newline at end of file
+<h1></h1>
+
+<div class="left">
+  <h2>Quickstart<br/>Guide</h2>
+</div>
+
+<div class="right">
+  If you're new to Apache ServiceMix, this document will guide you in your first steps in Apache ServiceMix.
+</div>
+
+<div class="left">
+  <a href="users-guide/index.html">
+    <h2>ServiceMix<br/>Manual</h2>
+  </a>
+</div>
+
+<div class="right">
+  The full reference manual, explaining about all the features and components in Apache ServiceMix
+  <% if (sitegen(engine)) { %>
+    <div class="pdf">
+      <a href="users-guide/manual.pdf" class="pdf">PDF document</a>
+    </div>
+  <% } %>
+</div>
+
+
+<div class="left">
+  <a href="karaf/index.html">
+    <h2>Karaf<br/>Manual</h2>
+  </a>
+</div>
+
+<div class="right">
+  Apache ServiceMix uses Apache Karaf as the underlying OSGi server runtime.  This manual will explain the features and functionality provided by Karaf.  
+</div>
+
+<div class="left">
+  <a href="commands/index.html">
+    <h2>Command Reference</h2>
+  </a>
+</div>
+
+<div class="right">
+  Help pages for all the available commands in the Apache ServiceMix console.
+</div>
+
+
+</div>
diff --git a/src/main/webapp/theme/images/pdf.png b/src/main/webapp/theme/images/pdf.png
new file mode 100644
index 0000000..1094238
--- /dev/null
+++ b/src/main/webapp/theme/images/pdf.png
Binary files differ
diff --git a/src/main/webapp/theme/master.css b/src/main/webapp/theme/master.css
index b44b17d..ee60c4c 100644
--- a/src/main/webapp/theme/master.css
+++ b/src/main/webapp/theme/master.css
@@ -62,3 +62,37 @@
   font-family: 'Courier', Courier, monospace;
   font-size: 1em;
 }
+
+div#bookpicker {
+  margin-left: -20em;
+  width: 700px;
+}
+
+div.left {
+  clear: both;
+  float: left;
+  text-align: right;
+  width: 200px;
+  margin-top: 1em;
+  margin-bottom: 1em;
+}
+
+div.left h2 {
+  color: #333333;
+}
+
+div.right {
+  float: right;
+  text-align: left;
+  width: 450px;
+  margin: auto;
+  color: #666666;
+  font-size: 120%;
+  margin-top: 1em;
+  margin-bottom: .75em;
+}
+
+div.pdf {
+  padding-left: 20px;
+  background: url('images/pdf.png') no-repeat left center;
+}
diff --git a/src/test/scala/org/apache/servicemix/documentation/HelperTest.scala b/src/test/scala/org/apache/servicemix/documentation/HelperTest.scala
index 221618d..a2854a5 100644
--- a/src/test/scala/org/apache/servicemix/documentation/HelperTest.scala
+++ b/src/test/scala/org/apache/servicemix/documentation/HelperTest.scala
@@ -19,7 +19,9 @@
 
 import org.apache.servicemix.documentation.Helper._
 import org.junit.Test
-import org.junit.Assert.{assertEquals}
+import org.junit.Assert.{assertEquals,assertFalse,assertTrue}
+import org.fusesource.scalate.maven.DummyTemplateEngine
+import org.fusesource.scalate.TemplateEngine
 
 /**
  * Test case for org.apache.servicemix.documentation.Helper
@@ -32,4 +34,13 @@
                  "/users-guide/toc.ssp", toc("/users-guide/index.conf"))
   }
 
+  @Test
+  def testSitegen = {
+    assertTrue("DummyTemplateEngine is used in scalate:sitegen",
+               sitegen(new DummyTemplateEngine(List())))
+    assertFalse("Any other template engine means we're not in scalate:sitegen",
+                sitegen(new TemplateEngine()))
+
+  }
+
 }