From 2a59e717c94a9bb5f2f5aa87611c4612929c413e Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sun, 20 Sep 2020 14:43:32 +0200 Subject: [PATCH] Added a layout based on Bootstrap-4.x with the help of webjars * The templates refer to bootstrapcnd.com directly * The production-version uses webjars, to embed the CSS in the app --- pom.xml | 7 +++++++ src/main/resources/templates/400.html | 7 ++++--- src/main/resources/templates/error.html | 15 ++++++++------- src/main/resources/templates/layout.html | 20 ++++++++++++++++++++ src/main/resources/templates/view.html | 17 ++++++++++------- 5 files changed, 49 insertions(+), 17 deletions(-) create mode 100644 src/main/resources/templates/layout.html diff --git a/pom.xml b/pom.xml index 299903c..546ac9f 100644 --- a/pom.xml +++ b/pom.xml @@ -16,6 +16,7 @@ 11 + 4.5.2 @@ -32,6 +33,12 @@ spring-boot-devtools true + + org.webjars + bootstrap + ${bootstrap.version} + runtime + org.springframework.boot diff --git a/src/main/resources/templates/400.html b/src/main/resources/templates/400.html index f1d4d5d..36ba0c0 100644 --- a/src/main/resources/templates/400.html +++ b/src/main/resources/templates/400.html @@ -1,14 +1,15 @@ - + Testing Exception-Handling - Template for 400 +

Template for 400

-
+

EXCEPTION

-

Back to HOME

+

Back to HOME

diff --git a/src/main/resources/templates/error.html b/src/main/resources/templates/error.html index e30ef9e..a5e8149 100644 --- a/src/main/resources/templates/error.html +++ b/src/main/resources/templates/error.html @@ -1,14 +1,15 @@ - + XXX: ERROR +

XXX: ERROR

- +
- + @@ -21,7 +22,7 @@ - + @@ -36,15 +37,15 @@
Status ERROR.STATUS
ERROR.MESSAGE
Request-IDRequest-ID ERROR.REQUEST_ID
Trace -
-
ERROR.TRACE
+
+
ERROR.TRACE
-

Back to HOME +

Back to HOME

diff --git a/src/main/resources/templates/layout.html b/src/main/resources/templates/layout.html new file mode 100644 index 0000000..5e455c2 --- /dev/null +++ b/src/main/resources/templates/layout.html @@ -0,0 +1,20 @@ + + + + + + TITLE + + + + +
+
+

HEADER

+
BODY
+
+
+ + diff --git a/src/main/resources/templates/view.html b/src/main/resources/templates/view.html index 70d3c51..e632398 100644 --- a/src/main/resources/templates/view.html +++ b/src/main/resources/templates/view.html @@ -1,12 +1,13 @@ - + Template: view +

Deep Thought

-
+

What is the answer to the ultimate question of life, the universe and everything?

@@ -15,12 +16,14 @@
  • Outcome: OUTCOME
  • -
    +
    -
    - - - +
    +
    + +
    + +
    -- 2.20.1