Skip to content

Commit 1a58137

Browse files
committed
Added all the code required for integrating eventBrite with our site, added events, changed javascript typewriter to customise to each page, added difficulty badges for activities and resources, and extended the iframe containers for external forms
1 parent f4417b8 commit 1a58137

30 files changed

+899
-174
lines changed

_includes/back-to-top.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<div class="row unpadded">
22
<div class="col">
3+
<p>
4+
&nbsp;
5+
</p>
36
<p>
47
<a href="#">Back to top</a>
58
</p>
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<!-- EventBrite Integration -->
2+
<script src="https://www.eventbrite.co.uk/static/widgets/eb_widgets.js"></script>
3+
4+
<script type="text/javascript">
5+
var orderComplete = function () {
6+
console.log('Order complete!');
7+
};
8+
9+
/* Databases 101 */
10+
window.EBWidgets.createWidget({
11+
widgetType: 'checkout',
12+
eventId: '117562278941',
13+
modal: true,
14+
modalTriggerElementId: 'eventbrite-widget-modal-trigger-117562278941',
15+
onOrderComplete: orderComplete
16+
});
17+
18+
/* Containers 101 - Docker */
19+
window.EBWidgets.createWidget({
20+
widgetType: 'checkout',
21+
eventId: '117832786035',
22+
modal: true,
23+
modalTriggerElementId: 'eventbrite-widget-modal-trigger-117832786035',
24+
onOrderComplete: orderComplete
25+
});
26+
27+
/* Just Git Started */
28+
window.EBWidgets.createWidget({
29+
widgetType: 'checkout',
30+
eventId: '117920634793',
31+
modal: true,
32+
modalTriggerElementId: 'eventbrite-widget-modal-trigger-117920634793',
33+
onOrderComplete: orderComplete
34+
});
35+
36+
/* SQL Walkthrough */
37+
window.EBWidgets.createWidget({
38+
widgetType: 'checkout',
39+
eventId: '117920303803',
40+
modal: true,
41+
modalTriggerElementId: 'eventbrite-widget-modal-trigger-117920303803',
42+
onOrderComplete: orderComplete
43+
});
44+
45+
/* Containers 102 - Kubernetes */
46+
window.EBWidgets.createWidget({
47+
widgetType: 'checkout',
48+
eventId: '117832864269',
49+
modal: true,
50+
modalTriggerElementId: 'eventbrite-widget-modal-trigger-117832864269',
51+
onOrderComplete: orderComplete
52+
});
53+
54+
</script>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!-- Global site tag (gtag.js) - Google Analytics -->
2+
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-174926144-1"></script>
3+
<script>
4+
window.dataLayer = window.dataLayer || [];
5+
6+
function gtag() {
7+
dataLayer.push(arguments);
8+
}
9+
10+
gtag('js', new Date());
11+
gtag('config', 'UA-174926144-1');
12+
</script>

_includes/head.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,10 @@
3232
<link rel="stylesheet" href="css/style.css">
3333
<link rel="stylesheet" href="css/sidebar.css">
3434

35+
<!-- I know scripts aren't supposed to go in the header, but we need this here in order to pick different suffix lists for the typewriter at the top -->
36+
<script src="./js/suffix-lists.js"></script>
37+
<script lang="javascript">
38+
var suffixOptions = {{ page.title }};
39+
</script>
40+
3541
</head>

_includes/scripts.html

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,4 @@
1515
<script src="./js/sidebar.js"></script>
1616
<script src="./js/typed-suffix.js"></script>
1717

18-
<!-- Global site tag (gtag.js) - Google Analytics -->
19-
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-174926144-1"></script>
20-
<script>
21-
window.dataLayer = window.dataLayer || [];
22-
23-
function gtag() {
24-
dataLayer.push(arguments);
25-
}
26-
27-
gtag('js', new Date());
28-
gtag('config', 'UA-174926144-1');
29-
</script>
18+
{% include google-analytics-tag-script.html %}

_layouts/default.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<img src="./images/keyboard-green.png">
1313
</div>
1414
<div class="main-logo-title">
15-
<h1 class="cover-heading">CODEWITH<span id="suffix" class="typed-suffix">US</span></h1>
15+
<h1 class="cover-heading">CODEWITH<span id="small-screen-break"><br /></span><span id="suffix" class="typed-suffix">US</span></h1>
1616
</div>
1717
</div>
1818
<div class="row unpadded">
@@ -22,8 +22,8 @@ <h1 class="cover-heading">CODEWITH<span id="suffix" class="typed-suffix">US</spa
2222
</div>
2323
{% include back-to-top.html %}
2424
</main>
25-
{% include scripts.html %}
2625
</div>
26+
{% include scripts.html %}
2727
</body>
2828

2929
</html>

