Initial version (not really functioning)
authorKai Moritz <kai@juplo.de>
Mon, 13 Jun 2016 12:52:51 +0000 (14:52 +0200)
committerKai Moritz <kai@juplo.de>
Sat, 16 Jul 2016 11:55:16 +0000 (13:55 +0200)
.gitignore [new file with mode: 0644]
pom.xml [new file with mode: 0644]
src/main/resources/META-INF/maven/site.vm [new file with mode: 0644]
src/site/site.xml [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/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..a6f89c2
--- /dev/null
@@ -0,0 +1 @@
+/target/
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
new file mode 100644 (file)
index 0000000..94d1a40
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>de.juplo.maven</groupId>
+  <artifactId>maven-thymeleaf-skin</artifactId>
+  <version>1.0-SNAPSHOT</version>
+
+  <name>Apache-Maven Thymeleaf-Skin</name>
+  <description>A maven skin, that renders the site as templates, that can be styled without restrictions with the help of thymeleaf.</description>
+  <url>http://juplo.de/maven-thymeleaf-skin</url>
+
+  <scm>
+    <connection>scm:git:http://juplo.de/git/maven-thymeleaf-skin</connection>
+    <developerConnection>scm:git:ssh://juplo.de:/var/lib/git/juplo/maven-thymeleaf-skin</developerConnection>
+    <url>http://juplo.de/gitweb/?p=maven-thymeleaf-skin;a=summary</url>
+  </scm>
+
+  <developers>
+    <developer>
+      <id>kai</id>
+      <name>Kai Moritz</name>
+      <email>kai@juplo.de</email>
+    </developer>
+  </developers>
+
+
+  <properties>
+
+    <!-- Zeichensatz -->
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+  </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>2.7</version>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.maven.shared</groupId>
+            <artifactId>maven-filtering</artifactId>
+            <version>1.3</version>
+          </dependency>
+        </dependencies>
+        <executions>
+          <execution>
+            <id>copy-resources</id>
+            <phase>pre-site</phase>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${project.build.directory}/filtered-site</outputDirectory>
+              <resources>
+                <resource>
+                  <directory>src/site</directory>
+                  <filtering>true</filtering>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <artifactId>maven-site-plugin</artifactId>
+        <version>3.5.1</version>
+        <configuration>
+          <siteDirectory>${project.build.directory}/filtered-site</siteDirectory>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/src/main/resources/META-INF/maven/site.vm b/src/main/resources/META-INF/maven/site.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/site.xml b/src/site/site.xml
new file mode 100644 (file)
index 0000000..d2c542c
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+    xmlns="http://maven.apache.org/DECORATION/1.1.0"
+    xlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="
+      http://maven.apache.org/DECORATION/1.1.0
+      http://maven.apache.org/xsd/decoration-1.1.0.xsd
+      "
+    name="Apache Maven Thymeleaf-Skin"
+    >
+  <skin>
+    <groupId>${project.groupId}</groupId>
+    <artifactId>${project.artifactId}</artifactId>
+    <version>${project.version}</version>
+  </skin>
+  <body>
+    <menu>
+      <item name="About" href="index.html"/>
+      <item name="Usage Examples" href="usage.html"/>
+      <item name="Project Information" href="project-info.html"/>
+    </menu>
+    <menu ref="reports"/>
+  </body>
+</project>
diff --git a/src/site/xhtml/index.xhtml b/src/site/xhtml/index.xhtml
new file mode 100644 (file)
index 0000000..524a997
--- /dev/null
@@ -0,0 +1,16 @@
+<!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>${project.name}</h1>
+  <h2>${project.description}</h2>
+  <p><em>TODO...</em></p>
+  <h2>Releases</h2>
+  <ul>
+    <li><a href="http://juplo.de/maven-thymeleaf-skin/">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>