From 7e49305c9248231d4dcaa1dbe31158b554a74ab6 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Mon, 1 Sep 2014 15:18:09 +0200 Subject: [PATCH] Umstellung auf Thymeleaf: Schritt 3 - Versucht, das Projet umzustellen MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Ergebnis: Möglichkeiten von Thymeleaf+Tiles zu eingeschränkt/kompliziert. --- .../juplo/branding/web/ApplicationConfig.java | 22 ---- src/main/resources/spring/tiles.xml | 23 ++-- .../webapp/WEB-INF/templates/maincontent.jsp | 72 +++++------ src/main/webapp/WEB-INF/web.xml | 8 -- src/main/webapp/less/all.less | 3 + .../webapp/thymeleaf/templates/defaults.html | 60 +++++++++ .../webapp/thymeleaf/templates/footer.html | 12 -- .../webapp/thymeleaf/templates/header.html | 12 -- .../webapp/thymeleaf/templates/html5page.html | 119 ++++++++++++++++++ .../webapp/thymeleaf/templates/layout.html | 35 ------ src/main/webapp/thymeleaf/views/index.html | 45 ++++++- .../views/projects/fix-swf/overview.html | 52 ++++++++ 12 files changed, 326 insertions(+), 137 deletions(-) delete mode 100644 src/main/java/de/juplo/branding/web/ApplicationConfig.java create mode 100644 src/main/webapp/less/all.less create mode 100644 src/main/webapp/thymeleaf/templates/defaults.html delete mode 100644 src/main/webapp/thymeleaf/templates/footer.html delete mode 100644 src/main/webapp/thymeleaf/templates/header.html create mode 100644 src/main/webapp/thymeleaf/templates/html5page.html delete mode 100644 src/main/webapp/thymeleaf/templates/layout.html create mode 100644 src/main/webapp/thymeleaf/views/projects/fix-swf/overview.html diff --git a/src/main/java/de/juplo/branding/web/ApplicationConfig.java b/src/main/java/de/juplo/branding/web/ApplicationConfig.java deleted file mode 100644 index 598f1b08..00000000 --- a/src/main/java/de/juplo/branding/web/ApplicationConfig.java +++ /dev/null @@ -1,22 +0,0 @@ -package de.juplo.branding.web; - -import javax.annotation.PostConstruct; -import javax.annotation.Resource; -import javax.servlet.ServletContext; -import org.springframework.stereotype.Component; - - -@Component -public class ApplicationConfig -{ - public static final String ATTRIBUTE_BASE = "base"; - - @Resource - private ServletContext context; - - @PostConstruct - public void configureApplication() - { - context.setAttribute(ATTRIBUTE_BASE, context.getContextPath() + '/'); - } -} \ No newline at end of file diff --git a/src/main/resources/spring/tiles.xml b/src/main/resources/spring/tiles.xml index 8439ff05..f77fb859 100644 --- a/src/main/resources/spring/tiles.xml +++ b/src/main/resources/spring/tiles.xml @@ -8,19 +8,20 @@ Main definition that uses layout.html to put title and content attributes from Thymeleaf fragments; {1} will be evaluated to either 'list', 'form' or 'view'. --> - - - - + + + + + + + + + + - - - + + diff --git a/src/main/webapp/WEB-INF/templates/maincontent.jsp b/src/main/webapp/WEB-INF/templates/maincontent.jsp index c09b6b0a..f2a0fcf3 100644 --- a/src/main/webapp/WEB-INF/templates/maincontent.jsp +++ b/src/main/webapp/WEB-INF/templates/maincontent.jsp @@ -2,38 +2,40 @@ <%@page pageEncoding="UTF-8"%> <%@page session="false" %> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> -

- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do - eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim - ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut - aliquip ex ea commodo consequat. Duis aute irure dolor in - reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla - pariatur. Excepteur sint occaecat cupidatat non proident, sunt in - culpa qui officia deserunt mollit anim id est laborum. -

-

Duis aute irure dolor

-
    -
  • Operators and other mathematical stuff:
  • -
  • Characters offten used in programming languages:
  • -
  • Special german characters:
  • -
  • Other special characters:
  • -
-

Excepteur sint occaecat cupidatat

-

- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do - eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim - ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut - aliquip ex ea commodo consequat. Duis aute irure dolor in - reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla - pariatur. Excepteur sint occaecat cupidatat non proident, sunt in - culpa qui officia deserunt mollit anim id est laborum. -

-

- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do - eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim - ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut - aliquip ex ea commodo consequat. Duis aute irure dolor in - reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla - pariatur. Excepteur sint occaecat cupidatat non proident, sunt in - culpa qui officia deserunt mollit anim id est laborum. -

+
+

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do + eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim + ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut + aliquip ex ea commodo consequat. Duis aute irure dolor in + reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla + pariatur. Excepteur sint occaecat cupidatat non proident, sunt in + culpa qui officia deserunt mollit anim id est laborum. +

+

Duis aute irure dolor

+
    +
  • Operators and other mathematical stuff:
  • +
  • Characters offten used in programming languages:
  • +
  • Special german characters:
  • +
  • Other special characters:
  • +
+

Excepteur sint occaecat cupidatat

+

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do + eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim + ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut + aliquip ex ea commodo consequat. Duis aute irure dolor in + reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla + pariatur. Excepteur sint occaecat cupidatat non proident, sunt in + culpa qui officia deserunt mollit anim id est laborum. +

