diff --git a/assets/css/output.css b/assets/css/output.css index 3459e24..6b2dcf4 100644 --- a/assets/css/output.css +++ b/assets/css/output.css @@ -1981,11 +1981,31 @@ body { height: 0.375rem; } +.before\:h-2::before { + content: var(--tw-content); + height: 0.5rem; +} + +.before\:h-2\.5::before { + content: var(--tw-content); + height: 0.625rem; +} + .before\:w-1\.5::before { content: var(--tw-content); width: 0.375rem; } +.before\:w-2::before { + content: var(--tw-content); + width: 0.5rem; +} + +.before\:w-2\.5::before { + content: var(--tw-content); + width: 0.625rem; +} + .before\:-translate-x-1\/2::before { content: var(--tw-content); --tw-translate-x: -50%; diff --git a/internals/ui/pages/themes.templ b/internals/ui/pages/themes.templ index e03dac6..d7dcbdf 100644 --- a/internals/ui/pages/themes.templ +++ b/internals/ui/pages/themes.templ @@ -63,103 +63,138 @@ templ ThemePreview() { } @components.CardContent() {
-
- + @components.FormItem(components.FormItemProps{}) { + @components.Label(components.LabelProps{For: "username", Text: "Username"}) @components.Input(components.InputProps{ ID: "username", Name: "username", Type: components.InputTypeText, Placeholder: "Enter your username", }) -
-
- + } + @components.FormItem(components.FormItemProps{}) { + @components.Label(components.LabelProps{For: "email", Text: "Email"}) @components.Input(components.InputProps{ ID: "email", Name: "email", Type: components.InputTypeEmail, Placeholder: "Enter your email", }) -
-
- + } + @components.FormItem(components.FormItemProps{}) { + @components.Label(components.LabelProps{For: "password", Text: "Password"}) @components.Input(components.InputProps{ ID: "password", Name: "password", Type: components.InputTypePassword, Placeholder: "Enter your password", }) -
-
- + } + @components.FormItem(components.FormItemProps{}) { + @components.Label(components.LabelProps{For: "birthdate", Text: "Birth Date"}) @components.Datepicker(components.DatepickerProps{ ID: "birthdate", Name: "birthdate", Placeholder: "Select your birth date", }) -
-
- - @components.Radio(components.RadioProps{ - Value: "email", - ID: "contact-email", - Name: "contact-method", - // Label: templ.Raw("Email"), - }) - @components.Radio(components.RadioProps{ - Value: "phone", - ID: "contact-phone", - Name: "contact-method", - // Label: templ.Raw("Phone"), - }) - @components.Radio(components.RadioProps{ - Value: "mail", - ID: "contact-mail", - Name: "contact-method", - // Label: templ.Raw("Physical Mail"), - Attributes: templ.Attributes{"disabled": "true"}, - }) -
-
- -
+ } + @components.FormItem(components.FormItemProps{}) { + @components.Label(components.LabelProps{For: "contact-method", Text: "Contact Method"}) + @components.FormItemFlex(components.FormItemProps{}) { + @components.Radio(components.RadioProps{ + Value: "email", + ID: "contact-email", + Name: "contact-method", + }) + @components.Label(components.LabelProps{ + For: "contact-email", + Text: "Email", + }) + } + @components.FormItemFlex(components.FormItemProps{}) { + @components.Radio(components.RadioProps{ + Value: "phone", + ID: "contact-phone", + Name: "contact-method", + }) + @components.Label(components.LabelProps{ + For: "contact-phone", + Text: "Phone", + }) + } + @components.FormItemFlex(components.FormItemProps{}) { + @components.Radio(components.RadioProps{ + Value: "mail", + ID: "contact-mail", + Name: "contact-method", + Attributes: templ.Attributes{"disabled": "true"}, + }) + @components.Label(components.LabelProps{ + For: "contact-mail", + Text: "Physical Mail", + }) + } + } + @components.FormItem(components.FormItemProps{}) { + @components.Label(components.LabelProps{Text: "Preferences"}) + @components.FormItemFlex(components.FormItemProps{}) { @components.Toggle(components.ToggleProps{ ID: "marketing", Name: "marketing", - // LabelRight: "Receive marketing emails", }) -
-
+ @components.Label(components.LabelProps{ + For: "marketing", + Text: "Receive marketing emails", + }) + } + @components.FormItemFlex(components.FormItemProps{}) { @components.Toggle(components.ToggleProps{ - ID: "notifications", - Name: "notifications", - // LabelRight: "Enable notifications", + ID: "notifications", + Name: "notifications", Attributes: templ.Attributes{"checked": "true"}, }) -
-
+ @components.Label(components.LabelProps{ + For: "notifications", + Text: "Enable notifications", + }) + } + @components.FormItemFlex(components.FormItemProps{}) { @components.Toggle(components.ToggleProps{ - ID: "beta", - Name: "beta", - // LabelRight: "Join beta program", + ID: "beta", + Name: "beta", Attributes: templ.Attributes{"disabled": "true"}, }) -
-
-
- @components.Checkbox(components.CheckboxProps{ - ID: "terms", - Name: "terms", - Value: "accepted", - }) -
-
- @components.Checkbox(components.CheckboxProps{ - ID: "newsletter", - Name: "newsletter", - Value: "subscribed", - }) -
+ @components.Label(components.LabelProps{ + For: "beta", + Text: "Join beta program", + }) + } + } + @components.FormItem(components.FormItemProps{}) { + @components.Label(components.LabelProps{Text: "Terms and Conditions"}) + @components.FormItemFlex(components.FormItemProps{}) { + @components.Checkbox(components.CheckboxProps{ + ID: "terms", + Name: "terms", + Value: "accepted", + }) + @components.Label(components.LabelProps{ + For: "terms", + Text: "I accept the terms and conditions", + }) + } + @components.FormItemFlex(components.FormItemProps{}) { + @components.Checkbox(components.CheckboxProps{ + ID: "newsletter", + Name: "newsletter", + Value: "subscribed", + }) + @components.Label(components.LabelProps{ + For: "newsletter", + Text: "Subscribe to newsletter", + }) + } + }
} @components.CardFooter() { diff --git a/internals/ui/showcase/input_form.templ b/internals/ui/showcase/input_form.templ index 62cff26..16b919e 100644 --- a/internals/ui/showcase/input_form.templ +++ b/internals/ui/showcase/input_form.templ @@ -15,7 +15,6 @@ templ InputForm() { Name: "email", Placeholder: "m@example.com", HasError: true, - Disabled: true, }) @components.FormDescription(components.FormDescriptionProps{}) { Enter your email address for notifications. diff --git a/pkg/styles/goilerplate.css b/pkg/styles/goilerplate.css index 284f988..0e0c9d1 100644 --- a/pkg/styles/goilerplate.css +++ b/pkg/styles/goilerplate.css @@ -1587,11 +1587,31 @@ body { height: 0.375rem; } +.before\:h-2::before { + content: var(--tw-content); + height: 0.5rem; +} + +.before\:h-2\.5::before { + content: var(--tw-content); + height: 0.625rem; +} + .before\:w-1\.5::before { content: var(--tw-content); width: 0.375rem; } +.before\:w-2::before { + content: var(--tw-content); + width: 0.5rem; +} + +.before\:w-2\.5::before { + content: var(--tw-content); + width: 0.625rem; +} + .before\:-translate-x-1\/2::before { content: var(--tw-content); --tw-translate-x: -50%;