Author: gertv
Date: Mon Oct 18 13:34:29 2010
New Revision: 1023790

URL: http://svn.apache.org/viewvc?rev=1023790&view=rev
Log:
Cleaning up the first page

Added:
    servicemix/documentation/trunk/src/main/webapp/theme/images/pdf.png
Modified:
    servicemix/documentation/trunk/pom.xml
    
servicemix/documentation/trunk/src/main/scala/org/apache/servicemix/documentation/Helper.scala
    servicemix/documentation/trunk/src/main/webapp/index.ssp
    servicemix/documentation/trunk/src/main/webapp/theme/master.css
    
servicemix/documentation/trunk/src/test/scala/org/apache/servicemix/documentation/HelperTest.scala

Modified: servicemix/documentation/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/servicemix/documentation/trunk/pom.xml?rev=1023790&r1=1023789&r2=1023790&view=diff
==============================================================================
--- servicemix/documentation/trunk/pom.xml (original)
+++ servicemix/documentation/trunk/pom.xml Mon Oct 18 13:34:29 2010
@@ -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>

Modified: 
servicemix/documentation/trunk/src/main/scala/org/apache/servicemix/documentation/Helper.scala
URL: 
http://svn.apache.org/viewvc/servicemix/documentation/trunk/src/main/scala/org/apache/servicemix/documentation/Helper.scala?rev=1023790&r1=1023789&r2=1023790&view=diff
==============================================================================
--- 
servicemix/documentation/trunk/src/main/scala/org/apache/servicemix/documentation/Helper.scala
 (original)
+++ 
servicemix/documentation/trunk/src/main/scala/org/apache/servicemix/documentation/Helper.scala
 Mon Oct 18 13:34:29 2010
@@ -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 @@ object Helper {
     "/" + 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)
+
+}

Modified: servicemix/documentation/trunk/src/main/webapp/index.ssp
URL: 
http://svn.apache.org/viewvc/servicemix/documentation/trunk/src/main/webapp/index.ssp?rev=1023790&r1=1023789&r2=1023790&view=diff
==============================================================================
--- servicemix/documentation/trunk/src/main/webapp/index.ssp (original)
+++ servicemix/documentation/trunk/src/main/webapp/index.ssp Mon Oct 18 
13:34:29 2010
@@ -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>

Added: servicemix/documentation/trunk/src/main/webapp/theme/images/pdf.png
URL: 
http://svn.apache.org/viewvc/servicemix/documentation/trunk/src/main/webapp/theme/images/pdf.png?rev=1023790&view=auto
==============================================================================
Files servicemix/documentation/trunk/src/main/webapp/theme/images/pdf.png 
(added) and servicemix/documentation/trunk/src/main/webapp/theme/images/pdf.png 
Mon Oct 18 13:34:29 2010 differ

Modified: servicemix/documentation/trunk/src/main/webapp/theme/master.css
URL: 
http://svn.apache.org/viewvc/servicemix/documentation/trunk/src/main/webapp/theme/master.css?rev=1023790&r1=1023789&r2=1023790&view=diff
==============================================================================
--- servicemix/documentation/trunk/src/main/webapp/theme/master.css (original)
+++ servicemix/documentation/trunk/src/main/webapp/theme/master.css Mon Oct 18 
13:34:29 2010
@@ -62,3 +62,37 @@ tt {
   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;
+}

Modified: 
servicemix/documentation/trunk/src/test/scala/org/apache/servicemix/documentation/HelperTest.scala
URL: 
http://svn.apache.org/viewvc/servicemix/documentation/trunk/src/test/scala/org/apache/servicemix/documentation/HelperTest.scala?rev=1023790&r1=1023789&r2=1023790&view=diff
==============================================================================
--- 
servicemix/documentation/trunk/src/test/scala/org/apache/servicemix/documentation/HelperTest.scala
 (original)
+++ 
servicemix/documentation/trunk/src/test/scala/org/apache/servicemix/documentation/HelperTest.scala
 Mon Oct 18 13:34:29 2010
@@ -19,7 +19,9 @@ package org.apache.servicemix.documentat
 
 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 @@ class HelperTest {
                  "/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()))
+
+  }
+
 }


Reply via email to