Open nicolargo opened 2 years ago
@fr4nc0is Any idea / remark on this request ?
Hi @nicolargo ,
Customization could be implemented w/ :
<head />
section of index.html.tpl
fileexample
// glances.conf
[theme:light]
--bs-body-bg=#fff
--bs-body-color=#212529
[theme:dark]
--bs-body-bg=#212529
--bs-body-color=#adb5bd
[theme:my-custom]
color-scheme=dark
--bs-blue=#0d6efd
--bs-indigo=#6610f2
--bs-purple=#6f42c1
--bs-pink=#d63384
--bs-red=#dc3545
--bs-orange=#fd7e14
--bs-yellow=#ffc107
--bs-green=#198754
--bs-teal=#20c997
--bs-cyan=#0dcaf0
--bs-black=#000
--bs-white=#fff
--bs-gray=#6c757d
will output
<!DOCTYPE html>
<html>
<head>
<style>
[data-bs-theme="light"] {
--bs-body-bg: #fff;
--bs-body-color: #212529;
}
[data-bs-theme="dark"] {
--bs-body-bg: #212529;
--bs-body-color: #adb5bd;
}
[data-bs-theme="my-custom"] {
color-scheme: dark;
--bs-blue: #0d6efd;
--bs-indigo: #6610f2;
--bs-purple: #6f42c1;
--bs-pink: #d63384;
--bs-red: #dc3545;
--bs-orange: #fd7e14;
--bs-yellow: #ffc107;
--bs-green: #198754;
--bs-teal: #20c997;
--bs-cyan: #0dcaf0;
--bs-black: #000;
--bs-white: #fff;
--bs-gray: #6c757d;
}
</style>
....
</head>
What do you think about this implementation?
Looks great. But as we want to split the WebUI from the Glances "Core") (see https://github.com/nicolargo/glances/issues/2114), i think it will be better to have the [theme:*] section in a dedicated configuration file (glances-webui.conf) for example...
What do you think ?
@fr4nc0is : Like that ? https://makina-corpus.com/front-end/utiliser-bootstrap-avec-sass
This issue is stale because it has been open for 3 months with no activity.
Should also be configurable for the Curses UI.
Discussed in https://github.com/nicolargo/glances/discussions/2046