-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
224 lines (210 loc) · 9.14 KB
/
index.html
File metadata and controls
224 lines (210 loc) · 9.14 KB
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
214
215
216
217
218
219
220
221
222
223
224
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>4uffin | Status Operation Center</title>
<meta property="og:title" content="Status Operation Center">
<meta property="og:description" content="Automated profile status rotation dashboard.">
<meta property="og:type" content="website">
<meta name="theme-color" content="#f0f4f8">
<style>
:root {
--bg-color: #f0f4f8;
--text-color: #222;
--accent-color: #0056b3;
--border-color: #ccc;
--font-main: "Courier New", Courier, monospace;
}
body {
background-color: var(--bg-color);
color: var(--text-color);
font-family: var(--font-main);
display: flex;
justify-content: center;
padding: 20px;
margin: 0;
}
.container {
width: 100%;
max-width: 800px;
background: #fff;
border: 2px solid var(--border-color);
padding: 20px;
box-shadow: 4px 4px 0px var(--border-color);
}
header {
border-bottom: 2px solid var(--accent-color);
margin-bottom: 20px;
padding-bottom: 10px;
}
h1 { margin: 0; font-size: 1.5rem; text-transform: uppercase; }
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 15px;
margin-bottom: 30px;
}
.stat-card {
border: 1px solid var(--border-color);
padding: 15px;
background: #fafafa;
}
.stat-label { font-size: 0.7rem; color: #666; text-transform: uppercase; letter-spacing: 1px; }
.stat-value { font-size: 1.2rem; font-weight: bold; margin-top: 5px; }
.history-table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
.history-table th, .history-table td {
text-align: left;
padding: 12px;
border: 1px solid var(--border-color);
}
.history-table th { background: var(--bg-color); font-size: 0.8rem; text-transform: uppercase; }
.status-pill {
background: #eef;
padding: 4px 8px;
border-radius: 4px;
font-size: 0.9rem;
border-left: 3px solid var(--accent-color);
display: inline-block;
}
.emoji-box {
font-size: 1.2rem;
text-align: center;
width: 30px;
}
.live-indicator {
display: inline-block;
width: 8px;
height: 8px;
background-color: #28a745;
border-radius: 50%;
margin-right: 10px;
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { opacity: 1; }
50% { opacity: 0.3; }
100% { opacity: 1; }
}
footer {
margin-top: 40px;
font-size: 0.7rem;
color: #888;
text-align: center;
border-top: 1px solid var(--border-color);
padding-top: 10px;
}
</style>
</head>
<body>
<div class="container">
<header>
<h1><span class="live-indicator"></span>Status Operation Center</h1>
<div id="last-updated" style="font-size: 0.7rem; margin-top: 5px; color: #555;">Initializing system link...</div>
</header>
<div id="stats-grid" class="grid">
<div class="stat-card">
<div class="stat-label">Total Cycles</div>
<div id="total-attempts" class="stat-value">--</div>
</div>
<div class="stat-card">
<div class="stat-label">Pool Variety</div>
<div id="pool-count" class="stat-value">--</div>
</div>
<div class="stat-card">
<div class="stat-label">Success Rate</div>
<div id="success-count" class="stat-value">--</div>
</div>
<div class="stat-card">
<div class="stat-label">Failure Rate</div>
<div id="error-rate" class="stat-value">--</div>
</div>
</div>
<h3>Operational Logs</h3>
<table class="history-table">
<thead>
<tr>
<th style="width: 25%;">Timestamp (UTC)</th>
<th style="width: 10%;">Icon</th>
<th>Applied Status</th>
</tr>
</thead>
<tbody id="history-body">
<tr><td colspan="3">Fetching operational logs...</td></tr>
</tbody>
</table>
<footer>
<p>Vibe-coded via Gemini 3 Fast • Automated GitHub Status Dashboard</p>
</footer>
</div>
<script>
const USERNAME = '4uffin';
const REPO = 'random-github-status';
const DATA_URL = `https://raw.githubusercontent.com/${USERNAME}/${REPO}/main/stats.json`;
// Map of GitHub Shortcodes to Unicode Emojis for browser rendering
const emojiMap = {
":video_game:": "🎮", ":ghost:": "👻", ":telephone_receiver:": "📞", ":computer:": "💻",
":house:": "🏠", ":bread:": "🍞", ":distraught:": "😫", ":keyboard:": "⌨️",
":memory:": "💾", ":penguin:": "🐧", ":memo:": "📝", ":question:": "❓",
":milky_way:": "🌌", ":crossed_swords:": "⚔️", ":city_sunset:": "🌆", ":foggy:": "🌫️",
":speech_balloon:": "💬", ":fountain_pen:": "🖋️", ":art:": "🎨", ":satellite:": "📡",
":night_with_stars:": "🌃", ":heart:": "❤️", ":icecream:": "🍦", ":black_currant:": "🫐",
":eyeglasses:": "👓", ":money_with_wings:": "💸", ":clapper:": "🎬", ":briefcase:": "💼",
":bear:": "🐻", ":records:": "💿", ":office:": "🏢", ":owl:": "🦉",
":person_doing_cartwheel:": "🤸", ":pretzel:": "🥨", ":trophy:": "🏆", ":hot_pepper:": "🌶️",
":zap:": "⚡", ":classical_building:": "🏛️", ":red_car:": "🚗", ":high_voltage:": "⚡",
":seedling:": "🌱", ":sauropod:": "🦕", ":smoking:": "🚬", ":ticket:": "🎫",
":multiplication:": "✖️", ":coin:": "🪙", ":ringed_planet:": "🪐", ":stop_sign:": "🛑",
":red_circle:": "🔴", ":key:": "🔑", ":robot:": "🤖", ":rocket:": "🚀",
":ship:": "🚢", ":mag:": "🔍", ":suit:": "🕴️", ":snowflake:": "❄️",
":man_mage:": "🧙", ":rabbit:": "🐇", ":birthday:": "🎂", ":sun_with_face:": "🌞",
":anchor:": "⚓", ":radioactive:": "☢️", ":fairy:": "🧚", ":scroll:": "📜",
":skull:": "💀", ":wind_face:": "🌬️", ":mushroom:": "🍄", ":star:": "⭐",
":floppy_disk:": "💾", ":wastebasket:": "🗑️", ":lady_beetle:": "🐞", ":shrug:": "🤷",
":cyclone:": "🌀", ":exploding_head:": "🤯", ":package:": "📦", ":hammer:": "🔨",
":hot_face:": "🥵", ":thinking:": "🤔", ":repeat:": "🔁", ":cat:": "🐱",
":hocho:": "🔪", ":chart_with_upwards_trend:": "📈", ":dice:": "🎲",
":put_litter_in_its_place:": "🚮", ":vulcan_salute:": "🖖", ":eye:": "👁️",
":tux:": "🐧", ":t_rex:": "🦖", ":joystick:": "🕹️", ":alien:": "👽",
":microchip:": "📟", ":satellite_antenna:": "📡", ":crystal_ball:": "🔮",
":test_tube:": "🧪", ":infinity:": "∞", ":dna:": "🧬"
};
async function fetchStats() {
const historyBody = document.getElementById('history-body');
try {
// Fetch the updated stats.json containing new emoji field
const response = await fetch(DATA_URL);
if (!response.ok) throw new Error('Data fetch failed');
const data = await response.json();
// Populate summary cards
document.getElementById('total-attempts').innerText = data.total_attempts;
document.getElementById('pool-count').innerText = data.status_pool_count || '200';
document.getElementById('success-count').innerText = data.success_count;
document.getElementById('error-rate').innerText = data.error_rate_percent;
document.getElementById('last-updated').innerText = `Last System Run: ${data.last_run}`;
historyBody.innerHTML = '';
data.history.forEach(item => {
// Perform lookup using the new explicit emoji field from JSON
const icon = emojiMap[item.emoji] || "📝";
const row = document.createElement('tr');
row.innerHTML = `
<td>${item.time}</td>
<td class="emoji-box">${icon}</td>
<td><span class="status-pill">${item.status}</span></td>
`;
historyBody.appendChild(row);
});
} catch (err) {
historyBody.innerHTML = `<tr><td colspan="3" style="color:red; text-align:center;">OFFLINE: ${err.message}</td></tr>`;
}
}
// Initial load and periodic refresh cycle
fetchStats();
setInterval(fetchStats, 300000); // 5-minute refresh interval
</script>
</body>
</html>