Skip to content

Commit 1847065

Browse files
committed
Merge upstream/master into fix/hljs-highlighter-regression-5334
2 parents e9dcc7c + 4c3fcef commit 1847065

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+903
-3063
lines changed

.eslintrc.json

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"root": true,
23
"env": {
34
"es6": true,
45
"browser": true,
@@ -13,8 +14,12 @@
1314
"globalReturn": false
1415
}
1516
},
16-
"extends": ["eslint:recommended"],
17-
"ignorePatterns": ["lib/**"],
17+
"extends": [
18+
"eslint:recommended"
19+
],
20+
"ignorePatterns": [
21+
"lib/**"
22+
],
1823
"rules": {
1924
"no-console": "off",
2025
"no-unused-vars": "off",
@@ -25,12 +30,12 @@
2530
"semi": "error",
2631
"no-duplicate-case": "error",
2732
"no-irregular-whitespace": "warn",
28-
"no-prototype-builtins" : "off",
29-
"no-useless-escape" : "off",
30-
"no-inner-declarations" : "off",
31-
"no-constant-assign" : "off",
32-
"no-const-assign" : "off",
33-
"no-dupe-keys" : "off",
34-
"no-useless-catch" : "off"
33+
"no-prototype-builtins": "off",
34+
"no-useless-escape": "off",
35+
"no-inner-declarations": "off",
36+
"no-constant-assign": "off",
37+
"no-const-assign": "off",
38+
"no-dupe-keys": "off",
39+
"no-useless-catch": "off"
3540
}
3641
}

.github/workflows/node.js.yml

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,38 @@
44
name: Smoke Test
55

66
on:
7-
push:
8-
branches: [master]
9-
pull_request:
10-
branches: [master]
7+
push:
8+
branches: [master]
9+
pull_request:
10+
branches: [master]
1111

1212
jobs:
13-
build:
14-
runs-on: ubuntu-latest
15-
16-
strategy:
17-
matrix:
18-
node-version: [18.x, 20.x]
19-
20-
steps:
21-
- name: Checkout code
22-
uses: actions/checkout@v4
23-
with:
24-
fetch-depth: 0
25-
26-
- name: Use Node.js ${{ matrix.node-version }}
27-
uses: actions/setup-node@v4
28-
with:
29-
node-version: ${{ matrix.node-version }}
30-
31-
- run: npm ci
32-
- run: npm run build --if-present
33-
34-
# Post-run cleanup to remove the build directory after the job finishes
35-
- name: Post-run cleanup
36-
if: always()
37-
run: rm -rf ./build
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
node-version: [18.x, 20.x]
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
cache: "npm"
31+
32+
- name: Install dependencies
33+
run: npm ci
34+
35+
- name: Build project
36+
run: npm run build --if-present
37+
38+
# Post-run cleanup to remove the build directory after the job finishes
39+
- name: Post-run cleanup
40+
if: always()
41+
run: rm -rf ./build

Docs/guide-es/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,8 +718,8 @@ can be used inside the _Pitch-time Matrix_ block.
718718

719719
The _Set Drum_ block is used to map the enclosed pitches into drum
720720
sounds. Drum sounds are played in a monopitch using the specified drum
721-
sample. In the example above, a `kick drum` will be substitued for
722-
each occurance of a `Re` `4`.
721+
sample. In the example above, a `kick drum` will be substituted for
722+
each occurrence of a `Re` `4`.
723723

724724
![alt tag](./drum8.svg " ")
725725

Docs/guide-ja/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -818,8 +818,8 @@ can be used inside the *ピッチ・タイム行列* block.
818818

819819
The *Set ドラム* block is used to map the enclosed pitches into ドラム
820820
sounds. ドラム sounds are played in a monopitch using the specified ドラム
821-
sample. In the example above, a `kick ドラム` will be substitued for
822-
each occurance of a `` `4`.
821+
sample. In the example above, a `kick ドラム` will be substituted for
822+
each occurrence of a `` `4`.
823823

824824
![alt tag](./drum8.svg "ピッチ・ドラム・グラフ 1")
825825

Docs/guide-zhCN/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -755,8 +755,8 @@ notes.
755755

756756
The *Set Drum* block is used to map the enclosed pitches into drum
757757
sounds. Drum sounds are played in a monopitch using the specified drum
758-
sample. In the example above, a `kick drum` will be substitued for
759-
each occurance of a `Re` `4`.
758+
sample. In the example above, a `kick drum` will be substituted for
759+
each occurrence of a `Re` `4`.
760760

761761
*Set Drum* 块用于将封闭的音高映射到鼓中声音。
762762
鼓声使用指定的鼓在单声道中播放。

css/activities.css

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,12 +1051,12 @@ table {
10511051
}
10521052

10531053
#right-arrow {
1054-
left: 385px;
1054+
right: 25px;
10551055
background: url("../header-icons/right-arrow.png");
10561056
}
10571057

10581058
#left-arrow {
1059-
left: 5px;
1059+
left: 10px;
10601060
background: url("../header-icons/left-arrow.png");
10611061
}
10621062

