Projekt-Seite erstellt: Velocity-Template - Erster Anlauf (unvollständig)
authorKai Moritz <kai@juplo.de>
Tue, 5 Jul 2016 14:33:38 +0000 (16:33 +0200)
committerKai Moritz <kai@juplo.de>
Mon, 11 Jul 2016 16:55:57 +0000 (18:55 +0200)
src/site/site.xml [new file with mode: 0644]
src/site/template.vm [new file with mode: 0644]
src/site/xhtml/faq.xhtml [new file with mode: 0644]
src/site/xhtml/index.xhtml [new file with mode: 0644]
src/site/xhtml/issue-tracking.xhtml [new file with mode: 0644]
src/site/xhtml/mail-lists.xhtml [new file with mode: 0644]
src/site/xhtml/usage.xhtml [new file with mode: 0644]

diff --git a/src/site/site.xml b/src/site/site.xml
new file mode 100644 (file)
index 0000000..02fc7c8
--- /dev/null
@@ -0,0 +1,12 @@
+<project>
+  <body>
+    <menu>
+      <item name="About" href="index.html"/>
+      <item name="Usage Examples" href="usage.html"/>
+      <item name="FAQ" href="faq.html"/>
+      <item name="Project Information" href="project-info.html"/>
+      <item name="Project Reports" href="project-reports.html"/>
+    </menu>
+    <menu ref="reports"/>
+  </body>
+</project>
diff --git a/src/site/template.vm b/src/site/template.vm
new file mode 100644 (file)
index 0000000..a973c5c
--- /dev/null
@@ -0,0 +1,105 @@
+<!DOCTYPE html>
+<!-- Generated by Apache Maven Doxia Site Renderer#if( $doxiaSiteRendererVersion ) $doxiaSiteRendererVersion#end at $dateFormat.format( $currentDate ) -->
+
+
+## Automatisch generierte Seiten einlesen
+#set ( $pages = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
+#macro ( buildPages $items )
+  #foreach ( $item in $items )
+    #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
+    #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
+    #set ( $sinkhole = $pages.put( $item.name, $currentItemHref ) )
+    #if ( !$item.items.empty )
+      #buildPages ( $item.items )
+    #end
+  #end
+#end
+#foreach ( $menu in $decoration.body.menus )
+  ## Nur benannte Menüs werden berücksichtigt
+  #if ($menu.name)
+    #buildPages ( $menu.items )
+  #end
+#end
+<!-- $pages -->
+
+#set ( $crumbs = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
+#macro ( searchBreadcrumbTrail $items )
+  #set ( $sep = '' )
+  #foreach ( $item in $items )
+    #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
+    #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
+    #if ( $currentItemHref == 'index.html' )
+      #set ( $name = $project.name )
+    #else
+      #set ( $name = $item.name )
+    #end
+    #if ( !$breadcrumbs && $alignedFileName == $currentItemHref )
+      #set ( $breadcrumbs = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
+      ## Den Titel der Seite korrigieren!
+      #set ( $title = "$project.name - $item.name" )
+      #set ( $shortTitle = $name )
+      #set ( $sinkhole = $breadcrumbs.put( 'index.html', $project.name) )
+      #foreach ( $crumb in $crumbs.entrySet() )
+        #set ( $sinkhole = $breadcrumbs.put( $crumb.key , $crumb.value ) )
+      #end
+      #set ( $sinkhole = $breadcrumbs.put( $alignedFileName , $shortTitle) )
+    #end
+    $sep"$currentItemHref": {
+      "name": "$name"
+      #if ( !$item.items.empty )
+        ,"childs": {
+        #set ( $sinkhole = $crumbs.put( $currentItemHref , $name) )
+        #searchBreadcrumbTrail ( $item.items )
+        #set ( $sinkhole = $crumbs.pop() )
+        }
+      #end
+    }
+    #set ( $sep =',' )
+  #end
+#end
+
+## Datenstrukturen für die Navigation vorbereiten
+#foreach ( $menu in $decoration.body.menus )
+  ## Nur unbenannte Menüs werden berücksichtigt
+  #if (!($menu.name))
+    ## Breadcrumb-Pfad suchen
+    "menu": {
+      #searchBreadcrumbTrail ( $menu.items )
+    }
+  #end
+#end
+
+<!-- title: $title -->
+<!-- short title: $shortTitle -->
+<!-- current page: $alignedFileName -->
+<!-- breadcrumbs: $breadcrumbs -->
+
+<!--
+#set ( $sep = '' )
+"$alignedFileName": [
+  #foreach( $crumb in $breadcrumbs.entrySet() )
+  $sep
+  { "uri": "$crumb.key", "name": "$crumb.value" }
+  #set ( $sep = ',' )
+  #end
+]
+-->
+
+<html
+    xmlns="http://www.w3.org/1999/xhtml"
+    xmlns:layout="http://www.thymeleaf.org"
+    layout:decorator="templates/layout"
+    th:with="uri='$alignedFileName'"
+    >
+  <head>
+    <title>juplo - $title</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=${outputEncoding}" />
+    <link rel="canonical" href="$project.url/$alignedFileName"/>
+  </head>
+  <body>
+    <article class="main" layout:fragment="maincontent">
+      <header><h1>$shortTitle</h1></header>
+      $bodyContent
+    </article>
+  </body>
+</html>
diff --git a/src/site/xhtml/faq.xhtml b/src/site/xhtml/faq.xhtml
new file mode 100644 (file)
index 0000000..802996e
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ </head>
+ <body>
+  <h1>Frequently Asked Questions (FAQ)</h1>
+  <p><em>TODO...</em></p>
+ </body>
+</html>
diff --git a/src/site/xhtml/index.xhtml b/src/site/xhtml/index.xhtml
new file mode 100644 (file)
index 0000000..022684b
--- /dev/null
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ </head>
+ <body>
+  <h1>Simple Mapper</h1>
+  <h2>A Simple Convenient Mapper, that translates JSON-Data Into A Hierarchy Of Java-Lists and -Maps</h2>
+  <h2>Releases</h2>
+  <ul>
+    <li><a href="http://juplo.de/simple-mapper">current version</a></li>
+    <li>${project.version} (this version)</li>
+  </ul>
+ </body>
+</html>
diff --git a/src/site/xhtml/issue-tracking.xhtml b/src/site/xhtml/issue-tracking.xhtml
new file mode 100644 (file)
index 0000000..f7e6859
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ </head>
+ <body>
+  <strong>There is no bug-tracking system set up for this project!</strong>
+  <p>
+  Please send your bug-reports, questions or feature-requests directly
+  to the developer.
+  </p>
+ </body>
+</html>
diff --git a/src/site/xhtml/mail-lists.xhtml b/src/site/xhtml/mail-lists.xhtml
new file mode 100644 (file)
index 0000000..ff8d7f2
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ </head>
+ <body>
+  <strong>There are no mailinglists defined for this project!</strong>
+  <p>
+  Please send your bug-reports, questions or feature-requests directly
+  to the developer.
+  </p>
+ </body>
+</html>
diff --git a/src/site/xhtml/usage.xhtml b/src/site/xhtml/usage.xhtml
new file mode 100644 (file)
index 0000000..3c573e4
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ </head>
+ <body>
+  <h1>Usage</h1>
+  <p><em>TODO...</em></p>
+ </body>
+</html>