Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions contact_us.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://pyscript.net/releases/2024.3.1/core.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script type="module" src="https://pyscript.net/releases/2024.3.1/core.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">
<title>Milktea - Contact Us</title>
<style>

</style>
</head>
<body class="blue-theme">
<div class="nav">
<nav class="navbar navbar-expand-lg navbar-dark">
<div class="container">
<a class="navbar-brand" href="index.html"><i class="fas fa-coffee me-2"></i>Milktea</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a class="nav-link" href="index.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" aria-current="page" href="ordering_form.html">Order Now</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="contact_us.html">Contact Us</a>
</li>
</ul>
</div>
</div>
</nav>
</div>
<div class="box">
<br>
<h1 class="text-primary mb-4 text-center">📧<br>Contact Us</h1>
<p class="text-center">Feel free to reach out to us through any of the following methods:</p>
<br>
<div class="row">
<div class="col">
<div class="boxini">
<h2 class="text-warning mb-4 text-center">Location</h2>
<p>67 Street, GH San Juan Philippines</p>
<p>.</p>
</div>
</div>
<div class="col">
<div class="boxini">
<h2 class="text-warning mb-4 text-center">Phone Number</h2>
<p>(305) 472-9186</p>
<p>.</p>
</div>
</div>
<div class="col">
<div class="boxini">
<h2 class="text-warning mb-4 text-center">Email Adress</h2>
<p>name1@provider.com</p>
<p>company@provider.com</p>
</div>
</div>
</div>
</div>
Binary file added d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added e.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
112 changes: 91 additions & 21 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,99 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DRILL 1</title>
<link rel="stylesheet" href="https://pyscript.net/releases/2025.8.1/core.css" />
<script type="module" src="https://pyscript.net/releases/2025.8.1/core.js"></script>
<link rel="stylesheet" href="https://pyscript.net/releases/2024.1.1/core.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-LN+7fdVzj6u52u30Kp6M/trliBMCMKTyK833zpbD+pXdCLuTusPj697FH4R/5mcr" crossorigin="anonymous">
<script type="module" src="https://pyscript.net/releases/2024.1.1/core.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link rel="stylesheet" type="text/css" href="style.css">
<title>Milktea - Menu</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
position: center;
}
input {
margin-bottom: 10px;
}
</style>
</style>
</head>
<body>
<h2>Simple Avg Calc</h2>
<p>score 1:</p>
<input type="text" id="score1">
<p>score 2:</p>
<input type="text" id="score2">
<button py-click="calculate_average">calculate</button>
<p>Your average is: <span id="averageA"></span></p>
<p>Passed: <span id="result"></span></p>
<div class="nav">
<nav class="navbar navbar-expand-lg navbar-dark">
<div class="container">
<a class="navbar-brand" href="index.html"><i class="fas fa-coffee me-2"></i>Milktea</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a class="nav-link active" href="index.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" aria-current="page" href="ordering_form.html">Order Now</a>
</li>
<li class="nav-item">
<a class="nav-link" href="contact_us.html">Contact Us</a>
</li>
</ul>
</div>
</div>
</nav>
</div>
<div class="box">
<div class="container">
<div class="header text-center">
<i class="fas fa-utensils restaurant-icon"></i>
<div id="name1" class="display-4 fw-bold"></div>
<div id="owner" class="fs-5 mt-2"></div>
<div id="since" class="fs-6"></div>
</div>

<div class="menu-card">
<table class="table table-hover">
<thead>
<tr>
<th id="heading1" colspan="2"></th>
</tr>
</thead>
<tbody>
<tr>
<td>Product Name</td>
<td>Price (₱)</td>
</tr>
<tr>
<td id="prod1"></td>
<td id="price1" class="price"></td>
</tr>
<tr>
<td id="prod2"></td>
<td id="price2" class="price"></td>
</tr>
<tr>
<td id="prod3"></td>
<td id="price3" class="price"></td>
</tr>
<tr>
<td id="prod4"></td>
<td id="price4" class="price"></td>
</tr>
<tr>
<td id="prod5"></td>
<td id="price5" class="price"></td>
</tr>
</tbody>
</table>
</div>