@@ -1177,12 +1177,14 @@ table {
11771177

11781178
#helpBodyDiv {
11791179
position: relative;
1180-
left: 45px;
1180+
margin: 0 auto !important;
1181+
left: 0 !important;
11811182
border: 0 !important;
11821183
overflow-x: hidden;
11831184
overflow-y: auto;
1184-
width: 350px;
1185-
padding: 1rem 1rem 0 0;
1185+
width: calc(100% - 130px) !important;
1186+
max-width: 350px;
1187+
padding: 1rem 1rem 0 1rem;
11861188
display: flex;
11871189
flex-direction: column;
11881190
justify-content: center;
@@ -2107,7 +2109,7 @@ table {
21072109

21082110
#right-arrow {
21092111
left: auto !important; /* Unset the old fixed pixel value */
2110-
right: 10px !important; /* Stick to the right edge */
2112+
right: 25px !important; /* Stick to the right edge */
21112113
}
21122114

21132115
/* --- Desktop View (Screens wider than 900px) --- */
@@ -2138,7 +2140,8 @@ table {
21382140

21392141
/* Fix the inner text box width so it doesn't overflow */
21402142
#helpBodyDiv {
2141-
width: 100% !important;
2143+
width: calc(100% - 110px) !important;
2144+
margin: 0 auto !important;
21422145
left: 0 !important;
21432146
padding: 0 10px;
21442147
box-sizing: border-box;

css/darkmode.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ body.dark {
1717

1818
/* Help widget colors */
1919
.dark #helpBodyDiv {
20-
background: #1d1d20;
20+
background: #505050;
2121
color: var(--fg);
22-
}
22+
}
2323

2424
.dark #helpBodyDiv > .heading,
2525
.dark #helpBodyDiv p {

css/themes.css

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@
143143
.dark #confirmation-message {
144144
color: #e2e2e2;
145145
}
146+
146147
body {
147148
--border: #cccccc;
148149
--bg: #ffffff;
@@ -159,4 +160,16 @@ body.dark {
159160
--accent: #3fe0d1;
160161
}
161162

162-
/* Your Custom Theme can go here if you don't want to modify the existing dark mode */
163+
/* Your Custom Theme can go here if you don't want to modify the existing dark mode */
164+
165+
/* Selected language highlight in language dropdown */
166+
#languagedropdown li a.selected-language {
167+
background-color: rgba(33, 150, 243, 0.15);
168+
border-left: 3px solid #2196F3;
169+
font-weight: 600;
170+
}
171+
172+
.dark #languagedropdown li a.selected-language {
173+
background-color: rgba(33, 150, 243, 0.25);
174+
border-left: 3px solid #64B5F6;
175+
}

gulpfile.mjs

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
import gulp from "gulp";
2+
import babel from "gulp-babel";
3+
import uglify from "gulp-uglify";
4+
import rename from "gulp-rename";
5+
import concat from "gulp-concat";
6+
import cleanCSS from "gulp-clean-css";
7+
import * as sassCompiler from "sass";
8+
import gulpSass from "gulp-sass";
9+
import postcss from "gulp-postcss";
10+
import autoprefixer from "autoprefixer";
11+
import cssnano from "cssnano";
12+
import sourcemaps from "gulp-sourcemaps";
13+
import prettier from "gulp-prettier";
14+
15+
const sass = gulpSass(sassCompiler);
16+
17+
const paths = {
18+
scripts: {
19+
src: "js/**/*.js",
20+
dest: "dist/js"
21+
},
22+
styles: {
23+
src: "css/**/*.css",
24+
dest: "dist/css"
25+
},
26+
sass: {
27+
src: "scss/**/*.scss",
28+
dest: "dist/css"
29+
}
30+
};
31+
32+
export function jsTask() {
33+
return gulp
34+
.src(paths.scripts.src)
35+
.pipe(sourcemaps.init())
36+
.pipe(
37+
babel({
38+
presets: ["@babel/preset-env"]
39+
})
40+
)
41+
.pipe(uglify())
42+
.pipe(concat("main.min.js"))
43+
.pipe(sourcemaps.write("."))
44+
.pipe(gulp.dest(paths.scripts.dest));
45+
}
46+
47+
export function cssTask() {
48+
return gulp
49+
.src(paths.styles.src)
50+
.pipe(sourcemaps.init())
51+
.pipe(postcss([autoprefixer(), cssnano()]))
52+
.pipe(cleanCSS())
53+
.pipe(rename({ suffix: ".min" }))
54+
.pipe(sourcemaps.write("."))
55+
.pipe(gulp.dest(paths.styles.dest));
56+
}
57+
58+
export function sassTask() {
59+
return gulp
60+
.src(paths.sass.src)
61+
.pipe(sourcemaps.init())
62+
.pipe(sass().on("error", sass.logError))
63+
.pipe(postcss([autoprefixer(), cssnano()]))
64+
.pipe(cleanCSS())
65+
.pipe(rename({ suffix: ".min" }))
66+
.pipe(sourcemaps.write("."))
67+
.pipe(gulp.dest(paths.sass.dest));
68+
}
69+
70+
export function prettify() {
71+
return gulp.src(paths.scripts.src).pipe(prettier()).pipe(gulp.dest("js"));
72+
}
73+
74+
export const build = gulp.series(gulp.parallel(jsTask, sassTask));
75+
export default build;

0 commit comments

Comments
 (0)