From dd6ab311d812635625335159da84bddd053192dd Mon Sep 17 00:00:00 2001 From: Stone-Red-Code <56473591+StoneRed5@users.noreply.github.com> Date: Tue, 5 Jan 2021 19:21:22 +0100 Subject: [PATCH] Made it better --- Scripts/loadNavBarAndFooter.js | 7 +++++++ Scripts/quotes.js | 4 +--- index.html | 16 ++-------------- projects.html | 19 +++---------------- style.css | 10 +++++----- 5 files changed, 18 insertions(+), 38 deletions(-) create mode 100644 Scripts/loadNavBarAndFooter.js diff --git a/Scripts/loadNavBarAndFooter.js b/Scripts/loadNavBarAndFooter.js new file mode 100644 index 0000000..00abf18 --- /dev/null +++ b/Scripts/loadNavBarAndFooter.js @@ -0,0 +1,7 @@ +$.get("footer.html", function (data) { + $("#footer-placeholder").replaceWith(data); +}); + +$.get("nav.html", function (data) { + $("#nav-placeholder").replaceWith(data); +}); \ No newline at end of file diff --git a/Scripts/quotes.js b/Scripts/quotes.js index 0bd762d..daef32e 100644 --- a/Scripts/quotes.js +++ b/Scripts/quotes.js @@ -16,6 +16,4 @@ var answerArray = new Array( "“A temporary defeat is nothing if it leads to ultimate victory!” – Stephanie Dola (No Game No Life)" ); -window.onload = function getAnswer() { - document.getElementById('quotes').innerHTML = answerArray[Math.floor(Math.random() * answerArray.length)]; -} \ No newline at end of file +document.getElementById('quotes').innerHTML = answerArray[Math.floor(Math.random() * answerArray.length)]; \ No newline at end of file diff --git a/index.html b/index.html index 2f62990..66477ce 100644 --- a/index.html +++ b/index.html @@ -21,13 +21,6 @@
- - - @@ -60,13 +53,6 @@ - - - @@ -77,6 +63,8 @@ integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"> + +