2024-07-07 08:02:00 -07:00
|
|
|
package sources
|
|
|
|
|
2024-07-09 08:33:15 -07:00
|
|
|
import (
|
2024-07-11 08:08:58 -07:00
|
|
|
"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"
|
|
|
|
)
|
2024-07-07 08:02:00 -07:00
|
|
|
|
2024-07-11 08:08:58 -07:00
|
|
|
var (
|
|
|
|
p = form.NewParam{
|
|
|
|
HxPost: "/sources/add",
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2024-07-07 08:02:00 -07:00
|
|
|
templ Add(model models.AddSourcePayloadModel) {
|
|
|
|
@layout.WithTemplate() {
|
2024-07-11 08:08:58 -07:00
|
|
|
@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)
|
|
|
|
}
|
2024-07-07 08:02:00 -07:00
|
|
|
}
|
|
|
|
}
|