newsbot-portal/internal/views/sources/add.templ

27 lines
739 B
Plaintext
Raw Normal View History

package sources
2024-07-09 08:33:15 -07:00
import (
"git.jamestombleson.com/jtom38/newsbot-portal/components/bulma"
"git.jamestombleson.com/jtom38/newsbot-portal/components/bulma/form"
2024-07-09 08:33:15 -07:00
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
"git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
)
var (
p = form.NewParam{
HxPost: "/sources/add",
}
)
templ Add(model models.AddSourcePayloadModel) {
@layout.WithTemplate() {
@bulma.H2("New Source", false)
<p>At this time only direct RSS links are allowed to be provided.</p>
@form.New(p) {
@form.TextInput("", "name", form.InputTypeText, "Name of the site")
@form.TextInput("", "url", form.InputTypeText, "RSS URL")
2024-07-09 08:33:15 -07:00
@form.Submit("Submit", bulma.ColorPrimary)
}
}
}