Skip to content

Commit ed1e948

Browse files
committed
Add registration form for latest event
1 parent ee9e0e4 commit ed1e948

8 files changed

+222
-18
lines changed

_includes/registerScript.html

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
2+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.2.2/jquery.form.min.js" integrity="sha256-2Pjr1OlpZMY6qesJM68t2v39t+lMLvxwpa8QlRjJroA=" crossorigin="anonymous">
3+
</script>
4+
<script type="text/javascript">
5+
$('#bootstrapForm').submit(function (event) {
6+
event.preventDefault()
7+
var extraData = {}
8+
$('#bootstrapForm').ajaxSubmit({
9+
data: extraData,
10+
dataType: 'jsonp', // This won't really work. It's just to use a GET instead of a POST to allow cookies from different domain.
11+
error: function () {
12+
// Submit of form should be successful but JSONP callback will fail because Google Forms
13+
// does not support it, so this is handled as a failure.
14+
alert('Registration Successful. See you at the event.')
15+
document.getElementById("bootstrapForm").reset();
16+
}
17+
})
18+
})
19+
</script>

_includes/sponsors.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<p class="content is-large has-text-centered">Sponsors and Supporters</p>
2+
<p class="content has-text-centered">The support of our generous sponsors, supporters, and patrons is highly appreciated.</p>
3+
<p class="content has-text-centered">Interested in sponsoring us? Please <a href="mailto:[email protected]">send us an email</a>. Or get in touch with us via <a href="/connect">other platforms</a></p>
4+
<div class="container content">
5+
<div class="columns is-centered is-8 is-desktop is-vcentered container content">
6+
<a href="https://education.github.com" class="is-one-quarter column" target="_blank"><img src="/res/sponsors/GitHub_Logo.webp" alt="GitHub Logo"></a>
7+
<div class="column is-1"></div>
8+
<a href="https://cloudflare.com" class="is-one-quarter column" target="_blank"><img src="/res/sponsors/cf-logo-v-rgb.webp" alt="Cloudflare Logo"></a>
9+
<div class="column is-1"></div>
10+
<a href="https://techcoopers.com" class="is-one-quarter column" target="_blank"><img src="/res/sponsors/tcLogo.webp" alt="TechCoopers Logo"></a>
11+
</div>
12+
<div class="columns is-centered is-8 is-desktop is-vcentered">
13+
<a href="https://cloudinglab.com" class="is-one-quarter column" target="_blank"><img src="/res/sponsors/cloudinglab.webp" alt="CloudingLab Logo"></a>
14+
<a href="https://vanfly.co" class="is-one-quarter column" target="_blank"><img src="/res/sponsors/vanfly.webp" alt="Vanfly Logo"></a>
15+
</div>

_layouts/connect.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
{% assign i = 0 %}
88
{% for channel in channel_list %}
99
{% assign remainder = i | modulo: 3 %}
10-
{% if remainder == 0 %}
10+
{% if remainder == 0 and i != 0 %}
1111
</div>
12-
<div class="columns">
12+
<div class="columns is-desktop">
1313
{% endif %}
1414
<div class="column">
1515
<div class="card">

_layouts/events.html

+5-1
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,13 @@ <h3>Upcoming Events</h3>
2626
{{ event.event-date | date: '%F' }}
2727
{% endcapture %}
2828
{% if eventdate >= currentDate %}
29-
{% assign i = 1 %}
29+
{% assign i = i | plus:1 %}
3030
<tr>
31+
{% if i == 1 %}
32+
<td class="has-text-centered"><a href="/register/" target="_blank">{{ event.title }}</a></td>
33+
{% else %}
3134
<td class="has-text-centered"><a href="{{ event.event-url }}" target="_blank">{{ event.title }}</a></td>
35+
{% endif %}
3236
<td class="has-text-centered">{{ event.type }}</td>
3337
<td class="has-text-centered">{{ event.event-date | date:"%b %d, %Y" }}</td>
3438
<td class="has-text-centered">{{ event.location }}</td>

_layouts/landing.html

