2020-01-25 13:59:08 +01:00
<!DOCTYPE html>
< html lang = "de" dir = "ltr" xmlns:th = "http://www.thymeleaf.org" >
< head >
2020-04-27 09:48:24 +02:00
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=0.75, user-scalable=no" >
2020-01-25 13:59:08 +01:00
2020-04-27 09:48:24 +02:00
< title > Angebote< / title >
< link rel = "stylesheet" th:href = "@{/css/ecom.css}" / >
2020-01-25 13:59:08 +01:00
< / head >
< body >
2020-04-27 09:48:24 +02:00
< nav th:replace = "fragments/header :: header" > Header< / nav >
< main >
< div class = 'hero' >
< div class = 'content-width' >
2020-01-25 13:59:08 +01:00
< h1 > Angebote< / h1 >
2020-04-27 09:48:24 +02:00
< script th:src = "@{/js/back.js}" > < / script >
< div class = "back" data-group = "shop" data-name = "Zurück zur Startseite." data-insert = "false" > < / div >
2020-05-10 15:28:39 +02:00
< div th:if = "${commercialArticles.size() == 0}" >
< h1 > Momentan gibt es keine Angebote< / h1 >
< / div >
< div class = 'grid m base shadow' th:if = "${commercialArticles.size() != 0}" >
2020-05-01 14:40:43 +02:00
< section th:each = "article: ${commercialArticles}" >
2020-05-14 15:43:16 +02:00
< a th:href = "@{/shop/articles/{id}(id=${article.id})}" class = "section" >
2020-01-25 13:59:08 +01:00
2020-05-14 15:43:16 +02:00
< img th:src = "@{/shop/articles/{id}/image.jpg(id=${article.id})}" / >
< h2 th:text = "${article.title}" / >
< p class = 'price' > < span th:text = "${#numbers.formatDecimal(article.getPriceGross() * 0.01, 1, 'POINT', 2, 'COMMA')}" > < / span > < span > EUR< / span > < / p >
< p th:text = "${article.description}" / >
< / a >
< / section >
2020-04-27 09:48:24 +02:00
< section class = "spacer" > < / section >
< section class = "spacer" > < / section >
< section class = "spacer" > < / section >
< section class = "spacer" > < / section >
2020-01-25 13:59:08 +01:00
< / div >
2020-04-27 09:48:24 +02:00
< / div >
< div class = "vertical-spacer s" > < / div >
< / div >
< div class = '' >
< div class = 'content-width' >
2020-01-25 13:59:08 +01:00
< h1 > Personalisierte Empfehlungen< / h1 >
2020-05-01 14:40:43 +02:00
<!-- if a User is NOT logged in -->
< div class = "grid l" th:if = "${isLoggedIn == false}" >
2020-04-27 09:48:24 +02:00
< img th:src = "@{/img/undraw_successful_purchase_secondary.svg}" / >
< div >
< h2 > Werde jetzt Kunde< / h2 >
< p > Jetzt Kunde werden und viele Vorteile sichern,
wie z.B. personalisierte Empfehlungen. < / p >
< p >
< a class = "button" th:href = "@{/register}" > Registieren< / a >
< / p >
< / div >
2020-01-25 13:59:08 +01:00
< / div >
2020-05-01 14:40:43 +02:00
<!-- If User is logged in but hasn't ordered anything yet -->
2020-05-07 15:48:00 +02:00
< div th:if = "${isLoggedIn == true and hasOrders == false}" >
2020-05-14 15:43:16 +02:00
< h2 > Jetzt Shoppen und Empfehlungen erhalten!< / h2 >
2020-05-01 14:40:43 +02:00
< / div >
<!-- If User is logged in and has ordered something before -->
2020-05-07 15:48:00 +02:00
< div th:if = "${hasOrders == true}" >
2020-05-01 14:40:43 +02:00
< div class = 'grid m base shadow' >
< section th:each = "article: ${suggestedArticles}" >
< a th:href = "@{/shop/articles/{id}(id=${article.id})}" class = "section" >
2020-05-07 15:48:00 +02:00
< img th:src = "@{/shop/articles/{id}/image.jpg(id=${article.id})}" / >
2020-05-01 14:40:43 +02:00
< h2 th:text = "${article.title}" / >
2020-05-10 14:57:02 +02:00
< p class = 'price' > < span th:text = "${#numbers.formatDecimal(article.getPriceGross() * 0.01, 1, 'POINT', 2, 'COMMA')}" > < / span > < span > EUR< / span > < / p >
2020-05-01 14:40:43 +02:00
< p th:text = "${article.description}" / >
< / a >
< / section >
< / div >
< / div >
2020-04-27 09:48:24 +02:00
< / div >
< div class = "vertical-spacer s" > < / div >
< / div >
< / main >
< footer th:replace = "fragments/footer :: footer" > < / footer >
2020-01-25 13:59:08 +01:00
< / body >
< / html >