summaryrefslogtreecommitdiff
path: root/assets/static/script.js
diff options
context:
space:
mode:
authorjoak <joak@nospace.at>2020-08-17 11:55:24 +0200
committerjoak <joak@nospace.at>2020-08-17 11:55:24 +0200
commitf60e9ccd5b046101903a79bf6afa0cf87fdd956c (patch)
treedb29d0f55a1bc3347b63341551fa05308554101d /assets/static/script.js
init
Diffstat (limited to 'assets/static/script.js')
-rw-r--r--assets/static/script.js75
1 files changed, 75 insertions, 0 deletions
diff --git a/assets/static/script.js b/assets/static/script.js
new file mode 100644
index 0000000..ea7a927
--- /dev/null
+++ b/assets/static/script.js
@@ -0,0 +1,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 = " ";
+ }
+});