Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Gulp and improve workflow #97

Merged
merged 1 commit into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
28 changes: 22 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
# This file is for unifying the coding style for different editors and IDEs
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
# Change these settings to your own preference
indent_style = tab
indent_size = 2
# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
end_of_line = crlf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
insert_final_newline = true
max_line_length = off
quote_type = double

[*.{html,js,css,scss}]
block_comment_start = /**
block_comment = *
block_comment_end = */

[*.{js}]
quote_type = single
max_line_length = 100

[*.svg]
insert_final_newline = false
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Enforce Unix newlines
* text=auto eol=lf

# Don't diff or textually merge source maps
*.map binary
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
76 changes: 25 additions & 51 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,59 +1,33 @@
# Project
docs/includes
# See http://help.github.com/ignore-files/ for more about ignoring files.

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Dependency directories
node_modules/
# dependencies
/node_modules

# Optional npm cache directory
.npm
# IDEs and editors
/.idea
/.vscode
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# Optional eslint cache
.eslintcache
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# Numerous always-ignore extensions
*.diff
*.err
# misc
/.sass-cache
*.log
*.orig
*.rej
*.swo
*.swp
*.vi
*.zip
*.tgz
*~

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# OS or Editor folders
._*
.cache
# System Files
.DS_Store
.idea
.vscode
.project
.settings
.tmproj
*.esproj
*.sublime-project
*.sublime-workspace
nbproject
Thumbs.db
/.vscode/

# Build
docs/includes/
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: 0 additions & 1 deletion .npmrc

This file was deleted.

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"
}
}
}
}
10 changes: 10 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "stylelint-config-recommended-scss",
"plugins": [
"stylelint-scss"
],
"rules": {
"no-descending-specificity": null,
"scss/comment-no-empty": null
}
}
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