David Vogel
e722ae1d2b
- 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
23 lines
402 B
Go
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
|
|
}
|