-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
533 lines (486 loc) · 21.3 KB
/
index.html
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
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
<html>
<head>
<title>Xenial.Template</title>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1"
/>
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
<input
class="xenial__toggletheme-checkbox"
id="xenial-toggle-theme"
type="checkbox"
aria-hidden="true"
/>
<div class="xenial-body">
<header class="xenial-header">
<input
class="xenial-header__togglenavbar-checkbox"
id="xenial-toggle-navbar"
type="checkbox"
aria-hidden="true"
/>
<div class="xenial-header__logo__teaser" aria-hidden="true">
<img src="./img/logo.svg" />
<span class="xenial-header__logo__teaser__brand-rows">
<span class="xenial-header__logo__teaser__brand-first-row">
Manuel Grundner
</span>
<span class="xenial-header__logo__teaser__brand-second-row">
code & consult
</span>
</span>
</div>
<div class="xenial-header__logo">
<img src="./img/logo.svg" />
<span class="xenial-header__logo__brand-rows">
<span class="xenial-header__logo__brand-first-row">
Manuel Grundner
</span>
<span class="xenial-header__logo__brand-second-row">
code & consult
</span>
</span>
</div>
<label
class="xenial-header__togglenavbar-label"
for="xenial-toggle-navbar"
>
<div>
<span class="middle">
<span class="before"></span>
<span class="after"></span>
</span>
</div>
</label>
<nav class="xenial-header__nav">
<ul class="xenial-header__navlist">
<li>
<label for="xenial-toggle-theme">
<i class="fas fa-sun"></i>
Theme
</label>
</li>
<li>
<a href="#">
<i class="fas fa-home"></i>
Home
</a>
</li>
<li>
<a href="#">
<i class="fas fa-info-circle"></i>
About
</a>
</li>
<li>
<a href="#">
<i class="fas fa-briefcase"></i>
Projects
</a>
</li>
<li>
<a href="#">
<i class="fas fa-book"></i>
Series
</a>
</li>
<li>
<a href="#">
<i class="fas fa-archive"></i>
Archive
</a>
</li>
<li>
<a href="#">
<i class="fas fa-tag"></i>
Tags
</a>
</li>
</ul>
</nav>
</header>
<main>
<article>
<h1>Lorem ipsum dolor</h1>
<p>
sit amet, consectetur adipisicing elit. Deleniti facere minus atque.
Recusandae assumenda, inventore veniam voluptatum doloribus expedita
adipisci corporis nobis molestiae, necessitatibus repudiandae eum!
Vero, dicta? Molestias, autem! Lorem ipsum dolor sit amet
consectetur adipisicing elit. Ipsa, quibusdam accusamus quas nemo
hic delectus voluptatibus libero aspernatur quo consectetur dolore
soluta expedita voluptatem, nulla officia quis deserunt magnam
totam. Lorem ipsum dolor sit amet consectetur adipisicing elit.
Veniam mollitia, quas impedit, amet nihil exercitationem id autem
culpa eveniet sit voluptate rerum eaque, vel sunt? Officia
temporibus cupiditate quia perspiciatis. Lorem ipsum, dolor sit amet
consectetur adipisicing elit. Explicabo delectus qui aperiam
consectetur odit sapiente beatae similique vitae. Esse
necessitatibus iure recusandae minus quibusdam officia accusantium.
Nobis iusto vero fugiat?
</p>
<h2>Lorem ipsum dolor</h2>
<p>
<pre><code class="language-csharp">using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Threading.Tasks;
using Xenial.Delicious.Metadata;
using Xenial.Delicious.Scopes;
namespace Xenial.Delicious.Reporters
{
public static class NyanCatReporter
{
private const int colorCount = 6 * 7;
private static readonly int nyanCatWidth;
private static readonly int width;
private static int colorIndex;
private static readonly int numberOfLines;
private static readonly Color[]? rainbowColors;
private static bool tick;
private static readonly List<List<string>>? trajectories;
private static readonly int trajectoryWidthMax;
//TODO: FOO
static NyanCatReporter()
{
if (!HasValidConsole)
{
return;
}
Pastel.ConsoleExtensions.Enable();
nyanCatWidth = 11;
width = (int)(Console.WindowWidth * 0.75);
colorIndex = 0;
numberOfLines = Enum.GetValues(typeof(TestOutcome)).Length;
rainbowColors = GenerateColors();
tick = false;
trajectories = new List<List<string>>();
for (var i = 0; i < numberOfLines; i++)
{
trajectories.Add(new List<string>());
}
trajectoryWidthMax = width - nyanCatWidth;
if (trajectoryWidthMax < 0)
{
trajectoryWidthMax = 0;
}
}
public static TastyScope RegisterNyanReporter(this TastyScope scope)
=> (scope ?? throw new ArgumentNullException(nameof(scope))).RegisterReporter(Report)
.RegisterReporter(ReportSummary);
public static TastyScope Register()
=> Tasty.TastyDefaultScope.RegisterNyanReporter();
private static bool? hasValidConsole;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "We don't care about which exception is thrown")]
private static bool HasValidConsole
{
get
{
if (!hasValidConsole.HasValue)
{
try
{
hasValidConsole = Console.WindowWidth > 0;
}
catch
{
hasValidConsole = false;
}
}
return hasValidConsole.Value;
}
}
private static Task ReportSummary(IEnumerable<TestCaseResult> tests)
{
Console.WriteLine();
Console.ForegroundColor = ColorScheme.Default.DefaultColor;
Console.WriteLine($"\t{tests.Count()} total ({(int)Math.Round(TimeSpan.FromTicks(tests.Sum(t => t.Duration.Ticks)).TotalSeconds, 0, MidpointRounding.AwayFromZero)} s)");
Console.ForegroundColor = ColorScheme.Default.SuccessColor;
var successCount = tests.Count(t => t.TestOutcome == TestOutcome.Success);
if (successCount > 0) { Console.WriteLine($"\t{ColorScheme.Default.SuccessIcon} {successCount} passing"); }
Console.ForegroundColor = ColorScheme.Default.ErrorColor;
var failedCount = tests.Count(t => t.TestOutcome == TestOutcome.Failed);
if (failedCount > 0) { Console.WriteLine($"\t{ColorScheme.Default.ErrorIcon} {failedCount} failed"); }
Console.ForegroundColor = ColorScheme.Default.SuccessColor;
if (tests.Count() == successCount) { Console.WriteLine($"\t{ColorScheme.Default.SuccessIcon} All tests passed"); }
if (failedCount > 0)
{
Console.ForegroundColor = ColorScheme.Default.ErrorColor;
Console.WriteLine($"\t{ColorScheme.Default.ErrorIcon} Failed tests:");
foreach (var fail in tests.Where(t => t.TestOutcome == TestOutcome.Failed))
{
Console.WriteLine($"\t\t{fail.FullName}");
Console.WriteLine($"\t\t\t{fail.AdditionalMessage}");
}
}
return Task.CompletedTask;
}
public static Task Report(TestCaseResult test)
{
if (!HasValidConsole)
{
return Task.CompletedTask;
}
Draw(test);
return Task.CompletedTask;
}
private static Color[] GenerateColors()
{
var colors = new Color[colorCount];
var progress = 0f;
var step = 1f / colorCount;
for (var i = 0; i < colorCount; i++)
{
colors[i] = Rainbow(progress);
progress += step;
}
return colors;
}
private static Color Rainbow(float progress)
{
var div = (Math.Abs(progress % 1) * 6);
var ascending = (int)((div % 1) * 255);
var descending = 255 - ascending;
return ((int)div) switch
{
0 => Color.FromArgb(255, 255, ascending, 0),
1 => Color.FromArgb(255, descending, 255, 0),
2 => Color.FromArgb(255, 0, 255, ascending),
3 => Color.FromArgb(255, 0, descending, 255),
4 => Color.FromArgb(255, ascending, 0, 255),
_ => Color.FromArgb(255, 255, 0, descending),
};
}
private static void Draw(TestCaseResult testCase)
{
Console.CursorTop = 0;
Console.CursorLeft = 0;
tick = !tick;
for (var i = 0; i < numberOfLines; i++)
{
if (trajectories![i].Count > trajectoryWidthMax)
{
foreach (var traj in trajectories)
{
traj.RemoveAt(0);
}
}
trajectories[i].Add(AppendRainbow());
}
var catIndex = 0;
var cat = GetNyanCat(testCase).ToList();
foreach (var traj in trajectories!)
{
Console.WriteLine(string.Join(string.Empty, traj) + cat[catIndex]);
catIndex++;
}
}
private static string AppendRainbow() => Rainbowify(tick ? "_" : "-");
private static string Rainbowify(string input)
{
var color = rainbowColors![colorIndex % rainbowColors.Length];
var result = Pastel.ConsoleExtensions.Pastel(input, color);
colorIndex += 1;
return result;
}
private static IEnumerable<string> GetNyanCat(TestCaseResult testCase)
{
yield return " _,------,";
yield return " _| /\\_/\\";
yield return " ^|__" + Face(testCase);
yield return " \"\" \"\" ";
}
private static string Face(TestCaseResult testCase)
=> testCase.TestOutcome switch
{
TestOutcome.NotRun => "( o .o)",
TestOutcome.Ignored => "( - .-)",
TestOutcome.Failed => "( x .x)",
TestOutcome.Success => "( ^ .^)",
_ => "( - .-)",
};
}
}</code></pre>
sit amet, consectetur adipisicing elit. Deleniti facere minus atque.
Recusandae assumenda, inventore veniam voluptatum doloribus expedita
adipisci corporis nobis molestiae, necessitatibus repudiandae eum!
Vero, dicta? Molestias, autem! Lorem ipsum dolor sit amet
consectetur adipisicing elit. Ipsa, quibusdam accusamus quas nemo
hic delectus voluptatibus libero aspernatur quo consectetur dolore
soluta expedita voluptatem, nulla officia quis deserunt magnam
totam. Lorem ipsum dolor sit amet consectetur adipisicing elit.
Veniam mollitia, quas impedit, amet nihil exercitationem id autem
culpa eveniet sit voluptate rerum eaque, vel sunt? Officia
temporibus cupiditate quia perspiciatis. Lorem ipsum, dolor sit amet
consectetur adipisicing elit. Explicabo delectus qui aperiam
consectetur odit sapiente beatae similique vitae. Esse
necessitatibus iure recusandae minus quibusdam officia accusantium.
Nobis iusto vero fugiat?
</p>
<h1>Lorem ipsum dolor</h1>
<p>
sit amet, consectetur adipisicing elit. Deleniti facere minus atque.
Recusandae assumenda, inventore veniam voluptatum doloribus expedita
adipisci corporis nobis molestiae, necessitatibus repudiandae eum!
Vero, dicta? Molestias, autem! Lorem ipsum dolor sit amet
consectetur adipisicing elit. Ipsa, quibusdam accusamus quas nemo
hic delectus voluptatibus libero aspernatur quo consectetur dolore
soluta expedita voluptatem, nulla officia quis deserunt magnam
totam. Lorem ipsum dolor sit amet consectetur adipisicing elit.
Veniam mollitia, quas impedit, amet nihil exercitationem id autem
culpa eveniet sit voluptate rerum eaque, vel sunt? Officia
temporibus cupiditate quia perspiciatis. Lorem ipsum, dolor sit amet
consectetur adipisicing elit. Explicabo delectus qui aperiam
consectetur odit sapiente beatae similique vitae. Esse
necessitatibus iure recusandae minus quibusdam officia accusantium.
Nobis iusto vero fugiat?
</p>
<h2>Lorem ipsum dolor</h2>
<p>
sit amet, consectetur adipisicing elit. Deleniti facere minus atque.
Recusandae assumenda, inventore veniam voluptatum doloribus expedita
adipisci corporis nobis molestiae, necessitatibus repudiandae eum!
Vero, dicta? Molestias, autem! Lorem ipsum dolor sit amet
consectetur adipisicing elit. Ipsa, quibusdam accusamus quas nemo
hic delectus voluptatibus libero aspernatur quo consectetur dolore
soluta expedita voluptatem, nulla officia quis deserunt magnam
totam. Lorem ipsum dolor sit amet consectetur adipisicing elit.
Veniam mollitia, quas impedit, amet nihil exercitationem id autem
culpa eveniet sit voluptate rerum eaque, vel sunt? Officia
temporibus cupiditate quia perspiciatis. Lorem ipsum, dolor sit amet
consectetur adipisicing elit. Explicabo delectus qui aperiam
consectetur odit sapiente beatae similique vitae. Esse
necessitatibus iure recusandae minus quibusdam officia accusantium.
Nobis iusto vero fugiat?
</p>
<!-- <h3>Lorem ipsum dolor</h3><p>
sit amet, consectetur adipisicing elit. Deleniti facere minus atque.
Recusandae assumenda, inventore veniam voluptatum doloribus expedita
adipisci corporis nobis molestiae, necessitatibus repudiandae eum!
Vero, dicta? Molestias, autem! Lorem ipsum dolor sit amet consectetur
adipisicing elit. Ipsa, quibusdam accusamus quas nemo hic delectus
voluptatibus libero aspernatur quo consectetur dolore soluta expedita
voluptatem, nulla officia quis deserunt magnam totam. Lorem ipsum
dolor sit amet consectetur adipisicing elit. Veniam mollitia, quas
impedit, amet nihil exercitationem id autem culpa eveniet sit
voluptate rerum eaque, vel sunt? Officia temporibus cupiditate quia
perspiciatis. Lorem ipsum, dolor sit amet consectetur adipisicing
elit. Explicabo delectus qui aperiam consectetur odit sapiente beatae
similique vitae. Esse necessitatibus iure recusandae minus quibusdam
officia accusantium. Nobis iusto vero fugiat?
</p>
<h2>Lorem ipsum dolor</h2>
<p>
sit amet, consectetur adipisicing elit. Deleniti facere minus atque.
Recusandae assumenda, inventore veniam voluptatum doloribus expedita
adipisci corporis nobis molestiae, necessitatibus repudiandae eum!
Vero, dicta? Molestias, autem! Lorem ipsum dolor sit amet consectetur
adipisicing elit. Ipsa, quibusdam accusamus quas nemo hic delectus
voluptatibus libero aspernatur quo consectetur dolore soluta expedita
voluptatem, nulla officia quis deserunt magnam totam. Lorem ipsum
dolor sit amet consectetur adipisicing elit. Veniam mollitia, quas
impedit, amet nihil exercitationem id autem culpa eveniet sit
voluptate rerum eaque, vel sunt? Officia temporibus cupiditate quia
perspiciatis. Lorem ipsum, dolor sit amet consectetur adipisicing
elit. Explicabo delectus qui aperiam consectetur odit sapiente beatae
similique vitae. Esse necessitatibus iure recusandae minus quibusdam
officia accusantium. Nobis iusto vero fugiat?
</p>
<h1>Lorem ipsum dolor</h1>
<p>
sit amet, consectetur adipisicing elit. Deleniti facere minus atque.
Recusandae assumenda, inventore veniam voluptatum doloribus expedita
adipisci corporis nobis molestiae, necessitatibus repudiandae eum!
Vero, dicta? Molestias, autem! Lorem ipsum dolor sit amet consectetur
adipisicing elit. Ipsa, quibusdam accusamus quas nemo hic delectus
voluptatibus libero aspernatur quo consectetur dolore soluta expedita
voluptatem, nulla officia quis deserunt magnam totam. Lorem ipsum
dolor sit amet consectetur adipisicing elit. Veniam mollitia, quas
impedit, amet nihil exercitationem id autem culpa eveniet sit
voluptate rerum eaque, vel sunt? Officia temporibus cupiditate quia
perspiciatis. Lorem ipsum, dolor sit amet consectetur adipisicing
elit. Explicabo delectus qui aperiam consectetur odit sapiente beatae
similique vitae. Esse necessitatibus iure recusandae minus quibusdam
officia accusantium. Nobis iusto vero fugiat?
</p>
<h2>Lorem ipsum dolor</h2>
<p>
sit amet, consectetur adipisicing elit. Deleniti facere minus atque.
Recusandae assumenda, inventore veniam voluptatum doloribus expedita
adipisci corporis nobis molestiae, necessitatibus repudiandae eum!
Vero, dicta? Molestias, autem! Lorem ipsum dolor sit amet consectetur
adipisicing elit. Ipsa, quibusdam accusamus quas nemo hic delectus
voluptatibus libero aspernatur quo consectetur dolore soluta expedita
voluptatem, nulla officia quis deserunt magnam totam. Lorem ipsum
dolor sit amet consectetur adipisicing elit. Veniam mollitia, quas
impedit, amet nihil exercitationem id autem culpa eveniet sit
voluptate rerum eaque, vel sunt? Officia temporibus cupiditate quia
perspiciatis. Lorem ipsum, dolor sit amet consectetur adipisicing
elit. Explicabo delectus qui aperiam consectetur odit sapiente beatae
similique vitae. Esse necessitatibus iure recusandae minus quibusdam
officia accusantium. Nobis iusto vero fugiat?
</p>
--></article>
</main>
<footer class="xenial-footer">
<div class="xenial-footer__social">
<h3>Learned something new?</h3>
<p>Consider supporting me on the following platforms</p>
<ul class="xenial-footer__social-links">
<li>
<a href="#"><i class="fab fa-github"></i></a>
</li>
<li>
<a href="#"><i class="fab fa-patreon"></i></a>
</li>
<li>
<a href="#"><i class="fas fa-beer"></i></a>
</li>
<li class="break" aria-hidden="true"></li>
<li>
<a href="#"><i class="fab fa-twitter"></i></a>
</li>
<li>
<a href="#"><i class="fas fa-rss-square"></i></a>
</li>
<li>
<a href="#"><i class="fas fa-atom"></i></a>
</li>
</ul>
</div>
<div class="xenial-footer__fineprint">
<p class="xenial-footer__fineprint-love">
<span>Made with ❤💚❤💚 in Austria</span>
</p>
<ul class="xenial-footer__fineprint-imprint">
<li><a href="#">Licenses</a></li>
<li><a href="#">Imprint</a></li>
</ul>
<p class="xenial-footer__fineprint-terms">
Use of this site constitutes acceptance of our
<a href="#">Website Terms of Use</a>
and
<a href="#">Privacy Policy</a>
<br />
Copyright © 2012-2020 Manuel Grundner. All trademarks or registered
trademarks are property of their respective owners
</p>
<p class="xenial-footer__fineprint-githash" aria-hidden="true">
<a
href="//github.com/biohazard999/Scissors.Blog/commit/b6111fe7b674e8fd6ea99a37b003efe83ee7a3db"
title="Version: '0.1.0+354' Last update: '2020-09-21' Sha: 'b6111fe7b674e8fd6ea99a37b003efe83ee7a3db'"
>
0.1.0+354 - 2020-09-21
</a>
</p>
</div>
</footer>
</div>
<script defered src="./index.min.js"></script>
</body>
</html>