{{ message }}
Repository navigation
Expand file tree
/
Copy pathstats.html
More file actions
340 lines (324 loc) · 10.9 KB
/
Copy pathstats.html
File metadata and controls
340 lines (324 loc) · 10.9 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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Statistics · BlockNSFW</title>
<script src="ui/scheme.js"></script>
<link rel="stylesheet" href="ui/tokens.css" />
<link rel="stylesheet" href="ui/components.css" />
<style>
/* Statistics: numbered sections, each a full-width band of its own, so
the page changes ground as it goes rather than being one flat field.
Inside every band the same 960px column; figures are mono, everything
else is sans. */
.page {
max-width: calc(960px + 2 * var(--space-6));
margin-inline: auto;
padding-inline: var(--space-6);
}
.page-head {
padding-block: var(--space-7) var(--space-6);
}
.back-link {
gap: 6px;
padding: var(--space-1) 0;
}
.page-title {
margin-top: var(--space-4);
}
.page-alert {
margin-top: var(--space-3);
color: var(--color-ink);
font-weight: 500;
}
.section {
padding-block: var(--space-7);
}
.week-row {
display: flex;
flex-wrap: wrap;
gap: var(--space-2) var(--space-6);
margin-top: var(--space-5);
}
.section.band-sheet {
border-block: 1px solid var(--color-rule);
}
.section-head {
margin-bottom: var(--space-5);
}
/* Records in two columns where there is room, one where there isn't.
Every record is ruled above and below, and each overlaps the next by
its own hairline, so a column always closes on one rule. */
.record-grid {
display: grid;
grid-template-columns: minmax(0, 1fr);
column-gap: var(--space-7);
margin: 0;
}
.record-grid > .record {
margin-bottom: -1px;
border-block: 1px solid var(--color-rule);
}
@media (min-width: 45rem) {
.record-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
.record-label {
display: block;
font-size: var(--text-row);
line-height: 1.35;
color: var(--color-ink);
}
.record-desc {
display: block;
margin-top: 2px;
font-size: 13px;
line-height: 1.45;
color: var(--color-ink-2);
}
/* The last seven days as seven pine bars on one baseline, oldest first.
Each day reads as "Thu, Oct 2: 9 blocks"; the drawing is only the
picture of it. */
.week-chart {
--plot: 196px;
position: relative;
display: grid;
grid-template-columns: repeat(7, minmax(0, 1fr));
gap: var(--space-4);
margin: 0;
padding: 0;
list-style: none;
}
.week-chart::after {
content: "";
position: absolute;
left: 0;
right: 0;
top: var(--plot);
border-top: 1px solid var(--color-rule-2);
}
.week-day {
display: flex;
flex-direction: column;
align-items: center;
}
.week-name {
order: 2;
margin-top: 10px;
text-align: center;
}
.week-day.is-today .week-name {
color: var(--color-pine);
}
.week-plot {
order: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
gap: var(--space-2);
width: 100%;
height: var(--plot);
}
.week-count {
font-family: var(--font-mono);
font-size: 13px;
line-height: 1;
font-variant-numeric: tabular-nums;
font-feature-settings: "tnum" 1;
color: var(--color-ink-2);
}
.week-bar {
display: block;
width: 100%;
max-width: 56px;
background: var(--color-pine);
}
.site-list {
max-width: var(--measure);
}
.domain-count {
flex: none;
font-family: var(--font-mono);
font-size: 13px;
font-variant-numeric: tabular-nums;
font-feature-settings: "tnum" 1;
color: var(--color-ink-2);
white-space: nowrap;
}
.quote {
margin-block: 0;
padding-block: var(--space-7) var(--space-6);
}
.quote-text {
margin: 0;
max-width: var(--measure);
font-family: var(--font-display);
font-style: italic;
font-size: 20px;
line-height: 1.45;
color: var(--color-ink-2);
text-wrap: balance;
}
.quote-author {
margin-top: var(--space-2);
}
.page-foot {
padding-bottom: var(--space-7);
}
@media (max-width: 40rem) {
.page {
padding-inline: var(--space-4);
}
.page-head {
padding-top: var(--space-6);
}
.section {
padding-block: var(--space-6);
}
.week-chart {
--plot: 160px;
gap: var(--space-2);
}
}
</style>
</head>
<body>
<main>
<header class="page page-head">
<a class="arrow-link meta back-link" href="options.html">
<svg class="icon icon-12 icon-left" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path d="M13.5 8h-11M6.5 4l-4 4 4 4" /></svg>
Settings
</a>
<h1 class="title title-page page-title">Statistics</h1>
<p class="notice page-alert" id="stats-alert" role="alert"></p>
</header>
<!-- Shown only while a run of protection is under way. -->
<section class="section band-sheet" id="protection-section" aria-labelledby="protection-head" hidden>
<div class="page">
<h2 class="section-head" id="protection-head"><span class="index">01</span>Protection</h2>
<dl class="record-grid">
<div class="record">
<dt class="record-label">
Days kept
<span class="record-desc" id="days-kept-desc">Protection on all day and no slip, in the last 30 days</span>
</dt>
<dd class="record-value" id="days-kept">0 of 0</dd>
</div>
<div class="record">
<dt class="record-label">
Current run
<span class="record-desc" id="streak-start-date"></span>
</dt>
<dd class="record-value" id="current-streak">0</dd>
</div>
<div class="record">
<dt class="record-label">Longest run</dt>
<dd class="record-value" id="longest-streak">0 days</dd>
</div>
<div class="record" id="kept-moments-record" hidden>
<dt class="record-label">
Moments waited out
<span class="record-desc">From the blocked page’s “I’m OK now”</span>
</dt>
<dd class="record-value" id="kept-moments">0</dd>
</div>
<div class="record" id="gateway-stops-record" hidden>
<dt class="record-label">
Stopped at the door
<span class="record-desc" id="gateway-stops-desc">Times you chose “Not tonight” on a gateway</span>
</dt>
<dd class="record-value" id="gateway-stops">0</dd>
</div>
</dl>
<p class="week-row">
<a class="arrow-link" href="week.html">
Read your week
<svg class="icon icon-12 icon-right" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path d="M2.5 8h11M9.5 4l4 4-4 4" /></svg>
</a>
<a class="arrow-link" href="month.html">
Your month
<svg class="icon icon-12 icon-right" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path d="M2.5 8h11M9.5 4l4 4-4 4" /></svg>
</a>
<a class="arrow-link" href="hardest.html">
When it’s hardest
<svg class="icon icon-12 icon-right" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path d="M2.5 8h11M9.5 4l4 4-4 4" /></svg>
</a>
<a class="arrow-link" href="gooddays.html">
Your good days
<svg class="icon icon-12 icon-right" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path d="M2.5 8h11M9.5 4l4 4-4 4" /></svg>
</a>
<a class="arrow-link" href="path.html">
The path
<svg class="icon icon-12 icon-right" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path d="M2.5 8h11M9.5 4l4 4-4 4" /></svg>
</a>
</p>
</div>
</section>
<section class="section" aria-labelledby="totals-head">
<div class="page">
<h2 class="section-head" id="totals-head"><span class="index">02</span>Totals</h2>
<dl class="record-grid">
<div class="record">
<dt class="record-label">Blocks in total</dt>
<dd class="record-value" id="total-blocked">0</dd>
</div>
<div class="record">
<dt class="record-label">Sites blocked</dt>
<dd class="record-value" id="websites-blocked">0</dd>
</div>
<div class="record">
<dt class="record-label">Images blocked</dt>
<dd class="record-value" id="images-filtered">0</dd>
</div>
<div class="record">
<dt class="record-label">Search results blocked</dt>
<dd class="record-value" id="search-filtered">0</dd>
</div>
<div class="record">
<dt>
<span class="record-label">Time saved</span>
<span class="record-desc">Estimated at <span class="mono tnum">5</span> minutes a block</span>
</dt>
<dd class="record-value" id="time-saved">0m</dd>
</div>
</dl>
</div>
</section>
<section class="section band-sheet" aria-labelledby="week-head">
<div class="page">
<h2 class="section-head" id="week-head"><span class="index">03</span>Last 7 days</h2>
<ol class="week-chart" id="week-list" aria-labelledby="week-head"></ol>
</div>
</section>
<section class="section" aria-labelledby="top-head">
<div class="page">
<h2 class="section-head" id="top-head"><span class="index">04</span>Most blocked sites</h2>
<ol class="domain-list site-list" id="top-sites">
<li class="domain-empty">Nothing has been blocked yet.</li>
</ol>
</div>
</section>
<section class="section band-sheet" aria-labelledby="recent-head">
<div class="page">
<h2 class="section-head" id="recent-head"><span class="index">05</span>Recent</h2>
<ol class="domain-list site-list" id="activity-list">
<li class="domain-empty">No recent blocks.</li>
</ol>
</div>
</section>
<figure class="page quote">
<blockquote class="quote-text" id="quote-text">The secret of change is to focus all of your energy not on fighting the old, but on building the new.</blockquote>
<figcaption class="meta quote-author" id="quote-author">— Socrates</figcaption>
</figure>
<footer class="page meta page-foot">BlockNSFW · monolab</footer>
</main>
<script src="shared/moments.js"></script>
<script src="shared/gateways.js"></script>
<script src="shared/ledger.js"></script>
<script src="shared/progress.js"></script>
<script src="stats.js"></script>
</body>
</html>
You can’t perform that action at this time.
