From 451fd1b00bae0b0af71816b6984905890b5c1411 Mon Sep 17 00:00:00 2001 From: hugh5 Date: Tue, 23 Apr 2024 03:31:31 +1000 Subject: [PATCH] added header and footer --- _footer.html | 21 --------------------- _navbar.html | 7 ------- experience.html | 46 ++++++++++++++++++++++++++++++++++++++++++++-- index.html | 46 ++++++++++++++++++++++++++++++++++++++++++++-- js/script.js | 28 ++++++++++------------------ projects.html | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 6 files changed, 142 insertions(+), 52 deletions(-) delete mode 100644 _footer.html delete mode 100644 _navbar.html diff --git a/_footer.html b/_footer.html deleted file mode 100644 index d8642d7..0000000 --- a/_footer.html +++ /dev/null @@ -1,21 +0,0 @@ -
-

© 2024 Hugh's Portfolio. All rights reserved.

- -
- - Email -
-
- -
- - GitHub -
-
-
- - LinkedIn -
-
-
diff --git a/_navbar.html b/_navbar.html deleted file mode 100644 index 1839264..0000000 --- a/_navbar.html +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/experience.html b/experience.html index fd9ac8f..73b2932 100644 --- a/experience.html +++ b/experience.html @@ -10,7 +10,15 @@ -
+
+ +
@@ -252,6 +260,40 @@

Frameworks and Tools

- + diff --git a/index.html b/index.html index e21e674..e6bd57d 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,15 @@ -
+
+ +
@@ -66,6 +74,40 @@

Career Objectives

- + diff --git a/js/script.js b/js/script.js index eb2567e..c2961ab 100644 --- a/js/script.js +++ b/js/script.js @@ -1,18 +1,15 @@ function loadNav() { - // Load the navbar - $("header").load("_navbar.html", function () { - // Colour the active nav item - var path = window.location.pathname; - var page = path.split("/").pop(); - if (page == "" || page == "index.html") { - page = "/"; + // Colour the active nav item + var path = window.location.pathname; + var page = path.split("/").pop(); + if (page == "" || page == "index.html") { + page = "/"; + } + $("nav a").each(function () { + var href = $(this).attr("href"); + if (page == href) { + $(this).addClass("active"); } - $("nav a").each(function () { - var href = $(this).attr("href"); - if (page == href) { - $(this).addClass("active"); - } - }); }); // On scroll, hide/show the navbar @@ -31,10 +28,6 @@ function loadNav() { }); } -function loadFooter() { - $("footer").load("_footer.html"); -} - let counter = { project1: 0, project2: 0, @@ -122,6 +115,5 @@ function loadImageSliders() { $(function () { loadNav(); - loadFooter(); loadImageSliders(); }); diff --git a/projects.html b/projects.html index 73b7506..b172096 100644 --- a/projects.html +++ b/projects.html @@ -10,7 +10,15 @@ -
+
+ +
@@ -407,6 +415,40 @@
Desktop App
- +