_site/activities-learning.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ <h2>
1313
<h4>
1414
<span class="fab fa-connectdevelop"></span>
1515
<a href="https://www.codecademy.com/" target="_blank">Codecademy</a>
16+
<span class="badge badge-success">Easy</span>
1617
</h4>
1718
<p>
1819
Code Academy gives you specific problems to solve and, as you solve each one, the difficulty
@@ -29,6 +30,7 @@ <h4>
2930
<h4>
3031
<span class="fas fa-fist-raised"></span>
3132
<a href="https://codecombat.com/play" target="_blank">Code Combat</a>
33+
<span class="badge badge-success">Easy</span>
3234
</h4>
3335
<p>
3436
Code Combat was designed for use in schools but is a great place to start if you're looking
@@ -45,6 +47,7 @@ <h4>
4547
<h4>
4648
<span class="fas fa-utensils"></span>
4749
<a href="https://flukeout.github.io/" target="_blank">CSS Diner</a>
50+
<span class="badge badge-success">Easy</span>
4851
</h4>
4952
<p>
5053
This is a simple game that introduces you to different CSS selectors in an interactive and
@@ -61,6 +64,7 @@ <h4>
6164
<h4>
6265
<span class="fab fa-css3-alt"></span>
6366
<a href="https://css-tricks.com" target="_blank">CSS Tricks</a>
67+
<span class="badge badge-success">Easy</span>
6468
</h4>
6569
<p>
6670
CSS Tricks is an excellent website with a large amount of information on CSS, including
@@ -76,6 +80,7 @@ <h4>
7680
<h4>
7781
<span class="fab fa-free-code-camp"></span>
7882
<a href="https://freecodecamp.org" target="_blank">FreeCodeCamp</a>
83+
<span class="badge badge-success">Easy</span>
7984
</h4>
8085
<p>
8186
FreeCodeCamp is a popular online learning tool for beginners to get to grips with
@@ -93,6 +98,7 @@ <h4>
9398
<span class="fab fa-git-alt"></span>
9499
<a href="http://rogerdudler.github.io/git-guide/" target="_blank">git - the
95100
simple guide</a>
101+
<span class="badge badge-warning">Medium</span>
96102
</h4>
97103
<p>
98104
Just a simple guide for getting started with git, no deep or confusing stuff.
@@ -109,10 +115,11 @@ <h4>
109115
<h4>
110116
<span class="fab fa-js-square"></span>
111117
<a href="https://javascript.info" target="_blank">The Modern JS Tutorial</a>
118+
<span class="badge badge-success">Easy</span>
112119
</h4>
113120
<p>
114-
Javascript.info has its own built in search function, using which you can
115-
search every aspect of javascript for helpful guides and examples.
121+
Has its own built in search function, using which you can search every aspect of javascript for
122+
helpful guides and examples.
116123
</p>
117124
</div>
118125
</div>
@@ -124,6 +131,7 @@ <h4>
124131
<h4>
125132
<span class="fas fa-user-graduate"></span>
126133
<a href="https://www.udemy.com" target="_blank">Udemy</a>
134+
<span class="badge badge-success">Easy</span>
127135
</h4>
128136
<p>
129137
Udemy is an online platform offering video tutorial courses led by real-world professionals. There

_site/activities-practice.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ <h2>
1313
<h4>
1414
<span class="fas fa-calendar-day"></span>
1515
<a href="http://100daysofcode.com/" target="_blank">#100DaysOfCode</a>
16+
<span class="badge badge-success">Easy</span>
1617
</h4>
1718
<p>
1819
Alexander Kallaway spent a year and a half learning to code and had many ups and downs along the
@@ -30,6 +31,7 @@ <h4>
3031
<h4>
3132
<span class="fas fa-candy-cane"></span>
3233
<a href="http://adventofcode.com/" target="_blank">Advent of Code</a>
34+
<span class="badge badge-warning">Medium</span>
3335
</h4>
3436
<p>
3537
In 2015 <a href="http://was.tl/" target="_blank">Eric Wastl</a>, presumably unsatisfied with the
@@ -51,6 +53,7 @@ <h4>
5153
<h4>
5254
<span class="fas fa-dice-d6"></span>
5355
<a href="http://box-256.com/" target="_blank">Box-256</a>
56+
<span class="badge badge-danger">Hard</span>
5457
</h4>
5558
<p>
5659
Interested in what life was like when computers were programmed using 4-letter code words and
@@ -68,6 +71,7 @@ <h4>
6871
<h4>
6972
<span class="fas fa-keyboard"></span>
7073
<a href="https://www.codewars.com/" target="_blank">Code Wars</a>
74+
<span class="badge badge-warning">Medium</span>
7175
</h4>
7276
<p>
7377
The principle behind Code Wars is that you achieve mastery through challenge, and you can improve
@@ -85,6 +89,7 @@ <h4>
8589
<h4>
8690
<span class="fas fa-ghost"></span>
8791
<a href="https://www.codingame.com/" target="_blank">CodinGame</a>
92+
<span class="badge badge-warning">Medium</span>
8893
</h4>
8994
<p>
9095
A site where you can practice coding in almost any language you can think of. It has a beautiful
@@ -102,6 +107,7 @@ <h4>
102107
<h4>
103108
<span class="fab fa-medapps"></span>
104109
<a href="https://edabit.com" target="_blank">Edabit</a>
110+
<span class="badge badge-warning">Medium</span>
105111
</h4>
106112
<p>
107113
Edabit simulates what programming is like in the real world while removing the tedious,
@@ -118,6 +124,7 @@ <h4>
118124
<h4>
119125
<span class="fab fa-reddit"></span>
120126
<a href="https://www.reddit.com/r/dailyprogrammer/" target="_blank">Reddit: Daily Programmer</a>
127+
<span class="badge badge-success">Easy</span>
121128
</h4>
122129
<p>
123130
Similar to Advent of Code, this is a resource that presents you with various programming puzzles
@@ -135,6 +142,7 @@ <h4>
135142
<h4>
136143
<span class="fas fa-list-ul"></span>
137144
<a href="https://jupyter.org/try" target="_blank">Jupyter</a>
145+
<span class="badge badge-warning">Medium</span>
138146
</h4>
139147
<p>
140148
Jupyter is an open-source web application that allows you to create and share documents that contain

0 commit comments

Comments
 (0)