whispervis/tile.go

35 lines
543 B
Go
Raw Normal View History

2018-10-23 21:10:42 +02:00
package main
import (
"github.com/gopherjs/vecty"
"github.com/gopherjs/vecty/elem"
)
func Tile(content vecty.MarkupOrChild) *vecty.HTML {
return elem.Div(
vecty.Markup(
vecty.Class("tile"),
),
elem.Div(
vecty.Markup(
vecty.Class("tile", "is-child", "box"),
),
content,
),
)
}
func TileParent(content vecty.MarkupOrChild) *vecty.HTML {
return elem.Div(
vecty.Markup(
vecty.Class("tile", "is-parent"),
),
elem.Div(
vecty.Markup(
vecty.Class("tile", "is-child", "box"),
),
content,
),
)
}