]> git.agnieray.net Git - galette.git/commitdiff
Gaptcha input style
authorGuillaume AGNIERAY <dev@agnieray.net>
Mon, 6 Feb 2023 15:58:29 +0000 (16:58 +0100)
committerJohan Cwiklinski <johan@x-tnd.be>
Fri, 10 Feb 2023 17:21:06 +0000 (18:21 +0100)
galette/templates/default/components/forms/captcha.html.twig
ui/semantic/galette/collections/form.overrides [new file with mode: 0644]
ui/semantic/galette/collections/form.variables [new file with mode: 0644]
ui/semantic/theme.config

index f7745a9c5744dfce2192a5edc890c040e82dbb16..98402ea83e5f4060ac56f4be2fbe957775c7914c 100644 (file)
@@ -8,12 +8,13 @@
     {% set value = null %}
     {% set example = _T("(numbers only)") %}
     {% set tip = _T("This field is required trying to avoid registration spam. We are sorry for the inconvennience.") %}
-    {% set component_class = "field required" %}
+    {% set component_class = "field" %}
+    {% set elt_class = "required" %}
     {{ parent() }}
 {% endblock %}
 
 {% block label %}
     {% set label = _T("Captcha") %}
     {{ parent() }}
-    {{ gaptcha.generateQuestion() }}
+    <p><span class="ui medium red text">{{ gaptcha.generateQuestion() }}</span></p>
 {% endblock %}
diff --git a/ui/semantic/galette/collections/form.overrides b/ui/semantic/galette/collections/form.overrides
new file mode 100644 (file)
index 0000000..25345fe
--- /dev/null
@@ -0,0 +1,32 @@
+/*******************************
+         Galette Overrides
+*******************************/
+
+
+/*--------------------
+    Gaptcha Input
+---------------------*/
+
+.ui.form input[type="gaptcha"] {
+  width: 100px;
+  vertical-align: top;
+}
+
+.ui.form input[type="gaptcha"] {
+  font-family: @inputFont;
+  margin: 0;
+  outline: none;
+  -webkit-appearance: none;
+  -webkit-tap-highlight-color:  rgba(255, 255, 255, 0);
+
+  line-height: @inputLineHeight;
+  padding: @inputPadding;
+  font-size: @inputFontSize;
+
+  background: @inputBackground;
+  border: @inputBorder;
+  color: @inputColor;
+  border-radius: @inputBorderRadius;
+  box-shadow: @inputBoxShadow;
+  transition: @inputTransition;
+}
diff --git a/ui/semantic/galette/collections/form.variables b/ui/semantic/galette/collections/form.variables
new file mode 100644 (file)
index 0000000..3938db6
--- /dev/null
@@ -0,0 +1,3 @@
+/*******************************
+    Galette Overrides
+*******************************/
index 32abfcd5ac38f4dda7dbd8de848f15a634e34913..7bcd1c11cbf06e7da38e615bcc0948a09c5b6267 100644 (file)
@@ -43,7 +43,7 @@
 
 /* Collections */
 @breadcrumb : 'default';
-@form       : 'default';
+@form       : 'galette';
 @grid       : 'galette';
 @menu       : 'galette';
 @message    : 'galette';