display: flex;
justify-content: center;
align-items: center;
+ flex-wrap: wrap;
+ }
+
+ #cgquotes {
+ font-size: 30px;
+ text-shadow: 2px 2px 0 #000;
}
#slide-1 .slide div {
<body>
<div id="slide-0">
<div id="cloudguy">
- <img class="shake-constant shake-slow" style="height: 20%; animation-duration: 15s" src="img/cloudguy.png" />
+ <div style="height: 20%; text-align: center;">
+ <img style="height: 100%; display: block; margin-left: auto; margin-right: auto; margin-bottom: 10px;" src="img/cloudguy.gif" />
+ <div id="cgquotes" style="width: 80%; margin: auto;">Welcome to the talk!</div>
+ </div>
</div>
</div>
<div id="slide-1">
.then(x => Promise.resolve(x + " and finally here!"))</code></pre>
<h1>Haskell</h1>
<pre><code class="haskell">Right("We start here")
- <span class="code-friends1" onmouseenter="activateFriends(1);" onmouseleave="deactivateFriends(1);" style="display: inline-block">>>=</span> (\x -> Right (x ++ " then get here"))
+ <span class="code-friends1" onmouseenter="activateFriends(1);" onmouseleave="deactivateFriends(1);" style="display: inline-block">>>=</span> (\x -> Right (x ++ " then get here"))
>>= (\x -> Right (x ++ " and finally here!"))</code></pre>
</div>
</div>
</body>
<script>
- (function() {
- var div, i, j, span, duration = "";
- var crazyTexts = [];
- var opacyTexts = [];
- div = document.querySelectorAll("#rant > span.crazy");
- for (j = 0; j < div.length; j++) {
- span=""
- for (i = 0; i < div[j].innerText.length; i++) {
- duration = Math.floor(Math.random() * 5) + 100
- span += "<span class=\"letter shake-constant shake-little\" style=\"animation-duration: " + duration + "ms\">";
- span += div[j].innerText[i] == " " ? " " : div[j].innerText[i];
- span += "</span>";
- }
- crazyTexts.push(span);
+ var div, i, j, span, duration = "";
+ var crazyTexts = [];
+ var opacyTexts = [];
+ div = document.querySelectorAll("#rant > span.crazy");
+ for (j = 0; j < div.length; j++) {
+ span=""
+ for (i = 0; i < div[j].innerText.length; i++) {
+ duration = Math.floor(Math.random() * 5) + 100
+ span += "<span class=\"letter shake-constant shake-little\" style=\"animation-duration: " + duration + "ms\">";
+ span += div[j].innerText[i] == " " ? " " : div[j].innerText[i];
+ span += "</span>";
}
+ crazyTexts.push(span);
+ }
- opacities = document.querySelectorAll("#rant > span.shake-opacity");
- for (k = 0; k < opacities.length; k++) {
- shrek=Math.random();
- opacities[k].style.animationDuration = shrek + 's';
- opacyTexts.push(opacities[k].outerHTML);
- }
+ opacities = document.querySelectorAll("#rant > span.shake-opacity");
+ for (k = 0; k < opacities.length; k++) {
+ shrek=Math.random();
+ opacities[k].style.animationDuration = shrek + 's';
+ opacyTexts.push(opacities[k].outerHTML);
+ }
- allText = ""
- for (l = 0; l< crazyTexts.length; l++) {
- allText+=crazyTexts[l] + " " + (opacyTexts[l] ? opacyTexts[l] : "") + " ";
- }
+ allText = ""
+ for (l = 0; l< crazyTexts.length; l++) {
+ allText+=crazyTexts[l] + " " + (opacyTexts[l] ? opacyTexts[l] : "") + " ";
+ }
- document.getElementById('rant').innerHTML = allText;
+ document.getElementById('rant').innerHTML = allText;
- var x = 0;
- var y = 0;
- var b = document.querySelectorAll('body')[0];
- setInterval(function(){
- x+=2;
- y-=2;
- b.style.backgroundPosition = x + 'px ' + y + 'px';
- }, 250);
+ var x = 0;
+ var y = 0;
+ var b = document.querySelectorAll('body')[0];
+ setInterval(function(){
+ x+=2;
+ y-=2;
+ b.style.backgroundPosition = x + 'px ' + y + 'px';
+ }, 250);
- urlParts = document.URL.split('#');
- window.console.log(urlParts);
- var currentSlide = urlParts.length > 1 ? urlParts[1] : 0;
- document.getElementById('slide-' + currentSlide).style.display = 'block';
- document.onkeydown = checkKey;
+ urlParts = document.URL.split('#');
+ window.console.log(urlParts);
+ var currentSlide = urlParts.length > 1 ? urlParts[1] : 0;
+ document.getElementById('slide-' + currentSlide).style.display = 'block';
+ document.onkeydown = checkKey;
- function checkKey(e) {
+ function checkKey(e) {
- e = e || window.event;
- if (e.keyCode == '37') {
- if (document.getElementById('slide-' + currentSlide)) {
- document.getElementById('slide-' + currentSlide).style.display = 'none';
- }
- currentSlide--;
- document.getElementById('slide-' + currentSlide).style.display = 'block';
+ e = e || window.event;
+ if (e.keyCode == '37') {
+ if (document.getElementById('slide-' + currentSlide)) {
+ document.getElementById('slide-' + currentSlide).style.display = 'none';
}
- else if (e.keyCode == '39') {
- if (document.getElementById('slide-' + currentSlide)) {
- document.getElementById('slide-' + currentSlide).style.display = 'none';
- }
- currentSlide++;
- document.getElementById('slide-' + currentSlide).style.display = 'block';
+ currentSlide--;
+ document.getElementById('slide-' + currentSlide).style.display = 'block';
+ }
+ else if (e.keyCode == '39') {
+ if (document.getElementById('slide-' + currentSlide)) {
+ document.getElementById('slide-' + currentSlide).style.display = 'none';
}
-
+ currentSlide++;
+ document.getElementById('slide-' + currentSlide).style.display = 'block';
}
- })();
+
+ }
+
function activateFriends(n) {
f = document.querySelectorAll('.code-friends' + n);
f[0].classList.add("shake-constant");
f[1].classList.remove("shake-slow");
f[1].classList.remove("on");
}
+
+ cloudGuyQuotes = [
+ "Welcome to the talk!",
+ "I hope we'll have fun exploring functional programming together!",
+ "But while we wait let's share interesting facts and anectodes :)",
+ "If you can be disgruntled, can you also be gruntled?",
+ "0.9 recurring is exactly equal to one if you think about it.",
+ "In English, the word \"ghoti\" can be pronounced as \"fish\".",
+ "Your credit card details are somewhere in Pi.",
+ "It takes 366 people to make sure two of them share a birthday, but only 23 people to ensure a 50% chance.",
+ "1729 is the best number (I checked them all).",
+ "The secret to strengh is to eat only a banana for breakfast",
+ "All of Back to the Future happened in the past.",
+ "Everything is in the future."
+ ];
+
+ cgq = document.getElementById("cgquotes");
+ numQuotes = cloudGuyQuotes.length;
+ currentQuote = 0;
+ setInterval(function(){
+ cgq.innerText = cloudGuyQuotes[currentQuote];
+ currentQuote = (currentQuote + 1) % numQuotes;
+ }, 5000);
+
</script>
</html>