Download components/data-highlights.js from Tommygu/pixelpulse-analytics-dashboard: direct link, hf CLI and curl.
- Browser
- Download file 4.56 kB
-
https://huggingface.co/spaces/Tommygu/pixelpulse-analytics-dashboard/resolve/main/components/data-highlights.js
- Command line
-
hf download hf://spaces/Tommygu/pixelpulse-analytics-dashboard/components/data-highlights.js
-
curl -L -o data-highlights.js https://huggingface.co/spaces/Tommygu/pixelpulse-analytics-dashboard/resolve/main/components/data-highlights.js
4.56 kB
| class CustomDataHighlights extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| .highlights-container { | |
| background: white; | |
| border-radius: 0.5rem; | |
| padding: 1.5rem; | |
| margin-bottom: 2rem; | |
| box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); | |
| } | |
| .highlight-title { | |
| font-size: 1.25rem; | |
| font-weight: bold; | |
| margin-bottom: 1rem; | |
| color: #1f2937; | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| } | |
| .highlight-item { | |
| display: flex; | |
| align-items: center; | |
| padding: 0.75rem 0; | |
| border-bottom: 1px solid #e5e7eb; | |
| } | |
| .highlight-item:last-child { | |
| border-bottom: none; | |
| } | |
| .highlight-icon { | |
| width: 2.5rem; | |
| height: 2.5rem; | |
| border-radius: 50%; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| margin-right: 1rem; | |
| flex-shrink: 0; | |
| } | |
| .highlight-content { | |
| flex-grow: 1; | |
| } | |
| .highlight-label { | |
| font-weight: 500; | |
| color: #4b5563; | |
| margin-bottom: 0.25rem; | |
| } | |
| .highlight-value { | |
| font-weight: bold; | |
| color: #1f2937; | |
| } | |
| .trend-indicator { | |
| display: flex; | |
| align-items: center; | |
| font-size: 0.875rem; | |
| } | |
| .trend-up { | |
| color: #10b981; | |
| } | |
| .trend-down { | |
| color: #ef4444; | |
| } | |
| .icon-bg-1 { background-color: rgba(99, 102, 241, 0.1); color: #6366f1; } | |
| .icon-bg-2 { background-color: rgba(236, 72, 153, 0.1); color: #ec4899; } | |
| .icon-bg-3 { background-color: rgba(16, 185, 129, 0.1); color: #10b981; } | |
| .icon-bg-4 { background-color: rgba(245, 158, 11, 0.1); color: #f59e0b; } | |
| </style> | |
| <div class="highlights-container animate-fade-in"> | |
| <div class="highlight-title"> | |
| <i data-feather="zap" width="20"></i> | |
| <span>Key Performance Highlights</span> | |
| </div> | |
| <div class="highlight-item"> | |
| <div class="highlight-icon icon-bg-1"> | |
| <i data-feather="dollar-sign" width="16"></i> | |
| </div> | |
| <div class="highlight-content"> | |
| <div class="highlight-label">Top Earning Game</div> | |
| <div class="highlight-value">Claw 13 Duck ($212.27)</div> | |
| </div> | |
| <div class="trend-indicator trend-up"> | |
| <span>+18.7%</span> | |
| <i data-feather="trending-up" width="16" class="ml-1"></i> | |
| </div> | |
| </div> | |
| <div class="highlight-item"> | |
| <div class="highlight-icon icon-bg-2"> | |
| <i data-feather="activity" width="16"></i> | |
| </div> | |
| <div class="highlight-content"> | |
| <div class="highlight-label">Most Played Category</div> | |
| <div class="highlight-value">Cranes (1,164 plays)</div> | |
| </div> | |
| <div class="trend-indicator trend-up"> | |
| <span>+22.3%</span> | |
| <i data-feather="trending-up" width="16" class="ml-1"></i> | |
| </div> | |
| </div> | |
| <div class="highlight-item"> | |
| <div class="highlight-icon icon-bg-3"> | |
| <i data-feather="clock" width="16"></i> | |
| </div> | |
| <div class="highlight-content"> | |
| <div class="highlight-label">Peak Revenue Hour</div> | |
| <div class="highlight-value">7:00 PM ($1,248.50)</div> | |
| </div> | |
| <div class="trend-indicator trend-down"> | |
| <span>-3.2%</span> | |
| <i data-feather="trending-down" width="16" class="ml-1"></i> | |
| </div> | |
| </div> | |
| <div class="highlight-item"> | |
| <div class="highlight-icon icon-bg-4"> | |
| <i data-feather="users" width="16"></i> | |
| </div> | |
| <div class="highlight-content"> | |
| <div class="highlight-label">New Players Today</div> | |
| <div class="highlight-value">143 new players</div> | |
| </div> | |
| <div class="trend-indicator trend-up"> | |
| <span>+9.5%</span> | |
| <i data-feather="trending-up" width="16" class="ml-1"></i> | |
| </div> | |
| </div> | |
| </div> | |
| `; | |
| } | |
| } | |
| customElements.define('custom-data-highlights', CustomDataHighlights); |