Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
tharanithar-r authored Oct 25, 2023
2 parents def36cd + 81e126c commit 4650199
Show file tree
Hide file tree
Showing 13 changed files with 343 additions and 45 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Cafe Management

An online portal for a cafe for ordering coffee or snacks or whatever else it offers.
<img width="944" alt="image" src="https://github.com/Kavyam172/Cafe-Management/assets/124245507/75e2ecaa-3c77-45c9-ae88-53a328453343">
<img width="927" alt="image" src="https://github.com/Open-Source-Chandigarh/Cafe-Management/assets/124245507/b5937489-da33-4858-bba2-d81323861292">




Expand All @@ -22,7 +23,7 @@ Steps to contribute:
```
4. Make changes to the code.
5. Once you are satisfied, commit the changes and and push your code to the forked repository.
6. Create a pull request from the forked repository to this repository.Make sure to provide a concise title and description.Your pull request will only be accepted if the issue is assigned to you.
6. Create a pull request from the forked repository to this repository.Make sure to provide a concise title and description and link the related issue to the pull request.Your pull request will only be accepted if the issue is assigned to you.

We will review your code and merge it into the project.
Please adhere to the code of conduct mentioned in [code_of_conduct.md](https://github.com/Open-Source-Chandigarh/Cafe-Management/blob/main/conduct_of_code.md).
Expand Down
6 changes: 6 additions & 0 deletions about.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@
<li class="nav-item">
<a href="faq.html" class="nav-link active" style="color:rgba(255, 255, 255);">FAQ</a>
</li>
<li class="nav-item">
<a href="signup.html" class="nav-link active" style="color:rgba(255, 255, 255);">Sign Up</a>
</li>
<li class="nav-item">
<a href="login.html" class="nav-link active" style="color:rgba(255, 255, 255);">Login</a>
</li>
</ul>
</div>
</div>
Expand Down
6 changes: 6 additions & 0 deletions contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@
<li class="nav-item">
<a href="faq.html" class="nav-link active" style="color:rgba(255, 255, 255);">FAQ</a>
</li>
<li class="nav-item">
<a href="signup.html" class="nav-link active" style="color:rgba(255, 255, 255);">Sign Up</a>
</li>
<li class="nav-item">
<a href="login.html" class="nav-link active" style="color:rgba(255, 255, 255);">Login</a>
</li>
</ul>
</div>
</div>
Expand Down
6 changes: 6 additions & 0 deletions faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@
<li class="nav-item">
<a href="faq.html" class="nav-link active" style="color:rgba(255, 255, 255);">FAQ</a>
</li>
<li class="nav-item">
<a href="signup.html" class="nav-link active" style="color:rgba(255, 255, 255);">Sign Up</a>
</li>
<li class="nav-item">
<a href="login.html" class="nav-link active" style="color:rgba(255, 255, 255);">Login</a>
</li>

</ul>
</div>
Expand Down
6 changes: 6 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@
<li class="nav-item">
<a href="faq.html" class="nav-link active" style="color:rgba(255, 255, 255);">FAQ</a>
</li>
<li class="nav-item">
<a href="signup.html" class="nav-link active" style="color:rgba(255, 255, 255);">Sign Up</a>
</li>
<li class="nav-item">
<a href="login.html" class="nav-link active" style="color:rgba(255, 255, 255);">Login</a>
</li>
</ul>
</div>
</div>
Expand Down
123 changes: 123 additions & 0 deletions login.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
<link rel="stylesheet" href="about.css">
<link rel="stylesheet" href="mynav.css">
<script src="jquery-3.6.4.min.js"></script>
<script src="mynav.js"></script>
<style>
/* Add your custom styles here */
body {
font-family: Arial, sans-serif;
background-color: rgb(111, 85, 85);
}
.containerr {
max-width: 600px;
margin: 0 auto;
padding: 40px;
background-color: white;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
margin-top: 100px;
max-height: 380px;
}
.sign{
text-align: center; /* Center align content */
}
.form-group {
margin-bottom: 20px;
}
label {
font-weight: bold;
display: block;
margin-bottom: 5px;
}
input[type="text"],
input[type="email"],
input[type="password"] {
width: 100%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
}
button[type="submit"] {
padding: 10px 20px;
background-color: #007bff;
border: none;
color: #fff;
border-radius: 4px;
cursor: pointer;
}
button[type="submit"]:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<nav class="navbar navbar-light navbar-expand-md navbar-fixed-top navigation-clean-button">
<div class="container">
<button class="navbar-toggler" data-bs-toggle="collapse" data-bs-target="#mynav"><span
class="visually-hidden">.</span><span class="navbar-toggler-icon"></span></button>
<div>
<a href="index.html" class="navbar-brand
"><span><strong>The Cafe</strong></span></a>
</div>
<div class="collapse navbar-collapse" id="mynav">
<ul class="navbar-nav navbar-right">
<li class="nav-item">
<a href="index.html" class="nav-link active" style="color:rgb(255, 255, 255);">Home</a>
</li>
<li class="nav-item dropdown">
<a class="dropdown-toggle nav-link" data-bs-toggle="dropdown" href="#"
style="color:rgba(255, 255, 255);">Services</a>
<div class="dropdown-menu">
<a href="menu.html" class="dropdown-item bg-dark" data-bss-hover-animate="pulse"
style="color:rgba(255, 255, 255);">Menu</a>
<a href="order.html" class="dropdown-item bg-dark d-fle" data-bss-hover-animate="pulse"
style="color:rgba(255, 255, 255);">Your Order</a>
</div>
</li>
<li class="nav-item">
<a href="about.html" class="nav-link active" style="color:rgba(255, 255, 255);">About Us</a>
</li>
<li class="nav-item">
<a href="contact.html" class="nav-link active" style="color:rgba(255, 255, 255);">Contact Us</a>
</li>
<li class="nav-item">
<a href="faq.html" class="nav-link active" style="color:rgba(255, 255, 255);">FAQ</a>
</li>
<li class="nav-item">
<a href="signup.html" class="nav-link active" style="color:rgba(255, 255, 255);">Sign Up</a>
</li>
<li class="nav-item">
<a href="login.html" class="nav-link active" style="color:rgba(255, 255, 255);">Login</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- Your login form starts here -->
<div class="containerr">
<h2 class="sign">Login</h2>
<form action="login_form.php" method="post">
<div class="form-group">
<label for="username">Username</label>
<input type="text" id="username" name="username" required>
</div>
<div class="form-group">
<label for="password">Password</label>
<input type="password" id="password" name="password" required>
</div>
<div class="form-group" >
<button type="submit">Login</button>
</div>
</form>
<p>Don't have an account? <a href="signup.html">Sign Up here</a>.</p>
</div>
<!-- Your login form ends here -->
</body>
</html>
5 changes: 5 additions & 0 deletions menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,9 @@ div.col h3{
.item-card{
padding: 12px;
box-shadow: 0 2px 6px rgba(65, 11, 16, .15)

.flex-menu {
display: flex;
justify-content: space-between;
gap: 1px;
}
28 changes: 17 additions & 11 deletions menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@
<li class="nav-item">
<a href="faq.html" class="nav-link active" style="color:rgba(255, 255, 255);">FAQ</a>
</li>
<li class="nav-item">
<a href="signup.html" class="nav-link active" style="color:rgba(255, 255, 255);">Sign Up</a>
</li>
<li class="nav-item">
<a href="login.html" class="nav-link active" style="color:rgba(255, 255, 255);">Login</a>
</li>
</ul>
</div>
</div>
Expand Down Expand Up @@ -122,52 +128,52 @@ <h1 class="text-bg-dark">CAFE MENU</h1>
<tr>
<th>ITEMS</th>
<th style="width:117px">PRICE</th>
<th style="width: 100px;"></th>
<th style="width: 120px;"></th>
</tr>
</thead>
<tbody>
<tr>
<td id="itemi1">Hot Coffee</td>
<td id="pricei1">Rs.80</td>
<td id="ri1" class="add"><button id="i1" class="btn cart" type="button">Add</button></td>
<td id="ri1" class="add flex-menu"><button id="i1" class="btn cart" type="button">Add</button></td>
</tr>
<tr>
<td id="itemi2">Black Coffee</td>
<td id="pricei2">Rs.80</td>
<td id="ri2" class="add"><button id="i2" class="btn cart" type="button">Add</button></td>
<td id="ri2" class="add flex-menu"><button id="i2" class="btn cart" type="button">Add</button></td>
</tr>
<tr>
<td id="itemi3">Hazelnut Cold Coffee</td>
<td id="pricei3">Rs.125</td>
<td id="ri3" class="add"><button id="i3" class="btn cart" type="button">Add</button></td>
<td id="ri3" class="add flex-menu"><button id="i3" class="btn cart" type="button">Add</button></td>
</tr>
<tr>
<td id="itemi4">Chocolate Cold Coffee</td>
<td id="pricei4">Rs.125</td>
<td id="ri4" class="add"><button id="i4" class="btn cart" type="button">Add</button></td>
<td id="ri4" class="add flex-menu"><button id="i4" class="btn cart" type="button">Add</button></td>
</tr>
<tr>
<td id="itemi5">Caramel Cold Coffee</td>
<td id="pricei5">Rs.125</td>
<td id="ri5" class="add"><button id="i5" class="btn cart" type="button">Add</button></td>
<td id="ri5" class="add flex-menu"><button id="i5" class="btn cart" type="button">Add</button></td>
</tr>
<tr>
<td id="itemi6">Classic Cold Coffee</td>
<td id="pricei6">Rs.100</td>
<td id="ri6" class="add"><button id="i6" class="btn cart" type="button">Add</button></td>
<td id="ri6" class="add flex-menu"><button id="i6" class="btn cart" type="button">Add</button></td>
</tr>
<tr>
<td id="itemi7">Iced Americano</td>
<td id="pricei7">Rs.160</td>
<td id="ri7" class="add">
<buttonn id="i7" class="btn cart" type="button">Add</buttonn>
<td id="ri7" class="add flex-menu">
<button id="i7" class="btn cart" type="button">Add</button>
</td>
</tr>
<tr>
<td id="itemi8">Maggie</td>
<td id="pricei8">Rs.30</td>
<td id="ri8" class="add">
<buttonn id="i8" class="btn cart" type="button">Add</buttonn>
<td id="ri8" class="add flex-menu">
<button id="i8" class="btn cart" type="button">Add</button>
</td>
</tr>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function updatecart(cart){
document.getElementById("r"+item).innerHTML=`<button id="`+item+`" class="btn cart" type="button">Add</button>`;
}
else{
document.getElementById("r"+item).innerHTML="<button id='minus"+item+"' class='btn minus'>-</button><div id='val"+item+"' style='text-align:center;'>"+cart[item].quantity+"</div><button id='plus"+item+"' class='btn plus'>+</button>";
document.getElementById("r"+item).innerHTML=`<div><button id='minus${item}' class='btn minus'> -</button></div><div id='val${item}' style='font-size: 3vh;'> ${cart[item].quantity} </div> <div><button id='plus${item}' class='btn plus'>+ </button> </div>`;
}
}
localStorage.setItem('cart', JSON.stringify(cart));
Expand Down
8 changes: 8 additions & 0 deletions order.css
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,12 @@ body{
padding: 8px;
border-radius: 20px;
text-align: center;
}

.hide_as_link {
text-decoration: none;
color: #000000;
}
.hide_as_link :active {
color: #000000;
}
25 changes: 15 additions & 10 deletions order.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,25 @@
<li class="nav-item">
<a href="faq.html" class="nav-link active" style="color:rgba(255, 255, 255);">FAQ</a>
</li>
<li class="nav-item">
<a href="signup.html" class="nav-link active" style="color:rgba(255, 255, 255);">Sign Up</a>
</li>
<li class="nav-item">
<a href="login.html" class="nav-link active" style="color:rgba(255, 255, 255);">Login</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container step1">
<div class="row">
<h2> Step 1 - My Awesome Cart Express Checkout - Review Your Cart items </h2>
<div class="row">
<div id="items">
<!-- items will be added here -->
</div>

</div>
</div>
<div class="container step1">
<a class="hide_as_link" href="./menu.html">
<h2> Step 1 - My Awesome Cart Express Checkout - Review Your Cart items </h2>
<div class="row">
<div id="items">
<!-- items will be added here -->
</div>
</div>
</a>
</div>
<div class="col my-4">
<h2> Step 2 - Enter Address & Other Details</h2>
Expand Down
37 changes: 16 additions & 21 deletions order.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,21 @@ $(document).ready(function () {
listcart(cart);
});
function listcart(cart) {
let str=``;
if (cart == {}) {
str += `<div id="default">
<span><h5>Your Cart is Empty........</h5></span>
let str_order=``;
for (let item in cart) {
str_order+=`<div class="row">
<div class="col">
`+cart[item].name+`
</div>
<div class="col">
x`+ cart[item].quantity +`
</div>
<div class="col">
= Rs.`+ (cart[item].price)*(cart[item].quantity) +`
</div>
</div>`
}
else{
for (let item in cart) {
str+=`<div class="row">
<div class="col">
`+cart[item].name+`
</div>
<div class="col">
x`+ cart[item].quantity +`
</div>
<div class="col">
= Rs.`+ (cart[item].price)*(cart[item].quantity) +`
</div>
</div>`
}
}
document.getElementById("items").innerHTML=str;
}

if(str_order == ``) str_order = `<h5 class='default'> Your Cart is Empty. Click here to Go to Menu </h5>`;
document.getElementById("items").innerHTML= str_order;
}
Loading

0 comments on commit 4650199

Please sign in to comment.