-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContact.html
More file actions
138 lines (116 loc) · 5.56 KB
/
Contact.html
File metadata and controls
138 lines (116 loc) · 5.56 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="utf-8" />
<title>KIIT E-CELL- Contact Us</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<style>
.contact-us-section {
background-image: url('assets/contact_us_page[1].svg');
color: #fff;
padding: 60px 20px;
display: flex;
justify-content: center;
align-items: center;
}
</style>
<div class="header-background">
<header>
<div id="navbar-placeholder"></div>
</header>
</div>
<main>
<section class="contact-us-section">
<div class="contact-container">
<div class="contact-image-area">
<img src="assets/6043b9c69e35130d470f5c3df89711dfc861daa7.png" alt="KIIT Entrepreneurship Cell Logo">
</div>
<div class="contact-form-area">
<h1>Contact Us</h1>
<form class="contact-form">
<div class="form-main-content">
<div class="form-inputs-group">
<div class="form-group">
<label for="fullName">Full Name</label>
<input type="text" id="fullName" name="fullName" placeholder=" " required>
</div>
<div class="form-group">
<label for="email">E-mail</label>
<input type="email" id="email" name="email" placeholder=" " required>
</div>
<div class="form-group message-group">
<label for="message">Message</label>
<textarea id="message" name="message" placeholder="Type your message here..." rows="4" required></textarea>
</div>
</div>
<div class="contact-info-buttons-group">
<div class="contact-details">
<p><strong>Contact</strong></p>
<p>support@ecell.com</p>
<p><strong>Based in</strong></p>
<p>KIIT University</p>
<p>Bhubaneswar, India</p>
</div>
<div class="social-icons">
<a href="https://www.linkedin.com/company/kiit-e-cell/"><img src="assets/9f6540276f4a50d2c7311c310a6aebe05e03c19d.png" alt="LinkedIn"></a>
<a href="https://www.instagram.com/ecell_kiit?utm_source=ig_web_button_share_sheet&igsh=ZDNlZDc0MzIxNw=="><img src="assets/1c5dcff80ccba862a915805358949e78911bc8ff.png" alt="Instagram"></a>
<a href="https://www.youtube.com/@KIIT-ECELL"><img src="assets/c083b15d9f7d69a43ffb61c34e278218d3331f87.png" alt="YouTube"></a>
<a href="https://www.facebook.com/kiitecell/"><img src="assets/13c99c95e1789a256f7722c9f384dab9abbf9b71.png" alt="Facebook"></a>
</div>
<button type="submit" class="contact-submit-btn">Contact</button>
</div>
</div>
</form>
</div>
</div>
</section>
</main>
<footer>
<div id="footer-placeholder"></div>
</footer>
<!-- FIREBASE authentication for storing messages -->
<script type="module">
import { initializeApp } from "https://www.gstatic.com/firebasejs/10.12.0/firebase-app.js";
import { getFirestore, collection, addDoc } from "https://www.gstatic.com/firebasejs/10.12.0/firebase-firestore.js";
const firebaseConfig = {
apiKey: "AIzaSyDFsxNmiaIr9osXoldaOR_jGPIQYR4QYNA",
authDomain: "kiit-login-system.firebaseapp.com",
projectId: "kiit-login-system",
storageBucket: "kiit-login-system.appspot.com",
messagingSenderId: "715253053686",
appId: "1:715253053686:web:6ff51656cdb16a46dd94d7"
};
const app = initializeApp(firebaseConfig);
const db = getFirestore(app);
const form = document.querySelector('.contact-form');
form.addEventListener('submit', async (e) => {
e.preventDefault();
const fullName = document.getElementById('fullName').value.trim();
const email = document.getElementById('email').value.trim();
const message = document.getElementById('message').value.trim();
if (!fullName || !email || !message) {
alert('Please fill in all fields.');
return;
}
try {
await addDoc(collection(db, "contactMessages"), {
fullName,
email,
message,
timestamp: new Date()
});
alert('Your message has been submitted successfully!');
form.reset();
} catch (error) {
console.error("Error adding message: ", error);
alert("Submission failed. Please try again.");
}
});
</script>
<!-- FIREBASE END -->
<script src="script.js"></script>
</body>
</html>