1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- package e13_vuetify_list
- // @snippet_begin(VuetifyListSample)
- import (
- . "github.com/qor5/ui/vuetify"
- "github.com/qor5/web"
- h "github.com/theplant/htmlgo"
- )
- func HelloVuetifyList(ctx *web.EventContext) (pr web.PageResponse, err error) {
- wrapper := func(children ...h.HTMLComponent) h.HTMLComponent {
- return VContainer(
- VLayout(
- VFlex(
- VCard(children...),
- ).Col(Xs, 6).Offset(Sm, 3),
- ).Row(true),
- ).GridList(Md).TextAlign(Xs, Center)
- }
- pr.Body = wrapper(
- VToolbar(
- // VToolbarSideIcon(),
- VToolbarTitle("Inbox"),
- VSpacer(),
- VBtn("").Icon(true).Children(
- VIcon("search"),
- ),
- ).Color("cyan").Dark(true),
- VList(
- VSubheader(h.Text("Today")),
- VListItem(
- VListItemAvatar(
- h.Img("https://cdn.vuetifyjs.com/images/lists/1.jpg"),
- ),
- VListItemContent(
- VListItemTitle(h.Text("Brunch this weekend?")),
- VListItemSubtitle(
- h.Span("Ali Connors").Class("text--primary"),
- h.Text("— I'll be in your neighborhood doing errands this weekend. Do you want to hang out?"),
- ),
- ),
- ),
- VDivider().Inset(true),
- VListItem(
- VListItemAvatar(
- h.Img("https://cdn.vuetifyjs.com/images/lists/2.jpg"),
- ),
- VListItemContent(
- VListItemTitle(h.RawHTML(`Summer BBQ <span class="grey--text text--lighten-1">4</span>`)),
- VListItemSubtitle(h.RawHTML(`<span class='text--primary'>to Alex, Scott, Jennifer</span> — Wish I could come, but I'm out of town this weekend.`)),
- ),
- ),
- VDivider().Inset(true),
- VListItem(
- VListItemAvatar(
- h.Img("https://cdn.vuetifyjs.com/images/lists/3.jpg"),
- ),
- VListItemContent(
- VListItemTitle(h.Text(`Oui oui`)),
- VListItemSubtitle(h.RawHTML(`<span class='text--primary'>Sandra Adams</span> — Do you have Paris recommendations? Have you ever been?`)),
- ),
- ),
- ).TwoLine(true),
- )
- return
- }
- var HelloVuetifyListPB = web.Page(HelloVuetifyList)
- const HelloVuetifyListPath = "/samples/hello-vuetify-list"
- // @snippet_end
|