-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
227 lines (209 loc) · 9.77 KB
/
Copy pathindex.html
File metadata and controls
227 lines (209 loc) · 9.77 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
225
226
227
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>cf.analyzer — coder's edge</title>
<meta name="description" content="Codeforces profile analysis — problem suggestions, streaks, and progression." />
<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=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="app">
<!-- Background dot grid -->
<svg class="bg-grid" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<defs>
<pattern id="dots" width="28" height="28" patternUnits="userSpaceOnUse">
<circle cx="1.5" cy="1.5" r="1" fill="rgba(255,255,255,0.035)"/>
</pattern>
</defs>
<rect width="100%" height="100%" fill="url(#dots)"/>
</svg>
<!-- Header -->
<header class="header">
<div class="container header-inner">
<div class="brand">
<div class="brand-logo mono"><span class="brace">{</span>CF<span class="brace">}</span></div>
<div>
<div class="brand-name">cf.analyzer</div>
<div class="brand-sub mono">coder's edge<span class="blink">_</span></div>
</div>
</div>
<div class="api-badge mono"><span class="api-dot"></span>API online</div>
</div>
</header>
<main class="main">
<div class="container">
<!-- Hero Search -->
<section class="hero">
<div class="hero-left">
<h1 class="hero-title">
<span class="mono kw">fn</span> <span class="mono">analyze</span>(<span class="mono param">handle</span>: <span class="mono">str</span>)
<span class="mono arrow">→</span> <span class="mono ret">insights</span>
</h1>
<p class="hero-desc">Enter your Codeforces handle to get problem suggestions, streak tracking, and progression insights.</p>
<form id="searchForm" class="search-row" autocomplete="off">
<div class="input-box">
<span class="mono prompt">$</span>
<input id="handleInput" type="text" placeholder="tourist" autocapitalize="off" spellcheck="false" required aria-label="Codeforces handle" />
<span class="mono ext">.cf</span>
</div>
<button id="analyzeBtn" class="btn-primary mono" type="submit">analyze</button>
</form>
<p class="hero-hint">Press <kbd class="mono">Enter</kbd> to run</p>
</div>
<div class="hero-right">
<div class="code-win">
<div class="win-bar">
<span class="win-dot red"></span>
<span class="win-dot yellow"></span>
<span class="win-dot green"></span>
<span class="win-title mono">suggestion.cpp</span>
</div>
<pre class="win-code mono"><span class="c">// practice pick for @<span id="cppHandle">tourist</span></span>
<span class="kw">auto</span> problem = <span class="fn">pickPracticeProblem</span>(
<span class="c">/* rating */</span> <span class="num" id="cppRating">1700</span>,
<span class="c">/* focusTags */</span> {<span class="str" id="cppTags">"dp", "graphs"</span>}
);
<span class="kw">cout</span> << problem.<span class="prop">url</span> << <span class="str">"\n"</span>;
<span class="c">// -> "<a id="cppUrl" href="https://codeforces.com/problemset/problem/1234/D" target="_blank" rel="noopener noreferrer" class="code-link">https://codeforces.com/problemset/problem/1234/D</a>"</span></pre>
</div>
</div>
</section>
<!-- Loader -->
<div id="loader" class="loader hidden" aria-live="polite" aria-label="Loading">
<div class="loader-track"><div class="loader-fill"></div></div>
<p class="mono loader-text">compiling insights<span class="ellipsis"></span></p>
</div>
<!-- Error -->
<div id="errorBox" class="error-box hidden" role="alert"></div>
<!-- Results -->
<section id="results" class="results hidden" aria-live="polite">
<!-- Row 1: Profile -->
<div class="card profile-card">
<div class="profile-left">
<div class="avatar-wrap">
<img id="avatar" class="avatar" alt="avatar" />
<span id="rankBadge" class="rank-badge mono">unrated</span>
</div>
<div class="profile-info">
<div class="handle-row">
<span id="handleDisplay" class="handle mono">handle</span>
<span id="country" class="country">Earth</span>
</div>
<div class="rating-row">
<div class="r-block">
<div class="r-label">rating</div>
<div id="rating" class="r-val mono">—</div>
</div>
<div class="r-divider"></div>
<div class="r-block">
<div class="r-label">max</div>
<div id="maxRating" class="r-val mono">—</div>
</div>
<div class="r-divider"></div>
<div class="r-block">
<div class="r-label">last Δ</div>
<div id="lastDelta" class="r-val mono">—</div>
</div>
</div>
</div>
</div>
<div class="profile-stats">
<div class="pstat">
<div class="pstat-val mono" id="solvedCount">—</div>
<div class="pstat-label">solved</div>
</div>
<div class="pstat">
<div class="pstat-val mono" id="totalSubs">—</div>
<div class="pstat-label">submissions</div>
</div>
<div class="pstat">
<div class="pstat-val mono" id="contribution">—</div>
<div class="pstat-label">contribution</div>
</div>
</div>
<div class="profile-weak">
<div class="weak-title">weak areas</div>
<div id="weakTags" class="tag-list"></div>
</div>
</div>
<!-- Row 2: Streak + Suggestion -->
<div class="two-col">
<!-- Streak -->
<div class="card">
<div class="card-header">
<span class="card-title">streak & activity</span>
<span class="card-meta mono" id="streakWindowMeta">last 70 days</span>
</div>
<div class="streak-row">
<div class="streak-stat">
<div class="streak-val mono" id="currentStreak">0</div>
<div class="streak-lbl">current <span>🔥</span></div>
</div>
<div class="streak-stat">
<div class="streak-val mono" id="maxStreak">0</div>
<div class="streak-lbl">longest</div>
</div>
<div class="streak-stat">
<div class="streak-val mono" id="activeDays">0</div>
<div class="streak-lbl">active days</div>
</div>
</div>
<div id="activityCalendar" class="calendar"></div>
<div class="cal-legend">
<span>less</span>
<span class="leg l0"></span><span class="leg l1"></span>
<span class="leg l2"></span><span class="leg l3"></span>
<span>more</span>
</div>
</div>
<!-- Problem Suggestion -->
<div class="card">
<div class="card-header">
<span class="card-title">suggested problem</span>
<button id="newProblemBtn" class="btn-ghost btn-refresh mono" type="button">new ⟳</button>
</div>
<div id="problemCard" class="problem-area">
<p class="empty-state">Enter a handle to get suggestions</p>
</div>
</div>
</div>
<!-- Row 3: Rating Chart -->
<div class="card">
<div class="card-header">
<span class="card-title">rating progression</span>
<span class="card-meta mono" id="contestCount">0 contests</span>
</div>
<div class="chart-area">
<canvas id="ratingChart"></canvas>
</div>
<div class="chart-footer">
<div class="cfstat"><div class="cfstat-label">best rank</div><div class="cfstat-val mono" id="bestRank">#—</div></div>
<div class="cfstat"><div class="cfstat-label">worst rank</div><div class="cfstat-val mono" id="worstRank">#—</div></div>
<div class="cfstat"><div class="cfstat-label">avg Δ/contest</div><div class="cfstat-val mono" id="avgDelta">—</div></div>
</div>
</div>
<!-- Row 4: Distribution -->
<div class="card">
<div class="card-header">
<span class="card-title">solved by rating</span>
<span class="card-meta mono">distribution</span>
</div>
<div id="ratingBars" class="bars"></div>
</div>
</section>
</div>
</main>
<footer class="footer">
<div class="container footer-inner">
<span class="mono footer-left">cf.analyzer v3.0 · <a href="https://codeforces.com" target="_blank" rel="noopener" class="link">codeforces.com</a></span>
<span class="mono footer-right">client-side only · no tracking</span>
</div>
</footer>
</div>
<script type="module" src="index.js"></script>
</body>
</html>