features/templ-components #3
@ -1,4 +1,4 @@
|
|||||||
package templhtml
|
package html
|
||||||
|
|
||||||
templ Br(){
|
templ Br(){
|
||||||
<br/>
|
<br/>
|
@ -1,4 +1,4 @@
|
|||||||
package templhtml
|
package html
|
||||||
|
|
||||||
templ ALink(url, title string) {
|
templ ALink(url, title string) {
|
||||||
<a href={ templ.SafeURL(url) }>{ title }</a>
|
<a href={ templ.SafeURL(url) }>{ title }</a>
|
26
components/bulma/html/html.templ
Normal file
26
components/bulma/html/html.templ
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
package html
|
||||||
|
|
||||||
|
templ Doctype() {
|
||||||
|
<!DOCTYPE html>
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creates <html> that accepts children
|
||||||
|
templ New(lang string) {
|
||||||
|
<html lang={ lang }>
|
||||||
|
{ children... }
|
||||||
|
</html>
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creates <head> that accepts children
|
||||||
|
templ NewHeader() {
|
||||||
|
<head>
|
||||||
|
{ children... }
|
||||||
|
</head>
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creates <body> that accepts children
|
||||||
|
templ NewBody() {
|
||||||
|
<body>
|
||||||
|
{ children... }
|
||||||
|
</body>
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user