Spaces:
Running
Running
Komalpreet Kaur
feat: update subtitle to mention Redis + CDN caching and restore a highly minimal refresh button
058537a Download frontend/src/components/VisitorAnalytics.css from komalsohal/Soma: direct link, hf CLI and curl.
- Browser
- Download file 11.8 kB
-
https://huggingface.co/spaces/komalsohal/Soma/resolve/main/frontend/src/components/VisitorAnalytics.css
- Command line
-
hf download hf://spaces/komalsohal/Soma/frontend/src/components/VisitorAnalytics.css
-
curl -L -o VisitorAnalytics.css https://huggingface.co/spaces/komalsohal/Soma/resolve/main/frontend/src/components/VisitorAnalytics.css
11.8 kB
| /* VisitorAnalytics.css - Premium Adaptive Neural Gloss Traffic Diagnostics */ | |
| .analytics-stage { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 16px; | |
| width: 100%; | |
| color: var(--text-main); | |
| transition: color 0.3s ease; | |
| } | |
| .analytics-header-row { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| flex-wrap: wrap; | |
| gap: 12px; | |
| border-bottom: 1px solid rgba(0, 0, 0, 0.05); | |
| padding-bottom: 12px; | |
| padding-right: 36px; /* Prevent overlap with the absolute positioned close button */ | |
| transition: border-color 0.3s ease; | |
| } | |
| body.dark-theme .analytics-header-row { | |
| border-bottom-color: rgba(255, 255, 255, 0.05); | |
| } | |
| .analytics-title-area h3 { | |
| font-family: var(--font-display); | |
| font-size: 1.2rem; | |
| font-weight: 700; | |
| color: #ff6b35; | |
| margin: 0 0 4px 0; | |
| letter-spacing: -0.01em; | |
| } | |
| .analytics-title-area p { | |
| font-size: 0.75rem; | |
| color: var(--text-muted); | |
| margin: 0; | |
| transition: color 0.3s ease; | |
| } | |
| .analytics-db-status .status-badge { | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 8px; | |
| font-size: 0.75rem; | |
| font-weight: 700; | |
| text-transform: uppercase; | |
| letter-spacing: 0.05em; | |
| padding: 6px 14px; | |
| border-radius: 20px; | |
| background: rgba(0, 0, 0, 0.02); | |
| border: 1px solid rgba(0, 0, 0, 0.05); | |
| transition: all 0.3s ease; | |
| } | |
| body.dark-theme .analytics-db-status .status-badge { | |
| background: rgba(255, 255, 255, 0.02); | |
| border-color: rgba(255, 255, 255, 0.08); | |
| } | |
| .analytics-db-status .status-badge.success { | |
| color: #ff6b35; | |
| border-color: rgba(255, 107, 53, 0.2); | |
| background: rgba(255, 107, 53, 0.03); | |
| } | |
| .analytics-db-status .status-badge.success .dot { | |
| background: #ff6b35; | |
| box-shadow: 0 0 8px #ff6b35; | |
| } | |
| .analytics-db-status .status-badge.warning { | |
| color: #f59e0b; | |
| border-color: rgba(245, 158, 11, 0.2); | |
| background: rgba(245, 158, 11, 0.03); | |
| } | |
| .analytics-db-status .status-badge.warning .dot { | |
| background: #f59e0b; | |
| box-shadow: 0 0 8px #f59e0b; | |
| } | |
| .analytics-db-status .status-badge.error { | |
| color: var(--text-muted); | |
| border-color: var(--border-card); | |
| background: rgba(0, 0, 0, 0.02); | |
| } | |
| body.dark-theme .analytics-db-status .status-badge.error { | |
| background: rgba(255, 255, 255, 0.02); | |
| } | |
| .analytics-db-status .status-badge.error .dot { | |
| background: #737373; | |
| } | |
| .analytics-db-status .dot { | |
| width: 6px; | |
| height: 6px; | |
| border-radius: 50%; | |
| } | |
| /* Metrics Grid - Adjusted column wrapping to fit beautifully in modal viewport */ | |
| .analytics-grid { | |
| display: grid; | |
| grid-template-columns: 1fr 1fr; | |
| gap: 20px; | |
| } | |
| .metric-card { | |
| position: relative; | |
| display: flex; | |
| align-items: center; | |
| gap: 16px; | |
| padding: 16px 20px; | |
| border-radius: 16px; | |
| background: rgba(255, 255, 255, 0.7); | |
| border: 1px solid rgba(0, 0, 0, 0.04); | |
| box-shadow: 0 8px 30px rgba(0, 0, 0, 0.02); | |
| backdrop-filter: blur(12px); | |
| overflow: hidden; | |
| transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); | |
| color: var(--text-main); | |
| } | |
| body.dark-theme .metric-card { | |
| background: rgba(10, 10, 10, 0.6); | |
| border-color: rgba(255, 255, 255, 0.03); | |
| box-shadow: none; | |
| } | |
| .metric-card:hover { | |
| transform: translateY(-4px); | |
| border-color: rgba(0, 0, 0, 0.1); | |
| box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06); | |
| } | |
| body.dark-theme .metric-card:hover { | |
| border-color: rgba(255, 255, 255, 0.08); | |
| box-shadow: none; | |
| } | |
| .metric-card.glow-orange:hover, | |
| .metric-card.glow-green:hover { | |
| box-shadow: 0 12px 40px -10px rgba(255, 107, 53, 0.15); | |
| border-color: rgba(255, 107, 53, 0.25); | |
| } | |
| .metric-icon { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| width: 56px; | |
| height: 56px; | |
| border-radius: 12px; | |
| background: rgba(0, 0, 0, 0.02); | |
| border: 1px solid rgba(0, 0, 0, 0.05); | |
| transition: all 0.3s ease; | |
| } | |
| body.dark-theme .metric-icon { | |
| background: rgba(255, 255, 255, 0.02); | |
| border-color: rgba(255, 255, 255, 0.05); | |
| } | |
| .glow-orange .metric-icon, | |
| .glow-green .metric-icon { | |
| color: #ff6b35; | |
| background: rgba(255, 107, 53, 0.04); | |
| border-color: rgba(255, 107, 53, 0.15); | |
| } | |
| .metric-icon .material-icons { | |
| font-size: 26px; | |
| } | |
| .metric-data { | |
| display: flex; | |
| flex-direction: column; | |
| z-index: 1; | |
| } | |
| .metric-number { | |
| font-size: 1.5rem; | |
| font-weight: 800; | |
| line-height: 1.1; | |
| letter-spacing: -0.03em; | |
| margin-bottom: 4px; | |
| color: #ff6b35; | |
| text-shadow: 0 0 20px rgba(255, 107, 53, 0.15); | |
| } | |
| .metric-label { | |
| font-size: 0.65rem; | |
| font-weight: 700; | |
| letter-spacing: 0.1em; | |
| text-transform: uppercase; | |
| color: var(--text-muted); | |
| margin-bottom: 4px; | |
| transition: color 0.3s ease; | |
| } | |
| .metric-subtext { | |
| font-size: 0.75rem; | |
| color: var(--text-muted); | |
| transition: color 0.3s ease; | |
| } | |
| /* Mini graphic background in cards */ | |
| .metric-graph-bg { | |
| position: absolute; | |
| bottom: 0; | |
| right: 0; | |
| width: 140px; | |
| height: 60px; | |
| opacity: 0.07; | |
| pointer-events: none; | |
| } | |
| .mini-wave { | |
| width: 100%; | |
| height: 100%; | |
| background: linear-gradient(180deg, transparent 40%, #ff6b35 100%); | |
| clip-path: polygon(0 80%, 20% 60%, 40% 75%, 60% 40%, 80% 55%, 100% 20%, 100% 100%, 0 100%); | |
| } | |
| .wave-green { | |
| background: linear-gradient(180deg, transparent 40%, #ff6b35 100%); | |
| } | |
| /* Insights Dashboard Grid */ | |
| .analytics-insights-grid { | |
| display: grid; | |
| grid-template-columns: 1fr; | |
| gap: 20px; | |
| } | |
| .insights-panel { | |
| padding: 16px 20px; | |
| border-radius: 16px; | |
| background: rgba(255, 255, 255, 0.5); | |
| border: 1px solid rgba(0, 0, 0, 0.03); | |
| backdrop-filter: blur(8px); | |
| transition: all 0.3s ease; | |
| } | |
| body.dark-theme .insights-panel { | |
| background: rgba(10, 10, 10, 0.4); | |
| border-color: rgba(255, 255, 255, 0.02); | |
| } | |
| .insights-panel h4 { | |
| font-size: 0.65rem; | |
| font-weight: 800; | |
| text-transform: uppercase; | |
| color: var(--text-light); | |
| letter-spacing: 0.1em; | |
| margin: 0 0 12px 0; | |
| transition: color 0.3s ease; | |
| } | |
| /* Ratio Bar */ | |
| .ratio-bar-container { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 12px; | |
| margin-bottom: 16px; | |
| } | |
| .ratio-bar { | |
| display: flex; | |
| height: 8px; | |
| border-radius: 4px; | |
| overflow: hidden; | |
| background: rgba(0, 0, 0, 0.05); | |
| transition: background 0.3s ease; | |
| } | |
| body.dark-theme .ratio-bar { | |
| background: rgba(255, 255, 255, 0.05); | |
| } | |
| .ratio-fill { | |
| height: 100%; | |
| transition: width 0.6s ease; | |
| } | |
| .unique-fill { | |
| background: #ff6b35; | |
| box-shadow: 0 0 10px rgba(255, 107, 53, 0.3); | |
| } | |
| .returning-fill { | |
| background: #a34018; | |
| box-shadow: 0 0 10px rgba(163, 64, 24, 0.3); | |
| } | |
| .ratio-legend { | |
| display: flex; | |
| gap: 16px; | |
| } | |
| .legend-item { | |
| display: flex; | |
| align-items: center; | |
| gap: 8px; | |
| font-size: 0.7rem; | |
| color: var(--text-muted); | |
| transition: color 0.3s ease; | |
| } | |
| .indicator-dot { | |
| width: 8px; | |
| height: 8px; | |
| border-radius: 50%; | |
| } | |
| .unique-dot { | |
| background: #ff6b35; | |
| } | |
| .returning-dot { | |
| background: #a34018; | |
| } | |
| .retention-score-block { | |
| display: flex; | |
| align-items: center; | |
| gap: 16px; | |
| border-top: 1px solid rgba(0, 0, 0, 0.05); | |
| padding-top: 12px; | |
| transition: border-color 0.3s ease; | |
| } | |
| body.dark-theme .retention-score-block { | |
| border-top-color: rgba(255, 255, 255, 0.03); | |
| } | |
| .retention-score { | |
| font-size: 1.5rem; | |
| font-weight: 800; | |
| color: #ff6b35; | |
| line-height: 1; | |
| } | |
| .retention-copy h5 { | |
| font-size: 0.75rem; | |
| font-weight: 700; | |
| margin: 0 0 2px 0; | |
| color: var(--text-main); | |
| transition: color 0.3s ease; | |
| } | |
| .retention-copy p { | |
| font-size: 0.75rem; | |
| color: var(--text-muted); | |
| margin: 0; | |
| transition: color 0.3s ease; | |
| } | |
| /* Sync telemetries btn */ | |
| .analytics-action-row { | |
| display: flex; | |
| justify-content: flex-end; | |
| margin-top: 8px; | |
| } | |
| .analytics-sync-btn { | |
| display: flex; | |
| align-items: center; | |
| gap: 6px; | |
| font-size: 0.7rem; | |
| font-weight: 700; | |
| color: #ff6b35; | |
| background: rgba(255, 107, 53, 0.03); | |
| border: 1px solid rgba(255, 107, 53, 0.12); | |
| padding: 6px 12px; | |
| border-radius: 6px; | |
| cursor: pointer; | |
| transition: all 0.2s ease; | |
| } | |
| .analytics-sync-btn .material-icons { | |
| font-size: 14px; | |
| } | |
| .analytics-sync-btn:hover:not(:disabled) { | |
| background: rgba(255, 107, 53, 0.08); | |
| border-color: #ff6b35; | |
| box-shadow: 0 0 12px rgba(255, 107, 53, 0.1); | |
| } | |
| .analytics-sync-btn:disabled { | |
| opacity: 0.6; | |
| cursor: not-allowed; | |
| } | |
| @keyframes pulse { | |
| 0% { transform: scale(1); opacity: 1; } | |
| 50% { transform: scale(1.1); opacity: 0.7; } | |
| 100% { transform: scale(1); opacity: 1; } | |
| } | |
| .pulse { | |
| animation: pulse 2s infinite ease-in-out; | |
| } | |
| /* Modal Backdrop Overlay */ | |
| .analytics-modal-backdrop { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| width: 100vw; | |
| height: 100vh; | |
| background: rgba(0, 0, 0, 0.25); | |
| backdrop-filter: blur(8px); | |
| z-index: 9999; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards; | |
| transition: background-color 0.3s ease; | |
| } | |
| body.dark-theme .analytics-modal-backdrop { | |
| background: rgba(0, 0, 0, 0.7); | |
| } | |
| /* Modal Content Container */ | |
| .analytics-modal-content { | |
| background: rgba(255, 255, 255, 0.85); | |
| border: 1px solid rgba(0, 0, 0, 0.05); | |
| box-shadow: 0 24px 60px rgba(0, 0, 0, 0.1), 0 0 40px rgba(255, 107, 53, 0.02); | |
| border-radius: 20px; | |
| width: 90%; | |
| max-width: 480px; /* Reduced from 620px */ | |
| padding: 20px 24px; | |
| position: relative; | |
| backdrop-filter: blur(25px); | |
| max-height: 90vh; | |
| overflow-y: auto; | |
| scrollbar-width: thin; | |
| scrollbar-color: rgba(255, 107, 53, 0.25) transparent; | |
| animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards; | |
| transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; | |
| } | |
| body.dark-theme .analytics-modal-content { | |
| background: rgba(13, 13, 13, 0.85); | |
| border: 1px solid rgba(255, 255, 255, 0.08); | |
| box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 107, 53, 0.05); | |
| } | |
| .analytics-modal-content::-webkit-scrollbar { | |
| width: 4px; | |
| } | |
| .analytics-modal-content::-webkit-scrollbar-track { | |
| background: transparent; | |
| } | |
| .analytics-modal-content::-webkit-scrollbar-thumb { | |
| background: rgba(255, 107, 53, 0.25); | |
| border-radius: 4px; | |
| } | |
| .analytics-modal-content::-webkit-scrollbar-thumb:hover { | |
| background: rgba(255, 107, 53, 0.45); | |
| } | |
| /* Modal Close Button */ | |
| .modal-close-btn { | |
| position: absolute; | |
| top: 16px; | |
| right: 16px; | |
| background: transparent; | |
| border: none; | |
| color: var(--text-muted); | |
| cursor: pointer; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| width: 32px; | |
| height: 32px; | |
| border-radius: 50%; | |
| transition: all 0.2s ease; | |
| z-index: 10; | |
| } | |
| .modal-close-btn:hover { | |
| background: rgba(0, 0, 0, 0.05); | |
| color: var(--text-main); | |
| } | |
| body.dark-theme .modal-close-btn:hover { | |
| background: rgba(255, 255, 255, 0.05); | |
| } | |
| .modal-close-btn .material-icons { | |
| font-size: 20px; | |
| } | |
| /* Animations */ | |
| @keyframes fadeIn { | |
| from { opacity: 0; } | |
| to { opacity: 1; } | |
| } | |
| @keyframes slideUp { | |
| from { transform: translateY(20px); opacity: 0; } | |
| to { transform: translateY(0); opacity: 1; } | |
| } | |
| /* Responsive Adaptive Viewports - Ultra Responsive stack */ | |
| @media (max-width: 600px) { | |
| .analytics-modal-content { | |
| width: 95%; | |
| padding: 16px; | |
| max-height: 95vh; | |
| } | |
| .analytics-stage { | |
| gap: 12px; | |
| } | |
| .analytics-header-row { | |
| flex-direction: column; | |
| align-items: flex-start; | |
| gap: 10px; | |
| padding-bottom: 10px; | |
| } | |
| .analytics-db-status { | |
| align-self: flex-start; | |
| } | |
| .analytics-grid { | |
| grid-template-columns: 1fr; | |
| gap: 12px; | |
| } | |
| .metric-card { | |
| padding: 12px 16px; | |
| gap: 12px; | |
| } | |
| .metric-number { | |
| font-size: 1.8rem; | |
| } | |
| .metric-icon { | |
| width: 48px; | |
| height: 48px; | |
| } | |
| .metric-icon .material-icons { | |
| font-size: 22px; | |
| } | |
| .insights-panel { | |
| padding: 12px 16px; | |
| } | |
| .ratio-legend { | |
| flex-direction: column; | |
| gap: 8px; | |
| } | |
| .retention-score-block { | |
| gap: 12px; | |
| padding-top: 10px; | |
| } | |
| .retention-score { | |
| font-size: 1.5rem; | |
| } | |
| .modal-close-btn { | |
| top: 12px; | |
| right: 12px; | |
| } | |
| } | |