<div class="opening-hours">
<i class="fas fa-clock me-2"></i>
<span id="openingHours"></span>
</div>

<div class="text-center mt-4">
<span id="orderType" class="badge bg-primary"></span>
</div>
<div class="ss">
<a class="btn btn-warning center" text-align="center" href="ordering_form.html" >Order Now</a>
<p>.</p>
</div>
</div>
</div>
<script type="py" src="main.py"></script>
</body>
</html>
</html>

68 changes: 57 additions & 11 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,61 @@
from pyscript import document
from pyscript import display
# Restaurant Order System using Python Data Types

def calculate_average(event):
score1 = float(document.getElementById("score1").value)
score2 = float(document.getElementById("score2").value)
# String data type
restaurant_name = "Milktea Shop"
owner_name = "Eyl Valeroso"

average = (score1 + score2) / 2
# Integer data type
year_since = 2067

if average >= 75:
result = "Yes"
else:
result = "No"
# Float data type
tax_rate = 0.08 # 8% tax

# Boolean data type
has_delivery = True
is_dine_in = True
is_takeaway = False

# List data type
beverages = ["Milktea", "Choc Milktea", "Strawberry Milktea", "Coffee Milktea", "Milktea w/ IceCream"]

# Tuple data type
business_hours = ("11:00 AM", "10:00 PM")

# Dictionary data type
menu = {
"Milktea": 79.99,
"Choc Milktea": 89.00,
"Strawberry Milktea": 89.00,
"Coffee Milktea": 89.00,
"Milktea w/ IceCream": 99.00
}

# Set data type
common_allergens = {"dairy", "nuts"}

# Displaying restaurant information
display(restaurant_name, target="name1")
display(f"Owner: {owner_name}", target="owner")
display(f"Since {year_since}", target="since")
display(f"Menu Pricelist", target="heading1")

# Display menu items
display(beverages[0], target="prod1")
display(f"₱{menu['Milktea']:.2f}", target="price1")
display(beverages[1], target="prod2")
display(f"₱{menu['Choc Milktea']:.2f}", target="price2")
display(beverages[2], target="prod3")
display(f"₱{menu['Strawberry Milktea']:.2f}", target="price3")
display(beverages[3], target="prod4")
display(f"₱{menu['Coffee Milktea']:.2f}", target="price4")
display(beverages[4], target="prod5")
display(f"₱{menu['Milktea w/ IceCream']:.2f}", target="price5")

# Display additional information
display(f"Open: {business_hours[0]} - {business_hours[1]}", target="openingHours")


# Display order type
display(f"Dine-in Available", target="orderType")

document.getElementById("averageA").innerText = str(round(average,2))
document.getElementById("result").innerText = result
26 changes: 26 additions & 0 deletions main2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from pyscript import document, display


def create_order(e):
# Get input values
item1 = document.getElementById("item1")
item2 = document.getElementById("item2")
item3 = document.getElementById("item3")
item4 = document.getElementById("item4")
item5 = document.getElementById("item5")

# Calculate total by multiplying value by checked status (1 or 0)
total = (float(item1.value) * item1.checked +
float(item2.value) * item2.checked +
float(item3.value) * item3.checked +
float(item4.value) * item4.checked +
float(item5.value) * item5.checked)

customer_name = document.getElementById("customer").value
customer_address = document.getElementById("address").value
contact_number = document.getElementById("contact_number").value

display(f"Order for: {customer_name}", target="order_output1")
display(f"Address: {customer_address}", target="order_output2")
display(f"Contact number: {contact_number}", target="order_output3")
display(f"Total: ₱ {total:.2f} ", target="show")
Loading