Skip to content

Commit

Permalink
added header and footer
Browse files Browse the repository at this point in the history
  • Loading branch information
hugh5 committed Apr 22, 2024
1 parent fe63d19 commit 451fd1b
Show file tree
Hide file tree
Showing 6 changed files with 142 additions and 52 deletions.
21 changes: 0 additions & 21 deletions _footer.html

This file was deleted.

7 changes: 0 additions & 7 deletions _navbar.html

This file was deleted.

46 changes: 44 additions & 2 deletions experience.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@
<script src="js/script.js"></script>
</head>
<body>
<header></header>
<header>
<nav>
<a href="/">Home</a>
<a href="experience.html">Experience</a>
<a href="projects.html">Projects</a>
<a href="blog.html">Blog</a>
<a href="testimonials.html">Testimonials</a>
</nav>
</header>
<div id="page">
<div id="experience">
<div class="column">
Expand Down Expand Up @@ -252,6 +260,40 @@ <h4>Frameworks and Tools</h4>
</div>
</div>
</div>
<footer></footer>
<footer>
<div class="row">
<p>&copy; 2024 Hugh's Portfolio. All rights reserved.</p>
<a href="mailto: [email protected]">
<div class="column">
<img
class="social-icon"
src="images/email.png"
alt="Email"
/>
Email
</div>
</a>
<a href="https://github.com/hugh5" target="_blank">
<div class="column">
<img
class="social-icon"
src="images/github.png"
alt="GitHub"
/>
GitHub
</div>
</a>
<a href="https://linkedin.com/in/hugh-drummond7" target="_blank"
><div class="column">
<img
class="social-icon"
src="images/linkedin.png"
alt="LinkedIn"
/>
LinkedIn
</div>
</a>
</div>
</footer>
</body>
</html>
46 changes: 44 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@
<script src="js/script.js"></script>
</head>
<body>
<header></header>
<header>
<nav>
<a href="/">Home</a>
<a href="experience.html">Experience</a>
<a href="projects.html">Projects</a>
<a href="blog.html">Blog</a>
<a href="testimonials.html">Testimonials</a>
</nav>
</header>
<div id="page">
<div id="home">
<div class="column">
Expand Down Expand Up @@ -66,6 +74,40 @@ <h3>Career Objectives</h3>
</div>
</div>
</div>
<footer></footer>
<footer>
<div class="row">
<p>&copy; 2024 Hugh's Portfolio. All rights reserved.</p>
<a href="mailto: [email protected]">
<div class="column">
<img
class="social-icon"
src="images/email.png"
alt="Email"
/>
Email
</div>
</a>
<a href="https://github.com/hugh5" target="_blank">
<div class="column">
<img
class="social-icon"
src="images/github.png"
alt="GitHub"
/>
GitHub
</div>
</a>
<a href="https://linkedin.com/in/hugh-drummond7" target="_blank"
><div class="column">
<img
class="social-icon"
src="images/linkedin.png"
alt="LinkedIn"
/>
LinkedIn
</div>
</a>
</div>
</footer>
</body>
</html>
28 changes: 10 additions & 18 deletions js/script.js
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -31,10 +28,6 @@ function loadNav() {
});
}

function loadFooter() {
$("footer").load("_footer.html");
}

let counter = {
project1: 0,
project2: 0,
Expand Down Expand Up @@ -122,6 +115,5 @@ function loadImageSliders() {

$(function () {
loadNav();
loadFooter();
loadImageSliders();
});
46 changes: 44 additions & 2 deletions projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@
<script src="js/script.js"></script>
</head>
<body>
<header></header>
<header>
<nav>
<a href="/">Home</a>
<a href="experience.html">Experience</a>
<a href="projects.html">Projects</a>
<a href="blog.html">Blog</a>
<a href="testimonials.html">Testimonials</a>
</nav>
</header>
<div id="page">
<div id="projects">
<div class="column">
Expand Down Expand Up @@ -407,6 +415,40 @@ <h5>Desktop App</h5>
</div>
</div>
</div>
<footer></footer>
<footer>
<div class="row">
<p>&copy; 2024 Hugh's Portfolio. All rights reserved.</p>
<a href="mailto: [email protected]">
<div class="column">
<img
class="social-icon"
src="images/email.png"
alt="Email"
/>
Email
</div>
</a>
<a href="https://github.com/hugh5" target="_blank">
<div class="column">
<img
class="social-icon"
src="images/github.png"
alt="GitHub"
/>
GitHub
</div>
</a>
<a href="https://linkedin.com/in/hugh-drummond7" target="_blank"
><div class="column">
<img
class="social-icon"
src="images/linkedin.png"
alt="LinkedIn"
/>
LinkedIn
</div>
</a>
</div>
</footer>
</body>
</html>

0 comments on commit 451fd1b

Please sign in to comment.