+landing page
This commit is contained in:
parent
4abb018703
commit
1965331149
@ -9,6 +9,7 @@ import lombok.Setter;
|
|||||||
import javax.faces.bean.ManagedBean;
|
import javax.faces.bean.ManagedBean;
|
||||||
import javax.faces.bean.SessionScoped;
|
import javax.faces.bean.SessionScoped;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ManagedBean
|
@ManagedBean
|
||||||
@ -39,4 +40,13 @@ public class CategoryBean implements Serializable {
|
|||||||
public List<Book> getBooks() {
|
public List<Book> getBooks() {
|
||||||
return Database.getInstance().book().getAll(category);
|
return Database.getInstance().book().getAll(category);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Book> getPresentedBooks() {
|
||||||
|
List<Book> books = Database.getInstance().book().getAll();
|
||||||
|
if(books == null){
|
||||||
|
return new ArrayList<>();
|
||||||
|
}else{
|
||||||
|
return books.subList( Math.max(0,books.size() - 3), books.size());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -9,7 +9,7 @@
|
|||||||
<ui:composition template="template.xhtml">
|
<ui:composition template="template.xhtml">
|
||||||
<ui:define name="content">
|
<ui:define name="content">
|
||||||
<div class="m-row">
|
<div class="m-row">
|
||||||
<h1 class="m-text-center">Warenkorb</h1>
|
<h2 class="m-text-center">Warenkorb</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ui:repeat value="#{cartBean.items}" var="item">
|
<ui:repeat value="#{cartBean.items}" var="item">
|
||||||
@ -62,7 +62,7 @@
|
|||||||
</h:panelGroup>
|
</h:panelGroup>
|
||||||
|
|
||||||
<h:panelGroup layout="block" styleClass="m-row" rendered="#{cartBean.itemCount == 0}">
|
<h:panelGroup layout="block" styleClass="m-row" rendered="#{cartBean.itemCount == 0}">
|
||||||
<h1 class="m-text-center">Der Warenkorb ist Leer</h1>
|
<h1 class="m-text-center">Bitte melden Sie sich an um Bücher in ihrem Warenkorb hinzuzufügen.</h1>
|
||||||
</h:panelGroup>
|
</h:panelGroup>
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<ui:composition template="template.xhtml">
|
<ui:composition template="template.xhtml">
|
||||||
<ui:define name="content">
|
<ui:define name="content">
|
||||||
<div class="m-row">
|
<div class="m-row">
|
||||||
<h1 class="m-text-center">Bestellbestätigung</h1>
|
<h2 class="m-text-center">Bestellbestätigung</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="m-row">
|
<div class="m-row">
|
||||||
@ -22,8 +22,10 @@
|
|||||||
<div class="m-col-t-4 m-block m-push-t-5">
|
<div class="m-col-t-4 m-block m-push-t-5">
|
||||||
<h4>#{paymentBean.selected.type.name}</h4>
|
<h4>#{paymentBean.selected.type.name}</h4>
|
||||||
<h:panelGroup layout="block" rendered="#{paymentBean.selected.type.name eq 'CreditCard'}">
|
<h:panelGroup layout="block" rendered="#{paymentBean.selected.type.name eq 'CreditCard'}">
|
||||||
Inhaber: #{paymentBean.selected.owner}<br/>
|
Inhaber: #{paymentBean.selected.owner}
|
||||||
|
<br/>
|
||||||
Nummer : #{paymentBean.selected.number} / #{paymentBean.selected.checksum}
|
Nummer : #{paymentBean.selected.number} / #{paymentBean.selected.checksum}
|
||||||
|
<br/>
|
||||||
gültig bis: #{paymentBean.selected.expiration}
|
gültig bis: #{paymentBean.selected.expiration}
|
||||||
</h:panelGroup>
|
</h:panelGroup>
|
||||||
|
|
||||||
@ -38,10 +40,10 @@
|
|||||||
|
|
||||||
<div class="m-row m-block">
|
<div class="m-row m-block">
|
||||||
<div class="m-col-t-4">
|
<div class="m-col-t-4">
|
||||||
<img src="https://source.unsplash.com/#{item.article.image}/100x100" class="m-image" alt="Buchcover"/>
|
<img src="https://source.unsplash.com/#{item.article.image}/200x200" class="m-image" alt="Buchcover"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="m-col-t-4">
|
<div class="m-col-t-4">
|
||||||
<h3>#{item.article.title}</h3>
|
<h3>#{item.article.title} - #{item.article.authorsString}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="m-col-t-4">
|
<div class="m-col-t-4">
|
||||||
<h4 class="m-text-right">#{item.count} x #{item.article.priceString}€</h4>
|
<h4 class="m-text-right">#{item.count} x #{item.article.priceString}€</h4>
|
||||||
|
10
src/main/webapp/index.html
Normal file
10
src/main/webapp/index.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Redirect</title>
|
||||||
|
<meta http-equiv="refresh" content="0; index.jsf"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -10,7 +10,47 @@
|
|||||||
<ui:composition template="template.xhtml">
|
<ui:composition template="template.xhtml">
|
||||||
<ui:define name="content">
|
<ui:define name="content">
|
||||||
|
|
||||||
Hallo Welt!!!
|
<div class="m-container">
|
||||||
|
<div class="m-row">
|
||||||
|
<h2 class="m-text-center m-success">Amazon light</h2>
|
||||||
|
</div>
|
||||||
|
<div class="m-row">
|
||||||
|
<h1 class="m-text-center">Sie haben noch nie ein richtig gutes Buch gelesen ?</h1>
|
||||||
|
</div>
|
||||||
|
<div class="m-row">
|
||||||
|
<h1 class="m-text-center">Dann können wir auch nicht helfen</h1>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
<div class="m-row">
|
||||||
|
<div class="m-button m-info">
|
||||||
|
<a href="category.jsf">
|
||||||
|
Zum Katalog
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="m-container">
|
||||||
|
<div class="m-row">
|
||||||
|
<h3 class="m-text-center">Aktuelle Angebote</h3>
|
||||||
|
<div class="m-row">
|
||||||
|
<ui:repeat value="#{categoryBean.presentedBooks}" var="book">
|
||||||
|
<div class="m-col-t-4">
|
||||||
|
<h:form>
|
||||||
|
<h:commandLink action="#{bookBean.select}" styleClass="m-flat">
|
||||||
|
<f:setPropertyActionListener target="#{categoryBean.book}" value="#{book}"/>
|
||||||
|
<figure class="m-figure">
|
||||||
|
<img src="https://source.unsplash.com/#{book.image}/900x900" alt="Buchcover"/>
|
||||||
|
<figcaption class="m-text-center">#{book.title}</figcaption>
|
||||||
|
</figure>
|
||||||
|
</h:commandLink>
|
||||||
|
</h:form>
|
||||||
|
</div>
|
||||||
|
</ui:repeat>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</ui:define>
|
</ui:define>
|
||||||
</ui:composition>
|
</ui:composition>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
</h:panelGroup>
|
</h:panelGroup>
|
||||||
|
|
||||||
<div class="m-row">
|
<div class="m-row">
|
||||||
<div class="m-col-l-6 m-push-l-4">
|
<div class="m-col-l-3 m-push-l-5">
|
||||||
<h:form>
|
<h:form>
|
||||||
<h:inputText id="username" value="#{userBean.username}">Nutzername</h:inputText>
|
<h:inputText id="username" value="#{userBean.username}">Nutzername</h:inputText>
|
||||||
<br/>
|
<br/>
|
||||||
@ -28,8 +28,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a href="register.xhtml">Noch kein Account ?</a>
|
<div class="m-row">
|
||||||
|
<div class="m-col-l-3 m-push-l-5">
|
||||||
|
<a href="register.xhtml" class="m-text-center">
|
||||||
|
Noch kein Account ?
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</ui:define>
|
</ui:define>
|
||||||
|
Loading…
Reference in New Issue
Block a user