Initial commit

This commit is contained in:
Janis M
2022-03-26 11:26:10 +01:00
commit bfe995158e
18 changed files with 2843 additions and 0 deletions

168
views/product.ejs Normal file
View File

@@ -0,0 +1,168 @@
<!DOCTYPE html>
<html lang="en">
<head>
<%- include('partials/head'); %>
</head>
<body>
<header>
<%- include('partials/header'); %>
</header>
<div id="content">
<div id="top">
<div id="productPicture">
<!--BILD-->
</div>
<div id="info">
<h1 id="title"><%= product.name %></h1>
<p style="word-wrap: break-word;"></p>
<div>
<label style="margin-right: 30px; margin-left: 30px;
<% if(stockAmount > 0){%>
color: green;">
lieferbar in <%= shippingDays %> - <%= shippingDays + 1 %> Tagen</label>
<span><input type="number" id="quantity" min="1" max="<%= stockAmount %>" style="width: 30px;" value="1" ></span>
<label>/<%= stockAmount %></label>
<% } else { %>
color: red;">
nicht lieferbar</label>
<% } %>
</div>
</div>
</div>
<div id="description">
<h1 style="margin-left: 30px;">Beschreibung</h1>
<p style="margin-left: 30px;"><%= productDescription %></p>
</div>
<% if(loggedIn){ %>
<div id="newReview">
<h1 style="padding-left: 30px;">Bewertung</h1>
<textarea name="review" id="" cols="60" rows="5" style="margin-left: 30px; resize: none;"></textarea>
<button>Post</button>
</div>
<% } %>
<div id="reviews">
<% if(reviews > 0){ %>
<div id="reviewTemplate">
<div style="width: 100%; height: 200px; display: block; float: left;">
<div id= data >
<h3 style="padding-left: 30px; width: 100%;">187Boii 12.12.12 12:12</h3>
</div>
<div id="text" >
<p style="padding-left: 30px;";">junge geiler text junge geiler text junge geiler text junge geiler text junge geiler text junge geiler text junge geiler text junge geiler text junge geiler text junge geiler text junge geiler text </p>
</div>
</div>
</div>
<% }else{ %>
<div style="width: 100%; height: 100px;">Leider hat dieses Produkt noch keine Bewertung. :(</div>
<% } %>
</div>
</div>
<style>
*{
padding:0;
}
#content
{
width: 1000px;
height:3000px;
background-color: rgb(59, 59, 59);
margin:auto;
}
#productPicture
{
width: 40%;
height: 400px;
background-color: rgb(85, 85, 85);
display: block;
float: left;
}
#info
{
width: 60%;
height: 400px;
display: block;
float: right;
background-color: rgb(121, 170, 182);
}
#description
{
width: 100%;
height: 250px;
display: block;
float: left;
background-color: rgb(103, 187, 183);
}
#title
{
margin-left: 30px;
}
#newReview{
width: 100%;
height: 200px;
display: block;
float: left;
background-color: rgb(45, 66, 94);
}
#reviews{
width: 100%;
height: 1600px;
display: block;
float: left;
background-color: rgb(39, 39, 39);
}
#reviewTemplate
{
width: 100%;
height: 200px;
float: left;
}
#reviewTemplatePicture
{
width: 200px;
height: 200px;
display: block;
float: left;
background-color: rgb(85, 158, 255);
}
#data
{
width: 100%;
height: 50px;
display: block;
float: left;
background-color: rgb(58, 94, 97);
}
#text
{
width: 100%;
height: 150px;
display: block;
float: left;
background-color: rgb(78, 129, 133);
}
#reviewTemplateText
{
background-color: rgb(235, 196, 228);
}
</style>
<%- include('partials/footer'); %>
</body>
</html>