From d2a3a9a8dae13ddb2af7ab247b7e0e49fe880019 Mon Sep 17 00:00:00 2001 From: slawkens Date: Thu, 25 Jan 2024 21:57:20 +0100 Subject: [PATCH] System-solution for styled tables, that works with every template --- system/templates/tables.style.html.twig | 6 ++++++ system/templates/templates.header.html.twig | 3 +++ templates/kathrine/style.css | 5 ----- templates/tibiacom/basic.css | 5 ----- 4 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 system/templates/tables.style.html.twig diff --git a/system/templates/tables.style.html.twig b/system/templates/tables.style.html.twig new file mode 100644 index 00000000..479db426 --- /dev/null +++ b/system/templates/tables.style.html.twig @@ -0,0 +1,6 @@ + diff --git a/system/templates/templates.header.html.twig b/system/templates/templates.header.html.twig index cded84de..69303dfa 100644 --- a/system/templates/templates.header.html.twig +++ b/system/templates/templates.header.html.twig @@ -18,3 +18,6 @@ Please turn it on, or be aware that some features on this website will not work correctly. +{% if constant('MYAAC_ADMIN') is not defined %} + {{ include('tables.style.html.twig') }} +{% endif %} diff --git a/templates/kathrine/style.css b/templates/kathrine/style.css index 584f6d36..a021b1d9 100644 --- a/templates/kathrine/style.css +++ b/templates/kathrine/style.css @@ -11,11 +11,6 @@ body color: #373737; } -.myaac-table tbody tr:nth-child(even) {background: #e5e3d7} /* light border */ -.myaac-table tbody tr:nth-child(odd) {background: #d0cdb4} /* dark border */ -.myaac-table thead td {background: #afab89; color: #ffffff !important;} /* vdark border */ -.myaac-table tfoot td {background: #afab89; color: #ffffff !important;} /* vdark border */ - #page { width: 780px; diff --git a/templates/tibiacom/basic.css b/templates/tibiacom/basic.css index fc43b736..3d260a97 100644 --- a/templates/tibiacom/basic.css +++ b/templates/tibiacom/basic.css @@ -11,11 +11,6 @@ img { border: none; } -.myaac-table tbody tr:nth-child(even) {background: #F1E0C6} /* light border */ -.myaac-table tbody tr:nth-child(odd) {background: #D4C0A1} /* dark border */ -.myaac-table thead td {background: #505050; color: #ffffff !important;} /* vdark border */ -.myaac-table tfoot td {background: #505050; color: #ffffff !important;} /* vdark border */ - #ArtworkHelper { text-align: center; background-position: top center;