mirror of
https://github.com/Retropex/custom-ocean.xyz-dashboard.git
synced 2025-05-12 19:20:45 +02:00

- Updated `App.py` to add a datetime formatting filter and enhance the earnings route with better error handling and currency conversion. - Revised `README.md` to document new features, including earnings breakdown and API endpoints. - Added default currency setting in `config.json` and a function to retrieve it in `config.py`. - Improved `data_service.py` with a new method for fetching payment history and enhanced error handling. - Updated `setup.py` to include new CSS and JS files for the earnings page. - Enhanced styling in `common.css`, `dashboard.css`, and `earnings.css` for better responsiveness. - Optimized `workers.js` for improved performance with a progressive loading approach. - Updated multiple HTML files to reflect new dashboard structure and features. - Enhanced `worker_service.py` for consistent hashrate values and improved logging.
508 lines
9.7 KiB
CSS
508 lines
9.7 KiB
CSS
.footer {
|
|
padding: 10px 0;
|
|
color: grey;
|
|
font-size: 0.9rem;
|
|
border-top: 1px solid rgba(128, 128, 128, 0.2);
|
|
}
|
|
|
|
/* Theme-aware loading state */
|
|
html.bitcoin-theme {
|
|
background-color: #111111;
|
|
}
|
|
|
|
html.deepsea-theme {
|
|
background-color: #0c141a;
|
|
}
|
|
|
|
#theme-loader {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
z-index: 9999;
|
|
font-family: 'VT323', monospace;
|
|
}
|
|
|
|
html.bitcoin-theme #theme-loader {
|
|
background-color: #111111;
|
|
color: #f2a900;
|
|
}
|
|
|
|
html.deepsea-theme #theme-loader {
|
|
background-color: #0c141a;
|
|
color: #0088cc;
|
|
}
|
|
|
|
#loader-icon {
|
|
font-size: 48px;
|
|
margin-bottom: 20px;
|
|
animation: spin 2s infinite linear;
|
|
}
|
|
|
|
#loader-text {
|
|
font-size: 24px;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
@keyframes spin {
|
|
0% {
|
|
transform: rotate(0deg);
|
|
}
|
|
|
|
100% {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
/* Hide content during load */
|
|
body {
|
|
visibility: hidden;
|
|
}
|
|
|
|
/* Common styling elements shared across all pages */
|
|
:root {
|
|
--bg-color: #0a0a0a;
|
|
--bg-gradient: linear-gradient(135deg, #0a0a0a, #1a1a1a);
|
|
--primary-color: #f7931a;
|
|
--accent-color: #00ffff;
|
|
--text-color: #ffffff;
|
|
--card-padding: 0.5rem;
|
|
--text-size-base: 16px;
|
|
--terminal-font: 'VT323', monospace;
|
|
--header-font: 'Orbitron', sans-serif;
|
|
--text-transform: uppercase;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
:root {
|
|
--card-padding: 0.75rem;
|
|
--text-size-base: 18px;
|
|
}
|
|
}
|
|
|
|
/* CRT Screen Effect */
|
|
body::before {
|
|
content: " ";
|
|
display: block;
|
|
position: fixed;
|
|
top: 0; left: 0; bottom: 0; right: 0;
|
|
background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%),
|
|
linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.03));
|
|
background-size: 100% 2px, 3px 100%;
|
|
pointer-events: none;
|
|
z-index: 2;
|
|
opacity: 0.15;
|
|
}
|
|
|
|
/* Flicker Animation */
|
|
@keyframes flicker {
|
|
0% { opacity: 0.97; }
|
|
5% { opacity: 0.95; }
|
|
10% { opacity: 0.97; }
|
|
15% { opacity: 0.94; }
|
|
20% { opacity: 0.98; }
|
|
50% { opacity: 0.95; }
|
|
80% { opacity: 0.96; }
|
|
90% { opacity: 0.94; }
|
|
100% { opacity: 0.98; }
|
|
}
|
|
|
|
body {
|
|
background: var(--bg-gradient);
|
|
color: var(--text-color);
|
|
padding-top: 0.5rem;
|
|
font-size: var(--text-size-base);
|
|
font-family: var(--terminal-font);
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 24px;
|
|
font-weight: bold;
|
|
color: var(--primary-color);
|
|
font-family: var(--header-font);
|
|
letter-spacing: 1px;
|
|
animation: flicker 4s infinite;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
h1 {
|
|
font-size: 26px;
|
|
}
|
|
}
|
|
|
|
/* Navigation links */
|
|
.navigation-links {
|
|
display: flex;
|
|
justify-content: center;
|
|
margin-top: 10px;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.nav-link {
|
|
padding: 5px 15px;
|
|
margin: 0 10px;
|
|
background-color: var(--bg-color);
|
|
border: 1px solid var(--primary-color);
|
|
color: var(--primary-color);
|
|
text-decoration: none;
|
|
font-family: var(--terminal-font);
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.nav-link:hover {
|
|
background-color: var(--primary-color);
|
|
color: var(--bg-color);
|
|
box-shadow: 0 0 10px rgba(247, 147, 26, 0.5);
|
|
}
|
|
|
|
.nav-link.active {
|
|
background-color: var(--primary-color);
|
|
color: var(--bg-color);
|
|
box-shadow: 0 0 10px rgba(247, 147, 26, 0.5);
|
|
}
|
|
|
|
/* Top right link */
|
|
#topRightLink {
|
|
position: absolute;
|
|
top: 10px;
|
|
right: 10px;
|
|
color: grey;
|
|
text-decoration: none;
|
|
font-size: 0.7rem; /* Decreased font size */
|
|
padding: 5px 10px; /* Add padding for a larger clickable area */
|
|
transition: background-color 0.3s ease; /* Optional: Add hover effect */
|
|
}
|
|
|
|
#topRightLink:hover {
|
|
background-color: rgba(255, 255, 255, 0.1); /* Optional: Highlight on hover */
|
|
}
|
|
|
|
|
|
/* Card styles */
|
|
.card,
|
|
.card-header,
|
|
.card-body,
|
|
.card-footer {
|
|
border-radius: 0 !important;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
/* Enhanced card with scanlines */
|
|
.card {
|
|
background-color: var(--bg-color);
|
|
border: 1px solid var(--primary-color);
|
|
margin-bottom: 0.5rem;
|
|
padding: var(--card-padding);
|
|
flex: 1;
|
|
position: relative;
|
|
overflow: hidden;
|
|
box-shadow: 0 0 5px rgba(247, 147, 26, 0.3);
|
|
}
|
|
|
|
/* Scanline effect for cards */
|
|
.card::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: repeating-linear-gradient(
|
|
0deg,
|
|
rgba(0, 0, 0, 0.05),
|
|
rgba(0, 0, 0, 0.05) 1px,
|
|
transparent 1px,
|
|
transparent 2px
|
|
);
|
|
pointer-events: none;
|
|
z-index: 1;
|
|
}
|
|
|
|
.card-header {
|
|
background-color: #000;
|
|
color: var(--primary-color);
|
|
font-weight: bold;
|
|
padding: 0.3rem 0.5rem;
|
|
font-size: 1.1rem;
|
|
border-bottom: 1px solid var(--primary-color);
|
|
animation: flicker 4s infinite;
|
|
font-family: var(--header-font);
|
|
}
|
|
|
|
.card-body hr {
|
|
border-top: 1px solid var(--primary-color);
|
|
margin: 0.25rem 0;
|
|
}
|
|
|
|
/* Connection status indicator */
|
|
#connectionStatus {
|
|
display: none;
|
|
position: fixed;
|
|
top: 10px;
|
|
right: 10px;
|
|
background: rgba(255,0,0,0.7);
|
|
color: white;
|
|
padding: 10px;
|
|
border-radius: 5px;
|
|
z-index: 9999;
|
|
font-size: 0.9rem;
|
|
box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
|
|
}
|
|
|
|
/* Last Updated text with subtle animation */
|
|
#lastUpdated {
|
|
animation: flicker 5s infinite;
|
|
text-align: center;
|
|
}
|
|
|
|
/* Cursor blink for terminal feel */
|
|
#terminal-cursor {
|
|
display: inline-block;
|
|
width: 10px;
|
|
height: 16px;
|
|
background-color: #f7931a;
|
|
margin-left: 2px;
|
|
animation: blink 1s step-end infinite;
|
|
vertical-align: middle;
|
|
box-shadow: 0 0 5px rgba(247, 147, 26, 0.8);
|
|
}
|
|
|
|
@keyframes blink {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0; }
|
|
}
|
|
|
|
/* Container */
|
|
.container-fluid {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding-left: 1rem;
|
|
padding-right: 1rem;
|
|
position: relative;
|
|
padding-bottom: 6rem;
|
|
}
|
|
|
|
/* Status indicators */
|
|
.online-dot {
|
|
display: inline-block;
|
|
width: 8px;
|
|
height: 8px;
|
|
background: #32CD32;
|
|
border-radius: 50%;
|
|
margin-left: 0.5em;
|
|
position: relative;
|
|
top: -1px;
|
|
animation: pulse 2s infinite;
|
|
box-shadow: 0 0 10px #32CD32, 0 0 20px #32CD32;
|
|
}
|
|
|
|
@keyframes glow {
|
|
0%, 100% { box-shadow: 0 0 10px #32CD32, 0 0 15px #32CD32; }
|
|
50% { box-shadow: 0 0 15px #32CD32, 0 0 25px #32CD32; }
|
|
}
|
|
|
|
.offline-dot {
|
|
display: inline-block;
|
|
width: 8px;
|
|
height: 8px;
|
|
background: red;
|
|
border-radius: 50%;
|
|
margin-left: 0.5em;
|
|
position: relative;
|
|
top: -1px;
|
|
animation: pulse 2s infinite;
|
|
box-shadow: 0 0 10px red, 0 0 20px red !important;
|
|
}
|
|
|
|
@keyframes glowRed {
|
|
0%, 100% { box-shadow: 0 0 10px red, 0 0 15px red; }
|
|
50% { box-shadow: 0 0 15px red, 0 0 25px red; }
|
|
}
|
|
|
|
/* Color utility classes */
|
|
.green-glow, .status-green {
|
|
color: #39ff14 !important;
|
|
}
|
|
|
|
.red-glow, .status-red {
|
|
color: #ff2d2d !important;
|
|
}
|
|
|
|
.yellow-glow {
|
|
color: #ffd700 !important;
|
|
}
|
|
|
|
.blue-glow {
|
|
color: #00dfff !important;
|
|
}
|
|
|
|
.white-glow {
|
|
color: #ffffff !important;
|
|
}
|
|
|
|
/* Basic color classes for backward compatibility */
|
|
.green {
|
|
color: #39ff14 !important;
|
|
}
|
|
|
|
.blue {
|
|
color: #00dfff !important;
|
|
}
|
|
|
|
.yellow {
|
|
color: #ffd700 !important;
|
|
font-weight: normal !important;
|
|
}
|
|
|
|
.white {
|
|
color: #ffffff !important;
|
|
}
|
|
|
|
.red {
|
|
color: #ff2d2d !important;
|
|
}
|
|
|
|
.magenta {
|
|
color: #ff2d95 !important;
|
|
}
|
|
|
|
/* Bitcoin Progress Bar Styles */
|
|
.bitcoin-progress-container {
|
|
width: 100%;
|
|
max-width: 300px;
|
|
height: 20px;
|
|
background-color: #111;
|
|
border: 1px solid var(--primary-color);
|
|
border-radius: 0;
|
|
margin: 0.5rem auto;
|
|
position: relative;
|
|
overflow: hidden;
|
|
box-shadow: 0 0 8px rgba(247, 147, 26, 0.5);
|
|
align-self: center;
|
|
}
|
|
|
|
.bitcoin-progress-inner {
|
|
height: 100%;
|
|
width: 0;
|
|
background: linear-gradient(90deg, #f7931a, #ffa500);
|
|
border-radius: 0;
|
|
transition: width 0.3s ease;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.bitcoin-progress-inner::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: linear-gradient(90deg,
|
|
rgba(255, 255, 255, 0.1) 0%,
|
|
rgba(255, 255, 255, 0.2) 20%,
|
|
rgba(255, 255, 255, 0.1) 40%);
|
|
animation: shimmer 2s infinite;
|
|
}
|
|
|
|
@keyframes shimmer {
|
|
0% { transform: translateX(-100%); }
|
|
100% { transform: translateX(100%); }
|
|
}
|
|
|
|
.bitcoin-icons {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 0;
|
|
width: 100%;
|
|
transform: translateY(-50%);
|
|
display: flex;
|
|
justify-content: space-around;
|
|
font-size: 12px;
|
|
color: rgba(0, 0, 0, 0.7);
|
|
}
|
|
|
|
.glow-effect {
|
|
box-shadow: 0 0 15px #f7931a, 0 0 25px #f7931a;
|
|
animation: pulse 1s infinite;
|
|
}
|
|
|
|
/* Extra styling for when server update is late */
|
|
.waiting-for-update {
|
|
animation: waitingPulse 2s infinite !important;
|
|
}
|
|
|
|
@keyframes waitingPulse {
|
|
0%, 100% { box-shadow: 0 0 10px #f7931a, 0 0 15px #f7931a; opacity: 0.8; }
|
|
50% { box-shadow: 0 0 20px #f7931a, 0 0 35px #f7931a; opacity: 1; }
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0.8; }
|
|
}
|
|
|
|
#progress-text {
|
|
font-size: 1rem;
|
|
color: var(--primary-color);
|
|
margin-top: 0.3rem;
|
|
text-align: center;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Mobile responsiveness */
|
|
@media (max-width: 576px) {
|
|
.container-fluid {
|
|
padding-left: 0.5rem;
|
|
padding-right: 0.5rem;
|
|
}
|
|
|
|
.card-body {
|
|
padding: 0.5rem;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 22px;
|
|
}
|
|
|
|
.card-header {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
#topRightLink {
|
|
position: static;
|
|
display: block;
|
|
text-align: right;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 576px) {
|
|
.nav-link {
|
|
font-size: 0.8rem; /* Reduce font size for smaller screens */
|
|
padding: 3px 10px; /* Adjust padding to save space */
|
|
}
|
|
}
|
|
|
|
|
|
/* Navigation badges for notifications */
|
|
.nav-badge {
|
|
background-color: var(--primary-color);
|
|
color: var(--bg-color);
|
|
border-radius: 10px;
|
|
font-size: 0.7rem;
|
|
padding: 1px 5px;
|
|
min-width: 16px;
|
|
text-align: center;
|
|
display: none;
|
|
margin-left: 5px;
|
|
vertical-align: middle;
|
|
}
|
|
|