views: prepare for refactoring views into separate files
This commit is contained in:
parent
b9a589cfcd
commit
a98dd2d33e
18
views/subreddits/view.templ
Normal file
18
views/subreddits/view.templ
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
package subreddits
|
||||||
|
|
||||||
|
import "github.com/tigorlazuardi/redmage/views"
|
||||||
|
import "github.com/tigorlazuardi/redmage/views/components"
|
||||||
|
import "github.com/tigorlazuardi/redmage/api"
|
||||||
|
|
||||||
|
type Data struct {
|
||||||
|
Subreddits api.ListSubredditsResult
|
||||||
|
Error string
|
||||||
|
}
|
||||||
|
|
||||||
|
templ View(c *views.Context) {
|
||||||
|
@components.Doctype() {
|
||||||
|
@components.Head(c, components.HeadTitle("Redmage - Subreddits"))
|
||||||
|
@components.Body(c) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue