READ ISSUES - WEB
This commit is contained in:
@@ -1,49 +1,44 @@
|
||||
package routes
|
||||
|
||||
import "github.com/LazyBachelor/LazyPM/pkg/web/components"
|
||||
import "github.com/LazyBachelor/LazyPM/pkg/web/components/base"
|
||||
|
||||
var baseLayout = components.LayoutProps{
|
||||
Title: "Beads Test Application",
|
||||
Description: "A sample application using Beads storage service",
|
||||
Head: components.HeadProps{
|
||||
Links: []components.Link{
|
||||
{Href: "/assets/css/styles.css", Rel: "preload", As: "style"},
|
||||
{Href: "/assets/css/styles.css", Rel: "stylesheet"},
|
||||
{Href: "/assets/manifest.json", Rel: "manifest"},
|
||||
},
|
||||
Scripts: []components.Script{
|
||||
{Src: "/assets/js/htmx.min.js", Defer: true},
|
||||
{Src: "/assets/js/ajax.min.js", Defer: true},
|
||||
},
|
||||
},
|
||||
|
||||
Routes: []components.NavRoutes{
|
||||
{Name: "Dashboard", Path: "/", Icon: components.IconDashboard()},
|
||||
{Name: "Issues", Path: "/", Icon: components.IconIssues()},
|
||||
{Name: "Agile Board", Path: "/board", Icon: components.IconAgileBoard()},
|
||||
{Name: "Backlog", Path: "/backlog", Icon: components.IconBacklog()},
|
||||
{Name: "Reports", Path: "/reports", Icon: components.IconReports()},
|
||||
{Name: "Settings", Path: "/settings", Icon: components.IconSettings()},
|
||||
},
|
||||
|
||||
Header: components.HeaderProps{
|
||||
Title: "LazyPM Dashboard",
|
||||
NavbarCenter: base.Input(base.InputProps{
|
||||
Name: "search-issue",
|
||||
Type: "search",
|
||||
Placeholder: "Search issues...",
|
||||
Class: "",
|
||||
Attrs: templ.Attributes{
|
||||
"class": "text-base-content",
|
||||
},
|
||||
}),
|
||||
NavbarEnd: components.Status(),
|
||||
},
|
||||
type BaseLayoutProps struct {
|
||||
SearchQuery string
|
||||
}
|
||||
|
||||
templ BaseLayout() {
|
||||
@components.Layout(baseLayout) {
|
||||
func buildLayoutProps(searchQuery string) components.LayoutProps {
|
||||
return components.LayoutProps{
|
||||
Title: "Beads Test Application",
|
||||
Description: "A sample application using Beads storage service",
|
||||
Head: components.HeadProps{
|
||||
Links: []components.Link{
|
||||
{Href: "/assets/css/styles.css", Rel: "preload", As: "style"},
|
||||
{Href: "/assets/css/styles.css", Rel: "stylesheet"},
|
||||
{Href: "/assets/manifest.json", Rel: "manifest"},
|
||||
},
|
||||
Scripts: []components.Script{
|
||||
{Src: "/assets/js/htmx.min.js", Defer: true},
|
||||
{Src: "/assets/js/ajax.min.js", Defer: true},
|
||||
},
|
||||
},
|
||||
Routes: []components.NavRoutes{
|
||||
{Name: "Dashboard", Path: "/", Icon: components.IconDashboard()},
|
||||
{Name: "Issues", Path: "/", Icon: components.IconIssues()},
|
||||
{Name: "Agile Board", Path: "/board", Icon: components.IconAgileBoard()},
|
||||
{Name: "Backlog", Path: "/backlog", Icon: components.IconBacklog()},
|
||||
{Name: "Reports", Path: "/reports", Icon: components.IconReports()},
|
||||
{Name: "Settings", Path: "/settings", Icon: components.IconSettings()},
|
||||
},
|
||||
Header: components.HeaderProps{
|
||||
Title: "LazyPM Dashboard",
|
||||
NavbarCenter: components.SearchForm(searchQuery),
|
||||
NavbarEnd: components.Status(),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
templ BaseLayout(props BaseLayoutProps) {
|
||||
@components.Layout(buildLayoutProps(props.SearchQuery)) {
|
||||
{ children... }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user