-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproduct.html
85 lines (73 loc) · 2.6 KB
/
product.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
a {
font-size: 17px;
}
</style>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/css/bootstrap.min.css">
<script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
<script
src="https://cdn.staticfile.org/popper.js/1.12.5/umd/popper.min.js"></script>
<script
src="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/js/bootstrap.min.js"></script>
<script src="./scripts/productDB.js"></script>
<script src="./scripts/product.js"></script>
<title>Product</title>
</head>
<body>
<nav class="navbar navbar-expand-sm bg-dark navbar-dark">
<a class="navbar-brand" href="shop.html">Shop</a>
<ul class="navbar-nav">
<li class="nav-item" id="navigation-actions"></li>
<li class="nav-item"><a class="nav-link"
href="shopping_cart.html">Shopping Cart</a></li>
</ul>
</nav>
<br />
<br />
<div class="container">
<img id="image" style="float: left; width: 50%">
<span id="productName" style="font-size: 50px; font-weight: bold;"></span><br />
<span id="cost" style="font-size: 40px;">Your Price: $</span> <br />
<span id="descShort" style="font-size: 27px"></span><br /> <br /> <br />
<span id="descLong"></span> <br /> <br /> <br /> <br /> <br /> <br />
<button type="button" onclick="addToCart()" class="btn btn-primary">Add
to Cart</button>
<br /> <br />
<form action="./shop.html">
<input type="submit" value="Continue Shopping" class="btn" />
</form>
</div>
</body>
<br/><br/><br/><br/><br/>
<footer>
The above data, including the images, all come from the following website: http://shop.cbssports.com/CBS_Boston_University
</footer>
<script>
if (localStorage.getItem("email")){
// Show Profile navigation
var navigation_profile = document.createElement("a");
var element1 = document.createTextNode("My Profile");
navigation_profile.href = './profile.html';
navigation_profile.appendChild(element1);
navigation_profile.className = "nav-link";
let navigation_action = document.getElementById("navigation-actions");
navigation_action.appendChild(navigation_profile);
}
else{
//Show Sign In navigation
var navigation_profile = document.createElement("a");
var element1 = document.createTextNode("Sign In");
navigation_profile.href = './login.html';
navigation_profile.appendChild(element1);
navigation_profile.className = "nav-link";
let navigation_action = document.getElementById("navigation-actions");
navigation_action.appendChild(navigation_profile);
}
</script>
</html>