diff --git a/theme/static/css/components.css b/theme/static/css/components.css index 42326ca..1d77a7d 100644 --- a/theme/static/css/components.css +++ b/theme/static/css/components.css @@ -77,4 +77,29 @@ .cart-navbar-floating { @apply absolute top-12 z-10 w-75 divide-y divide-gray-100 overflow-hidden overflow-y-auto rounded-lg bg-white antialiased shadow dark:divide-gray-600 dark:bg-gray-700 right-0 p-4; } + + .button-primary { + @apply w-full flex justify-center rounded-lg bg-primary-700 px-5 py-2.5 + text-sm font-medium text-white hover:bg-primary-800 focus:outline-none focus:ring-4 + focus:ring-primary-300 dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800 + content-center items-center cursor-pointer; + } + + .input-number { + @apply bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-600 + focus:border-primary-600 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 + dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500 mr-4; + } + + .input-text { + @apply dark:focus:ring-primary-500 text-gray-900 dark:text-white block border-gray-300 border w-full dark:border-gray-600 p-2.5 bg-gray-50 dark:focus:border-primary-500 focus:ring-primary-600 dark:bg-gray-700 focus:border-primary-600 dark:placeholder-gray-400 sm:text-sm rounded-lg my-2; + } + + .search-input { + @apply block w-full p-2 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500; + } + + .txt-2xl { + @apply text-2xl font-extrabold leading-tight text-gray-900 dark:text-white; + } } diff --git a/users/forms/login.py b/users/forms/login.py index d8ebbb7..200da6a 100644 --- a/users/forms/login.py +++ b/users/forms/login.py @@ -13,9 +13,7 @@ class LoginForm(StylingMixin, AuthenticationForm): widget=forms.EmailInput( attrs={ "autofocus": True, - "class": "my-2 bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-600 " - "focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600" - "dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500", + "class": "input-text", } ) ) @@ -25,10 +23,7 @@ class LoginForm(StylingMixin, AuthenticationForm): widget=forms.PasswordInput( attrs={ "autocomplete": "current-password", - "class": "my-2 bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg " - "focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 " - "dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 " - "dark:focus:border-primary-500", + "class": "input-text", } ), ) @@ -37,8 +32,7 @@ class LoginForm(StylingMixin, AuthenticationForm): required=False, widget=forms.CheckboxInput( attrs={ - "class": "my-2 border border-gray-300 rounded bg-gray-50 focus:ring-3 focus:ring-primary-300 " - "dark:bg-gray-700 dark:border-gray-600 dark:focus:ring-primary-600 dark:ring-offset-gray-800" + "class": "input-text" } ), ) diff --git a/web/mixins.py b/web/mixins.py index 987f1c6..16dbe5f 100644 --- a/web/mixins.py +++ b/web/mixins.py @@ -31,23 +31,7 @@ class StylingMixin: placeholder_for_field = {} styled_fields = [] classes = { - "my-2", - "bg-gray-50", - "border", - "border-gray-300", - "text-gray-900", - "sm:text-sm rounded-lg", - "focus:ring-primary-600", - "focus:border-primary-600", - "block", - "w-full", - "p-2.5", - "dark:bg-gray-700", - "dark:border-gray-600", - "dark:placeholder-gray-400", - "dark:text-white", - "dark:focus:ring-primary-500", - "dark:focus:border-primary-500", + "input-text", } def __init__(self, *args, **kwargs): diff --git a/web/templates/components/cart/add_to_cart.html b/web/templates/components/cart/add_to_cart.html index f2bf4fb..67c5290 100644 --- a/web/templates/components/cart/add_to_cart.html +++ b/web/templates/components/cart/add_to_cart.html @@ -4,14 +4,9 @@
- -
diff --git a/web/templates/components/users/retrieve_update_address.html b/web/templates/components/users/retrieve_update_address.html index bf94d41..a33e9fd 100644 --- a/web/templates/components/users/retrieve_update_address.html +++ b/web/templates/components/users/retrieve_update_address.html @@ -18,10 +18,7 @@
-
@@ -32,10 +29,7 @@
-
@@ -46,10 +40,7 @@
-
@@ -60,10 +51,7 @@
-
@@ -76,10 +64,7 @@
-
@@ -90,10 +75,7 @@
-
diff --git a/web/views/components.py b/web/views/components.py index 27b334f..d508935 100644 --- a/web/views/components.py +++ b/web/views/components.py @@ -65,6 +65,8 @@ class ListWishlistedProducts( page = self.get_paginated_queryset(qs) return { + "current_page": page.number, + "num_pages": page.paginator.num_pages, "page": page, "has_next_page": page.has_next(), "has_previous_page": page.has_previous(),