D3vugu-components/page-layout.go
David Vogel e722ae1d2b Add pagination component
- Add and update example pages
- Add example address component
- Add vugu data tags to struct fields
- Fix some button padding values
- Remove debug log line
- Fix background color of the sidebar menu
2023-05-16 18:10:24 +02:00

23 lines
402 B
Go

package main
import (
"log"
"git.d3nexus.de/Dadido3/D3vugu-components/components/navigation"
"github.com/vugu/vugu"
)
type PageLayout struct {
Page int `vugu:"data"`
Pages int `vugu:"data"`
}
func (c *PageLayout) Init(ctx vugu.InitCtx) {
c.Pages = 10
}
func (c *PageLayout) handlePagination(event navigation.PaginationEvent) {
log.Printf("Some page %v", event.Page)
c.Page = event.Page
}