-
Notifications
You must be signed in to change notification settings - Fork 2
/
contact.html
263 lines (250 loc) · 8.68 KB
/
contact.html
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Contact | fáilte</title>
<meta
name="description"
content="Have a question? Want to know more about this site? Have a feature
request? Get in touch and we’ll get back to you soonest!"
/>
<!-- META FOR FACEBOOK/LINKEDIN -->
<meta property="og:title" content="fáilte" />
<meta property="og:description" content="Discover Ireland's hidden gems" />
<meta property="og:url" content="https://failte.app/contact.html" />
<meta
property="og:image"
content="https://failte.app/assets/readme/img/cover-img.jpg"
/>
<!-- META FOR TWITTER -->
<meta name="twitter:title" content="fáilte" />
<meta name="twitter:description" content="Discover Ireland's hidden gems" />
<meta name="twitter:card" content="summary_large_image" />
<meta
name="twitter:image"
content="https://failte.app/assets/readme/img/cover-img.jpg"
/>
<!-- ADD STYLESHEET -->
<link rel="stylesheet" href="assets/css/styles.css" />
<!-- ADD FONTAWESOME -->
<script
src="https://kit.fontawesome.com/ee1bd5fe1b.js"
crossorigin="anonymous"
></script>
<!-- ADD GOOGLE FONTS -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Lilita+One&display=swap"
rel="stylesheet"
/>
<!-- ADD FAVICON -->
<link
rel="apple-touch-icon"
sizes="180x180"
href="assets/img/favicon/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="assets/img/favicon/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/assets/img/faviconfavicon-16x16.png"
/>
<link rel="manifest" href="assets/img/favicon/site.webmanifest" />
<!-- ADD EMAILJS -->
<script src="https://cdn.jsdelivr.net/npm/@emailjs/browser@3/dist/email.min.js"></script>
<script>
(function () {
emailjs.init("nAMWVoO4q5WTnV_xg");
})();
</script>
<script>
window.onload = function () {
let errorMsg;
document
.getElementById("contact-form")
.addEventListener("submit", function (event) {
event.preventDefault();
// generate a five digit number for the contact_number variable
this.contact_number.value = (Math.random() * 100000) | 0;
// these IDs from the previous steps
emailjs.sendForm("service_u8p34w3", "template_ilgfd18", this).then(
function () {
// SHOW SUCCESS FEEDBACK MESSAGE
const submitFeedbackOverlay = document.querySelector(
"#contact-feedback-overlay"
);
const submitBtn = document.querySelector("#submit-input");
const formTextInputs =
document.querySelector(".input-container");
const formTextarea = document.querySelector("textarea");
submitFeedbackOverlay.classList.add("submit");
submitBtn.style.visibility = "hidden";
formTextInputs.style.visibility = "hidden";
formTextarea.style.visibility = "hidden";
// IF ERROR MESSAGE ALREADY VISIBLE, HIDE ON SUCCESSFUL SUBMIT
if (errorMsg) {
document
.querySelector("#search-error-message")
.classList.add("hidden");
}
},
function (error) {
// IF UNSUCCESSFUL, SHOW ERROR MESSAGE
if (!errorMsg) {
const form = document.querySelector("form");
errorMsg = document.createElement("p");
errorMsg.setAttribute("id", "search-error-message");
errorMsg.innerText =
"Oops! Something went wrong. Please try again.";
form.append(errorMsg);
}
}
);
});
};
</script>
</head>
<body>
<div id="container">
<!-- HEADER -->
<header>
<div id="container-header">
<div id="nav-logo">
<a href="index.html" aria-label="Click to go to Homepage">fáilte</a>
</div>
<nav>
<ul>
<li><a href="index.html" aria-label="Go to Map page">Map</a></li>
<li>
<a href="play.html" aria-label="Go to Geo Game page">Play</a>
</li>
<li>
<a href="about.html" aria-label="Go to About page">About</a>
</li>
<li>
<a
href="contact.html"
class="active-page"
aria-label="Go to Contact page"
>Contact</a
>
</li>
</ul>
</nav>
</div>
</header>
<!-- MAIN CONTENT -->
<main>
<div id="container-about-contact-page">
<div class="about-contact-container">
<h1>What's the craic?</h1>
<p class="about-contact-paragraph">
Have a question? Want to know more about this site? Have a feature
request? Get in touch and we’ll get back to you soonest!
</p>
<!-- CONTACT FORM -->
<form id="contact-form">
<!-- FEEDBACK MSG TO SHOW ON SUCCESSFUL SUBMIT -->
<div id="contact-feedback-overlay">
Thank you for your message, keep an eye on your emails!
</div>
<!-- FLEX CONTAINER FOR NAME/EMAIL INPUT -->
<div class="input-container">
<input type="hidden" name="contact_number" />
<label for="name-input">Name</label>
<input
name="from_name"
id="name-input"
class="text-input"
type="text"
placeholder="Name"
minlength="1"
required
/>
<label for="email-input">Email</label>
<input
name="from_email"
id="email-input"
class="text-input"
type="email"
placeholder="Email"
required
/>
</div>
<label for="message-input">Message</label>
<textarea
name="message"
class="text-input"
id="message-input"
cols="30"
rows="10"
placeholder="Message"
minlength="1"
required
></textarea>
<label for="submit-input">Submit</label>
<input
id="submit-input"
type="submit"
class="primary-cta"
value="Send!"
/>
</form>
</div>
<!-- IMAGE -->
<div id="about-contact-img-container">
<img
id="about-contact-img"
src="assets/img/ireland-img.png"
alt="Background image of Ireland map"
/>
</div>
</div>
</main>
<!-- FOOTER -->
<footer>
<div id="footer-links">
<a
href="https://github.com/CarlMurray/failte-pp2"
target="_blank"
title="See this project's Repo on GitHub"
aria-label="See this project's Repo on GitHub"
><img
class="footer-icon"
src="assets/img/footer/footer-github-icon.svg"
alt="GitHub Logo"
/></a>
<a
href="https://carlmurray.design"
target="_blank"
title="View my portfolio of projects"
aria-label="View my portfolio of projects"
><img
class="footer-icon"
src="assets/img/footer/footer-portfolio-icon.svg"
alt="Personal Portfolio Logo"
/></a>
<a
href="https://www.linkedin.com/in/carljmurray/"
target="_blank"
title="Connect with me on LinkedIn"
aria-label="Connect with me on LinkedIn"
><img
class="footer-icon"
src="assets/img/footer/footer-linkedin-icon.svg"
alt="LinkedIn Logo"
/></a>
</div>
</footer>
</div>
</body>
</html>