From add89bcf2a62410a441f26d44d1893010539bcf8 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Wed, 24 Jul 2024 19:47:55 +0200 Subject: [PATCH] use bootstrap CSS classes for form elements --- layouts/partials/hx/button.html | 1 - layouts/shortcodes/hx/button.html | 7 +++---- layouts/shortcodes/hx/data-field-line.html | 4 +++- layouts/shortcodes/hx/data-form.html | 1 - layouts/shortcodes/hx/xplore.html | 5 +++-- sites/hx/content/auth/login.md | 5 +++-- 6 files changed, 12 insertions(+), 11 deletions(-) delete mode 100644 layouts/partials/hx/button.html diff --git a/layouts/partials/hx/button.html b/layouts/partials/hx/button.html deleted file mode 100644 index f28f116..0000000 --- a/layouts/partials/hx/button.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/layouts/shortcodes/hx/button.html b/layouts/shortcodes/hx/button.html index 5645864..0ce37bb 100644 --- a/layouts/shortcodes/hx/button.html +++ b/layouts/shortcodes/hx/button.html @@ -1,6 +1,5 @@ -{{- $type := .Get "type" | default "button" -}} +{{- $type := .Get "type" | default "submit" -}} {{- $name := .Get "name" | default "submit" -}} {{- $label := .Get "label" | default (title $name) -}} - -{{- $params := dict "type" $type "name" $name "label" $label -}} -{{ partial "hx/button" $params }} + diff --git a/layouts/shortcodes/hx/data-field-line.html b/layouts/shortcodes/hx/data-field-line.html index f341b2c..7b14be9 100644 --- a/layouts/shortcodes/hx/data-field-line.html +++ b/layouts/shortcodes/hx/data-field-line.html @@ -1,6 +1,8 @@ {{- $type := .Get "type" | default "text" -}} {{- $name := .Get "name" | default "textline" -}} +{{- $label := .Get "label" | default $name -}}
- {{- $label -}} +
diff --git a/layouts/shortcodes/hx/data-form.html b/layouts/shortcodes/hx/data-form.html index 30198ad..4739180 100644 --- a/layouts/shortcodes/hx/data-form.html +++ b/layouts/shortcodes/hx/data-form.html @@ -7,5 +7,4 @@
{{ .Inner }} -
diff --git a/layouts/shortcodes/hx/xplore.html b/layouts/shortcodes/hx/xplore.html index 5f7f90c..228deaf 100644 --- a/layouts/shortcodes/hx/xplore.html +++ b/layouts/shortcodes/hx/xplore.html @@ -1,9 +1,10 @@ -
- +
diff --git a/sites/hx/content/auth/login.md b/sites/hx/content/auth/login.md index 1369f5a..cfffc82 100644 --- a/sites/hx/content/auth/login.md +++ b/sites/hx/content/auth/login.md @@ -22,8 +22,9 @@ Please enter login data: {{< hx/data-form name="login" action="login" >}} - Login: {{< hx/data-field-line name="login" attrs="autofocus" >}} - Password: {{< hx/data-field-line type="password" name="password" >}} + {{< hx/data-field-line name="login" label="Login" attrs="autofocus" >}} + {{< hx/data-field-line type="password" name="password" label="Password" >}} + {{< hx/button label="Login" >}} {{< /hx/data-form >}}