diff --git a/prototype/src/main/java/org/hso/ecommerce/app/GreetingController.java b/prototype/src/main/java/org/hso/ecommerce/app/RequestController.java similarity index 78% rename from prototype/src/main/java/org/hso/ecommerce/app/GreetingController.java rename to prototype/src/main/java/org/hso/ecommerce/app/RequestController.java index 3f3b79c..bbc4024 100644 --- a/prototype/src/main/java/org/hso/ecommerce/app/GreetingController.java +++ b/prototype/src/main/java/org/hso/ecommerce/app/RequestController.java @@ -6,7 +6,17 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; @Controller -public class GreetingController { +public class RequestController { + + @GetMapping("/") + public String greeting() { + return "redirect:/home"; + } + + @GetMapping("/home") + public String home() { + return "home"; + } @GetMapping("/greeting") public String greeting(@RequestParam(name = "name", required = false, defaultValue = "World") String name, Model model) { @@ -14,10 +24,4 @@ public class GreetingController { return "greeting"; } - @GetMapping("/home") - public String home(Model model) { - //model.addAttribute("name", name); - return "home"; - } - } diff --git a/prototype/src/main/resources/static/css/ecom.css b/prototype/src/main/resources/static/css/ecom.css new file mode 100644 index 0000000..47ae8cb --- /dev/null +++ b/prototype/src/main/resources/static/css/ecom.css @@ -0,0 +1,404 @@ +:root { + font-family: "Fira Sans"; + line-height: 1.15; + + --u5: calc(1em * 1.5 * 1.5 * 1.5 * 1.5 * 1.5 ); + --u4: calc(1em * 1.5 * 1.5 * 1.5 * 1.5); + --u3: calc(1em * 1.5 * 1.5 * 1.5); + --u2: calc(1em * 1.5 * 1.5); + --u1: calc(1em * 1.5); + --u0: calc(1em); + --u-1: calc(1em * 0.666); + --u-2: calc(1em * 0.666 * 0.666); + --u-3: calc(1em * 0.666 * 0.666 * 0.666); + --u-4: calc(1em * 0.666 * 0.666 * 0.666 * 0.666); + + + --root-c-base: #ecf0f1; + --root-c-base-highlight: #bdc3c7; + + --root-c-primary: #1abc9c; + --root-c-primary-highlight: #16a085; + + --root-c-secondary: #9b59b6; + --root-c-secondary-highlight: #8e44ad; + + --root-c-black: #2c3e50; + --root-c-black-highlight: #34495e; + + + --c-base: var(--root-c-base); + --c-base-highlight: var(--root-c-base-highlight); + + --c-primary:var(--root-c-primary); + --c-primary-highlight: var(--root-c-primary-highlight); + + --c-secondary: var(--c-secondary); + --c-secondary-highlight: var(--root-c-secondary-highlight); + + --c-black: var(--root-c-black); + --c-black-highlight: var(--root-c-black-highlight); +} + +.primary { + --c-base: var(--root-c-base); + --c-base-highlight: var(--root-c-base-highlight); + + --c-primary:var(--root-c-primary); + --c-primary-highlight: var(--root-c-primary-highlight); + + --c-secondary: var(--c-secondary); + --c-secondary-highlight: var(--root-c-secondary-highlight); + + --c-black: var(--root-c-black); + --c-black: var(--root-c-black-highlight); +} + +.secondary { + --c-base: var(--root-c-base); + --c-base-highlight: var(--root-c-base-highlight); + + --c-primary:var(--root-c-secondary); + --c-primary-highlight: var(--root-c-secondary-highlight); + + --c-secondary: var(--root-c-primary); + --c-secondary-highlight: var(--root-c-primary-highlight); + + --c-black: var(--root-c-black); + --c-black-highlight: var(--root-c-black-highlight); +} + +.inverted { + --c-base: var(--root-c-black); + --c-base-highlight: var(--root-c-black-highlight); + + --c-primary:var(--root-c-primary); + --c-primary-highlight: var(--root-c-primary-highlight); + + --c-secondary: var(--c-secondary); + --c-secondary-highlight: var(--root-c-secondary-highlight); + + --c-black: var(--root-c-base); + --c-black-highlight: var(--root-c-base-highlight); +} + + +* { + margin: 0em; + padding: 0em; + box-sizing: border-box; +} + +html, body { + font-size: var(--u0); + height: 100%; + background-color: var(--c-base); + color: var(--c-black) +} + + +h1, h2, h3, h4, h5 { + font-family: "Fira Mono"; + padding-top: 1em; + padding-bottom: 0.618em; + text-transform: uppercase; +} + +h1 { + font-size: var(--u2); +} + +h2 { + font-size: var(--u1); +} + +h3, h4, h5 { + font-size: var(--u0); +} + +img { + width: 100%; + object-fit: cover; +} + +li { + list-style-type: none; +} + +/* + * NAV + */ + +nav h1 { + font-size: var(--u0); + margin: 0rem; +} + + +/* + * FOOTER + */ + +footer { + padding-top: var(--u3); + padding-bottom: var(--u1); +} + +/* + * INPUTS + */ + +input[type="text"], +input[type="password"] { + + background-color: var(--c-base); + + border: none; + + border-radius: var(--u-2); + margin-top: var(--u0); + margin-bottom: var(--u0); + + padding: var(--u0); + font-size: var(--u0); + color: var(--c-black); + + /* box-shadow: var(--s-0-secondary); */ +} + +input[type="text"]::placeholder, +input[type="password"]::placeholder { + color: var(--c-primary-highlight); + opacity: 50%; +} + +button, .botton { + font-family: "Fira Mono"; + + background-color: var(--c-primary); + color: var(--c-base); + + border: none; + border-radius: var(--u-2); + + margin-bottom: var(--u0); + margin-top: var(--u0); + + padding: var(--u0); + + min-width: 10em; + + font-family: "Fira Mono"; + text-transform: uppercase; + font-size: var(--u0); + + /* box-shadow: var(--s-0-secondary); */ +} + +button:active, .botton:active { + background-color: var(--c-primary-highlight); +} + +input[type="text"], +input[type="password"], +button, +.button { + transition: all 0.1s ease-out; +} + +label { + display: block; + min-width: 10em; +} + +/* + * HERO + */ + +.hero { + background-color: var(--c-primary); + color: var(--c-base); +} + +.hero-black { + background-color: var(--c-black); + color: var(--c-base); +} + +/* + * LAYOUT + */ + +.content-width { + max-width: 80rem; + margin-left: auto; + margin-right: auto; + + padding-left: var(--u0); + padding-right: var(--u0); +} + +.flex { + display: flex; + align-items: center; + justify-content: space-between; + flex-wrap: wrap; +} + +.flex > * { + margin: var(--u0); +} + +.flex > .spacer { + flex: 1; +} + +.grid { + display: flex; + justify-content: flex-start; + flex-wrap: wrap; +} + +.grid > * { + flex: 1; + margin: var(--u0); + padding: var(--u0); + border-radius: var(--u0); +} + +.grid.base > * { + background-color: var(--c-base); + color: var(--c-black); +} + +.grid.black > * { + background-color: var(--c-black); + color: var(--c-base); +} + +.grid.primary > * { + background-color: var(--c-primary); + color: var(--c-base); +} + +.grid.secondary > * { + background-color: var(--c-primary-highlight); + color: var(--c-base); +} + +.hero-primary .grid.shadow > * { + /* box-shadow: var(--s-0-secondary); */ +} + +.hero-black .grid.shadow > * { + /* box-shadow: var(--s-0-secondary); */ +} + + +.grid.s > .spacer { + box-shadow: none; + + margin: calc(var(--u0) * 2); + padding: 0px; + + width: 10rem; + max-width: 10rem; + min-width: 7.5rem; + height: 0px; +} + +.grid.s > * { + width: 10rem; + max-width: 10rem; + min-width: 7.5rem; +} + + +.grid.m > .spacer { + box-shadow: none; + + margin: calc(var(--u0) * 2); + padding: 0px; + + width: 20rem; + max-width: 20rem; + min-width: 15rem; + height: 0px; + padding: 0px; +} + +.grid.m > * { + width: 20rem; + max-width: 20rem; + min-width: 15rem; +} + +.grid.l > .spacer { + box-shadow: none; + + margin: calc(var(--u0) * 2); + padding: 0px; + + width: 40rem; + max-width: 40rem; + min-width: 15rem; + height: 0px; + padding: 0px; +} + +.grid.l > * { + width: 40rem; + max-width: 40rem; + min-width: 15rem; +} + +.vertical-spacer.s { + min-height: 10rem; +} + +.vertical-spacer.m { + min-height: 20rem; +} + +.vertical-spacer.l { + min-height: 40rem; +} + +/* + * Impov + */ + +.input-icon { + /* box-shadow: var(--s-0-secondary); */ + display: flex; + padding: 0px; + + border-radius: var(--u0); +} + +.input-icon > input { + flex: 1; + margin: 0px; + border-top-right-radius: 0px; + border-bottom-right-radius: 0px; + box-shadow: none; +} + +.input-icon > button { + margin: 0px; + + border-top-left-radius: 0px; + border-bottom-left-radius: 0px; + box-shadow: none; +} + + +/* + * CONTENT + */ + +.price { + opacity: 75%; + font-size: var(--u1); + text-align: right; +} diff --git a/prototype/src/main/resources/static/img/error_404_illustatus.svg b/prototype/src/main/resources/static/img/error_404_illustatus.svg new file mode 100644 index 0000000..8f39065 --- /dev/null +++ b/prototype/src/main/resources/static/img/error_404_illustatus.svg @@ -0,0 +1,261 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Oops, Page not found + + + + + \ No newline at end of file diff --git a/prototype/src/main/resources/static/img/error_generic_illustatus.svg b/prototype/src/main/resources/static/img/error_generic_illustatus.svg new file mode 100644 index 0000000..15955fe --- /dev/null +++ b/prototype/src/main/resources/static/img/error_generic_illustatus.svg @@ -0,0 +1,261 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Oops, something went wrong + + + + + \ No newline at end of file diff --git a/prototype/src/main/resources/static/img/product-1.jpg b/prototype/src/main/resources/static/img/product-1.jpg new file mode 100644 index 0000000..8ea7598 Binary files /dev/null and b/prototype/src/main/resources/static/img/product-1.jpg differ diff --git a/prototype/src/main/resources/static/img/product-2.jpg b/prototype/src/main/resources/static/img/product-2.jpg new file mode 100644 index 0000000..427b2f0 Binary files /dev/null and b/prototype/src/main/resources/static/img/product-2.jpg differ diff --git a/prototype/src/main/resources/static/img/product-3.jpg b/prototype/src/main/resources/static/img/product-3.jpg new file mode 100644 index 0000000..dbc1b2e Binary files /dev/null and b/prototype/src/main/resources/static/img/product-3.jpg differ diff --git a/prototype/src/main/resources/static/img/product-4.jpg b/prototype/src/main/resources/static/img/product-4.jpg new file mode 100644 index 0000000..8f2d857 Binary files /dev/null and b/prototype/src/main/resources/static/img/product-4.jpg differ diff --git a/prototype/src/main/resources/static/img/product-5.jpg b/prototype/src/main/resources/static/img/product-5.jpg new file mode 100644 index 0000000..5e0a406 Binary files /dev/null and b/prototype/src/main/resources/static/img/product-5.jpg differ diff --git a/prototype/src/main/resources/static/img/product-6.jpg b/prototype/src/main/resources/static/img/product-6.jpg new file mode 100644 index 0000000..05d78c0 Binary files /dev/null and b/prototype/src/main/resources/static/img/product-6.jpg differ diff --git a/prototype/src/main/resources/static/img/product-7.jpg b/prototype/src/main/resources/static/img/product-7.jpg new file mode 100644 index 0000000..220140c Binary files /dev/null and b/prototype/src/main/resources/static/img/product-7.jpg differ diff --git a/prototype/src/main/resources/static/img/undraw_successful_purchase_secondary.svg b/prototype/src/main/resources/static/img/undraw_successful_purchase_secondary.svg new file mode 100644 index 0000000..96780fa --- /dev/null +++ b/prototype/src/main/resources/static/img/undraw_successful_purchase_secondary.svg @@ -0,0 +1 @@ +successful purchase diff --git a/prototype/src/main/resources/templates/error/404.html b/prototype/src/main/resources/templates/error/404.html new file mode 100644 index 0000000..09f6d26 --- /dev/null +++ b/prototype/src/main/resources/templates/error/404.html @@ -0,0 +1,25 @@ + + + + + e-commerce + + + + +
+
+
+

Error 404

+
+

Ein Fehler ist aufgetreten. Die gewünschte Ressource konnte nicht gefunden werden.

+ + +
+
+
+
+
+ + + \ No newline at end of file diff --git a/prototype/src/main/resources/templates/error/500.html b/prototype/src/main/resources/templates/error/500.html new file mode 100644 index 0000000..8e8d847 --- /dev/null +++ b/prototype/src/main/resources/templates/error/500.html @@ -0,0 +1,26 @@ + + + + + e-commerce + + + + +
+
+
+

Error 500

+
+

Ein Fehler ist aufgetreten. Bitte versuche es später nocheinmal.

+ + +
+
+
+
+
+ + + + diff --git a/prototype/src/main/resources/templates/fragments/footer.html b/prototype/src/main/resources/templates/fragments/footer.html new file mode 100644 index 0000000..4756a29 --- /dev/null +++ b/prototype/src/main/resources/templates/fragments/footer.html @@ -0,0 +1,32 @@ + + + + + e-commerce + + + + + \ 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 91b8f72..6aba443 100644 --- a/prototype/src/main/resources/templates/fragments/header.html +++ b/prototype/src/main/resources/templates/fragments/header.html @@ -1,17 +1,20 @@ - - + + e-commerce - + diff --git a/prototype/src/main/resources/templates/home.html b/prototype/src/main/resources/templates/home.html index e524b9a..1b002df 100644 --- a/prototype/src/main/resources/templates/home.html +++ b/prototype/src/main/resources/templates/home.html @@ -3,9 +3,88 @@ e-commerce - + -
Header
+ +
+
+
+

Angebote

+
+ +
+ +

Lorem Ipsum

+

25.14 €

+

+ Als Gregor Samsa eines Morgens aus unruhigen Träumen erwachte. +

+
+ +
+ +

Lorem Ipsum

+

10.14 €

+

+ Als Gregor Samsa eines Morgens aus unruhigen Träumen erwachte. +

+
+ +
+ +

Lorem Ipsum

+

25.14 €

+

+ Als Gregor Samsa eines Morgens aus unruhigen Träumen erwachte. +

+
+ +
+ +

Lorem Ipsum

+

10.14 €

+

+ Als Gregor Samsa eines Morgens aus unruhigen Träumen erwachte. +

+
+ +
+ +

Lorem Ipsum

+

44.14 €

+

+ + Als Gregor Samsa eines Morgens aus unruhigen Träumen erwachte. + +

+
+ +
+
+
+
+
+
+
+
+ +
+
+

Personalisierte Empfehlungen

+
+ +
+

Werde jetzt Kunde

+

Jetzt Kunde werden und viele Vorteile sichern, + wie z.B. personalisierte Empfehlungen.

+ +
+
+
+
+
+
+