Updated views to use the new git package
This commit is contained in:
parent
32d1869e9b
commit
6121cbce4d
@ -1,7 +1,7 @@
|
|||||||
package articles
|
package articles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/components/bulma"
|
"git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma"
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
|
||||||
)
|
)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package articles
|
package articles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/components/bulma"
|
"git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma"
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
|
||||||
)
|
)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package home
|
package home
|
||||||
|
|
||||||
import "git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
|
import "git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
|
||||||
import "git.jamestombleson.com/jtom38/newsbot-portal/components/bulma"
|
|
||||||
import "git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
import "git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
||||||
|
import "git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma"
|
||||||
|
|
||||||
templ About(vm models.HomeAboutViewModel) {
|
templ About(vm models.HomeAboutViewModel) {
|
||||||
@layout.WithTemplate(vm.HeaderMetaTags){
|
@layout.WithTemplate(vm.HeaderMetaTags){
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package home
|
package home
|
||||||
|
|
||||||
import (
|
import (
|
||||||
b "git.jamestombleson.com/jtom38/newsbot-portal/components/bulma"
|
b "git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma"
|
||||||
bl "git.jamestombleson.com/jtom38/newsbot-portal/components/bulma/layout"
|
bl "git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma/layout"
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
|
||||||
)
|
)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package layout
|
package layout
|
||||||
|
|
||||||
import "git.jamestombleson.com/jtom38/newsbot-portal/components/bulma"
|
import "git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma"
|
||||||
import "git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
import "git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
||||||
|
|
||||||
templ header(meta models.HeaderMetaTags) {
|
templ header(meta models.HeaderMetaTags) {
|
||||||
|
@ -1,24 +1,25 @@
|
|||||||
package layout
|
package layout
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/components/bulma"
|
"git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma"
|
||||||
bl "git.jamestombleson.com/jtom38/newsbot-portal/components/bulma/layout"
|
bl "git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma/layout"
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
||||||
|
"git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma/html"
|
||||||
)
|
)
|
||||||
|
|
||||||
templ WithTemplate(meta models.HeaderMetaTags) {
|
templ WithTemplate(meta models.HeaderMetaTags) {
|
||||||
<!DOCTYPE html>
|
@html.Doctype()
|
||||||
<html lang="en">
|
@html.New("en") {
|
||||||
<head>
|
@html.NewHeader() {
|
||||||
@header(meta)
|
@header(meta)
|
||||||
</head>
|
}
|
||||||
<body>
|
@html.NewBody(){
|
||||||
@navBar()
|
@navBar()
|
||||||
<br/>
|
@html.Br()
|
||||||
@bl.Container(bulma.BreakpointDefault) {
|
@bl.Container(bulma.BreakpointDefault) {
|
||||||
{ children... }
|
{ children... }
|
||||||
@footer()
|
|
||||||
}
|
}
|
||||||
</body>
|
@footer()
|
||||||
</html>
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package sources
|
package sources
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/components/bulma"
|
"git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma"
|
||||||
bf "git.jamestombleson.com/jtom38/newsbot-portal/components/bulma/form"
|
bf "git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma/form"
|
||||||
bl "git.jamestombleson.com/jtom38/newsbot-portal/components/bulma/layout"
|
bl "git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma/layout"
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
|
||||||
)
|
)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package sources
|
package sources
|
||||||
|
|
||||||
import "git.jamestombleson.com/jtom38/newsbot-portal/components/bulma"
|
import "git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma"
|
||||||
|
|
||||||
templ AddAfter(message string, isError bool) {
|
templ AddAfter(message string, isError bool) {
|
||||||
if isError {
|
if isError {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package sources
|
package sources
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/components/bulma"
|
"git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma"
|
||||||
bh "git.jamestombleson.com/jtom38/newsbot-portal/components/bulma/html"
|
bh "git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma/html"
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
|
||||||
)
|
)
|
||||||
@ -12,13 +12,23 @@ templ ListAll(model models.ListAllSourcesViewModel) {
|
|||||||
@bulma.Button() {
|
@bulma.Button() {
|
||||||
@bh.ALink("/sources/add", "New Source")
|
@bh.ALink("/sources/add", "New Source")
|
||||||
}
|
}
|
||||||
@bh.Br()
|
@bulma.Table() {
|
||||||
@bh.Br()
|
@bulma.TableHeader() {
|
||||||
for _, item := range model.Items {
|
@bulma.TableHeaderData("Name")
|
||||||
@bulma.ButtonColor(bulma.ColorPrimary) {
|
@bulma.TableHeaderData("Source")
|
||||||
@bulma.ANewTab(item.Url, item.DisplayName)
|
@bulma.TableHeaderData("Visit")
|
||||||
|
}
|
||||||
|
for _, item := range model.Items {
|
||||||
|
@bulma.TableRow() {
|
||||||
|
@bulma.TableData(item.DisplayName)
|
||||||
|
@bulma.TableData(item.Source)
|
||||||
|
@bulma.TableDataChildren() {
|
||||||
|
@bulma.Button() {
|
||||||
|
@bulma.ANewTab(item.Url, item.DisplayName)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
<br/>
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package users
|
package users
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/components/bulma"
|
"git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma"
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package users
|
package users
|
||||||
|
|
||||||
import "git.jamestombleson.com/jtom38/newsbot-portal/components/bulma"
|
import "git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma"
|
||||||
|
|
||||||
// This is returned after the user creates an account.
|
// This is returned after the user creates an account.
|
||||||
// It just returns a partial view because it will overlap with the existing template.
|
// It just returns a partial view because it will overlap with the existing template.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package users
|
package users
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/components/bulma/form"
|
"git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma/form"
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
||||||
)
|
)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package users
|
package users
|
||||||
|
|
||||||
import (
|
import (
|
||||||
bl "git.jamestombleson.com/jtom38/newsbot-portal/components/bulma/layout"
|
bl "git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma/layout"
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
|
||||||
)
|
)
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package users
|
package users
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/components/bulma"
|
"git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma"
|
||||||
bh "git.jamestombleson.com/jtom38/newsbot-portal/components/bulma/html"
|
bh "git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma/html"
|
||||||
bl "git.jamestombleson.com/jtom38/newsbot-portal/components/bulma/layout"
|
bl "git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma/layout"
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
|
||||||
)
|
)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package users
|
package users
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/components/bulma/form"
|
"git.jamestombleson.com/jtom38/newsbot-portal/templ-bulma/form"
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/models"
|
||||||
"git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/views/layout"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user