diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml deleted file mode 100644 index 71ea8eb..0000000 --- a/.github/workflows/nodejs.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Node CI - -on: [push, pull_request] - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [10.x, 12.x] - - steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: npm install, build, and test - run: | - npm install - npm run build --if-present - npm test - env: - CI: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..d8c4a79 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,18 @@ +name: Test + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [14, 16] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - run: npm run build --if-present + - run: npm run test diff --git a/bin/sync-vendor-libs.sh b/bin/sync-vendor-libs.sh new file mode 100755 index 0000000..c2e27d9 --- /dev/null +++ b/bin/sync-vendor-libs.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cd "$(dirname "$0")/.." +cp node_modules/chai/chai.js test/vendor/ +cp node_modules/mocha/mocha.js test/vendor/ +cp node_modules/mocha/mocha.css test/vendor/ diff --git a/css/demo.css b/css/demo.css index 1f22b97..7cb99b4 100644 --- a/css/demo.css +++ b/css/demo.css @@ -10,11 +10,12 @@ */ body { - max-width: 750px; + max-width: 990px; margin: 0 auto; padding: 1em; - font-family: -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, - sans-serif; + font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', + Arial, sans-serif; + -webkit-text-size-adjust: 100%; line-height: 1.4; background: #212121; color: #dedede; @@ -29,64 +30,58 @@ a:visited { a:hover { color: #98c379; } -figure, -tr { - background: #363636; -} -tr:nth-child(odd) { - background: #414141; -} -td, -th { - padding: 10px; - text-align: left; -} -table { - width: 100%; - word-wrap: break-word; - table-layout: fixed; - border-collapse: collapse; -} -figure { - margin: 0; - padding: 10px; - border-radius: 5px; - display: inline-block; -} -figure, -table { - margin-bottom: 20px; -} -img, -canvas { - border: 0; - vertical-align: middle; -} -h1, -h2, -h3, -h4, -h5, -h6 { - margin-top: 1.5em; - margin-bottom: 0.5em; -} h1 { margin-top: 0.5em; + margin-bottom: 0.5em; +} +label { + display: inline-block; + margin-bottom: 0.25em; } button, input, -select, textarea { + -webkit-appearance: none; box-sizing: border-box; + margin: 0; + padding: 0.5em 0.75em; font-family: inherit; font-size: 100%; - line-height: 1.15; - margin: 0; - padding: 5px; + line-height: 1.4; + background: #414141; + color: #dedede; + border: 1px solid #363636; + border-radius: 5px; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.07); +} +input, +textarea { + display: block; + width: 100%; + box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.07); } -input[type='file'] { - padding: inherit; +textarea { + display: block; + overflow: auto; +} +button { + background: #3c76a7; + background: linear-gradient(180deg, #3c76a7, #225c8d); + border-color: #225c8d; + color: #fff; +} +button[type='submit'] { + background: #6fa349; + background: linear-gradient(180deg, #6fa349, #568a30); + border-color: #568a30; +} +button[type='reset'] { + background: #d79435; + background: linear-gradient(180deg, #d79435, #be7b1c); + border-color: #be7b1c; +} +button:active { + box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5); } @media (prefers-color-scheme: light) { @@ -103,22 +98,15 @@ input[type='file'] { a:hover { color: #6fa349; } - figure, - tr { + input, + textarea { background: #fff; + border-color: #d1d1d1; color: #212121; } - tr:nth-child(odd) { - background: #f6f6f6; - } -} - -#input, -#result { - width: 100%; } -@media (min-width: 481px) { +@media (min-width: 540px) { #navigation { list-style: none; padding: 0; diff --git a/index.html b/index.html index 8d95266..ff78e15 100644 --- a/index.html +++ b/index.html @@ -53,17 +53,26 @@