File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,21 +20,11 @@ document.addEventListener("DOMContentLoaded", function () {
2020 e . preventDefault ( ) ;
2121 const target = link . getAttribute ( "href" ) ;
2222
23- let defaultContent = document . querySelector ( "#content" ) . innerHTML ;
2423 let contentHTML ;
2524 if ( target === "/" ) {
26- // contentHTML = defaultContent;
2725 const res = await fetch ( "pages/home.html" ) ;
2826 contentHTML = await res . text ( ) ;
2927 window . history . pushState ( { page : "home" } , "Home" , "/" ) ;
30- } else if ( target === "/Mission" ) {
31- const res = await fetch ( "pages/mission.html" ) ;
32- contentHTML = await res . text ( ) ;
33- window . history . pushState ( { page : "mission" } , "Mission" , "/mission" ) ;
34- } else if ( target === "/Projects" ) {
35- const res = await fetch ( "pages/projects.html" ) ;
36- contentHTML = await res . text ( ) ;
37- window . history . pushState ( { page : "projects" } , "Projects" , "/projects" ) ;
3828 } else if ( target === "/Blogs" ) {
3929 const res = await fetch ( "pages/blogs.html" ) ;
4030 console . log ( target ) ;
You can’t perform that action at this time.
0 commit comments