geethareddy commited on
Commit
84a2cb4
·
verified ·
1 Parent(s): c7186e4

templates/menu_page.html

Browse files
Files changed (1) hide show
  1. templates/menu_page.html +0 -128
templates/menu_page.html DELETED
@@ -1,128 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Menu - Biryani Hub</title>
7
- <style>
8
- /* General Body Styling */
9
- body {
10
- font-family: Arial, sans-serif;
11
- background-color: #f8f8f8;
12
- margin: 0;
13
- padding: 0;
14
- }
15
-
16
- /* Container for the menu */
17
- .menu-container {
18
- max-width: 1200px;
19
- margin: 0 auto;
20
- padding: 20px;
21
- background-color: #fff;
22
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
23
- border-radius: 8px;
24
- margin-top: 50px;
25
- }
26
-
27
- h1 {
28
- text-align: center;
29
- font-size: 2.5rem;
30
- color: #333;
31
- margin-bottom: 30px;
32
- }
33
-
34
- .menu-item {
35
- border-bottom: 1px solid #eee;
36
- padding: 15px 0;
37
- display: flex;
38
- justify-content: space-between;
39
- align-items: center;
40
- }
41
-
42
- .order-btn {
43
- padding: 10px 20px;
44
- background-color: #4CAF50;
45
- color: white;
46
- border: none;
47
- border-radius: 5px;
48
- cursor: pointer;
49
- }
50
-
51
- .order-btn:hover {
52
- background-color: #45a049;
53
- }
54
-
55
- #listen-btn {
56
- padding: 10px 20px;
57
- background-color: #4CAF50;
58
- color: white;
59
- border: none;
60
- border-radius: 5px;
61
- cursor: pointer;
62
- font-size: 1.2rem;
63
- display: block;
64
- margin: 30px auto;
65
- }
66
-
67
- #listen-btn:hover {
68
- background-color: #45a049;
69
- }
70
- </style>
71
- </head>
72
- <body>
73
-
74
- <div class="menu-container">
75
- <h1>Welcome to the Menu</h1>
76
-
77
- {% for item in menu_items %}
78
- <div class="menu-item">
79
- <div class="details">
80
- <h3>{{ item.name }}</h3>
81
- <p><strong>Ingredients:</strong> {{ item.ingredients }}</p>
82
- <p><strong>Category:</strong> {{ item.category }}</p>
83
- <p class="price">Price: ${{ item.price }}</p>
84
- </div>
85
- <button class="order-btn">Order</button>
86
- </div>
87
- {% endfor %}
88
-
89
- <!-- Button for triggering voice recognition -->
90
- <button id="listen-btn">Say "Order" to order an item</button>
91
- </div>
92
-
93
- <script>
94
- const listenButton = document.getElementById("listen-btn");
95
- const recognition = new (window.SpeechRecognition || window.webkitSpeechRecognition)();
96
-
97
- recognition.lang = "en-US";
98
- recognition.interimResults = false;
99
-
100
- function speak(text) {
101
- const msg = new SpeechSynthesisUtterance(text);
102
- window.speechSynthesis.speak(msg);
103
- }
104
-
105
- listenButton.addEventListener("click", () => {
106
- speak("Please say the item you want to order.");
107
- recognition.start();
108
- });
109
-
110
- recognition.onresult = (event) => {
111
- const command = event.results[0][0].transcript.toLowerCase();
112
- console.log("User said:", command);
113
-
114
- // Add logic to recognize specific items or trigger actions based on the command
115
- if (command.includes("order")) {
116
- // For example, navigate or process an order (customize as needed)
117
- speak("Your order has been placed.");
118
- }
119
- };
120
-
121
- recognition.onerror = (event) => {
122
- console.error("Speech recognition error:", event.error);
123
- speak("Sorry, I couldn't understand that. Please try again.");
124
- };
125
- </script>
126
-
127
- </body>
128
- </html>