dark mode. new COB style

This commit is contained in:
Dobromir Popov
2025-07-22 22:00:27 +03:00
parent 55803c4fb9
commit 8898f71832
4 changed files with 162 additions and 37 deletions

View File

@ -174,12 +174,64 @@ class CleanTradingDashboard:
timezone_name = self.config.get('system', {}).get('timezone', 'Europe/Sofia')
self.timezone = pytz.timezone(timezone_name)
# Create Dash app
# Create Dash app with dark theme
self.app = Dash(__name__, external_stylesheets=[
'https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css',
'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css'
])
# Add custom dark theme CSS
self.app.index_string = '''
<!DOCTYPE html>
<html>
<head>
{%metas%}
<title>{%title%}</title>
{%favicon%}
{%css%}
<style>
body {
background-color: #111827 !important;
color: #f8f9fa !important;
}
.card {
background-color: #1f2937 !important;
border: 1px solid #374151 !important;
color: #f8f9fa !important;
}
.card-header {
background-color: #374151 !important;
border-bottom: 1px solid #4b5563 !important;
color: #f8f9fa !important;
}
.table {
color: #f8f9fa !important;
}
.table-dark {
background-color: #1f2937 !important;
}
.bg-light {
background-color: #374151 !important;
}
.text-muted {
color: #9ca3af !important;
}
.border {
border-color: #4b5563 !important;
}
</style>
</head>
<body>
{%app_entry%}
<footer>
{%config%}
{%scripts%}
{%renderer%}
</footer>
</body>
</html>
'''
# Suppress Dash development mode logging
self.app.enable_dev_tools(debug=False, dev_tools_silence_routes_logging=True)