You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2019/12/12 17:22:21 UTC

[isis-app-helloworld] branch master updated: ISIS-2201: adds templates/error.html. SB will use this automatically (see BasicErrorController).

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis-app-helloworld.git


The following commit(s) were added to refs/heads/master by this push:
     new 274e5b3  ISIS-2201: adds templates/error.html.  SB will use this automatically (see BasicErrorController).
274e5b3 is described below

commit 274e5b38f433cf34071335cf598cd1fc4c9a0198
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Dec 12 17:22:03 2019 +0000

    ISIS-2201: adds templates/error.html.  SB will use this automatically (see BasicErrorController).
    
    also factors out page.css from index.html, for common look-n-feel.
---
 src/main/resources/static/css/page.css  | 27 +++++++++++++++++++++++++++
 src/main/resources/static/index.html    | 30 +-----------------------------
 src/main/resources/templates/error.html | 20 ++++++++++++++++++++
 3 files changed, 48 insertions(+), 29 deletions(-)

diff --git a/src/main/resources/static/css/page.css b/src/main/resources/static/css/page.css
new file mode 100644
index 0000000..487d6a8
--- /dev/null
+++ b/src/main/resources/static/css/page.css
@@ -0,0 +1,27 @@
+body {
+    background-color: #1A467B;
+    font-family: Verdana, Helvetica, Arial, serif;
+    font-size: 90%;
+}
+
+li {
+    margin-top: 6px;
+    margin-bottom: 6px;
+}
+table {
+    border-collapse: collapse;
+}
+table, th, td {
+    border: 1px;
+    border-style: solid;
+    border-color: lightgray;
+}
+th, td {
+    padding: 10px;
+}
+#wrapper {
+    background-color: #ffffff;
+    width: 900px;
+    margin: 8px auto;
+    padding: 12px;
+}
diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html
index a497c3e..404c9b9 100644
--- a/src/main/resources/static/index.html
+++ b/src/main/resources/static/index.html
@@ -3,36 +3,8 @@
     <head>
         <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
         <title>Apache Isis&trade; HelloWorld</title>
-        
-        <style type="text/css">
-body {
-    background-color: #1A467B;
-    font-family: Verdana, Helvetica, Arial, serif;
-    font-size: 90%;
-}
 
-li {
-    margin-top: 6px;
-    margin-bottom: 6px;
-}
-table {
-    border-collapse: collapse;
-}
-table, th, td {
-    border: 1px;
-    border-style: solid;
-    border-color: lightgray;
-}
-th, td {
-    padding: 10px;
-}
-#wrapper {
-    background-color: #ffffff;
-    width: 900px;
-    margin: 8px auto;
-    padding: 12px;
-}
-        </style>
+        <link rel="stylesheet" type="text/css" href="css/page.css">
     </head>
     <body>
         <div id="wrapper">
diff --git a/src/main/resources/templates/error.html b/src/main/resources/templates/error.html
new file mode 100644
index 0000000..d60df7c
--- /dev/null
+++ b/src/main/resources/templates/error.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html xmlns:th="http://www.thymeleaf.org">
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+        <title>Apache Isis&trade; HelloWorld</title>
+
+        <link rel="stylesheet" type="text/css" th:href="@{/css/page.css}">
+    </head>
+    <body>
+        <div id="wrapper">
+            <img alt="Isis Logo" th:src="@{/images/apache-isis/logo.png}" />
+             
+            <p>
+                Our apologies - an error occurred.
+            </p>
+
+            <p>You can access the app <a th:href="@{/wicket/}">here</a>
+        </div>
+    </body>
+</html>