diff --git a/internal/views/sources/add.templ b/internal/views/sources/add.templ index a61a503..bdd3cda 100644 --- a/internal/views/sources/add.templ +++ b/internal/views/sources/add.templ @@ -1,10 +1,19 @@ package sources -import "git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout" -import "git.jamestombleson.com/jtom38/newsbot-portal/internal/models" +import ( + "git.jamestombleson.com/jtom38/newsbot-portal/internal/models" + "git.jamestombleson.com/jtom38/newsbot-portal/internal/views/bulma" + "git.jamestombleson.com/jtom38/newsbot-portal/internal/views/bulma/form" + "git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout" +) templ Add(model models.AddSourcePayloadModel) { @layout.WithTemplate() { -
+At this time only direct RSS links are allowed to be provided
+ @form.New("/sources/add") { + @form.Input("", "url", "text") + @form.Submit("Submit", bulma.ColorPrimary) + } } } diff --git a/internal/views/sources/listAll.templ b/internal/views/sources/listAll.templ index f1872a5..6f2379b 100644 --- a/internal/views/sources/listAll.templ +++ b/internal/views/sources/listAll.templ @@ -1,12 +1,17 @@ package sources -import "git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout" -import "git.jamestombleson.com/jtom38/newsbot-portal/internal/models" +import ( + "git.jamestombleson.com/jtom38/newsbot-portal/internal/models" + "git.jamestombleson.com/jtom38/newsbot-portal/internal/views/bulma" + "git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout" +) templ ListAll(model models.ListAllSourcesViewModel) { @layout.WithTemplate() { for _, item := range model.Items { - { item.DisplayName } - { item.Source } + @bulma.Button(bulma.ColorPrimary, false, false) { + @bulma.ANewTab(item.Url, item.DisplayName) + }