inferno_core 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c105c5f0c4f7cbf2dbf746ee4ff37a21e02a4bdc468ed3d55013dbac1d89ee0
4
- data.tar.gz: 5990b0bb758da1cffc74d728c3130abc058ba4586ed718e40f2d5fdce4b68d7c
3
+ metadata.gz: 4b6d3addad9ac71e0079b47aa15551a3c13773227277668b48bbaad775a26ee8
4
+ data.tar.gz: aa2337d181489d7b345d3c1d24b6beb895ad0e544c35a40e4346ffce8a2065be
5
5
  SHA512:
6
- metadata.gz: 99bdd6463a91ee3c959b109eedf1eedc7b7ec0c0b2015aba100fd36e90cb325d5ee306162e2401d56cdc13ab29210b0bf56f79a43bbce133af6e8239f2b15c64
7
- data.tar.gz: 4919ab7a53ef2d7c3e67cca7e2fd5061af4829afea8ae31ebc7492d2f173d3e715a66401a61e53722c1a697aa2a31a9161b150680c1ab04916cc0107a85ebe3b
6
+ metadata.gz: 7aff18aae2e2799fd7817d01a5a6a9d3b1842efe75a509845a98f6392852b934fa0fc8db37fa63cc42d8cebf1badb487ea63ffa300ee40801d008d34b3d5a689
7
+ data.tar.gz: 2854ddeac51ecbf418301243a48903a68340dfdce6aaea8333ee98f42caade8723d6d66505062df06521d8716d70457aefbc1475a67cb8da11a9470dca5ff5d7
@@ -0,0 +1,534 @@
1
+ :root {
2
+ --top-nav-height: 6rem;
3
+ --article-actions-container-height: 2rem;
4
+ --sticky-header-height: calc(var(--top-nav-height) + var(--article-actions-container-height) + 2px);
5
+
6
+ --link-color: #036cae;
7
+ --product-card-pinned-bkg: #fcfcfc;
8
+ --product-card-pinned-border-color: #9be;
9
+
10
+ --card-header-bkg: #fcfcfc;
11
+ --footer-bkg: #f2f2f2;
12
+ --tag-bkg: #f0f0f0;
13
+ --year-header-color: #555;
14
+ --features-bkg: #f9f9f9;
15
+
16
+ --test-kit-header-bkg: #f2f2f2;
17
+ --filter-bar-bkg: #f2f2f2;
18
+ --filter-label-bkg: #f2f2f2;
19
+ }
20
+
21
+ h3 {
22
+ font-size: 1.25rem
23
+ }
24
+
25
+ /* Buttons */
26
+
27
+ a {
28
+ color: #036cae;
29
+ }
30
+
31
+ .btn {
32
+ border-radius: 30px;
33
+ padding: 0.5rem 1.25rem;
34
+ }
35
+
36
+ .btn-primary {
37
+ background-color: #036cae;
38
+ border-color: #036cae;
39
+ }
40
+
41
+ .btn-outline-primary {
42
+ border-color: #036cae;
43
+ color: #036cae;
44
+ }
45
+
46
+ .btn-outline-primary:hover {
47
+ background-color: #036cae;
48
+ color: #fff;
49
+ }
50
+
51
+ /* Header and Footer */
52
+ .banner-header {
53
+ margin: 1rem 0;
54
+ }
55
+
56
+ footer {
57
+ background-color: var(--footer-bkg);
58
+ font-size: 0.9rem;
59
+ }
60
+
61
+ footer p {
62
+ margin-bottom: 0.5rem;
63
+ }
64
+
65
+ footer .footer-logo{
66
+ text-align: right;
67
+ float:right;
68
+ margin-top: 5px;
69
+ }
70
+
71
+ footer .footer-logo a {
72
+ text-decoration: none;
73
+ width: 130px;
74
+ display: block;
75
+ }
76
+
77
+ footer .footer-logo a,
78
+ footer .footer-logo a:hover,
79
+ footer .footer-logo a:active,
80
+ footer .footer-logo a:visited
81
+ {
82
+ color: rgb(33, 37, 41);
83
+ }
84
+
85
+ footer .footer-logo .built-with {
86
+ margin-bottom: -12px;
87
+ margin-left: -2px;
88
+ text-align: left;
89
+ text-decoration: none;
90
+ text-transform: uppercase;
91
+ }
92
+
93
+ /* Container */
94
+ .container-fluid {
95
+ max-width: 1200px;
96
+ }
97
+
98
+ /* Main Content container */
99
+ #content {
100
+ scroll-margin-top: 150px;
101
+ }
102
+
103
+ /* so anchor links account for header */
104
+ a.anchor {
105
+ scroll-margin-top: 80px;
106
+ visibility: hidden;
107
+ }
108
+
109
+
110
+ /* Navbar */
111
+ .navbar {
112
+ border-bottom: 5px solid rgba(0, 0, 0, 0.12);
113
+ height: 90px;
114
+ }
115
+
116
+ nav .dropdown {
117
+ flex-grow: 0;
118
+ flex-basis: 0;
119
+ }
120
+
121
+ /* Align right */
122
+ nav .dropdown .dropdown-menu {
123
+ left: unset;
124
+ right: 0;
125
+ }
126
+
127
+ nav .navbar .navbar-nav li.nav-item:hover,
128
+ .dropdown .dropdown-menu li.nav-item:hover {
129
+ background-color: #f0f0f0
130
+ }
131
+
132
+ .navbar-nav .nav-link,
133
+ .dropdown .dropdown-menu .nav-link {
134
+ font-size: 1.3rem;
135
+ text-decoration: none;
136
+ color: rgba(0, 0, 0, .55);
137
+ }
138
+
139
+ .navbar-nav .nav-link.active {
140
+ color: #316DB1 !important;
141
+ }
142
+
143
+ @media (min-width: 992px) {
144
+ .navbar-expand-lg .navbar-nav .nav-link {
145
+ margin: 0 .3rem;
146
+ }
147
+ }
148
+
149
+ .navbar-brand {
150
+ width: 265px;
151
+ font-size: 2rem;
152
+ }
153
+
154
+ .navbar-brand div {
155
+ position: relative;
156
+ }
157
+
158
+ .navbar-brand img {
159
+ height: 50px;
160
+ }
161
+
162
+ /* disclaimer bar */
163
+ .disclaimer-text {
164
+ font-family: 'Source Sans Pro', sans-serif;
165
+ background-color: #63758A;
166
+ color: white;
167
+ text-align: center;
168
+ font-size: 1rem;
169
+ width: 100%;
170
+ padding: 0.5em;
171
+ white-space: normal;
172
+ }
173
+
174
+ .disclaimer-text a{
175
+ color: white;
176
+ text-decoration: none;
177
+ }
178
+
179
+ .disclaimer-text>.narrow {
180
+ display: none;
181
+ }
182
+
183
+ @media (max-width: 1100px) {
184
+ .disclaimer-text>.narrow {
185
+ display: inline;
186
+ }
187
+
188
+ .disclaimer-text>.wide {
189
+ display: none;
190
+ }
191
+ }
192
+
193
+ /* Breadcrumbs */
194
+ .breadcrumb {
195
+ background-color: transparent;
196
+ margin-bottom: 0;
197
+ padding: 0;
198
+ font-size: 1.1rem;
199
+ }
200
+
201
+ .breadcrumb .breadcrumb-item {
202
+ font-weight: bold;
203
+ color: #333;
204
+ text-transform: uppercase;
205
+ letter-spacing: 0.05rem;
206
+ }
207
+
208
+ .breadcrumb .breadcrumb-item a {
209
+ color: #036cae;
210
+ text-decoration: none;
211
+ }
212
+
213
+ .breadcrumb .breadcrumb-item.active {
214
+ color: #333;
215
+ }
216
+
217
+ /* Table of Contents */
218
+ .toc-header {
219
+ font-size: 0.9em;
220
+ text-transform: uppercase;
221
+ font-weight: bold;
222
+ color: #444;
223
+ border-bottom: 1px solid #eee;
224
+ letter-spacing: 0.1em;
225
+ }
226
+
227
+ .bd-toc .nav.navbar-nav .nav-link {
228
+ font-size: 1.1rem;
229
+ color: var(--link-color);
230
+ }
231
+
232
+ .nav.navbar-nav li>.nav.navbar-nav {
233
+ margin-left: 1rem;
234
+ }
235
+
236
+ /* General content */
237
+ .info-card {
238
+ margin-top: 4rem;
239
+ padding: 1rem;
240
+ border: 2px solid #036cae;
241
+ }
242
+
243
+ /* Test kit panel on homepage */
244
+ .test-kit-column {
245
+ margin-top: 4rem;
246
+ padding-left: 1.5rem;
247
+ padding-right: 1.5rem;
248
+ margin-bottom: 4rem;
249
+ }
250
+
251
+ .test-kit {
252
+ margin: 1rem 0;
253
+ border-bottom: 1px solid #036cae;
254
+ padding-bottom: 1rem;
255
+ }
256
+
257
+ .test-kit:last-child {
258
+ border-bottom: none;
259
+ margin-bottom: 0;
260
+ }
261
+
262
+ .test-kit-section {
263
+ background: linear-gradient(to bottom right, #fff, #f8f8f8);
264
+ border-radius: 0.5rem;
265
+ border: 1px solid #036cae;
266
+ }
267
+
268
+ .test-kit-section>section {
269
+ padding: 1rem 1rem .5rem 1rem;
270
+ }
271
+
272
+ .test-kit-section>section.header {
273
+ background-color: var(--test-kit-header-bkg);
274
+ border-top-right-radius: 0.5rem;
275
+ border-top-left-radius: 0.5rem;
276
+ }
277
+
278
+ /* Homepage Inferno Features section */
279
+ .features {
280
+ background-color: var(--features-bkg);
281
+ margin-top: 2rem;
282
+ padding: 1rem 0 0 0;
283
+ border-top: 1px solid #eee;
284
+ border-bottom: 1px solid #eee;
285
+ position: relative;
286
+ }
287
+
288
+ .features::after {
289
+ content: '';
290
+ position: absolute;
291
+ bottom: 0;
292
+ left: 0;
293
+ width: 100%;
294
+ box-shadow: 0 -2px 8px 6px rgba(0, 0, 0, 0.2);
295
+ z-index: -1;
296
+ }
297
+
298
+ .features .feature-content {
299
+ padding: 1.5em 0.5em;
300
+ }
301
+
302
+ /* Sectional Pages with TOC */
303
+ .section {
304
+ margin-bottom: 50px;
305
+ }
306
+
307
+ .section h2 {
308
+ margin-top: 0;
309
+ scroll-margin-top: 80px;
310
+ }
311
+
312
+ #content h2 {
313
+ scroll-margin-top: 80px;
314
+ }
315
+
316
+
317
+ @media (min-width: 992px) {
318
+ #toc {
319
+ position: sticky;
320
+ top: var(--top-nav-height);
321
+ height: calc(50vh);
322
+ }
323
+ }
324
+
325
+ .quick-links {
326
+ margin: 2rem auto;
327
+ }
328
+
329
+ /* News and Events */
330
+ .news-and-events {
331
+ padding-top: 2rem;
332
+ border-top: 3px solid #f2f2f2;
333
+ }
334
+
335
+ .news-and-events .view-all {
336
+ border-top: 1px solid #f0f0f0;
337
+ line-height: 3rem;
338
+ }
339
+
340
+ .news-and-events .recent-news-items,
341
+ .news-and-events .upcoming-events {
342
+ margin-top: 1em;
343
+ }
344
+
345
+ .event-item {
346
+ display: flex;
347
+ justify-content: stretch;
348
+ gap: 1rem;
349
+ margin-bottom: 2rem;
350
+ }
351
+
352
+ .no-news-or-events {
353
+ margin: 2rem 0;
354
+ }
355
+
356
+ .news-item {
357
+ margin-bottom: 2em
358
+ }
359
+
360
+ .news-item>time,
361
+ .event-detail>time {
362
+ text-transform: uppercase;
363
+ color: #444;
364
+ font-size: 0.9em;
365
+ font-weight: bold;
366
+ line-height: 1.5rem;
367
+ }
368
+
369
+ .view-all {
370
+ text-align: center !important;
371
+ }
372
+
373
+ .calendardate {
374
+ display: flex;
375
+ flex-direction: column;
376
+ justify-content: center;
377
+ background: #ddd;
378
+ background: linear-gradient(0deg, #dddddd 0%, #eeeeee 25%, #f9f9f9 100%);
379
+ text-align: center;
380
+ padding: 10px 12px 5px 12px;
381
+ line-height: 1.25rem;
382
+ width: 3.5em;
383
+ height: 3.5em;
384
+ border-right: 1px solid #ddd;
385
+ border-bottom: 1px solid #ccc;
386
+ }
387
+
388
+ .calendardate-day {
389
+ display: block;
390
+ font-size: 1.5rem;
391
+ }
392
+
393
+ .calendardate-month {
394
+ display: block;
395
+ text-transform: uppercase;
396
+ font-size: 0.9rem;
397
+ }
398
+
399
+ /* News & Events archive pages */
400
+ h2.year {
401
+ color: var(--year-header-color);
402
+ border-bottom: 1px solid #ccc;
403
+ margin-bottom: 2rem;
404
+ clear: both;
405
+ }
406
+
407
+ /* Testing Kits */
408
+ .product-card {
409
+ border: 1px solid #ddd;
410
+ padding: 15px;
411
+ position: relative;
412
+ margin-bottom: 15px;
413
+ }
414
+
415
+ .product-card.pinned {
416
+ background-color: var(--product-card-pinned-bkg);
417
+ border-color: var(--product-card-pinned-border-color);
418
+ border-width: 2px;
419
+ }
420
+
421
+ .product-card .title {
422
+ font-weight: bold;
423
+ font-size: 1.25rem;
424
+ margin-bottom: 10px;
425
+ display: block;
426
+ color: #036cae;
427
+ }
428
+
429
+ .product-card .description {
430
+ margin-bottom: 10px;
431
+ }
432
+
433
+ .product-card .components {
434
+ font-size: 0.9rem;
435
+ }
436
+
437
+ .product-card .card-footer {
438
+ /* position: absolute;
439
+ bottom: 0;
440
+ right: 0; */
441
+ padding: 0;
442
+ display: flex;
443
+ justify-content: space-between;
444
+ font-size: 0.8rem;
445
+ color: #555;
446
+ background-color: inherit;
447
+ border-top: 0;
448
+ }
449
+
450
+ .product-card .card-footer>div {
451
+ display: inline-flex;
452
+ line-height: 1.5rem;
453
+ align-self: flex-end;
454
+ }
455
+
456
+ .card-header {
457
+ background-color: var(--card-header-bkg);
458
+ }
459
+
460
+ /* Generic custom classes */
461
+ .hide-item {
462
+ display: none !important;
463
+ }
464
+
465
+ .show-item {
466
+ display: block !important;
467
+ }
468
+
469
+ .callout {
470
+ padding: 20px;
471
+ margin: 20px 0;
472
+ border: 1px solid #eee;
473
+ border-left-width: 5px;
474
+ border-radius: 3px;
475
+ }
476
+ .callout h4 {
477
+ margin-top: 0;
478
+ margin-bottom: 5px;
479
+ }
480
+ .callout p:last-child {
481
+ margin-bottom: 0;
482
+ }
483
+ .callout code {
484
+ border-radius: 3px;
485
+ }
486
+ .callout + .bs-callout {
487
+ margin-top: -5px;
488
+ }
489
+ .callout-default {
490
+ border-left-color: #777;
491
+ }
492
+ .callout-default h4 {
493
+ color: #777;
494
+ }
495
+ .callout-primary {
496
+ border-left-color: #428bca;
497
+ }
498
+ .callout-primary h4 {
499
+ color: #428bca;
500
+ }
501
+ .callout-success {
502
+ border-left-color: #5cb85c;
503
+ }
504
+ .callout-success h4 {
505
+ color: #5cb85c;
506
+ }
507
+ .callout-danger {
508
+ border-left-color: #d9534f;
509
+ }
510
+ .callout-danger h4 {
511
+ color: #d9534f;
512
+ }
513
+ .callout-warning {
514
+ border-left-color: #f9c051;
515
+ }
516
+ .callout-warning h4 {
517
+ color: #f9c051;
518
+ }
519
+ .callout-info {
520
+ border-left-color: #5bc0de;
521
+ }
522
+ .callout-info h4 {
523
+ color: #5bc0de;
524
+ }
525
+ .callout-bdc {
526
+ border-left-color: #29527a;
527
+ }
528
+ .callout-bdc h4 {
529
+ color: #29527a;
530
+ }
531
+
532
+ nav[data-toggle="toc"] .nav .nav {
533
+ display: none;
534
+ }
@@ -0,0 +1,48 @@
1
+ /* UTILITIES */
2
+
3
+ // Show/hide element based on condition
4
+ const showElement = (condition, element) => {
5
+ if (condition) {
6
+ element.classList.add('show-item');
7
+ element.classList.remove('hide-item');
8
+ } else {
9
+ element.classList.add('hide-item');
10
+ element.classList.remove('show-item');
11
+ }
12
+ };
13
+
14
+ // Show toast message -- there should only be one at a time,
15
+ // if this behavior changes then this will need to be updated
16
+ const showToast = (message) => {
17
+ const toastElement = document.querySelector('.toast');
18
+ const toast = new bootstrap.Toast(toastElement);
19
+ const toastBody = document.querySelector('.toast-body');
20
+ toastBody.innerHTML = ''; // clear any existing errors
21
+ toastBody.append(message);
22
+ toast.show();
23
+ };
24
+
25
+ $(document).ready(function () {
26
+ const scrollTopTrigger = 0;
27
+ $(window).scroll(function () {
28
+ if ($(window).scrollTop() > scrollTopTrigger) {
29
+ $('.navbar').addClass('scrolled');
30
+ } else {
31
+ $('.navbar').removeClass('scrolled');
32
+ }
33
+ });
34
+ if ($(window).scrollTop() > scrollTopTrigger) {
35
+ $('.navbar').addClass('scrolled');
36
+ } else {
37
+ $('.navbar').removeClass('scrolled');
38
+ }
39
+ });
40
+
41
+ document.addEventListener('DOMContentLoaded', function () {
42
+ var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
43
+ var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
44
+ return new bootstrap.Tooltip(tooltipTriggerEl);
45
+ });
46
+ });
47
+
48
+
@@ -0,0 +1,35 @@
1
+ const createSession = () => {
2
+ // Get Suite ID
3
+ const suiteId = Array.from(document.getElementsByTagName('input'))
4
+ .filter((elem) => elem.checked && elem.name === 'suite')
5
+ .map((elem) => elem.value)[0]; // should only have one selected option
6
+
7
+ // Get checked options and map to id and value
8
+ const checkedOptions = Array.from(document.getElementsByTagName('input'))
9
+ .filter((elem) => elem.checked && elem.name !== 'suite' && $(elem).is(':visible'))
10
+ .map((elem) => ({
11
+ id: elem.name,
12
+ value: elem.value
13
+ }));
14
+
15
+ const postUrl = `api/test_sessions?test_suite_id=${suiteId}`;
16
+ const postBody = {
17
+ preset_id: null,
18
+ suite_options: checkedOptions,
19
+ };
20
+ fetch(postUrl, { method: 'POST', body: JSON.stringify(postBody) })
21
+ .then((response) => response.json())
22
+ .then((result) => {
23
+ const sessionId = result.id;
24
+ if (!result) {
25
+ throw Error('Session could not be created. Please check input values.');
26
+ } else if (!sessionId || sessionId === 'undefined') {
27
+ throw Error('Session could not be created. Session ID is undefined.');
28
+ } else {
29
+ location.href = `test_sessions/${sessionId}`;
30
+ }
31
+ })
32
+ .catch((e) => {
33
+ showToast(e);
34
+ });
35
+ };
@@ -0,0 +1,59 @@
1
+ // Returns a list of all tags as strings from a test kit element
2
+ const getTags = (tags, elem) => {
3
+ Array.from(elem.children).forEach((e) => {
4
+ if (e.className === 'tag') {
5
+ tags.push(e.innerText);
6
+ }
7
+ getTags(tags, e);
8
+ });
9
+ return tags;
10
+ };
11
+
12
+ // Returns the level of maturity for a given test kit element
13
+ const getMaturity = (elem) => {
14
+ let innerText = '';
15
+ Array.from(elem.children).forEach((e) => {
16
+ if (e.className === 'maturity') {
17
+ innerText = e.innerText;
18
+ return e.innerText;
19
+ }
20
+
21
+ // ignore the pinned icon for traversal, which is hit last
22
+ if(e.nodeName !== 'I'){
23
+ innerText = getMaturity(e);
24
+ }
25
+
26
+ });
27
+
28
+ return innerText;
29
+ };
30
+
31
+ // Returns true if test kit should be shown based on standard filter
32
+ const filterTag = (testKit, standard) => {
33
+ if (!standard) return true;
34
+ const tags = getTags([], testKit);
35
+ return tags.includes(standard) || standard === 'All Tags';
36
+ };
37
+
38
+ // Returns true if test kit should be shown based on maturity filter
39
+ const filterMaturity = (testKit, maturity) => {
40
+ if (!maturity) return true;
41
+ const testKitMaturity = getMaturity(testKit);
42
+ return testKitMaturity.includes(maturity) || maturity === 'All Levels';
43
+ };
44
+
45
+ // Returns true if test kit should be shown based on text filter
46
+ const filterText = (testKit, text) => {
47
+ const testKitText = testKit.innerText.toLowerCase();
48
+ return testKitText.includes(text);
49
+ };
50
+
51
+ // Ensure all applied filters take effect
52
+ const filterAll = (text, standard, maturity) => {
53
+ for (let testKit of document.getElementsByName('test-kit')) {
54
+ showElement(
55
+ filterText(testKit, text) && filterTag(testKit, standard) && filterMaturity(testKit, maturity),
56
+ testKit,
57
+ );
58
+ }
59
+ };
@@ -1,4 +1,4 @@
1
1
  module Inferno
2
2
  # Standard patterns for gem versions: https://guides.rubygems.org/patterns/
3
- VERSION = '1.0.0'.freeze
3
+ VERSION = '1.0.2'.freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inferno_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen MacVicar
@@ -690,8 +690,12 @@ files:
690
690
  - lib/inferno/public/assets.json
691
691
  - lib/inferno/public/bundle.js
692
692
  - lib/inferno/public/bundle.js.LICENSE.txt
693
+ - lib/inferno/public/common.css
694
+ - lib/inferno/public/common.js
693
695
  - lib/inferno/public/favicon.ico
694
696
  - lib/inferno/public/logo192.png
697
+ - lib/inferno/public/session.js
698
+ - lib/inferno/public/test_kits.js
695
699
  - lib/inferno/repositories.rb
696
700
  - lib/inferno/repositories/headers.rb
697
701
  - lib/inferno/repositories/igs.rb