feat: create space
This commit is contained in:
parent
8e952455cd
commit
775177cba1
11 changed files with 200 additions and 3 deletions
31
internal/ui/pages/create_space.templ
Normal file
31
internal/ui/pages/create_space.templ
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
package pages
|
||||
|
||||
import "git.juancwu.dev/juancwu/budgit/internal/ui/layouts"
|
||||
import "git.juancwu.dev/juancwu/budgit/internal/ctxkeys"
|
||||
import "git.juancwu.dev/juancwu/budgit/internal/ui/blocks"
|
||||
import "git.juancwu.dev/juancwu/budgit/internal/ui/forms"
|
||||
|
||||
templ CreateSpace() {
|
||||
@layouts.Base(layouts.SEOProps{
|
||||
Title: "Create Space",
|
||||
Description: "Create space to manage and track expenses in a collaborative manner.",
|
||||
Path: ctxkeys.URLPath(ctx),
|
||||
}) {
|
||||
<div class="min-h-screen flex items-center justify-center p-4 relative">
|
||||
<div class="absolute top-4 right-4 z-10">
|
||||
@blocks.ThemeSwitcher()
|
||||
</div>
|
||||
<div class="w-full max-w-2xl md:grid md:grid-cols-2 md:gap-4">
|
||||
<div class="space-y-2">
|
||||
<h1 class="text-2xl">
|
||||
Create Space
|
||||
</h1>
|
||||
<p class="text-sm text-muted-foreground">This is where you or your group can track expenses.</p>
|
||||
</div>
|
||||
<div class="mt-4 md:mt-0">
|
||||
@forms.CreateSpace("", "")
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
9
internal/ui/pages/page_app_spaces_space_overview.templ
Normal file
9
internal/ui/pages/page_app_spaces_space_overview.templ
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
package pages
|
||||
|
||||
import "git.juancwu.dev/juancwu/budgit/internal/ui/layouts"
|
||||
|
||||
templ SpaceOverview(spaceName string) {
|
||||
@layouts.App("Space Overview") {
|
||||
<div>space overview: { spaceName }</div>
|
||||
}
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@ templ Spaces(spaces []blocks.SpaceCardInfo) {
|
|||
<div>
|
||||
@button.Button(button.Props{
|
||||
Class: "flex gap-2 items-center",
|
||||
Href: routeurl.URL("page.app.create-space"),
|
||||
Href: routeurl.URL("page.app.spaces.create"),
|
||||
}) {
|
||||
@icon.Plus()
|
||||
Create space
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue