From 213c5a2c94dedca45a9641d94edec5e34a0502bf Mon Sep 17 00:00:00 2001 From: Hannes Date: Sat, 11 Jan 2020 16:39:34 +0100 Subject: [PATCH] initial searchresult and detailview --- .../hso/ecommerce/app/RequestController.java | 6 + .../resources/static/css/articleDetail.css | 26 ++++ .../src/main/resources/static/css/ecom.css | 7 +- .../resources/static/css/searchResults.css | 56 ++++++++ .../resources/templates/articleDetail.html | 88 ++++++++++++ .../resources/templates/fragments/header.html | 4 +- .../resources/templates/searchResults.html | 126 ++++++++++++++++++ 7 files changed, 308 insertions(+), 5 deletions(-) create mode 100644 prototype/src/main/resources/static/css/articleDetail.css create mode 100644 prototype/src/main/resources/static/css/searchResults.css create mode 100644 prototype/src/main/resources/templates/articleDetail.html create mode 100644 prototype/src/main/resources/templates/searchResults.html diff --git a/prototype/src/main/java/org/hso/ecommerce/app/RequestController.java b/prototype/src/main/java/org/hso/ecommerce/app/RequestController.java index c46de63..d5c4527 100644 --- a/prototype/src/main/java/org/hso/ecommerce/app/RequestController.java +++ b/prototype/src/main/java/org/hso/ecommerce/app/RequestController.java @@ -37,6 +37,12 @@ public class RequestController { return "greeting"; } + @GetMapping("/articledetail") + public String articledetail() { return "articledetail";} + + @GetMapping("/searchresults") + public String searchresults() { return "searchresults";} + @GetMapping("/login") public String login(@CookieValue(value = "loginToken", defaultValue = "") String loginToken, Model model) { model.addAttribute(new Customer()); diff --git a/prototype/src/main/resources/static/css/articleDetail.css b/prototype/src/main/resources/static/css/articleDetail.css new file mode 100644 index 0000000..ad62913 --- /dev/null +++ b/prototype/src/main/resources/static/css/articleDetail.css @@ -0,0 +1,26 @@ +.articledetail { + max-width: 100%; + padding: 2em; + background-color: var(--root-c-secondary); +} + +.availability { + color: var(--c-primary); +} + +.checkout { + border: 0px; + border-left: 2px; + border-color: var(--c-white); + border-style: solid; +} + +.quantity { + display: flex; +} + +.quantity label { + min-width: 5em; + margin-bottom: 0px; + padding-left: 15px; +} \ No newline at end of file diff --git a/prototype/src/main/resources/static/css/ecom.css b/prototype/src/main/resources/static/css/ecom.css index 1d63c08..fe32f77 100644 --- a/prototype/src/main/resources/static/css/ecom.css +++ b/prototype/src/main/resources/static/css/ecom.css @@ -384,7 +384,7 @@ label { box-shadow: none; } -.input-icon > button { +.input-icon > form > button { margin: 0px; border-top-left-radius: 0px; @@ -393,6 +393,8 @@ label { } + + /* * CONTENT */ @@ -427,6 +429,3 @@ label { } -.container { - padding: 16px; -} diff --git a/prototype/src/main/resources/static/css/searchResults.css b/prototype/src/main/resources/static/css/searchResults.css new file mode 100644 index 0000000..b36808d --- /dev/null +++ b/prototype/src/main/resources/static/css/searchResults.css @@ -0,0 +1,56 @@ +.container { + +} + +.searchresults { + max-width: 100%; + padding: 2em; + background-color: var(--root-c-secondary); + border: 0px; +} + +.sidebar { + border: 0px; + border-right: 2px; + border-style: solid; + border-color: white; +} + +.articlelist { + background-color: var(--root-c-secondary); +} + +.article { + padding: 1em; +} + +img { + width: 75% +} + +h2 { + padding-bottom: 0px; +} + +.articlelink { + color: var(--c-white); + background-color: var(--root-c-secondary); + border: 0px; +} + +.articlelink:hover { + color: var(--c-primary) +} + +h1 { + padding: 0px; + padding-bottom: 0.5em; +} + +hr { + border-top: 2px solid white; + width: 75%; + margin: auto; + margin-top: 5px; + margin-bottom: 5px; +} \ No newline at end of file diff --git a/prototype/src/main/resources/templates/articleDetail.html b/prototype/src/main/resources/templates/articleDetail.html new file mode 100644 index 0000000..74cfa30 --- /dev/null +++ b/prototype/src/main/resources/templates/articleDetail.html @@ -0,0 +1,88 @@ + + + + + e-commerce + + + + + + +
+
+
+
+
+ +
+ +
+

50.28 €

+

Auf Lager

+
+
+
+ + +
+
+
+
+ +
+
+
+
+
+ + + \ No newline at end of file diff --git a/prototype/src/main/resources/templates/fragments/header.html b/prototype/src/main/resources/templates/fragments/header.html index c3678d2..a64acd6 100644 --- a/prototype/src/main/resources/templates/fragments/header.html +++ b/prototype/src/main/resources/templates/fragments/header.html @@ -11,7 +11,9 @@
- +
+ +
diff --git a/prototype/src/main/resources/templates/searchResults.html b/prototype/src/main/resources/templates/searchResults.html new file mode 100644 index 0000000..cf69e77 --- /dev/null +++ b/prototype/src/main/resources/templates/searchResults.html @@ -0,0 +1,126 @@ + + + + + e-commerce + + + + + +
+
+
+
+
+ +
+
+
+ +
+
+

+
+ +
+

+

25.14 €

+

+ Eine TOLLE Kamera
+ Jaja du denkst jetzt bestimmt: "Bei dem Preis kann sie gar nich sooo TOLL sein".
+ Aber glaub mir, sie is echt echt TOLL!
+ Indianerehrenwort! +

+
+
+
+
+
+ +
+
+

+
+ +
+

+

10.14 €

+

+ Sind halt Kopfhörer ohne Kabel, mehr gibts da nich zu sagen. +

+
+
+
+
+
+ +
+
+

+
+ +
+

+

44.14 €

+

+ Ich weiß selbst nich was das genau sein soll.
+ Wenn dus willst kannst es gern haben, musst nur das Geld überweisen. +

+
+
+
+
+
+
+
+ + + \ No newline at end of file