From b768b47f5333d2bb2b57647cc162df06ee860443 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Mon, 20 Feb 2023 18:00:36 +1100 Subject: [PATCH] assets: Added js for possible future use --- assets/js/skills.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 assets/js/skills.js diff --git a/assets/js/skills.js b/assets/js/skills.js new file mode 100644 index 0000000..b700e57 --- /dev/null +++ b/assets/js/skills.js @@ -0,0 +1,25 @@ +codetarget = document.querySelector(".skillcode"); + +// C# Code +document.querySelector(".programc").onmouseover = event => { + codetarget.innerText = "if(c#.hover){\nthis.show();\n}\nelse{\nthis.hide;\n}"; +}; +document.querySelector(".programc").onmouseleave = event => { + codetarget.innerText = ""; +}; + +// Linux Code +document.querySelector(".programlinux").onmouseover = event => { + codetarget.innerText = "#!/bin/bash\nif [ $1 == \"linux\" ]; then\n echo \"Linux is awesome!\";\nelse\n echo \"Linux is still cool!\";\nfi"; +}; +document.querySelector(".programlinux").onmouseleave = event => { + codetarget.innerText = ""; +}; + +// Nginx Code +document.querySelector(".programnginx").onmouseover = event => { + codetarget.innerText = "server {\n listen 80;\n server_name nathan.woodburn;\n location / {\n root /var/www/nathanwoodburn;\n index index.html;\n}\nlisten 443 ssl;\nssl_certificate /etc/ssl/nathanwoodburn.crt;\nssl_certificate_key /etc/ssl/nathanwoodburn.key;\n}"; +}; +document.querySelector(".programnginx").onmouseleave = event => { + codetarget.innerText = ""; +}; \ No newline at end of file