diff --git a/backend/templates/cotton/ui/button.html b/backend/templates/cotton/ui/button.html index bc9ad39b..c3ff7229 100644 --- a/backend/templates/cotton/ui/button.html +++ b/backend/templates/cotton/ui/button.html @@ -13,8 +13,8 @@ Converts existing button component to use Django Cotton's component system type="type|default:'button'" disabled="disabled|default:''" onclick="onclick|default:''" - x_data="x_data|default:''" - x_on="x_on|default:''" + x_data="x_data" + x_on="x_on" hx_get="hx_get|default:''" hx_post="hx_post|default:''" hx_target="hx_target|default:''" @@ -60,7 +60,7 @@ Converts existing button component to use Django Cotton's component system {% if hx_post %}hx-post="{{ hx_post }}"{% endif %} {% if hx_target %}hx-target="{{ hx_target }}"{% endif %} {% if hx_swap %}hx-swap="{{ hx_swap }}"{% endif %} - {% if x_data and x_data != '' %}x-data="{{ x_data }}"{% endif %} + {% if x_data and x_data != 'x_data' %}x-data="{{ x_data }}"{% endif %} {% if x_on %}{{ x_on }}{% endif %} {% if disabled and disabled != '' %}disabled{% endif %} {{ attrs }} diff --git a/backend/templates/cotton/ui/input.html b/backend/templates/cotton/ui/input.html index 5a1e185d..b308839e 100644 --- a/backend/templates/cotton/ui/input.html +++ b/backend/templates/cotton/ui/input.html @@ -14,9 +14,9 @@ Converts existing input component to use Django Cotton's component system disabled="disabled|default:''" required="required|default:''" readonly="readonly|default:''" - x_model="x_model|default:''" - x_data="x_data|default:''" - x_on="x_on|default:''" + x_model="x_model" + x_data="x_data" + x_on="x_on" hx_get="hx_get|default:''" hx_post="hx_post|default:''" hx_target="hx_target|default:''" @@ -41,7 +41,7 @@ Converts existing input component to use Django Cotton's component system {% if required %}required{% endif %} {% if readonly %}readonly{% endif %} {% if x_model %}x-model="{{ x_model }}"{% endif %} - {% if x_data %}x-data="{{ x_data }}"{% endif %} + {% if x_data and x_data != 'x_data' %}x-data="{{ x_data }}"{% endif %} {% if x_on %}{{ x_on }}{% endif %} {% if hx_get %}hx-get="{{ hx_get }}"{% endif %} {% if hx_post %}hx-post="{{ hx_post }}"{% endif %} diff --git a/backend/templates/pages/cotton_minimal_test.html b/backend/templates/pages/cotton_minimal_test.html new file mode 100644 index 00000000..fcc30651 --- /dev/null +++ b/backend/templates/pages/cotton_minimal_test.html @@ -0,0 +1,21 @@ +{% extends 'base/base.html' %} +{% load cotton %} + +{% block title %}Minimal Cotton Test - ThrillWiki{% endblock %} + +{% block content %} +
If you see buttons above, Cotton components are working correctly!
++ Basic test of Cotton components +
+Card content goes here.
++ If you can see this page without errors, basic Cotton components are working. +
++ Testing all 9 Phase 1 Cotton Components +
++ This is the main content area of the card component. +
++ Testing nested components within cards. +
++ Value: +
++ Testing pagination with mock page object data: +
+ + ++ Showing 11 to 20 of 100 results +
+Components Tested
+JavaScript Status
+Responsive Design
+