github.com/golazy/golazy@v0.0.7-0.20221012133820-968fe65a0b65/lazyview/document/lazylayout/layout.go (about) 1 package lazylayout 2 3 import ( 4 _ "embed" 5 "io" 6 7 "github.com/golazy/golazy/lazyview/document" 8 . "github.com/golazy/golazy/lazyview/html" 9 ) 10 11 //go:embed style.css 12 var style string 13 14 var Layout = &document.Document{ 15 Lang: "en", 16 Title: "golazy", 17 Viewport: "width=device-width", 18 Styles: []string{style}, 19 Head: []interface{}{Script(Type("module"), Src("https://cdn.skypack.dev/@hotwired/turbo"))}, 20 } 21 22 func PageHeader() io.WriterTo { 23 return Header(H1("lazygo")) 24 } 25 26 func PageNav() io.WriterTo { 27 return Nav( 28 Ul( 29 Li(A(Href("#"), "Web")), 30 Li(A(Href("#"), "Docs")), 31 Li(A(Href("#"), "Code")), 32 Li(A(Href("#"), "Config")), 33 ), 34 ) 35 }