https://github.com/CE-PhoenixCart/Phoen ... 85b34dc2c6
Admin Dark & Light Mode - Cosmetic Fixes
- burt
- Core Team
- Posts: 4916
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy A Coffee
- Has thanked: 296 times
- Been thanked: 493 times
- burt
- Core Team
- Posts: 4916
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy A Coffee
- Has thanked: 296 times
- Been thanked: 493 times
Re: Admin Dark & Light Mode - Cosmetic Fixes
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
- burt
- Core Team
- Posts: 4916
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy A Coffee
- Has thanked: 296 times
- Been thanked: 493 times
Re: Admin Dark & Light Mode - Cosmetic Fixes
https://github.com/CE-PhoenixCart/Phoen ... f606a3433e
Note that this is a "bit bigger" than a simple Dark/Light fix.
I plugged this page into the TableLayout class to make the output the exact same whether looking at orders - invoice - packingslip.
- burt
- Core Team
- Posts: 4916
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy A Coffee
- Has thanked: 296 times
- Been thanked: 493 times
Re: Admin Dark & Light Mode - Cosmetic Fixes
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
- burt
- Core Team
- Posts: 4916
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy A Coffee
- Has thanked: 296 times
- Been thanked: 493 times
Re: Admin Dark & Light Mode - Cosmetic Fixes
If anyone wants to help test, here is the download link that includes all the fixes made so far;
https://github.com/CE-PhoenixCart/Phoen ... .1.0.9.zip
Basically point out anything that looks wrong in Dark Mode.
https://github.com/CE-PhoenixCart/Phoen ... .1.0.9.zip
Basically point out anything that looks wrong in Dark Mode.
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
Fiber
- 100+
- Posts: 181
- Joined: Mon Oct 26, 2020 12:16 pm
- Phoenix Version: v1.1.0.8
- Has thanked: 19 times
- Been thanked: 28 times
Re: Admin Dark & Light Mode - Cosmetic Fixes
Done testing, and with the code in the language file nothing is changed, but whit thisburt wrote: ↑Sat Nov 07, 2026 12:08 pm If anyone wants to help test, here is the download link that includes all the fixes made so far;
https://github.com/CE-PhoenixCart/Phoen ... .1.0.9.zip
Basically point out anything that looks wrong in Dark Mode.
Code: Select all
const HTML_PARAMS = 'dir="ltr" lang="nl" data-bs-theme="' . BOOTSTRAP_THEME . '"';and I found this which looked strange with urls in admin: admin/products_attributes.php
and admin/catalog.php?cPath=1_3&pID=3&action=new_product
(insert image) attached in the css:
Code: Select all
/* Neutral input and edit rows on Item attributes in dark mode */
[data-bs-theme="dark"] #accordionAttributes .table-success,
[data-bs-theme="dark"] #accordionAttributes .table-info {
--bs-table-color: var(--bs-body-color);
--bs-table-bg: var(--bs-tertiary-bg);
--bs-table-border-color: var(--bs-border-color);
--bs-table-striped-color: var(--bs-body-color);
--bs-table-striped-bg: var(--bs-tertiary-bg);
--bs-table-hover-color: var(--bs-body-color);
--bs-table-hover-bg: var(--bs-secondary-bg);
--bs-table-active-color: var(--bs-body-color);
--bs-table-active-bg: var(--bs-secondary-bg);
}
/* Existing image names: neutral background in dark mode */
[data-bs-theme="dark"] #section_images_content .form-control.bg-light {
background-color: var(--bs-tertiary-bg) !important;
color: var(--bs-body-color) !important;
border-color: var(--bs-border-color);
}
-
Fiber
- 100+
- Posts: 181
- Joined: Mon Oct 26, 2020 12:16 pm
- Phoenix Version: v1.1.0.8
- Has thanked: 19 times
- Been thanked: 28 times
Re: Admin Dark & Light Mode - Cosmetic Fixes
Addition: I always copy a few hooks, e.g. tinymce.php, and with this code it is also dark or light. For those interested, here is the script part:
Code: Select all
<script>
(() => {
const adminTheme =
document.documentElement.getAttribute('data-bs-theme');
const isDark = adminTheme === 'dark';
const editorTheme = isDark ? 'dark' : 'light';
tinymce.init({
selector: 'textarea[name^="products_description"], textarea[name^="catalog_description"], textarea[name^="manufacturers_description"], textarea[name^="content"], textarea[name^="configuration_value"], textarea[name^="faq_answer"], textarea[name^="advert_html_text"], textarea[name^="message"], textarea[name^="orders_comments_text"], textarea[name^="categories_extra_description"], textarea[name^="messages_content"], textarea[name^="text"], textarea[name^="page_text"]',
height: 500,
forced_root_block: false,
theme: 'silver',
skin: isDark ? 'oxide-dark' : 'oxide',
plugins: [
'advlist autolink lists link image charmap print preview hr anchor pagebreak',
'searchreplace wordcount visualblocks visualchars code fullscreen',
'insertdatetime media nonbreaking save table directionality',
'emoticons template paste textpattern imagetools codesample toc'
],
toolbar1: 'undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
toolbar2: 'print preview media | forecolor backcolor | codesample fontselect fontsizeselect',
image_advtab: true,
relative_urls: false,
remove_script_host: false,
content_css: [
isDark ? 'dark' : 'default',
'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css',
'https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css'
],
extended_valid_elements:
'i[class|style|id],script[!src|defer|type]',
setup: function (editor) {
editor.on('init', function () {
editor.getDoc().documentElement.setAttribute(
'data-bs-theme',
editorTheme
);
});
editor.on('change', function () {
editor.save();
});
}
});
})();
</script>
- burt
- Core Team
- Posts: 4916
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy A Coffee
- Has thanked: 296 times
- Been thanked: 493 times
Re: Admin Dark & Light Mode - Cosmetic Fixes
Would this give similar effect?
<tr> <---- remove tabe-success class
<td colspan="3" class="bg-body-tertiary"> <----- add tertiary class
