diff --git a/internal/views/bulma/button.templ b/components/bulma/button.templ similarity index 55% rename from internal/views/bulma/button.templ rename to components/bulma/button.templ index 865a605..5385978 100644 --- a/internal/views/bulma/button.templ +++ b/components/bulma/button.templ @@ -1,21 +1,18 @@ package bulma -templ Button(color string, isLight, isDark bool) { - if isLight { - - } - if isDark { - - } - if !isLight && !isDark { - +} + +// Used to create a button and lets you define the color. +// Accepts children. +templ ButtonColor(color string) { + - } } templ ButtonNewTab(url, text string) { @@ -24,7 +21,6 @@ templ ButtonNewTab(url, text string) { } - templ ALink(url, title string) { { title } } diff --git a/internal/views/bulma/card.templ b/components/bulma/card.templ similarity index 100% rename from internal/views/bulma/card.templ rename to components/bulma/card.templ diff --git a/internal/views/bulma/form/control.templ b/components/bulma/form/control.templ similarity index 100% rename from internal/views/bulma/form/control.templ rename to components/bulma/form/control.templ diff --git a/internal/views/bulma/form/field.templ b/components/bulma/form/field.templ similarity index 100% rename from internal/views/bulma/form/field.templ rename to components/bulma/form/field.templ diff --git a/components/bulma/form/input.templ b/components/bulma/form/input.templ new file mode 100644 index 0000000..d793c66 --- /dev/null +++ b/components/bulma/form/input.templ @@ -0,0 +1,15 @@ +package form + +templ TextInput(color, id, fieldType, placeholder string) { + if color == "" { + + } else { + + } +} + +templ Checkbox(text, id string) { + +} diff --git a/internal/views/bulma/form/label.templ b/components/bulma/form/label.templ similarity index 100% rename from internal/views/bulma/form/label.templ rename to components/bulma/form/label.templ diff --git a/components/bulma/form/new.templ b/components/bulma/form/new.templ new file mode 100644 index 0000000..8f5029e --- /dev/null +++ b/components/bulma/form/new.templ @@ -0,0 +1,13 @@ +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 new file mode 100644 index 0000000..8adffdc --- /dev/null +++ b/components/bulma/form/select.templ @@ -0,0 +1,33 @@ +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/internal/views/bulma/form/submit.templ b/components/bulma/form/submit.templ similarity index 100% rename from internal/views/bulma/form/submit.templ rename to components/bulma/form/submit.templ diff --git a/components/bulma/form/textarea.templ b/components/bulma/form/textarea.templ new file mode 100644 index 0000000..d922742 --- /dev/null +++ b/components/bulma/form/textarea.templ @@ -0,0 +1,5 @@ +package form + +templ TextArea(id, placeholder, color string) { +