Skip to content

Commit abaf799

Browse files
committed
wip init assets/html folder
1 parent cb32447 commit abaf799

File tree

10 files changed

+24
-23
lines changed

10 files changed

+24
-23
lines changed

_about_subnavbar.html

Lines changed: 0 additions & 12 deletions
This file was deleted.
File renamed without changes.
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,4 @@ <h1 class="home_entrance_title">
2929
<div id="subnavbars"></div>
3030
</div>
3131
</header>
32-
3332
<div id="side-menu"></div>

navbar.html renamed to assets/html/navbar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@
2929
/>
3030
</a>
3131
</div>
32-
<div id="subnavbars"></div>
32+
<div class="row_scroll" id="subnavbar"></div>

assets/html/subnavbar_about.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<head>
2+
<meta name="robots" content="noindex" />
3+
</head>
4+
<!-- NOTE: These link class tags need to match the page breadcrumbs in order for the current page highlighting to work -->
5+
<ul width="50%">
6+
<li><a href="about/learning.html" class="learning">Learning</a></li>
7+
<li><a href="about/music.html" class="music">Music</a></li>
8+
<li><a href="about/swim.html" class="swim">Swim</a></li>
9+
<li><a href="about/travel.html" class="travel">Travel</a></li>
10+
</ul>

assets/js/main.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ String.prototype.toProperCase = function () {
44
});
55
};
66

7-
$("#top_professional").load("/_top_portfolio.html");
8-
$("#footer").load("/_footer.html");
9-
$("#independent_projects").load("/_independent_projects.html");
7+
$("#top_professional").load("/assets/html/top_professional.html");
8+
$("#footer").load("/assets/html/footer.html");
9+
$("#independent_projects").load("/assets/html/top_projects.html");
1010

1111
const breadcrumbs = window.location.pathname
1212
.replace("/", "")
@@ -49,17 +49,21 @@ function loadSection(selector, url) {
4949
async function initNavbars(crumbs) {
5050
try {
5151
// Always load header
52-
await loadSection("#headers", "/_header_html.html");
53-
await loadSection("#navbar", "/navbar.html");
54-
await loadSection("#side-menu", "/_side_menu.html");
52+
await loadSection("#headers", "/assets/html/header.html");
53+
await loadSection("#navbar", "/assets/html/navbar.html");
5554

5655
// Optionally load subnavbars
5756
if (window.location.pathname.includes("/about")) {
58-
await loadSection("#subnavbars", "/_about_subnavbar.html");
59-
} else if (window.location.pathname.includes("/portfolio")) {
60-
await loadSection("#subnavbars", "/_portfolio_subnavbar.html");
57+
await loadSection("#subnavbar", "/assets/html/subnavbar_about.html");
58+
} else if (window.location.pathname.includes("/professional")) {
59+
await loadSection(
60+
"#subnavbar",
61+
"/assets/html/subnavbar_professional.html",
62+
);
6163
}
6264

65+
await loadSection("#side-menu", "/assets/html/side_menu.html");
66+
6367
// Move menu to body
6468
$("#menu").appendTo($("body"));
6569

0 commit comments

Comments
 (0)