+

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do + eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim + ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut + aliquip ex ea commodo consequat. Duis aute irure dolor in + reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla + pariatur. Excepteur sint occaecat cupidatat non proident, sunt in + culpa qui officia deserunt mollit anim id est laborum. +

+
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index af117549..289983bb 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -72,12 +72,4 @@ / - - 404 - /404.html - - - /error.html - - diff --git a/src/main/webapp/less/all.less b/src/main/webapp/less/all.less new file mode 100644 index 00000000..c1eb4e02 --- /dev/null +++ b/src/main/webapp/less/all.less @@ -0,0 +1,3 @@ +@import 'variables.less'; +@import 'base.less'; +@import 'screen.less'; diff --git a/src/main/webapp/thymeleaf/templates/defaults.html b/src/main/webapp/thymeleaf/templates/defaults.html new file mode 100644 index 00000000..880af8b8 --- /dev/null +++ b/src/main/webapp/thymeleaf/templates/defaults.html @@ -0,0 +1,60 @@ + + + + juplo - STANDARDELEMENTE + + + + + + + + +

juplo

+
+

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do + eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim + ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut + aliquip ex ea commodo consequat. Duis aute irure dolor in + reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla + pariatur. Excepteur sint occaecat cupidatat non proident, sunt in + culpa qui officia deserunt mollit anim id est laborum. +

+

Duis aute irure dolor

+
    +
  • Operators and other mathematical stuff: -+/*
  • +
  • Characters offten used in programming languages: {(<>)}@$?%*#;:&/\!^"'`~
  • +
  • Special german characters: ÄäÖöÜü
  • +
  • Other special characters: @?¢§%°
  • +
+

Excepteur sint occaecat cupidatat

+

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do + eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim + ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut + aliquip ex ea commodo consequat. Duis aute irure dolor in + reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla + pariatur. Excepteur sint occaecat cupidatat non proident, sunt in + culpa qui officia deserunt mollit anim id est laborum. +

+

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do + eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim + ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut + aliquip ex ea commodo consequat. Duis aute irure dolor in + reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla + pariatur. Excepteur sint occaecat cupidatat non proident, sunt in + culpa qui officia deserunt mollit anim id est laborum. +

+
+ + + diff --git a/src/main/webapp/thymeleaf/templates/footer.html b/src/main/webapp/thymeleaf/templates/footer.html deleted file mode 100644 index 32d3ffc9..00000000 --- a/src/main/webapp/thymeleaf/templates/footer.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - Footer-Template - - -
-
- © 2014 juplo NG -
- - \ No newline at end of file diff --git a/src/main/webapp/thymeleaf/templates/header.html b/src/main/webapp/thymeleaf/templates/header.html deleted file mode 100644 index a2370235..00000000 --- a/src/main/webapp/thymeleaf/templates/header.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - Header-Template - - -
- juplo proudly presemts: -
-
- - \ No newline at end of file diff --git a/src/main/webapp/thymeleaf/templates/html5page.html b/src/main/webapp/thymeleaf/templates/html5page.html new file mode 100644 index 00000000..c52d5ffa --- /dev/null +++ b/src/main/webapp/thymeleaf/templates/html5page.html @@ -0,0 +1,119 @@ + + + + juplo - BASISTEMPLATE + + + + + +
+ + +
+
+

Überschrift

+

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do + eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim + ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut + aliquip ex ea commodo consequat. Duis aute irure dolor in + reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla + pariatur. Excepteur sint occaecat cupidatat non proident, sunt in + culpa qui officia deserunt mollit anim id est laborum. +

+
+ +
+ +
+ + diff --git a/src/main/webapp/thymeleaf/templates/layout.html b/src/main/webapp/thymeleaf/templates/layout.html deleted file mode 100644 index 7d02e2b4..00000000 --- a/src/main/webapp/thymeleaf/templates/layout.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - Title - - - -
HEADER
-
- -

Title

- -
- - - - - -

Content

-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. - Praesent scelerisque neque neque, ac elementum quam dignissim interdum. - Phasellus et placerat elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. - Praesent scelerisque neque neque, ac elementum quam dignissim interdum. - Phasellus et placerat elit. -

-
-
- -
TILES
- -
FOOTER
- - \ No newline at end of file diff --git a/src/main/webapp/thymeleaf/views/index.html b/src/main/webapp/thymeleaf/views/index.html index 101bdb88..cd366101 100644 --- a/src/main/webapp/thymeleaf/views/index.html +++ b/src/main/webapp/thymeleaf/views/index.html @@ -4,8 +4,49 @@ Index -
-

Inhalt der Index-Seite...

+ + +
+

Navigation

+ + + +
+
+

Inhalt der Index-Seite...

+
+ diff --git a/src/main/webapp/thymeleaf/views/projects/fix-swf/overview.html b/src/main/webapp/thymeleaf/views/projects/fix-swf/overview.html new file mode 100644 index 00000000..cd366101 --- /dev/null +++ b/src/main/webapp/thymeleaf/views/projects/fix-swf/overview.html @@ -0,0 +1,52 @@ + + + + Index + + + + +
+

Navigation

+ + + + +
+
+

Inhalt der Index-Seite...

+
+ + + -- 2.20.1