add initial dashboard page
This commit is contained in:
parent
e02e0e5176
commit
36624b675d
2 changed files with 23 additions and 3 deletions
|
|
@ -1,6 +1,11 @@
|
||||||
package handler
|
package handler
|
||||||
|
|
||||||
import "net/http"
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"git.juancwu.dev/juancwu/budgit/internal/ui"
|
||||||
|
"git.juancwu.dev/juancwu/budgit/internal/ui/pages"
|
||||||
|
)
|
||||||
|
|
||||||
type dashboardHandler struct{}
|
type dashboardHandler struct{}
|
||||||
|
|
||||||
|
|
@ -9,6 +14,5 @@ func NewDashboardHandler() *dashboardHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *dashboardHandler) DashboardPage(w http.ResponseWriter, r *http.Request) {
|
func (h *dashboardHandler) DashboardPage(w http.ResponseWriter, r *http.Request) {
|
||||||
w.WriteHeader(200)
|
ui.Render(w, r, pages.Dashboard())
|
||||||
w.Write([]byte("Dashboard page"))
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
16
internal/ui/pages/app_dashboard.templ
Normal file
16
internal/ui/pages/app_dashboard.templ
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
package pages
|
||||||
|
|
||||||
|
import "git.juancwu.dev/juancwu/budgit/internal/ui/layouts"
|
||||||
|
|
||||||
|
templ Dashboard() {
|
||||||
|
@layouts.App("Dashboard") {
|
||||||
|
<div class="container max-w-7xl px-6 py-8">
|
||||||
|
<div class="mb-8">
|
||||||
|
<h1 class="text-3xl font-bold">Dashboard</h1>
|
||||||
|
<p class="text-muted-foreground mt-2">
|
||||||
|
Welcome to your dashboard
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue