-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubmit.html
More file actions
82 lines (69 loc) · 2.47 KB
/
submit.html
File metadata and controls
82 lines (69 loc) · 2.47 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Submit Lost or Found Item</title>
<link rel="stylesheet" href="stylelost.css">
</head>
<body>
<header>
<h1>Submit Lost or Found Item</h1>
<nav>
<a href="index.html">Home</a>
<a href="listings.html">View Listings</a>
</nav>
</header>
<main>
<form id="itemForm">
<label for="itemType">Item Type:</label>
<select id="itemType" required>
<option value="lost">Lost</option>
<option value="found">Found</option>
</select><br><br>
<label for="itemName">Item Name:</label>
<input type="text" id="itemName" required><br><br>
<label for="description">Description:</label><br>
<textarea id="description" rows="4" required></textarea><br><br>
<label for="location">Last Seen/Found Location:</label>
<input type="text" id="location" required><br><br>
<label for="contact">Your Contact Info:</label>
<input type="text" id="contact" required><br><br>
<button type="submit">Submit</button>
</form>
</main>
<script>
const toggleBtn = document.getElementById("darkModeToggle");
const body = document.body;
// Load mode from localStorage
if (localStorage.getItem("dark-mode") === "true") {
body.classList.add("dark");
toggleBtn.textContent = "☀ Light Mode";
}
toggleBtn.addEventListener("click", () => {
body.classList.toggle("dark");
const darkMode = body.classList.contains("dark");
localStorage.setItem("dark-mode", darkMode);
toggleBtn.textContent = darkMode ? "☀ Light Mode" : "🌙 Dark Mode";
});
</script>
<!-- Firebase SDKs -->
<script src="https://www.gstatic.com/firebasejs/11.9.1/firebase-app-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/11.9.1/firebase-database-compat.js"></script>
<script>
const firebaseConfig = {
apiKey: "AIzaSyA4TM2ReYVjZi2Et8FNe2mogfQNjie8V1g",
authDomain: "lost-and-found-bfdd2.firebaseapp.com",
databaseURL: "https://lost-and-found-bfdd2-default-rtdb.firebaseio.com",
projectId: "lost-and-found-bfdd2",
storageBucket: "lost-and-found-bfdd2.firebasestorage.app",
messagingSenderId: "331139330999",
appId: "1:331139330999:web:cf66c0343ccb1767142e32"
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
const db = firebase.database();
</script>
<script src="main.js"></script>
</body>
</html>