-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
108 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,30 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Item List</title> | ||
<title>Active Orders</title> | ||
<link href="/styles/order-page.css" rel="stylesheet" type="text/css"/> | ||
</head> | ||
<body> | ||
<div class = "toolbar"> | ||
<img src="/imgs/Logo.png" href="/" width="200px"> | ||
</div> | ||
<div class="header"> | ||
<h1>Active orders:</h1> | ||
<h2>Current time:</h2> | ||
<h2 id="currentTime"></h2> | ||
</div> | ||
<table class="ptable", id="ptable"> | ||
<tr> | ||
<th>OrderID</th> | ||
<th>Items</th> | ||
<th>CustomerID</th> | ||
<th>Total Price</th> | ||
<th>Delivery Method</th> | ||
<th>Order Status</th> | ||
<th>Time Placed</th> | ||
<th></th> | ||
</tr> | ||
</table> | ||
</body> | ||
<script src="./scripts/order-page.js"></script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Functions for the clock | ||
|
||
function currentTime() { | ||
let clock = document.getElementById("currentTime") | ||
var today = new Date() | ||
let hours = hourParse(today) | ||
let meridiam = ampm(today) | ||
let min = parseTime(today.getMinutes()) | ||
let sec = parseTime(today.getSeconds()) | ||
var time = String(hours + ":" + min + ":" + sec + " " + meridiam) | ||
clock.innerText = time | ||
} | ||
|
||
function hourParse(today) { | ||
let hour = today.getHours() | ||
if (hour%12 == 0) { | ||
return 12 | ||
} | ||
else { | ||
return hour%12 | ||
} | ||
} | ||
|
||
function ampm(today) { | ||
let hour = today.getHours() | ||
if (hour < 12) { | ||
return "AM" | ||
} | ||
else { | ||
return "PM" | ||
} | ||
} | ||
|
||
function parseTime(temp) { | ||
if (temp < 10) { | ||
return "0" + temp | ||
} | ||
else { | ||
return temp | ||
} | ||
} | ||
|
||
currentTime() | ||
|
||
setInterval(() => { | ||
currentTime() | ||
}, 1000); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
body { | ||
font-family: sans-serif; | ||
background-color: rgb(255, 228, 233); | ||
background-size: 100%; | ||
background-attachment: fixed; | ||
text-align: center; | ||
} | ||
|
||
table { | ||
position: relative; | ||
border: 2px solid rgb(133, 126, 127); | ||
border-radius: 5px; | ||
width: 80%; | ||
/* margin: 20px 0px; */ | ||
left: 50%; | ||
transform: translate(-50%, 0%); | ||
} | ||
|
||
th { | ||
color: black; | ||
padding: 10px; | ||
} | ||
|
||
tr:first-child { | ||
background-color: rgb(255, 106, 188); | ||
} | ||
|
||
tr:nth-child(even) { | ||
background-color: white; | ||
color: magenta; | ||
} | ||
|
||
tr { | ||
background-color: rgb(245, 158, 245); | ||
color: white; | ||
padding: 10px; | ||
} |
Binary file not shown.