Skip to content

Commit

Permalink
fix: add rabobank contract
Browse files Browse the repository at this point in the history
  • Loading branch information
nesrinesghaier committed Oct 6, 2021
1 parent c59090e commit c4a528f
Show file tree
Hide file tree
Showing 3 changed files with 125 additions and 66 deletions.
105 changes: 54 additions & 51 deletions src/scenes/scene5/animation.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import sceneSvg from "./scene.svg";
import sceneHtml from "./scene.html";
import * as utils from "../../site/utilities";
import sceneSvg from './scene.svg';
import sceneHtml from './scene.html';
import * as utils from '../../site/utilities';

export default {
iskey: 0,
keyfreq: Math.floor(Math.random() * 2) + 4,
lightfreq: Math.floor(Math.random() * 21) + 10,
lightlast: "none",
lightlast: 'none',
islight: 0,
mousefreq: Math.floor(Math.random() * 21) + 30,
ismouse: 0,
Expand All @@ -18,70 +18,73 @@ export default {
init(site) {
document.querySelector('[data-scene="scene5"]').innerHTML = sceneHtml;
document.querySelector('[data-scene="scene5"] .svg').innerHTML = sceneSvg;
document.querySelector("#cv").addEventListener("click", () => {
document.querySelector('#cv').addEventListener('click', () => {
window.open(
"https://pdfhost.io/v/cI0DWkK7A_Nesrine_SGHAIER_CV.pdf",
"_blank"
'https://pdfhost.io/v/cI0DWkK7A_Nesrine_SGHAIER_CV.pdf',
'_blank',
);
});
document.querySelector("#sfaxcpc").addEventListener("click", () => {
document.querySelector('#sfaxcpc').addEventListener('click', () => {
window.open(
"https://pdfhost.io/v/bKzzXvm6H_Third_PlaceContestant362826pdf.pdf",
"_blank"
'https://pdfhost.io/v/bKzzXvm6H_Third_PlaceContestant362826pdf.pdf',
'_blank',
);
});
document.querySelector("#googlejam").addEventListener("click", () => {
window.open("https://pdfhost.io/v/boyn7TLLP_gj2019pdf.pdf", "_blank");
document.querySelector('#googlejam').addEventListener('click', () => {
window.open('https://pdfhost.io/v/boyn7TLLP_gj2019pdf.pdf', '_blank');
});
document.querySelector("#vneuron").addEventListener("click", () => {
window.open("https://www.vneuron.com/", "_blank");
document.querySelector('#vneuron').addEventListener('click', () => {
window.open('https://www.vneuron.com/', '_blank');
});
document.querySelector("#sofia").addEventListener("click", () => {
document.querySelector('#sofia').addEventListener('click', () => {
window.open(
"https://www.linkedin.com/company/sofia-technologies-tunisia/",
"_blank"
'https://www.linkedin.com/company/sofia-technologies-tunisia/',
'_blank',
);
});
document.querySelector("#eonics").addEventListener("click", () => {
window.open("https://eonics.nl/", "_blank");
document.querySelector('#eonics').addEventListener('click', () => {
window.open('https://eonics.nl/', '_blank');
});
document.querySelector("#makerlab").addEventListener("click", () => {
window.open("https://www.makerlab.tn/", "_blank");
document.querySelector('#rabobank').addEventListener('click', () => {
window.open('https://www.rabobank.nl/', '_blank');
});
document.querySelector('#makerlab').addEventListener('click', () => {
window.open('https://www.makerlab.tn/', '_blank');
});
this.addVideoPlayer(site);

this.getPhoneDimensionsInAHackyWayCauseFirefoxDoesNotWork();
},

getPhoneDimensionsInAHackyWayCauseFirefoxDoesNotWork() {
const rectt = document.querySelector("#iphone5positionpath");
const rectt = document.querySelector('#iphone5positionpath');
const newrect = rectt.cloneNode(true);
newrect.setAttribute("id", "dear_firefox_come_on");
newrect.setAttribute("fill", "transparent");
newrect.setAttribute('id', 'dear_firefox_come_on');
newrect.setAttribute('fill', 'transparent');
newrect.setAttribute(
"transform",
"rotate(90) translate(-6930, -530) scale(8)"
'transform',
'rotate(90) translate(-6930, -530) scale(8)',
);

// const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
// document.body.appendChild(svg);

const svg = document.querySelector("#svg5");
const svg = document.querySelector('#svg5');

svg.appendChild(newrect);
},

addVideoPlayer(site) {
const videoPlayerDiv = utils.createElementWithAttrs("div", {
id: "videoPlayer",
const videoPlayerDiv = utils.createElementWithAttrs('div', {
id: 'videoPlayer',
});

const videoPlayerIframe = utils.createElementWithAttrs("iframe", {
id: "vimeoPlayer",
src: "https://spark.adobe.com/video/YRfrWT5QdMipi/embed",
width: "100%",
height: "100%",
frameborder: "0",
const videoPlayerIframe = utils.createElementWithAttrs('iframe', {
id: 'vimeoPlayer',
src: 'https://spark.adobe.com/video/YRfrWT5QdMipi/embed',
width: '100%',
height: '100%',
frameborder: '0',
allowfullscreen: true,
});
videoPlayerDiv.appendChild(videoPlayerIframe);
Expand All @@ -93,10 +96,10 @@ export default {
// console.log('resizing');

const rect = document
.querySelector("#dear_firefox_come_on")
.querySelector('#dear_firefox_come_on')
.getBoundingClientRect();

const videoPlayerIframe = document.querySelector("#videoPlayer");
const videoPlayerIframe = document.querySelector('#videoPlayer');
videoPlayerIframe.style.left = `${Math.floor(rect.left)}px`;
videoPlayerIframe.style.top = `${Math.floor(rect.top)}px`;
videoPlayerIframe.style.width = `${Math.floor(rect.width)}px`;
Expand All @@ -105,32 +108,32 @@ export default {

if (data.curTop > this.minY && data.curTop < this.maxY) {
if (
(data.curTop - this.iskey > this.keyfreq &&
data.direction === "down") ||
(this.iskey - data.curTop > this.keyfreq && data.direction === "up")
(data.curTop - this.iskey > this.keyfreq
&& data.direction === 'down')
|| (this.iskey - data.curTop > this.keyfreq && data.direction === 'up')
) {
const keys1 = document.querySelectorAll("#keyboard rect");
const keys2 = document.querySelectorAll("#keyboard2 rect");
const keys3 = document.querySelectorAll("#keyboard3 rect");
const keys1 = document.querySelectorAll('#keyboard rect');
const keys2 = document.querySelectorAll('#keyboard2 rect');
const keys3 = document.querySelectorAll('#keyboard3 rect');

const randomKey1 = Math.floor(Math.random() * keys1.length);
const randomKey2 = Math.floor(Math.random() * keys2.length);
const randomKey3 = Math.floor(Math.random() * keys3.length);

keys1[randomKey1].style.fill = "#ccd1d9";
keys2[randomKey2].style.fill = "#f7f9f8";
keys3[randomKey3].style.fill = "#f7f9f8";
keys1[randomKey1].style.fill = '#ccd1d9';
keys2[randomKey2].style.fill = '#f7f9f8';
keys3[randomKey3].style.fill = '#f7f9f8';

this.iskey = data.curTop;
}

if (
(data.curTop - this.islight > this.lightfreq &&
data.direction === "down") ||
(this.islight - data.curTop > this.lightfreq && data.direction === "up")
(data.curTop - this.islight > this.lightfreq
&& data.direction === 'down')
|| (this.islight - data.curTop > this.lightfreq && data.direction === 'up')
) {
this.lightlast = this.lightlast === "none" ? "inline" : "none";
document.querySelector("#imaclight").style.display = this.lightlast;
this.lightlast = this.lightlast === 'none' ? 'inline' : 'none';
document.querySelector('#imaclight').style.display = this.lightlast;
this.islight = data.curTop;
}
}
Expand Down
36 changes: 21 additions & 15 deletions src/scenes/scene5/animation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -180,36 +180,31 @@ $start: $scene_05_begin;
#clients {
#vneuron {
-st-animation-name: vneuron;
cursor: pointer;
}
#makerlab {
-st-animation-name: makerlab;
cursor: pointer;
}
#sofia {
-st-animation-name: sofia;
cursor: pointer;
}
#eonics {
-st-animation-name: eonics;
cursor: pointer;
}
#rabobank {
-st-animation-name: rabobank;
cursor: pointer;
}
#googlejam {
-st-animation-name: googlejam;
}
#equitalia {
-st-animation-name: equitalia;
}
#infostrada {
-st-animation-name: infostrada;
}
#nintendo {
-st-animation-name: nintendo;
}
#peroni {
-st-animation-name: peroni;
}
#sapienza {
-st-animation-name: sapienza;
cursor: pointer;
}
#sfaxcpc {
-st-animation-name: sfaxcpc;
cursor: pointer;
}
}
@-st-keyframes sofia {
Expand Down Expand Up @@ -256,6 +251,17 @@ $start: $scene_05_begin;
}
}

@-st-keyframes rabobank {
#{$start + 300} {
transform: translate(-2400px, -8000px) scale(16);
opacity: 0;
}
#{$start + 450} {
transform: translate(150.72, 150.055) scale(1);
opacity: 1;
}
}

@-st-keyframes googlejam {
#{$start + 120} {
transform: translate(-2600px, -8000px) scale(1) rotate(7.2);
Expand Down
50 changes: 50 additions & 0 deletions src/scenes/scene5/scene.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c4a528f

Please sign in to comment.