From 4bb1c596a4cb00f937150bb64216f8ed95a19009 Mon Sep 17 00:00:00 2001 From: Noah Loomans Date: Sun, 26 Nov 2017 19:47:38 +0100 Subject: Add birthday page --- 18/index.html | 31 ++++++++++++++++++++++++++++++ 18/script.js | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 18/index.html create mode 100644 18/script.js (limited to '18') diff --git a/18/index.html b/18/index.html new file mode 100644 index 0000000..d1b183f --- /dev/null +++ b/18/index.html @@ -0,0 +1,31 @@ + + + + + + + + 18. + + + +
+
+
+
+ +
+
+
+

Hallo!

+

Het feit dat je een link naar deze pagina hebt ontvangen betekent dat je bent uitgenodigt voor mijn 18de verjaardag!

+

Het feest begint om 17:00! Het wordt een gezellig feestje met muziek, eten, drankjes en hopelijk een kampvuur in de tuin.

+

Locatie: ***REMOVED***
Datum: ***REMOVED***

+

Zeg het als je kunt komen!

+

Groet,

+

Noah.

+
+ + + \ No newline at end of file diff --git a/18/script.js b/18/script.js new file mode 100644 index 0000000..0c9be11 --- /dev/null +++ b/18/script.js @@ -0,0 +1,62 @@ +/** + * + */ + +function wait(ms) { + return new Promise((resolve) => { + window.setTimeout(resolve, ms); + }) +} + +function terminalType(prefix, text) { + if (text == null) text = ''; + const line = document.createElement('div'); + line.className = 'line'; + prefix = prefix.replace(/ /g, ' ') + line.innerHTML = prefix; + + document.querySelector('.terminal').appendChild(line); + + function type(text, line) { + if (text === '') { + return Promise.resolve(); + } + line.textContent = line.textContent + text.charAt(0); + return wait(100).then(() => type(text.substr(1), line)); + } + + return wait(500).then(() => type(text, line)); +} + +Promise.resolve() + .then(() => terminalType('noah@loomans ~ $ ', 'cd Code/calculate_age')) + .then(() => terminalType('noah@loomans ~/Code/calculate_age $ ', 'gcc calculate_age.c -o calculate_age')) + .then(() => terminalType('noah@loomans ~/Code/calculate_age $ ', './calculate_age')) + .then(() => terminalType('calculating', '.........')) + .then(() => terminalType(' 1111111 888888888')) + .then(() => terminalType(' 1::::::1 88:::::::::88')) + .then(() => terminalType('1:::::::1 88:::::::::::::88')) + .then(() => terminalType('111:::::1 8::::::88888::::::8')) + .then(() => terminalType(' 1::::1 8:::::8 8:::::8')) + .then(() => terminalType(' 1::::1 8:::::8 8:::::8')) + .then(() => terminalType(' 1::::1 8:::::88888:::::8')) + .then(() => terminalType(' 1::::l 8:::::::::::::8')) + .then(() => terminalType(' 1::::l 8:::::88888:::::8')) + .then(() => terminalType(' 1::::l 8:::::8 8:::::8')) + .then(() => terminalType(' 1::::l 8:::::8 8:::::8')) + .then(() => terminalType(' 1::::l 8:::::8 8:::::8')) + .then(() => terminalType('111::::::1118::::::88888::::::8')) + .then(() => terminalType('1::::::::::1 88:::::::::::::88')) + .then(() => terminalType('1::::::::::1 88:::::::::88')) + .then(() => terminalType('111111111111 888888888')) + .then(() => wait(2000)) + .then(() => document.querySelector('.down-arrow').classList.add('show')); + +function resize() { + const size = Math.min(window.innerWidth, window.innerHeight); + const factor = size / 1080; + document.documentElement.style.setProperty('--factor', factor); +} + +resize(); +window.addEventListener('resize', resize); \ No newline at end of file -- cgit v1.1