+1-15
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,7 @@
44
<p class="subtitle has-text-centered container content">
55
{{ content | remove: '<p>' | remove: '</p>' }}
66
</p>
7-
<p class="content is-large has-text-centered">Sponsors and Supporters</p>
8-
<p class="content has-text-centered">The support of our generous sponsors, supporters, and patrons is highly appreciated.</p>
9-
<p class="content has-text-centered">Interested in sponsoring us? Please <a href="mailto:[email protected]">send us an email</a>. Or get in touch with us via <a href="/connect">other platforms</a></p>
10-
<div class="container content">
11-
<div class="columns is-centered is-8 is-desktop is-vcentered container content">
12-
<a href="https://education.github.com" class="is-one-quarter column" target="_blank"><img src="/res/sponsors/GitHub_Logo.webp" alt="GitHub Logo"></a>
13-
<div class="column is-1"></div>
14-
<a href="https://cloudflare.com" class="is-one-quarter column" target="_blank"><img src="/res/sponsors/cf-logo-v-rgb.webp" alt="Cloudflare Logo"></a>
15-
<div class="column is-1"></div>
16-
<a href="https://techcoopers.com" class="is-one-quarter column" target="_blank"><img src="/res/sponsors/tcLogo.webp" alt="TechCoopers Logo"></a>
17-
</div>
18-
<div class="columns is-centered is-8 is-desktop is-vcentered">
19-
<a href="https://cloudinglab.com" class="is-one-quarter column" target="_blank"><img src="/res/sponsors/cloudinglab.webp" alt="CloudingLab Logo"></a>
20-
<a href="https://vanfly.co" class="is-one-quarter column" target="_blank"><img src="/res/sponsors/vanfly.webp" alt="Vanfly Logo"></a>
21-
</div>
7+
{% include sponsors.html %}
228
</div>
239
</div>
2410
{% include footer.html%}

_layouts/register.html

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
layout: default
3+
---
4+
<section class="section">
5+
<h1 class="has-text-centered">Register</h1>
6+
<div class="content container">
7+
<p class="has-text-centered">Fill the form to register yourself for <b>{{ page.title }}</b>. <br />Time:{{ page.time }}, Date:{{ page.date }}<br /> Venue: {{ page.venue }}<br />See you at the event!!</p>
8+
</div>
9+
<form action="https://docs.google.com/forms/d/e/1FAIpQLScOdxIdpAcPXUcaoO9iOWzlqVc9-id3UZS2irB1xWp6Phmitg/formResponse"
10+
target="_self"
11+
id="bootstrapForm"
12+
method="POST">
13+
14+
<!-- Field type: "short" id: "{{ page.form.name-label }}" -->
15+
<div class="field">
16+
<legend class="label" for="{{ page.form.name-label }}" class="label">Name</legend>
17+
<div class="control">
18+
<input id="{{ page.form.name }}" type="text" name="entry.{{ page.form.name }}" class="input" required>
19+
</div>
20+
</div>
21+
22+
23+
<!-- Field type: "short" id: "{{ page.form.email-label }}" -->
24+
<div class="field">
25+
<legend class="label" for="page.form.email-label">Email</legend>
26+
<div class="control">
27+
<input id="{{ page.form.email }}" type="text" name="entry.{{ page.form.email }}" class="input" required>
28+
</div>
29+
</div>
30+
31+
32+
<!-- Field type: "short" id: "{{ page.form.number-label }}" -->
33+
<div class="field">
34+
<legend class="label" for="{{ page.form.number-label }}">Phone Number</legend>
35+
<div class="control">
36+
<input id="{{ page.form.number }}" type="text" name="entry.{{ page.form.number }}" class="input" required>
37+
</div>
38+
</div>
39+
40+
41+
<!-- Field type: "short" id: "{{ page.form.college-label }}" -->
42+
<div class="field">
43+
<legend class="label" for="{{ page.form.college-label }}">College</legend>
44+
<div class="control">
45+
<input id="{{ page.form.college }}" type="text" name="entry.{{ page.form.college }}" class="input" required>
46+
</div>
47+
</div>
48+
49+
50+
<!-- Field type: "short" id: "{{ page.form.course-label }}" -->
51+
<div class="field">
52+
<legend class="label" for="{{ page.form.course-label }}">Course</legend>
53+
<div class="control">
54+
<input id="{{ page.form.course }}" type="text" name="entry.{{ page.form.course }}" class="input" required>
55+
</div>
56+
</div>
57+
58+
59+
<!-- Field type: "short" id: "{{ page.form.semester-label }}" -->
60+
<div class="field">
61+
<legend class="label" for="{{ page.form.semester-label }}">Semester</legend>
62+
<div class="control">
63+
<input id="{{ page.form.semester }}" type="text" name="entry.{{ page.form.semester }}" class="input" required>
64+
</div>
65+
</div>
66+
67+
<input type="hidden" name="fvv" value="{{ page.form.fvv }}">
68+
<input type="hidden" name="fbzx" value="{{ page.form.fbzx }}">
69+
<!--
70+
CAVEAT: In multipages (multisection) forms, *pageHistory* field tells to google what sections we've currently completed.
71+
This usually starts as "0" for the first page, then "0,1" in the second page... up to "0,1,2..N" in n-th page.
72+
Keep this in mind if you plan to change this code to recreate any sort of multipage-feature in your exported form.
73+
We're setting this to the total number of pages in this form because we're sending all fields from all the section together.
74+
-->
75+
<input type="hidden" name="pageHistory" value="0">
76+
<br />
77+
<div class="has-text-centered">
78+
<input class="button is-link" type="submit" value="Submit">
79+
</div>
80+
</form>
81+
82+
</section>
83+
{% include registerScript.html %}

