Swap Bulma for DaisyUI (Tailwind) (#111)
This commit is contained in:
parent
fc5db0e95a
commit
c1e9baabe6
53 changed files with 1124 additions and 632 deletions
|
|
@ -1,9 +1,7 @@
|
|||
package layouts
|
||||
|
||||
import (
|
||||
"github.com/mikestefanello/pagoda/pkg/routenames"
|
||||
"github.com/mikestefanello/pagoda/pkg/ui"
|
||||
"github.com/mikestefanello/pagoda/pkg/ui/cache"
|
||||
. "github.com/mikestefanello/pagoda/pkg/ui/components"
|
||||
. "maragu.dev/gomponents"
|
||||
. "maragu.dev/gomponents/html"
|
||||
|
|
@ -13,31 +11,24 @@ func Auth(r *ui.Request, content Node) Node {
|
|||
return Doctype(
|
||||
HTML(
|
||||
Lang("en"),
|
||||
Data("theme", "light"),
|
||||
Data("theme", "dark"),
|
||||
Head(
|
||||
Metatags(r),
|
||||
CSS(),
|
||||
JS(r),
|
||||
JS(),
|
||||
),
|
||||
Body(
|
||||
Section(
|
||||
Class("hero is-fullheight"),
|
||||
Div(
|
||||
Class("hero flex items-center justify-center min-h-screen"),
|
||||
Div(
|
||||
Class("hero-body"),
|
||||
Class("flex-col hero-content"),
|
||||
Div(
|
||||
Class("container"),
|
||||
Class("card shadow-md bg-base-200 w-96"),
|
||||
Div(
|
||||
Class("columns is-centered"),
|
||||
Div(
|
||||
Class("column is-half"),
|
||||
If(len(r.Title) > 0, H1(Class("title"), Text(r.Title))),
|
||||
Div(
|
||||
Class("notification"),
|
||||
FlashMessages(r),
|
||||
content,
|
||||
authNavBar(r),
|
||||
),
|
||||
),
|
||||
Class("card-body"),
|
||||
If(len(r.Title) > 0, H1(Class("text-2xl font-bold"), Text(r.Title))),
|
||||
FlashMessages(r),
|
||||
content,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
@ -47,20 +38,3 @@ func Auth(r *ui.Request, content Node) Node {
|
|||
),
|
||||
)
|
||||
}
|
||||
|
||||
func authNavBar(r *ui.Request) Node {
|
||||
return cache.SetIfNotExists("authNavBar", func() Node {
|
||||
return Nav(
|
||||
Class("navbar"),
|
||||
Div(
|
||||
Class("navbar-menu"),
|
||||
Div(
|
||||
Class("navbar-start"),
|
||||
A(Class("navbar-item"), Href(r.Path(routenames.Login)), Text("Login")),
|
||||
A(Class("navbar-item"), Href(r.Path(routenames.Register)), Text("Create an account")),
|
||||
A(Class("navbar-item"), Href(r.Path(routenames.ForgotPassword)), Text("Forgot password")),
|
||||
),
|
||||
),
|
||||
)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue