2024-07-07 08:02:00 -07:00
|
|
|
package sources
|
|
|
|
|
2024-07-09 08:33:15 -07:00
|
|
|
import (
|
2024-07-15 15:35:08 -07:00
|
|
|
"git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma"
|
|
|
|
bf "git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma/form"
|
|
|
|
bl "git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma/layout"
|
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 (
|
2024-07-13 10:38:54 -07:00
|
|
|
p = bf.NewParam{
|
2024-07-11 08:08:58 -07:00
|
|
|
HxPost: "/sources/add",
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2024-07-07 08:02:00 -07:00
|
|
|
templ Add(model models.AddSourcePayloadModel) {
|
2024-07-14 09:07:16 -07:00
|
|
|
@layout.WithTemplate(model.HeaderMetaTags) {
|
2024-07-13 10:38:54 -07:00
|
|
|
@bl.Hero("New Source", "")
|
|
|
|
@bulma.Block() {
|
|
|
|
At this time only direct RSS links are allowed to be provided.
|
|
|
|
}
|
|
|
|
@bf.New(p) {
|
|
|
|
@bf.TextInput("name", bf.InputTypeText, "Name of the site")
|
|
|
|
@bf.TextInput("url", bf.InputTypeText, "RSS URL")
|
|
|
|
@bf.Submit("Submit", bulma.ColorPrimary)
|
2024-07-09 08:33:15 -07:00
|
|
|
}
|
2024-07-07 08:02:00 -07:00
|
|
|
}
|
|
|
|
}
|