Skip to content

Commit

Permalink
Update file path
Browse files Browse the repository at this point in the history
  • Loading branch information
rayc2045 committed Apr 15, 2024
1 parent 0cf8dc2 commit ddd9572
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<!-- Libraries -->
<script src="https://cdn.tailwindcss.com"></script><!-- https://tailwindcss.com, https://hyperui.dev -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/animate.min.css"/>
<link rel="stylesheet" href="/src/style.css"/>
<script src="/src/app.js" defer></script>
<link rel="stylesheet" href="./src/style.css"/>
<script src="./src/app.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/component.min.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/@imacrayon/[email protected]/dist/cdn.min.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn.min.js" defer></script>
Expand Down
2 changes: 1 addition & 1 deletion src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const router = {
this.currentPath = path.startsWith('/') ? path : '/';
},
async getPageHTML(path = this.currentPath) {
const root = '/src/pages';
const root = './pages';
const page =
this.routes.find(route => route.path === path)?.component || '/404.html';
return await fetch(root + page).then(res => res.text());
Expand Down

0 comments on commit ddd9572

Please sign in to comment.