Spaces:
Runtime error
Runtime error
File size: 11,203 Bytes
4387c3c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LLM Dictionary β Usage Dashboard</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<style>
:root {
--bg: #f8fafc; --card: #fff; --text: #0f172a; --muted: #64748b;
--accent: #2563eb; --accent-light: #dbeafe; --border: #e2e8f0;
--green: #059669; --green-bg: #ecfdf5;
--orange: #d97706; --orange-bg: #fffbeb;
--purple: #7c3aed; --purple-bg: #f5f3ff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
.container { max-width: 900px; margin: 0 auto; padding: 2rem 1.5rem; }
header { margin-bottom: 2rem; }
header h1 { font-size: 1.8rem; font-weight: 700; }
header p { color: var(--muted); font-size: 0.9rem; margin-top: 0.25rem; }
.back-link { color: var(--accent); text-decoration: none; font-size: 0.85rem; display: inline-block; margin-bottom: 1rem; }
.back-link:hover { text-decoration: underline; }
/* KPI Cards */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.kpi-card {
background: var(--card); border: 1px solid var(--border); border-radius: 12px;
padding: 1.25rem; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.kpi-card .kpi-value { font-size: 2rem; font-weight: 700; }
.kpi-card .kpi-label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.25rem; }
.kpi-card.blue .kpi-value { color: var(--accent); }
.kpi-card.green .kpi-value { color: var(--green); }
.kpi-card.orange .kpi-value { color: var(--orange); }
.kpi-card.purple .kpi-value { color: var(--purple); }
/* Sections */
.section { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.section h2 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
/* Bar chart */
.bar-chart { display: flex; flex-direction: column; gap: 0.5rem; }
.bar-row { display: flex; align-items: center; gap: 0.75rem; }
.bar-label { font-size: 0.85rem; min-width: 100px; text-align: right; color: var(--text); font-weight: 500; }
.bar-track { flex: 1; height: 28px; background: #f1f5f9; border-radius: 6px; overflow: hidden; position: relative; }
.bar-fill { height: 100%; border-radius: 6px; transition: width 0.5s ease; display: flex; align-items: center; padding-left: 0.5rem; }
.bar-fill span { font-size: 0.75rem; font-weight: 600; color: white; }
.bar-fill.blue { background: var(--accent); }
.bar-fill.green { background: var(--green); }
.bar-fill.orange { background: var(--orange); }
.bar-fill.purple { background: var(--purple); }
/* Timeline */
.timeline-chart { display: flex; align-items: flex-end; gap: 2px; height: 120px; padding-top: 1rem; }
.timeline-bar { flex: 1; background: var(--accent-light); border-radius: 3px 3px 0 0; min-width: 8px; transition: height 0.3s ease; position: relative; }
.timeline-bar:hover { background: var(--accent); }
.timeline-bar:hover .timeline-tooltip { display: block; }
.timeline-tooltip {
display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
background: var(--text); color: white; padding: 0.25rem 0.5rem; border-radius: 4px;
font-size: 0.7rem; white-space: nowrap; margin-bottom: 4px;
}
/* Recent lookups table */
.recent-table { width: 100%; border-collapse: collapse; }
.recent-table th { text-align: left; font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; padding: 0.5rem 0.75rem; border-bottom: 2px solid var(--border); }
.recent-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.recent-table tr:last-child td { border-bottom: none; }
.lang-badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 10px; font-size: 0.75rem; font-weight: 500; }
.lang-badge.english { background: var(--accent-light); color: var(--accent); }
.lang-badge.telugu { background: var(--green-bg); color: var(--green); }
.lang-badge.hindi { background: var(--orange-bg); color: var(--orange); }
.lang-badge.sanskrit { background: var(--purple-bg); color: var(--purple); }
.loading-msg { text-align: center; color: var(--muted); padding: 3rem; }
.auto-refresh { font-size: 0.75rem; color: var(--muted); }
@media (max-width: 600px) {
.container { padding: 1rem; }
.kpi-grid { grid-template-columns: 1fr 1fr; }
.bar-label { min-width: 70px; font-size: 0.8rem; }
}
</style>
</head>
<body>
<div class="container">
<a href="/" class="back-link">β Back to Dictionary</a>
<header>
<h1>π Usage Dashboard</h1>
<p>Real-time analytics for LLM Dictionary <span class="auto-refresh">(refreshes every 15s)</span></p>
</header>
<div id="content"><p class="loading-msg">Loading analytics...</p></div>
</div>
<script>
</script>
</body>
</html>
|