From c15eaca205e812d22ea0d179fd7aaa10d6b22e65 Mon Sep 17 00:00:00 2001 From: Lukas Kucharczyk Date: Fri, 9 Aug 2024 12:42:54 +0200 Subject: [PATCH] only overflow table, not paginator, improve styling --- games/static/base.css | 39 ++++++++++++++++++++ games/templates/components/simple_table.html | 37 ++++++++++--------- games/templates/list_purchases.html | 2 +- 3 files changed, 59 insertions(+), 19 deletions(-) diff --git a/games/static/base.css b/games/static/base.css index 94ad2d7..a4d9b46 100644 --- a/games/static/base.css +++ b/games/static/base.css @@ -1829,6 +1829,16 @@ input:checked + .toggle-bg { background-color: rgb(255 255 255 / 0.5); } +.bg-gray-300 { + --tw-bg-opacity: 1; + background-color: rgb(209 213 219 / var(--tw-bg-opacity)); +} + +.bg-gray-400 { + --tw-bg-opacity: 1; + background-color: rgb(156 163 175 / var(--tw-bg-opacity)); +} + .p-1 { padding: 0.25rem; } @@ -2067,6 +2077,16 @@ input:checked + .toggle-bg { color: rgb(250 202 21 / var(--tw-text-opacity)); } +.text-gray-300 { + --tw-text-opacity: 1; + color: rgb(209 213 219 / var(--tw-text-opacity)); +} + +.text-gray-100 { + --tw-text-opacity: 1; + color: rgb(243 244 246 / var(--tw-text-opacity)); +} + .underline { text-decoration-line: underline; } @@ -2761,6 +2781,11 @@ textarea:disabled:is(.dark *) { color: rgb(255 255 255 / var(--tw-text-opacity)); } +.dark\:text-gray-200:is(.dark *) { + --tw-text-opacity: 1; + color: rgb(229 231 235 / var(--tw-text-opacity)); +} + .odd\:dark\:bg-gray-900:is(.dark *):nth-child(odd) { --tw-bg-opacity: 1; background-color: rgb(17 24 39 / var(--tw-bg-opacity)); @@ -2863,6 +2888,10 @@ textarea:disabled:is(.dark *) { max-width: 36rem; } + .sm\:max-w-screen-sm { + max-width: 640px; + } + .sm\:rounded-lg { border-radius: 0.5rem; } @@ -2910,6 +2939,10 @@ textarea:disabled:is(.dark *) { width: auto; } + .md\:max-w-screen-md { + max-width: 768px; + } + .md\:flex-row { flex-direction: row; } @@ -2939,6 +2972,12 @@ textarea:disabled:is(.dark *) { } } +@media (min-width: 1536px) { + .\32xl\:max-w-screen-2xl { + max-width: 1536px; + } +} + .rtl\:rotate-180:where([dir="rtl"], [dir="rtl"] *) { --tw-rotate: 180deg; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); diff --git a/games/templates/components/simple_table.html b/games/templates/components/simple_table.html index e3379cf..033e890 100644 --- a/games/templates/components/simple_table.html +++ b/games/templates/components/simple_table.html @@ -1,19 +1,20 @@ -
- - - - {% for column in columns %}{% endfor %} - - - - {% for row in rows %} - {% table_row data=row %} - {% endfor %} - -
{{ column }}
+
+
+ + + + {% for column in columns %}{% endfor %} + + + + {% for row in rows %} + {% table_row data=row %} + {% endfor %} + +
{{ column }}
+
{% if page_obj %} -