Skip to content

Commit

Permalink
Add an actual home page
Browse files Browse the repository at this point in the history
Nothing really on it and thats ok
  • Loading branch information
grepsedawk committed Aug 15, 2024
1 parent f4af373 commit 8dae780
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/Router.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import FoodPage from "../pages/food/FoodPage.js"
import SectionsPage from "../pages/sections/SectionsPage.js"
import NotFoundPage from "../pages/404/NotFoundPage.js"
import HomePage from "../pages/home/index.js"

class Router {
static routes = {
"/404": NotFoundPage,
"/": SectionsPage, // HomePage,
"/": HomePage,
"/sections": SectionsPage,
"/sections/:id/food": FoodPage,
}
Expand Down
3 changes: 3 additions & 0 deletions pages/home/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<h1>Plan my Hike!</h1>

<p>Simple tools to plan your hike</p>
17 changes: 17 additions & 0 deletions pages/home/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Page from "../../js/Page.js"

class HomePage extends Page {
constructor(parent, params) {
super()
this.parent = parent
this.template = "./pages/home/index.html"
this.title = "Plan My Hike"
this.description = "plan hikes easier!"
}

async render() {
await this.renderPage()
}
}

export default HomePage

0 comments on commit 8dae780

Please sign in to comment.