diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..8bb5009 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "templ-bulma"] + path = templ-bulma + url = https://github.com/jtom38/templ-bulma diff --git a/Justfile b/Justfile index f5234ab..fff8d8b 100644 --- a/Justfile +++ b/Justfile @@ -7,4 +7,8 @@ gen: build: templ generate go build cmd/server.go - ls -lh server \ No newline at end of file + ls -lh server + +update-submodule: + git submodule update --remote + templ generate \ No newline at end of file diff --git a/components/bulma/block.templ b/components/bulma/block.templ deleted file mode 100644 index 57d129b..0000000 --- a/components/bulma/block.templ +++ /dev/null @@ -1,8 +0,0 @@ -package bulma - -// Simple spacer that accepts children -templ Block() { -
- { children... } -
-} \ No newline at end of file diff --git a/components/bulma/button.templ b/components/bulma/button.templ deleted file mode 100644 index 5385978..0000000 --- a/components/bulma/button.templ +++ /dev/null @@ -1,30 +0,0 @@ -package bulma - -// This creates a button that accepts children under it. -templ Button() { - -} - -// Used to create a button and lets you define the color. -// Accepts children. -templ ButtonColor(color string) { - -} - -templ ButtonNewTab(url, text string) { - -} - -templ ALink(url, title string) { - { title } -} - -templ ANewTab(url, text string) { - { text } -} diff --git a/components/bulma/card.templ b/components/bulma/card.templ deleted file mode 100644 index 402b1dd..0000000 --- a/components/bulma/card.templ +++ /dev/null @@ -1,52 +0,0 @@ -package bulma - -templ ArticleCardWithThumbnail(title, thumbnailUrl, url, datePosted, sourceName string) { -
-
-
- -
-
-
-
-
- { title } -
-
-
- { datePosted } -
- { sourceName } -
-
-
-} - -// Creates a card container. -// Accepts children -templ Card() { -
- { children... } -
-} - -// Creates a image card container. -// Accepts children -templ CardImage() { -
- { children... } -
-} - -// -templ CardImageSize(size string) { -
- { children... } -
-} - -templ CardContentContainer() { -
- { children... } -
-} diff --git a/components/bulma/example/example.templ b/components/bulma/example/example.templ deleted file mode 100644 index 8940fe2..0000000 --- a/components/bulma/example/example.templ +++ /dev/null @@ -1,19 +0,0 @@ -package example - -import "git.jamestombleson.com/jtom38/newsbot-portal/components/bulma" -import "git.jamestombleson.com/jtom38/newsbot-portal/components/bulma/html" -import "git.jamestombleson.com/jtom38/newsbot-portal/components/bulma/layout" - -templ example() { - @html.Doctype() - @html.New("en"){ - @html.NewHeader(){ - @bulma.UseBulmaCdn() - } - @html.NewBody() { - @layout.Container(bulma.BreakpointDefault) { - { children... } - } - } - } -} \ No newline at end of file diff --git a/components/bulma/form/control.templ b/components/bulma/form/control.templ deleted file mode 100644 index d5183b2..0000000 --- a/components/bulma/form/control.templ +++ /dev/null @@ -1,8 +0,0 @@ -package form - -// Div container to add a input field to. -templ Control() { -
- { children... } -
-} \ No newline at end of file diff --git a/components/bulma/form/field.templ b/components/bulma/form/field.templ deleted file mode 100644 index ad7b0c3..0000000 --- a/components/bulma/form/field.templ +++ /dev/null @@ -1,8 +0,0 @@ -package form - -// This creates a field that you can add a Label, Control or Input object. -templ Field() { -
- { children... } -
-} \ No newline at end of file diff --git a/components/bulma/form/input.templ b/components/bulma/form/input.templ deleted file mode 100644 index 12a45bc..0000000 --- a/components/bulma/form/input.templ +++ /dev/null @@ -1,19 +0,0 @@ -package form - -templ TextInput(id, fieldType, placeholder string) { - -} - -templ TextInputColor(color, id, fieldType, placeholder string) { - if color == "" { - - } else { - - } -} - -templ Checkbox(text, id string) { - -} diff --git a/components/bulma/form/label.templ b/components/bulma/form/label.templ deleted file mode 100644 index 66deea3..0000000 --- a/components/bulma/form/label.templ +++ /dev/null @@ -1,6 +0,0 @@ -package form - -// This will create a small bit of text to add context to the form. -templ Label(text string) { - -} \ No newline at end of file diff --git a/components/bulma/form/new.templ b/components/bulma/form/new.templ deleted file mode 100644 index 8f5029e..0000000 --- a/components/bulma/form/new.templ +++ /dev/null @@ -1,13 +0,0 @@ -package form - -type NewParam struct { - HxPost string -} - -templ New(param NewParam) { - if param.HxPost != "" { -
- { children... } -
- } -} diff --git a/components/bulma/form/select.templ b/components/bulma/form/select.templ deleted file mode 100644 index 8adffdc..0000000 --- a/components/bulma/form/select.templ +++ /dev/null @@ -1,33 +0,0 @@ -package form - -templ SelectOne(color string, isRound bool) { - if isRound { -
- -
- } else { -
- -
- } -} - -templ SelectOneItem(name string) { - -} - -templ SelectMany(howManySelectable int, color string, isRound bool) { -
- -
-} - -templ SelectManyItem(name string) { - -} diff --git a/components/bulma/form/submit.templ b/components/bulma/form/submit.templ deleted file mode 100644 index e12ada7..0000000 --- a/components/bulma/form/submit.templ +++ /dev/null @@ -1,5 +0,0 @@ -package form - -templ Submit(text, color string) { - -} \ No newline at end of file diff --git a/components/bulma/form/textarea.templ b/components/bulma/form/textarea.templ deleted file mode 100644 index d922742..0000000 --- a/components/bulma/form/textarea.templ +++ /dev/null @@ -1,5 +0,0 @@ -package form - -templ TextArea(id, placeholder, color string) { -