From 26697cca1a5f86bbec6f08ded69c5a800e71c3a0 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Mon, 13 Jun 2016 14:52:51 +0200 Subject: [PATCH] Initial version (not really functioning) --- .gitignore | 1 + pom.xml | 77 ++++++++++++++++ src/main/resources/META-INF/maven/site.vm | 105 ++++++++++++++++++++++ src/site/site.xml | 24 +++++ src/site/xhtml/index.xhtml | 16 ++++ src/site/xhtml/issue-tracking.xhtml | 13 +++ src/site/xhtml/mail-lists.xhtml | 13 +++ src/site/xhtml/usage.xhtml | 10 +++ 8 files changed, 259 insertions(+) create mode 100644 .gitignore create mode 100644 pom.xml create mode 100644 src/main/resources/META-INF/maven/site.vm create mode 100644 src/site/site.xml create mode 100644 src/site/xhtml/index.xhtml create mode 100644 src/site/xhtml/issue-tracking.xhtml create mode 100644 src/site/xhtml/mail-lists.xhtml create mode 100644 src/site/xhtml/usage.xhtml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a6f89c2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target/ \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..94d1a40 --- /dev/null +++ b/pom.xml @@ -0,0 +1,77 @@ + + + 4.0.0 + + de.juplo.maven + maven-thymeleaf-skin + 1.0-SNAPSHOT + + Apache-Maven Thymeleaf-Skin + A maven skin, that renders the site as templates, that can be styled without restrictions with the help of thymeleaf. + http://juplo.de/maven-thymeleaf-skin + + + scm:git:http://juplo.de/git/maven-thymeleaf-skin + scm:git:ssh://juplo.de:/var/lib/git/juplo/maven-thymeleaf-skin + http://juplo.de/gitweb/?p=maven-thymeleaf-skin;a=summary + + + + + kai + Kai Moritz + kai@juplo.de + + + + + + + + UTF-8 + + + + + + + org.apache.maven.plugins + maven-resources-plugin + 2.7 + + + org.apache.maven.shared + maven-filtering + 1.3 + + + + + copy-resources + pre-site + + copy-resources + + + ${project.build.directory}/filtered-site + + + src/site + true + + + + + + + + maven-site-plugin + 3.5.1 + + ${project.build.directory}/filtered-site + + + + + + diff --git a/src/main/resources/META-INF/maven/site.vm b/src/main/resources/META-INF/maven/site.vm new file mode 100644 index 0000000..a973c5c --- /dev/null +++ b/src/main/resources/META-INF/maven/site.vm @@ -0,0 +1,105 @@ + + + + +## 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 + + +#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 + + + + + + + + + + + juplo - $title + + + + +
+

$shortTitle

+ $bodyContent +
+ + diff --git a/src/site/site.xml b/src/site/site.xml new file mode 100644 index 0000000..d2c542c --- /dev/null +++ b/src/site/site.xml @@ -0,0 +1,24 @@ + + + + ${project.groupId} + ${project.artifactId} + ${project.version} + + + + + + + + + + diff --git a/src/site/xhtml/index.xhtml b/src/site/xhtml/index.xhtml new file mode 100644 index 0000000..524a997 --- /dev/null +++ b/src/site/xhtml/index.xhtml @@ -0,0 +1,16 @@ + + + + + + +

${project.name}

+

${project.description}

+

TODO...

+

Releases

+ + + diff --git a/src/site/xhtml/issue-tracking.xhtml b/src/site/xhtml/issue-tracking.xhtml new file mode 100644 index 0000000..f7e6859 --- /dev/null +++ b/src/site/xhtml/issue-tracking.xhtml @@ -0,0 +1,13 @@ + + + + + + + There is no bug-tracking system set up for this project! +

+ Please send your bug-reports, questions or feature-requests directly + to the developer. +

+ + diff --git a/src/site/xhtml/mail-lists.xhtml b/src/site/xhtml/mail-lists.xhtml new file mode 100644 index 0000000..ff8d7f2 --- /dev/null +++ b/src/site/xhtml/mail-lists.xhtml @@ -0,0 +1,13 @@ + + + + + + + There are no mailinglists defined for this project! +

+ Please send your bug-reports, questions or feature-requests directly + to the developer. +

+ + diff --git a/src/site/xhtml/usage.xhtml b/src/site/xhtml/usage.xhtml new file mode 100644 index 0000000..3c573e4 --- /dev/null +++ b/src/site/xhtml/usage.xhtml @@ -0,0 +1,10 @@ + + + + + + +

Usage

+

TODO...

+ + -- 2.20.1