summaryrefslogtreecommitdiff
path: root/assets/static/script.js
blob: ea7a9273ed19850680ac37404c298d28b9c7fd7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
window.addEventListener('mousemove', event => {
	var x = event.clientX;
	var y = event.clientY;
	var move = document.getElementsByClassName("workthumb");
	for (i = 0; i < move.length; i++) {
		move[i].style.left = x+'px';
		move[i].style.top = y+'px';
	}
});


var background = document.getElementById("background");
background.addEventListener("change", function() {
    if(background.value == "white"){
		document.body.style.background = "#ffffff";			
	} else if (background.value == "black"){
		document.body.style.background = "#000000";	
	} else if (background.value == "red"){
		document.body.style.background = "#ff0000";	
	} else if (background.value == "green"){
		document.body.style.background = "#00ff00";	
	} else if (background.value == "blue"){
		document.body.style.background = "#0000ff";
	}else if (background.value == "windowsxp"){
		document.body.style.backgroundImage = "url('/static/images/windowsxp.jpeg')";	
	}else if (background.value == "osxgalaxy"){
		document.body.style.backgroundImage = "url('/static/images/osxgalaxy.jpeg')";		
	}else if (background.value == "ubuntu1010"){
		document.body.style.backgroundImage = "url('/static/images/ubuntu1010.jpeg')";		
	}else if (background.value == "windows98"){
		document.body.style.backgroundImage = "url('/static/images/windows98.jpeg')";	
	}else if (background.value == "windows10"){
		document.body.style.backgroundImage = "url('/static/images/windows10.jpeg')";
	}
});

var foregroundimg = document.getElementById("foregroundimg");
var foreground = document.getElementById("foreground");
foreground.addEventListener("change", function() {
    if(foreground.value == "malevich"){
		foregroundimg.removeAttribute("width");
		foregroundimg.setAttribute('height', '100%');
		foregroundimg.src = "/static/images/malevich.png";
	} else if (foreground.value == "bruegel"){
		foregroundimg.removeAttribute("height");
		foregroundimg.setAttribute('width', '100%');
		foregroundimg.src = "/static/images/bruegel.png";
	} else if (foreground.value == "luegt"){
		foregroundimg.removeAttribute("height");
		foregroundimg.setAttribute('width', '100%');
		foregroundimg.src = "/static/images/luegt.png";
	} else if (foreground.value == "metzger"){
		foregroundimg.removeAttribute("height");
		foregroundimg.setAttribute('width', '100%');
		foregroundimg.src = "/static/images/metzger.png";
	} else if (foreground.value == "grupaTOK"){
		foregroundimg.removeAttribute("height");
		foregroundimg.setAttribute('width', '100%');
		foregroundimg.src = "/static/images/grupaTOK.png";
	}else if (foreground.value == "steiger"){
                foregroundimg.removeAttribute("height");
                foregroundimg.setAttribute('width', '97%');
                foregroundimg.src = "/static/images/steiger.png";
        } else if (foreground.value == "social"){
		foregroundimg.removeAttribute("height");
		foregroundimg.setAttribute('width', '100%');
		foregroundimg.src = "/static/images/social.png";
	} else if (foreground.value == "flynt" ){
		foregroundimg.removeAttribute("height");
		foregroundimg.setAttribute('width', '100%');
		foregroundimg.src = "/static/images/flynt.png";
	} else if (foreground.value == "none"){
		foregroundimg.src = " ";
	}
});