From f06d6c78d95f5529c9c0b947791c29ef95470725 Mon Sep 17 00:00:00 2001 From: Claude Brisson Date: Wed, 7 Jun 2023 20:46:14 +0200 Subject: [PATCH] Setting up view --- view-webapp/src/main/config/layouts/standard.html | 12 ++++++++++++ .../kotlin/org/jeudego/pairgoth/web/ViewServlet.kt | 2 +- view-webapp/src/main/webapp/index.html | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 view-webapp/src/main/config/layouts/standard.html create mode 100644 view-webapp/src/main/webapp/index.html diff --git a/view-webapp/src/main/config/layouts/standard.html b/view-webapp/src/main/config/layouts/standard.html new file mode 100644 index 0000000..27ee025 --- /dev/null +++ b/view-webapp/src/main/config/layouts/standard.html @@ -0,0 +1,12 @@ + + + + + Pairgoth + + + + +#translate($page) + + \ No newline at end of file diff --git a/view-webapp/src/main/kotlin/org/jeudego/pairgoth/web/ViewServlet.kt b/view-webapp/src/main/kotlin/org/jeudego/pairgoth/web/ViewServlet.kt index 5a11e25..37d7606 100644 --- a/view-webapp/src/main/kotlin/org/jeudego/pairgoth/web/ViewServlet.kt +++ b/view-webapp/src/main/kotlin/org/jeudego/pairgoth/web/ViewServlet.kt @@ -41,7 +41,7 @@ class ViewServlet : VelocityViewServlet() { override fun fillContext(context: Context, request: HttpServletRequest) { super.fillContext(context, request) var uri = decodeURI(request) - context.put("page", uri) + context.put("page", "$uri.html") val base = uri.replaceFirst(".html$".toRegex(), "") val suffixes = Arrays.asList("js", "css") for (suffix in suffixes) { diff --git a/view-webapp/src/main/webapp/index.html b/view-webapp/src/main/webapp/index.html new file mode 100644 index 0000000..980a0d5 --- /dev/null +++ b/view-webapp/src/main/webapp/index.html @@ -0,0 +1 @@ +Hello World!