assets: Added js for possible future use

This commit is contained in:
Nathan Woodburn 2023-02-20 18:00:36 +11:00
parent 328ebd3e79
commit b768b47f53
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

25
assets/js/skills.js Normal file
View File

@ -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 = "";
};