-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.html
executable file
·332 lines (314 loc) · 15.4 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
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
<html lang="">
<head>
<meta charSet="utf-8"/>
<meta http-equiv="x-ua-compatible" content="ie=edge"/>
<title>
GDG DevFest 2018 Tokyo
</title>
<meta name="description" content="今年で3回目となるGDG DevFest 2018 Tokyoは、9月1日(土曜日)にベルサール新宿グランドで開催します。"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
<meta property="og:image" content="assets/tm7unis8.jpg?w=1200&h=630&fit=crop"/>
<link rel="icon" href="assets/gp8tlgr0.png"/>
<link rel="stylesheet" href="styles.css"/>
<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-119683141-2">
</script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-119683141-2');
</script>
</head>
<body>
<div style="font-family:Helvetica,sans-serif;font-size:14px">
<div>
<header class="header" style="color:#fff;font-weight:400">
<div class="wr">
<a id="headerLogo" href="/" class="header__logoImg">
<img src="assets/lkivl1yf.png?w=300" width="150"/>
</a>
<nav id="headerNav" class="header__nav">
<div class="header__navCtas">
<a href="https://gdg-tokyo.connpass.com/event/95307/" class="btn btn--c btn--primary" style="color:#fff;background-color:rgba(12,85,255,1)">
イベントのconnpassページ
</a>
<a href="/sessions" class="btn btn--c btn--primary" style="color:#fff;background-color:rgba(12,85,255,1)">
セッション紹介
</a>
<a href="/timetable" class="btn btn--c btn--primary" style="color:#fff;background-color:rgba(12,85,255,1)">
タイムテーブル
</a>
<a href="/codelabs" class="btn btn--c btn--primary" style="color:#fff;background-color:rgba(12,85,255,1)">
Codelabs
</a>
<a href="/contact" class="btn btn--c btn--primary" style="color:#fff;background-color:rgba(12,85,255,1)">
お問い合わせ
</a>
</div>
</nav>
<nav id="headerMenu" class="header__nav header__nav--hidden">
<button id="headerMenuButton" class="btn btn--c btn--primary" style="color:#fff;background-color:rgba(12,85,255,1)">
Menu
</button>
</nav>
<nav id="headerDrawer" class="headerMenu">
<div id="headerDrawerBackdrop" class="headerMenu__backdrop">
</div>
<ul class="headerMenu__links">
<li>
<a href="https://gdg-tokyo.connpass.com/event/95307/" class="btn btn--c btn--primary" style="color:#fff;background-color:rgba(12,85,255,1)">
イベントのconnpassページ
</a>
</li>
<li>
<a href="/sessions" class="btn btn--c btn--primary" style="color:#fff;background-color:rgba(12,85,255,1)">
セッション紹介
</a>
</li>
<li>
<a href="/timetable" class="btn btn--c btn--primary" style="color:#fff;background-color:rgba(12,85,255,1)">
タイムテーブル
</a>
</li>
<li>
<a href="/codelabs" class="btn btn--c btn--primary" style="color:#fff;background-color:rgba(12,85,255,1)">
Codelabs
</a>
</li>
<li>
<a href="/contact" class="btn btn--c btn--primary" style="color:#fff;background-color:rgba(12,85,255,1)">
お問い合わせ
</a>
</li>
</ul>
<button id="headerDrawerClose" class="headerMenu__close btn">
Close
</button>
</nav>
</div>
<script>
(function() {
var buffer = 10;
var margin = 60 + 40 + buffer;
// button
var button = document.getElementById('headerMenuButton');
var buttonWrapper = document.getElementById('headerMenu');
// drawer
var drawer = document.getElementById('headerDrawer');
var drawerBackdrop = document.getElementById('headerDrawerBackdrop');
var drawerClose = document.getElementById('headerDrawerClose');
// header UI
var logo = document.getElementById('headerLogo');
var nav = document.getElementById('headerNav');
var logoWidth = logo.offsetWidth;
var navWidth = nav.offsetWidth;
var determineVisibility = function() {
var parent = window.innerWidth;
if (logoWidth + navWidth > parent - margin) {
nav.classList.add('header__nav--hidden');
buttonWrapper.classList.add('headerMenu--visible');
} else {
nav.classList.remove('header__nav--hidden');
buttonWrapper.classList.remove('headerMenu--visible');
}
};
var showDrawer = function() {
drawer.classList.add('headerMenu--visible');
};
var hideDrawer = function() {
drawer.classList.remove('headerMenu--visible');
};
button.onclick = showDrawer;
drawerBackdrop.onclick = hideDrawer;
drawerClose.onclick = hideDrawer;
window.addEventListener('resize', determineVisibility);
determineVisibility();
})();
</script>
</header>
</div>
<div>
<div class="section section--hero" style="background-image:url(assets/rkoi76pq.png?w=1300&h=800&q=50&fit=crop)">
<div class="wr heroWr heroWr--center">
<div class="heroWrapper heroWrapper--center" style="--margin-bottom-scale:0.1;--margin-top-scale:0.1">
<h1 class="hero__title" style="color:#fff;font-weight:700;font-family:Helvetica,sans-serif">
</h1>
<h2 class="hero__subtitle" style="color:#fff;font-weight:400">
</h2>
<div class="hero__ctas">
</div>
</div>
<div>
</div>
</div>
</div>
</div>
<div>
<div class="section" style="background-color:#fff">
<div class="wr">
<h2 class="section__title center" style="color:#000;font-weight:700;font-family:Helvetica,sans-serif">
お問い合わせ
</h2>
<h3 class="section__subtitle center" style="color:rgba(74,74,74,1);font-weight:400">
運営事務局へのお問い合わせは下記フォームをご利用ください。
</h3>
<form class="contact" id="contact" data-siteid="ahhjw08i4b0e">
<div class="contact__item">
<label style="color:rgba(74,74,74,1);font-weight:500">
お名前(必須)
</label>
<input type="text" id="contactName" placeholder="山田 太郎" style="color:#000;font-weight:400"/>
</div>
<div class="contact__row">
<div class="contact__item">
<label style="color:rgba(74,74,74,1);font-weight:500">
メールアドレス(必須)
</label>
<input type="email" id="contactEmail" placeholder="abc@example.com(半角)" style="color:#000;font-weight:400"/>
</div>
<div class="contact__item">
<label style="color:rgba(74,74,74,1);font-weight:500">
電話(オプション)
</label>
<input type="text" id="contactPhone" placeholder="(01) 234-5678" style="color:#000;font-weight:400"/>
</div>
</div>
<div class="contact__item">
<label style="color:rgba(74,74,74,1);font-weight:500">
お問い合わせ内容
</label>
<textarea id="contactMessage" placeholder="なるべくお問い合わせ内容を具体的にお書きください。" style="color:#000;font-weight:400">
</textarea>
</div>
<div id="contactError" class="contact__error">
</div>
<button id="contactSubmit" class="btn btn--c btn--primary btn--large" style="color:#fff;background-color:rgba(12,85,255,1)">
送信
</button>
</form>
<script>
(function() {
function bindForm() {
var form = document.getElementById('contact');
form.addEventListener('submit', handleSubmit);
var btn = document.getElementById('contactSubmit');
btn.addEventListener('click', handleSubmit);
}
function handleSubmit(e) {
e.preventDefault();
console.log('submitted form');
var data = {
path: window.location.pathname,
siteId: document.getElementById('contact').getAttribute('data-siteid'),
name: document.getElementById('contactName').value,
email: document.getElementById('contactEmail').value,
phone: document.getElementById('contactPhone').value,
message: document.getElementById('contactMessage').value
};
if (!validateData(data)) {
return;
}
document.getElementById('contactSubmit').classList.add('btn--loading');
sendData(data);
}
function sendData(data) {
var request = new XMLHttpRequest();
request.open('POST', 'https://api.landen.co/public/contact', true);
request.setRequestHeader(
'Content-Type',
'application/x-www-form-urlencoded; charset=UTF-8'
);
request.send(JSON.stringify(data));
request.onload = function() {
document.getElementById('contactSubmit').classList.remove('btn--loading');
if (this.status >= 200 && this.status < 400) {
// success handling
clearData();
document.getElementById('contactSubmit').classList.add('btn--success');
setTimeout(function() {
document
.getElementById('contactSubmit')
.classList.remove('btn--success');
}, 2000);
} else {
console.log('error');
}
};
request.onerror = function() {
document.getElementById('contactError').innerText =
'A network error occured. Please make sure you are connected to the internet.';
};
}
function clearData() {
document.getElementById('contactName').value = '';
document.getElementById('contactEmail').value = '';
document.getElementById('contactPhone').value = '';
document.getElementById('contactMessage').value = '';
}
function validateData(data) {
var error = false;
if (data.name.length < 2) {
error = 'Please enter your name';
} else if (data.email.length < 6) {
error = 'Please enter your email address';
} else if (data.message.length < 4) {
error = 'Please enter a message';
}
if (error) {
document.getElementById('contactError').innerText = error;
} else {
document.getElementById('contactError').innerText = '';
}
return error === false;
}
bindForm();
})();
</script>
</div>
</div>
</div>
<div>
<footer class="section section--footer" style="background-color:#fff">
<div class="wr">
<div class="footer" style="color:rgba(74,74,74,1);font-weight:400">
<div class="footer__primary">
<span>
2018 © GDG Tokyo. All rights reserved.
</span>
<nav class="footer__linkRow">
<a href="/contact">
お問い合わせ
</a>
<a href="https://www.meetup.com/gdg-tokyo-jp/">
Join GDG Tokyo
</a>
<a href="https://twitter.com/hashtag/DevFest18">
#DevFest18
</a>
</nav>
</div>
<ul class="footer__social">
<li>
<a href="https://twitter.com/gdgtokyo" target="_blank">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z" fill="rgba(74,74,74,1)">
</path>
</svg>
</a>
</li>
<li>
<a href="https://www.facebook.com/gdgjapan" target="_blank">
<svg viewBox="0 0 448 512">
<path d="M448 56.7v398.5c0 13.7-11.1 24.7-24.7 24.7H309.1V306.5h58.2l8.7-67.6h-67v-43.2c0-19.6 5.4-32.9 33.5-32.9h35.8v-60.5c-6.2-.8-27.4-2.7-52.2-2.7-51.6 0-87 31.5-87 89.4v49.9h-58.4v67.6h58.4V480H24.7C11.1 480 0 468.9 0 455.3V56.7C0 43.1 11.1 32 24.7 32h398.5c13.7 0 24.8 11.1 24.8 24.7z" fill="rgba(74,74,74,1)">
</path>
</svg>
</a>
</li>
</ul>
</div>
</div>
</footer>
</div>
</div>
</body>
</html>