Skip to content

Commit

Permalink
refactor: upgrade deps and drop Gulp
Browse files Browse the repository at this point in the history
  • Loading branch information
ffoodd committed Jul 6, 2023
1 parent aa91c43 commit c4067f5
Show file tree
Hide file tree
Showing 140 changed files with 22,473 additions and 11,421 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/css.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
FORCE_COLOR: 2
NODE: 14
NODE: 18

jobs:
css:
Expand Down Expand Up @@ -39,4 +39,4 @@ jobs:
run: npm ci

- name: Build CSS
run: npm run gulp compile
run: npm run build
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
FORCE_COLOR: 2
NODE: 14
NODE: 18

jobs:
docs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
FORCE_COLOR: 2
NODE: 14
NODE: 18

jobs:
lint:
Expand Down Expand Up @@ -39,4 +39,4 @@ jobs:
run: npm ci

- name: Lint
run: npm run gulp lint
run: npm run lint
10 changes: 10 additions & 0 deletions .htmlvalidate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": [
"html-validate:recommended"
],
"rules": {
"aria-label-misuse": "off",
"no-redundant-role": "off",
"no-inline-style": "off"
}
}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
28 changes: 28 additions & 0 deletions .pa11yci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"standard": "WCAG2AA",
"level": "warning",
"concurrency": 1,
"defaults": {
"reporters": [
[
"pa11y-ci-reporter-html",
{
"destination": "./reports"
}
]
],
"wait": 3000,
"runners": [
"axe"
],
"timeout": 100000,
"hideElements": "",
"ignore": [
],
"defaults": {
"chromeLaunchConfig": {
"executablePath": "/snap/bin/chromium"
}
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
32 changes: 32 additions & 0 deletions _site/js/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
(function () {
"use strict";

// Toggle switch component
var switches = document.querySelectorAll('[role="switch"]');

switches.forEach(function (el) {
el.addEventListener('click', function () {
var checked = this.getAttribute('aria-checked') === 'true' || false;
this.setAttribute('aria-checked', !checked);

if (this.classList.contains('disable-css')) {
var chart = this.parentNode.nextElementSibling;
chart.classList.toggle('chaarts');
}
});
});

// Scrollable tables
var regions = document.querySelectorAll('.table-container');

if (window.matchMedia('(min-width: 30em)').matches) {
regions.forEach(function (el) {
var width = el.offsetWidth;
var table = el.querySelector('table');

if (table.offsetWidth > width) {
el.setAttribute('tabindex', '0');
}
});
}
})(document);
File renamed without changes.
63 changes: 63 additions & 0 deletions _site/scss/print.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
@media print {
body > :not(main),
main > :not(.deck),
*:not(.card)::after,
*:not(.card)::before, {
display: none !important;
}

html,
body,
body > * {
background: none !important;
}

/**
* 1. No orphans
* 2. No widows
*/
p,
blockquote,
.deck .card {
orphans: 3; /* 1 */
widows: 3; /* 2 */
}

/* @note Avoid random page break */
ul,
ol,
blockquote,
.deck .card {
page-break-inside: avoid;
break-inside: avoid;
}

h1,
h2,
h3,
h4,
h5,
h6,
caption {
page-break-after: avoid;
}

/**
* @note Display links' target, except for images
*/
a::after {
content: " (" attr(href) ") ";
display: inline-block !important;
}

/* Hide anchors' target */
a::after img,
a[href^="#"]::after,
a[href^="javascript"]::after {
content: "";
}

abbr::after {
content: " (" attr(title) ") ";
}
}
19 changes: 19 additions & 0 deletions _site/scss/styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@charset "UTF-8";

/* ==================== */
/* == Vendors
/* ==================== */
@use "sseeeedd/src/scss/styles";
@use "vendors/prism";

.mb-0 {
margin-bottom: 0 !important;
}

.pb-0 {
padding-bottom: 0 !important;
}

.fly-out [rel]::before {
content: "\1F30D\A0";
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pre[data-line] {
padding: .25em;
margin-top: 3.15em;
background: white;
mix-blend-mode: soft-light;
mix-blend-mode: soft-light;
pointer-events: none;
line-height: inherit;
white-space: pre;
Expand All @@ -26,5 +26,5 @@ pre[data-line] {
left: .5em;
min-width: 1ch;
color: black;
font-weight: 700;
font-weight: 700;
}
Loading

0 comments on commit c4067f5

Please sign in to comment.