-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequest.html
More file actions
189 lines (181 loc) · 8.85 KB
/
request.html
File metadata and controls
189 lines (181 loc) · 8.85 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Request Parts - IGNITE Part Share</title>
<link rel="stylesheet" href="styles.css">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
</head>
<body>
<!-- Navigation Bar -->
<nav class="navbar">
<div class="nav-container">
<div class="nav-logo">
<i class="fas fa-robot"></i>
<span>IGNITE Part Share</span>
</div>
<ul class="nav-menu">
<li class="nav-item">
<a href="index.html" class="nav-link">Home</a>
</li>
<li class="nav-item auth-required" style="display: none;">
<a href="donate.html" class="nav-link">Donate Parts</a>
</li>
<li class="nav-item auth-required" style="display: none;">
<a href="request.html" class="nav-link active">Request Parts</a>
</li>
<li class="nav-item auth-required" style="display: none;">
<a href="browse.html" class="nav-link">Browse Parts</a>
</li>
<li class="nav-item">
<a href="leaderboard.html" class="nav-link">Leaderboard</a>
</li>
<li class="nav-item">
<a href="contact.html" class="nav-link">Contact</a>
</li>
</ul>
<div class="user-menu">
<a href="profile.html" class="profile-link">
<i class="fas fa-user"></i>
Profile
</a>
<button class="logout-btn" onclick="signOut()">Logout</button>
</div>
<div class="login-btn">
<a href="login.html" class="btn btn-primary">Login</a>
</div>
<div class="hamburger">
<span class="bar"></span>
<span class="bar"></span>
<span class="bar"></span>
</div>
</div>
</nav>
<!-- Page Header -->
<section class="page-header">
<div class="container">
<h1 class="page-title">Request Parts</h1>
<p class="page-subtitle">Find the parts your team needs</p>
<p class="page-organization">A project of <a href="https://www.ignitepathways.org/" target="_blank" rel="noopener noreferrer" class="ignite-link">IGNITE Pathways</a></p>
</div>
</section>
<!-- Request Section -->
<section class="section">
<div class="container">
<div class="request-content">
<div class="request-form">
<form>
<div class="form-group">
<label for="request-team-number">Team Number</label>
<input type="text" id="request-team-number" placeholder="e.g., 1234" required>
</div>
<div class="form-group">
<label for="request-part">Part Needed</label>
<input type="text" id="request-part" placeholder="What part do you need?">
</div>
<div class="form-group">
<label for="request-urgency">Urgency</label>
<select id="request-urgency">
<option value="">Select Urgency</option>
<option value="critical">Critical - Need immediately</option>
<option value="high">High - Need within a week</option>
<option value="medium">Medium - Need within a month</option>
<option value="low">Low - Planning ahead</option>
</select>
</div>
<div class="form-group">
<label for="request-reason">Reason</label>
<textarea id="request-reason" placeholder="Why do you need this part?"></textarea>
</div>
<button type="submit" class="btn btn-primary">Submit Request</button>
</form>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="footer">
<div class="container">
<div class="footer-content">
<div class="footer-section">
<h3>IGNITE Part Share</h3>
<p>Building a stronger FIRST community through part sharing and collaboration.</p>
<p>A project of <a href="https://www.ignitepathways.org/" target="_blank" rel="noopener noreferrer" class="ignite-link">IGNITE Pathways</a></p>
</div>
<div class="footer-section">
<h4>Quick Links</h4>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="donate.html">Donate</a></li>
<li><a href="request.html">Request</a></li>
<li><a href="browse.html">Browse</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</div>
<div class="footer-section">
<h4>Legal</h4>
<ul>
<li><a href="terms.html">Terms of Service</a></li>
<li><a href="privacy.html">Privacy Policy</a></li>
<li><a href="disclaimer.html">Disclaimer</a></li>
<li><a href="cookies.html">Cookie Policy</a></li>
</ul>
</div>
<div class="footer-section">
<h4>Connect</h4>
<div class="social-links">
<a href="https://www.ignitepathways.org/" target="_blank" rel="noopener noreferrer" title="IGNITE Pathways"><i class="fas fa-globe"></i></a>
<a href="#" onclick="openSocialMedia('Twitter')"><i class="fab fa-twitter"></i></a>
<a href="#" onclick="openSocialMedia('Facebook')"><i class="fab fa-facebook"></i></a>
<a href="#" onclick="openSocialMedia('Instagram')"><i class="fab fa-instagram"></i></a>
<a href="#" onclick="openDiscord()"><i class="fab fa-discord"></i></a>
</div>
</div>
</div>
<div class="footer-bottom">
<p>© 2024 IGNITE Part Share. All rights reserved. | <a href="terms.html">Terms</a> | <a href="privacy.html">Privacy</a> | <a href="disclaimer.html">Disclaimer</a></p>
</div>
</div>
</footer>
<!-- Firebase SDK -->
<script src="https://www.gstatic.com/firebasejs/9.0.0/firebase-app-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.0.0/firebase-auth-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.0.0/firebase-firestore-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.0.0/firebase-storage-compat.js"></script>
<!-- Firebase Config -->
<script src="firebase-config.js"></script>
<!-- Auth Script -->
<script src="auth.js"></script>
<script src="script.js"></script>
<script>
// Check authentication on page load
document.addEventListener('DOMContentLoaded', function() {
let authChecked = false;
// Wait for auth to be initialized and check auth state
const checkAuth = () => {
if (typeof auth !== 'undefined') {
// Listen for auth state changes
auth.onAuthStateChanged(function(user) {
if (authChecked) return; // Prevent multiple checks
authChecked = true;
if (user) {
console.log('User authenticated, access granted to request page');
// User is authenticated, allow access
} else {
console.log('No user authenticated, redirecting to login');
showMessage('Please log in to access this feature', 'error');
window.location.href = 'login.html';
}
});
} else {
// Auth not ready yet, wait a bit
setTimeout(checkAuth, 100);
}
};
checkAuth();
});
</script>
</body>
</html>