From 9eb97d892fa3293c27641eb82e15f31a6d94d0ed Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Sat, 13 Jul 2024 10:38:02 -0700 Subject: [PATCH] minor changes and starting to add examples of how to use it --- components/bulma/block.templ | 8 ++++++++ components/bulma/example/example.templ | 19 +++++++++++++++++++ components/bulma/example/layout.templ | 1 + components/bulma/util.go | 6 ++++++ 4 files changed, 34 insertions(+) create mode 100644 components/bulma/block.templ create mode 100644 components/bulma/example/example.templ create mode 100644 components/bulma/example/layout.templ diff --git a/components/bulma/block.templ b/components/bulma/block.templ new file mode 100644 index 0000000..57d129b --- /dev/null +++ b/components/bulma/block.templ @@ -0,0 +1,8 @@ +package bulma + +// Simple spacer that accepts children +templ Block() { +
+ { children... } +
+} \ No newline at end of file diff --git a/components/bulma/example/example.templ b/components/bulma/example/example.templ new file mode 100644 index 0000000..8940fe2 --- /dev/null +++ b/components/bulma/example/example.templ @@ -0,0 +1,19 @@ +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/example/layout.templ b/components/bulma/example/layout.templ new file mode 100644 index 0000000..f7ec372 --- /dev/null +++ b/components/bulma/example/layout.templ @@ -0,0 +1 @@ +package example diff --git a/components/bulma/util.go b/components/bulma/util.go index 319fbca..1617019 100644 --- a/components/bulma/util.go +++ b/components/bulma/util.go @@ -11,4 +11,10 @@ const ( SizeNormal = "is-normal" SizeMedium = "is-medium" SizeLarge = "is-large" + + BreakpointDefault = "" + BreakpointWidescreen = "is-widescreen" + BreakpointFullHd = "is-fullhd" + BreakpointMaxDesktop = "is-max-desktop" + BreakpointMaxWidescreen = "is-max-widescreen" )