css/main.css

+4
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,7 @@ only screen and (max-width: 1000px) {
8787
text-decoration: underline;
8888
color: inherit;
8989
}
90+
91+
.card:hover {
92+
box-shadow: 3px 3px 4px 4px rgba(10, 10, 10, 0.1);
93+
}

register.md

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
layout: register
3+
permalink: /register/
4+
title: "MLH Localhost: Hack The Technical Interview"
5+
date: "29th July 2019"
6+
time: "2 PM to 4 PM"
7+
venue: "LT-1, IIPS, DAVV, Indore"
8+
form:
9+
name-label: 826355120
10+
name: 2092238618
11+
email-label: 2071572813
12+
email: 297764783
13+
number-label: 569514487
14+
number: 1966605262
15+
college-label: 245385898
16+
college: 479301265
17+
course-label: 1517600930
18+
course: 1340835164
19+
semester-label: 1312689492
20+
semester: 1857009907
21+
fvv: 1
22+
fbzx: 4436870651230317346
23+
---
24+
<form action="https://docs.google.com/forms/d/e/1FAIpQLScOdxIdpAcPXUcaoO9iOWzlqVc9-id3UZS2irB1xWp6Phmitg/formResponse"
25+
target="_self"
26+
id="bootstrapForm"
27+
method="POST">
28+
29+
<!-- Field type: "short" id: "826355120" -->
30+
<fieldset>
31+
<legend for="826355120" class="label">Name</legend>
32+
<div class="form-group">
33+
<input id="2092238618" type="text" name="entry.2092238618" class="form-control" required>
34+
</div>
35+
</fieldset>
36+
37+
38+
<!-- Field type: "short" id: "2071572813" -->
39+
<fieldset>
40+
<legend for="2071572813">Email</legend>
41+
<div class="form-group">
42+
<input id="297764783" type="text" name="entry.297764783" class="form-control" required>
43+
</div>
44+
</fieldset>
45+
46+
47+
<!-- Field type: "short" id: "569514487" -->
48+
<fieldset>
49+
<legend for="569514487">Phone Number</legend>
50+
<div class="form-group">
51+
<input id="1966605262" type="text" name="entry.1966605262" class="form-control" required>
52+
</div>
53+
</fieldset>
54+
55+
56+
<!-- Field type: "short" id: "245385898" -->
57+
<fieldset>
58+
<legend for="245385898">College</legend>
59+
<div class="form-group">
60+
<input id="479301265" type="text" name="entry.479301265" class="form-control" required>
61+
</div>
62+
</fieldset>
63+
64+
65+
<!-- Field type: "short" id: "1517600930" -->
66+
<fieldset>
67+
<legend for="1517600930">Course</legend>
68+
<div class="form-group">
69+
<input id="1340835164" type="text" name="entry.1340835164" class="form-control" required>
70+
</div>
71+
</fieldset>
72+
73+
74+
<!-- Field type: "short" id: "1312689492" -->
75+
<fieldset>
76+
<legend for="1312689492">Semester</legend>
77+
<div class="form-group">
78+
<input id="1857009907" type="text" name="entry.1857009907" class="form-control" required>
79+
</div>
80+
</fieldset>
81+
82+
<input type="hidden" name="fvv" value="1">
83+
<input type="hidden" name="fbzx" value="4436870651230317346">
84+
<!--
85+
CAVEAT: In multipages (multisection) forms, *pageHistory* field tells to google what sections we've currently completed.
86+
This usually starts as "0" for the first page, then "0,1" in the second page... up to "0,1,2..N" in n-th page.
87+
Keep this in mind if you plan to change this code to recreate any sort of multipage-feature in your exported form.
88+
We're setting this to the total number of pages in this form because we're sending all fields from all the section together.
89+
-->
90+
<input type="hidden" name="pageHistory" value="0">
91+
92+
<input class="btn btn-primary" type="submit" value="Submit">
93+
</form>

0 commit comments

Comments
 (0)