chore: formatted
This commit is contained in:
parent
55d0a1e998
commit
888531480f
16 changed files with 811 additions and 656 deletions
26
.prettierrc
26
.prettierrc
|
@ -1,15 +1,15 @@
|
|||
{
|
||||
"useTabs": true,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "none",
|
||||
"printWidth": 100,
|
||||
"plugins": ["prettier-plugin-svelte"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": "*.svelte",
|
||||
"options": {
|
||||
"parser": "svelte"
|
||||
}
|
||||
}
|
||||
]
|
||||
"useTabs": false,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "none",
|
||||
"printWidth": 100,
|
||||
"plugins": ["prettier-plugin-svelte"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": "*.svelte",
|
||||
"options": {
|
||||
"parser": "svelte"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -10,28 +10,28 @@ import svelteConfig from './svelte.config.js';
|
|||
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
|
||||
|
||||
export default ts.config(
|
||||
includeIgnoreFile(gitignorePath),
|
||||
js.configs.recommended,
|
||||
...ts.configs.recommended,
|
||||
...svelte.configs.recommended,
|
||||
prettier,
|
||||
...svelte.configs.prettier,
|
||||
{
|
||||
languageOptions: {
|
||||
globals: { ...globals.browser, ...globals.node }
|
||||
},
|
||||
rules: { 'no-undef': 'off' }
|
||||
},
|
||||
{
|
||||
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
|
||||
ignores: ['eslint.config.js', 'svelte.config.js'],
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
projectService: true,
|
||||
extraFileExtensions: ['.svelte'],
|
||||
parser: ts.parser,
|
||||
svelteConfig
|
||||
}
|
||||
}
|
||||
}
|
||||
includeIgnoreFile(gitignorePath),
|
||||
js.configs.recommended,
|
||||
...ts.configs.recommended,
|
||||
...svelte.configs.recommended,
|
||||
prettier,
|
||||
...svelte.configs.prettier,
|
||||
{
|
||||
languageOptions: {
|
||||
globals: { ...globals.browser, ...globals.node }
|
||||
},
|
||||
rules: { 'no-undef': 'off' }
|
||||
},
|
||||
{
|
||||
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
|
||||
ignores: ['eslint.config.js', 'svelte.config.js'],
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
projectService: true,
|
||||
extraFileExtensions: ['.svelte'],
|
||||
parser: ts.parser,
|
||||
svelteConfig
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
78
package.json
78
package.json
|
@ -1,41 +1,41 @@
|
|||
{
|
||||
"name": "ygo-aux-tools",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"prepare": "svelte-kit sync || echo ''",
|
||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||
"format": "prettier --write .",
|
||||
"lint": "prettier --check . && eslint ."
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^1.2.5",
|
||||
"@eslint/js": "^9.18.0",
|
||||
"@fontsource/fira-mono": "^5.0.0",
|
||||
"@neoconfetti/svelte": "^2.0.0",
|
||||
"@sveltejs/adapter-auto": "^4.0.0",
|
||||
"@sveltejs/kit": "^2.16.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^5.0.0",
|
||||
"eslint": "^9.18.0",
|
||||
"eslint-config-prettier": "^10.0.1",
|
||||
"eslint-plugin-svelte": "^3.0.0",
|
||||
"globals": "^16.0.0",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier-plugin-svelte": "^3.3.3",
|
||||
"svelte": "^5.25.0",
|
||||
"svelte-check": "^4.0.0",
|
||||
"typescript": "^5.0.0",
|
||||
"typescript-eslint": "^8.20.0",
|
||||
"vite": "^6.2.5"
|
||||
},
|
||||
"pnpm": {
|
||||
"onlyBuiltDependencies": [
|
||||
"esbuild"
|
||||
]
|
||||
}
|
||||
"name": "ygo-aux-tools",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"prepare": "svelte-kit sync || echo ''",
|
||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||
"format": "prettier --write .",
|
||||
"lint": "prettier --check . && eslint ."
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^1.2.5",
|
||||
"@eslint/js": "^9.18.0",
|
||||
"@fontsource/fira-mono": "^5.0.0",
|
||||
"@neoconfetti/svelte": "^2.0.0",
|
||||
"@sveltejs/adapter-node": "^5.2.12",
|
||||
"@sveltejs/kit": "^2.16.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^5.0.0",
|
||||
"eslint": "^9.18.0",
|
||||
"eslint-config-prettier": "^10.0.1",
|
||||
"eslint-plugin-svelte": "^3.0.0",
|
||||
"globals": "^16.0.0",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier-plugin-svelte": "^3.3.3",
|
||||
"svelte": "^5.25.0",
|
||||
"svelte-check": "^4.0.0",
|
||||
"typescript": "^5.0.0",
|
||||
"typescript-eslint": "^8.20.0",
|
||||
"vite": "^6.2.5"
|
||||
},
|
||||
"pnpm": {
|
||||
"onlyBuiltDependencies": [
|
||||
"esbuild"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
177
pnpm-lock.yaml
generated
177
pnpm-lock.yaml
generated
|
@ -20,9 +20,9 @@ importers:
|
|||
'@neoconfetti/svelte':
|
||||
specifier: ^2.0.0
|
||||
version: 2.2.2(svelte@5.25.7)
|
||||
'@sveltejs/adapter-auto':
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.0(@sveltejs/kit@2.20.4(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.25.7)(vite@6.2.5))(svelte@5.25.7)(vite@6.2.5))
|
||||
'@sveltejs/adapter-node':
|
||||
specifier: ^5.2.12
|
||||
version: 5.2.12(@sveltejs/kit@2.20.4(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.25.7)(vite@6.2.5))(svelte@5.25.7)(vite@6.2.5))
|
||||
'@sveltejs/kit':
|
||||
specifier: ^2.16.0
|
||||
version: 2.20.4(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.25.7)(vite@6.2.5))(svelte@5.25.7)(vite@6.2.5)
|
||||
|
@ -52,7 +52,7 @@ importers:
|
|||
version: 5.25.7
|
||||
svelte-check:
|
||||
specifier: ^4.0.0
|
||||
version: 4.1.5(svelte@5.25.7)(typescript@5.8.3)
|
||||
version: 4.1.5(picomatch@4.0.2)(svelte@5.25.7)(typescript@5.8.3)
|
||||
typescript:
|
||||
specifier: ^5.0.0
|
||||
version: 5.8.3
|
||||
|
@ -331,6 +331,42 @@ packages:
|
|||
'@polka/url@1.0.0-next.28':
|
||||
resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==}
|
||||
|
||||
'@rollup/plugin-commonjs@28.0.3':
|
||||
resolution: {integrity: sha512-pyltgilam1QPdn+Zd9gaCfOLcnjMEJ9gV+bTw6/r73INdvzf1ah9zLIJBm+kW7R6IUFIQ1YO+VqZtYxZNWFPEQ==}
|
||||
engines: {node: '>=16.0.0 || 14 >= 14.17'}
|
||||
peerDependencies:
|
||||
rollup: ^2.68.0||^3.0.0||^4.0.0
|
||||
peerDependenciesMeta:
|
||||
rollup:
|
||||
optional: true
|
||||
|
||||
'@rollup/plugin-json@6.1.0':
|
||||
resolution: {integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0
|
||||
peerDependenciesMeta:
|
||||
rollup:
|
||||
optional: true
|
||||
|
||||
'@rollup/plugin-node-resolve@16.0.1':
|
||||
resolution: {integrity: sha512-tk5YCxJWIG81umIvNkSod2qK5KyQW19qcBF/B78n1bjtOON6gzKoVeSzAE8yHCZEDmqkHKkxplExA8KzdJLJpA==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
rollup: ^2.78.0||^3.0.0||^4.0.0
|
||||
peerDependenciesMeta:
|
||||
rollup:
|
||||
optional: true
|
||||
|
||||
'@rollup/pluginutils@5.1.4':
|
||||
resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0
|
||||
peerDependenciesMeta:
|
||||
rollup:
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-android-arm-eabi@4.39.0':
|
||||
resolution: {integrity: sha512-lGVys55Qb00Wvh8DMAocp5kIcaNzEFTmGhfFd88LfaogYTRKrdxgtlO5H6S49v2Nd8R2C6wLOal0qv6/kCkOwA==}
|
||||
cpu: [arm]
|
||||
|
@ -436,10 +472,10 @@ packages:
|
|||
peerDependencies:
|
||||
acorn: ^8.9.0
|
||||
|
||||
'@sveltejs/adapter-auto@4.0.0':
|
||||
resolution: {integrity: sha512-kmuYSQdD2AwThymQF0haQhM8rE5rhutQXG4LNbnbShwhMO4qQGnKaaTy+88DuNSuoQDi58+thpq8XpHc1+oEKQ==}
|
||||
'@sveltejs/adapter-node@5.2.12':
|
||||
resolution: {integrity: sha512-0bp4Yb3jKIEcZWVcJC/L1xXp9zzJS4hDwfb4VITAkfT4OVdkspSHsx7YhqJDbb2hgLl6R9Vs7VQR+fqIVOxPUQ==}
|
||||
peerDependencies:
|
||||
'@sveltejs/kit': ^2.0.0
|
||||
'@sveltejs/kit': ^2.4.0
|
||||
|
||||
'@sveltejs/kit@2.20.4':
|
||||
resolution: {integrity: sha512-B3Y1mb1Qjt57zXLVch5tfqsK/ebHe6uYTcFSnGFNwRpId3+fplLgQK6Z2zhDVBezSsPuhDq6Pry+9PA88ocN6Q==}
|
||||
|
@ -474,6 +510,9 @@ packages:
|
|||
'@types/json-schema@7.0.15':
|
||||
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
|
||||
|
||||
'@types/resolve@1.20.2':
|
||||
resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==}
|
||||
|
||||
'@typescript-eslint/eslint-plugin@8.29.0':
|
||||
resolution: {integrity: sha512-PAIpk/U7NIS6H7TEtN45SPGLQaHNgB7wSjsQV/8+KYokAb2T/gloOA/Bee2yd4/yKVhPKe5LlaUGhAZk5zmSaQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
@ -585,6 +624,9 @@ packages:
|
|||
color-name@1.1.4:
|
||||
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
|
||||
|
||||
commondir@1.0.1:
|
||||
resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==}
|
||||
|
||||
concat-map@0.0.1:
|
||||
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
|
||||
|
||||
|
@ -689,6 +731,9 @@ packages:
|
|||
resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==}
|
||||
engines: {node: '>=4.0'}
|
||||
|
||||
estree-walker@2.0.2:
|
||||
resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}
|
||||
|
||||
esutils@2.0.3:
|
||||
resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
@ -741,6 +786,9 @@ packages:
|
|||
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
|
||||
os: [darwin]
|
||||
|
||||
function-bind@1.1.2:
|
||||
resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}
|
||||
|
||||
glob-parent@5.1.2:
|
||||
resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
|
||||
engines: {node: '>= 6'}
|
||||
|
@ -764,6 +812,10 @@ packages:
|
|||
resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
hasown@2.0.2:
|
||||
resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
ignore@5.3.2:
|
||||
resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==}
|
||||
engines: {node: '>= 4'}
|
||||
|
@ -779,6 +831,10 @@ packages:
|
|||
resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==}
|
||||
engines: {node: '>=0.8.19'}
|
||||
|
||||
is-core-module@2.16.1:
|
||||
resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
is-extglob@2.1.1:
|
||||
resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
@ -787,10 +843,16 @@ packages:
|
|||
resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
is-module@1.0.0:
|
||||
resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==}
|
||||
|
||||
is-number@7.0.0:
|
||||
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
|
||||
engines: {node: '>=0.12.0'}
|
||||
|
||||
is-reference@1.2.1:
|
||||
resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==}
|
||||
|
||||
is-reference@3.0.3:
|
||||
resolution: {integrity: sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==}
|
||||
|
||||
|
@ -899,6 +961,9 @@ packages:
|
|||
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
path-parse@1.0.7:
|
||||
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
|
||||
|
||||
picocolors@1.1.1:
|
||||
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
|
||||
|
||||
|
@ -906,6 +971,10 @@ packages:
|
|||
resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}
|
||||
engines: {node: '>=8.6'}
|
||||
|
||||
picomatch@4.0.2:
|
||||
resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
postcss-load-config@3.1.4:
|
||||
resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==}
|
||||
engines: {node: '>= 10'}
|
||||
|
@ -968,6 +1037,11 @@ packages:
|
|||
resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==}
|
||||
engines: {node: '>=4'}
|
||||
|
||||
resolve@1.22.10:
|
||||
resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==}
|
||||
engines: {node: '>= 0.4'}
|
||||
hasBin: true
|
||||
|
||||
reusify@1.1.0:
|
||||
resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==}
|
||||
engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
|
||||
|
@ -1016,6 +1090,10 @@ packages:
|
|||
resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
supports-preserve-symlinks-flag@1.0.0:
|
||||
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
svelte-check@4.1.5:
|
||||
resolution: {integrity: sha512-Gb0T2IqBNe1tLB9EB1Qh+LOe+JB8wt2/rNBDGvkxQVvk8vNeAoG+vZgFB/3P5+zC7RWlyBlzm9dVjZFph/maIg==}
|
||||
engines: {node: '>= 18.0.0'}
|
||||
|
@ -1325,6 +1403,42 @@ snapshots:
|
|||
|
||||
'@polka/url@1.0.0-next.28': {}
|
||||
|
||||
'@rollup/plugin-commonjs@28.0.3(rollup@4.39.0)':
|
||||
dependencies:
|
||||
'@rollup/pluginutils': 5.1.4(rollup@4.39.0)
|
||||
commondir: 1.0.1
|
||||
estree-walker: 2.0.2
|
||||
fdir: 6.4.3(picomatch@4.0.2)
|
||||
is-reference: 1.2.1
|
||||
magic-string: 0.30.17
|
||||
picomatch: 4.0.2
|
||||
optionalDependencies:
|
||||
rollup: 4.39.0
|
||||
|
||||
'@rollup/plugin-json@6.1.0(rollup@4.39.0)':
|
||||
dependencies:
|
||||
'@rollup/pluginutils': 5.1.4(rollup@4.39.0)
|
||||
optionalDependencies:
|
||||
rollup: 4.39.0
|
||||
|
||||
'@rollup/plugin-node-resolve@16.0.1(rollup@4.39.0)':
|
||||
dependencies:
|
||||
'@rollup/pluginutils': 5.1.4(rollup@4.39.0)
|
||||
'@types/resolve': 1.20.2
|
||||
deepmerge: 4.3.1
|
||||
is-module: 1.0.0
|
||||
resolve: 1.22.10
|
||||
optionalDependencies:
|
||||
rollup: 4.39.0
|
||||
|
||||
'@rollup/pluginutils@5.1.4(rollup@4.39.0)':
|
||||
dependencies:
|
||||
'@types/estree': 1.0.7
|
||||
estree-walker: 2.0.2
|
||||
picomatch: 4.0.2
|
||||
optionalDependencies:
|
||||
rollup: 4.39.0
|
||||
|
||||
'@rollup/rollup-android-arm-eabi@4.39.0':
|
||||
optional: true
|
||||
|
||||
|
@ -1389,10 +1503,13 @@ snapshots:
|
|||
dependencies:
|
||||
acorn: 8.14.1
|
||||
|
||||
'@sveltejs/adapter-auto@4.0.0(@sveltejs/kit@2.20.4(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.25.7)(vite@6.2.5))(svelte@5.25.7)(vite@6.2.5))':
|
||||
'@sveltejs/adapter-node@5.2.12(@sveltejs/kit@2.20.4(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.25.7)(vite@6.2.5))(svelte@5.25.7)(vite@6.2.5))':
|
||||
dependencies:
|
||||
'@rollup/plugin-commonjs': 28.0.3(rollup@4.39.0)
|
||||
'@rollup/plugin-json': 6.1.0(rollup@4.39.0)
|
||||
'@rollup/plugin-node-resolve': 16.0.1(rollup@4.39.0)
|
||||
'@sveltejs/kit': 2.20.4(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.25.7)(vite@6.2.5))(svelte@5.25.7)(vite@6.2.5)
|
||||
import-meta-resolve: 4.1.0
|
||||
rollup: 4.39.0
|
||||
|
||||
'@sveltejs/kit@2.20.4(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.25.7)(vite@6.2.5))(svelte@5.25.7)(vite@6.2.5)':
|
||||
dependencies:
|
||||
|
@ -1439,6 +1556,8 @@ snapshots:
|
|||
|
||||
'@types/json-schema@7.0.15': {}
|
||||
|
||||
'@types/resolve@1.20.2': {}
|
||||
|
||||
'@typescript-eslint/eslint-plugin@8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.24.0)(typescript@5.8.3))(eslint@9.24.0)(typescript@5.8.3)':
|
||||
dependencies:
|
||||
'@eslint-community/regexpp': 4.12.1
|
||||
|
@ -1573,6 +1692,8 @@ snapshots:
|
|||
|
||||
color-name@1.1.4: {}
|
||||
|
||||
commondir@1.0.1: {}
|
||||
|
||||
concat-map@0.0.1: {}
|
||||
|
||||
cookie@0.6.0: {}
|
||||
|
@ -1717,6 +1838,8 @@ snapshots:
|
|||
|
||||
estraverse@5.3.0: {}
|
||||
|
||||
estree-walker@2.0.2: {}
|
||||
|
||||
esutils@2.0.3: {}
|
||||
|
||||
fast-deep-equal@3.1.3: {}
|
||||
|
@ -1737,7 +1860,9 @@ snapshots:
|
|||
dependencies:
|
||||
reusify: 1.1.0
|
||||
|
||||
fdir@6.4.3: {}
|
||||
fdir@6.4.3(picomatch@4.0.2):
|
||||
optionalDependencies:
|
||||
picomatch: 4.0.2
|
||||
|
||||
file-entry-cache@8.0.0:
|
||||
dependencies:
|
||||
|
@ -1762,6 +1887,8 @@ snapshots:
|
|||
fsevents@2.3.3:
|
||||
optional: true
|
||||
|
||||
function-bind@1.1.2: {}
|
||||
|
||||
glob-parent@5.1.2:
|
||||
dependencies:
|
||||
is-glob: 4.0.3
|
||||
|
@ -1778,6 +1905,10 @@ snapshots:
|
|||
|
||||
has-flag@4.0.0: {}
|
||||
|
||||
hasown@2.0.2:
|
||||
dependencies:
|
||||
function-bind: 1.1.2
|
||||
|
||||
ignore@5.3.2: {}
|
||||
|
||||
import-fresh@3.3.1:
|
||||
|
@ -1789,14 +1920,24 @@ snapshots:
|
|||
|
||||
imurmurhash@0.1.4: {}
|
||||
|
||||
is-core-module@2.16.1:
|
||||
dependencies:
|
||||
hasown: 2.0.2
|
||||
|
||||
is-extglob@2.1.1: {}
|
||||
|
||||
is-glob@4.0.3:
|
||||
dependencies:
|
||||
is-extglob: 2.1.1
|
||||
|
||||
is-module@1.0.0: {}
|
||||
|
||||
is-number@7.0.0: {}
|
||||
|
||||
is-reference@1.2.1:
|
||||
dependencies:
|
||||
'@types/estree': 1.0.7
|
||||
|
||||
is-reference@3.0.3:
|
||||
dependencies:
|
||||
'@types/estree': 1.0.7
|
||||
|
@ -1890,10 +2031,14 @@ snapshots:
|
|||
|
||||
path-key@3.1.1: {}
|
||||
|
||||
path-parse@1.0.7: {}
|
||||
|
||||
picocolors@1.1.1: {}
|
||||
|
||||
picomatch@2.3.1: {}
|
||||
|
||||
picomatch@4.0.2: {}
|
||||
|
||||
postcss-load-config@3.1.4(postcss@8.5.3):
|
||||
dependencies:
|
||||
lilconfig: 2.1.0
|
||||
|
@ -1937,6 +2082,12 @@ snapshots:
|
|||
|
||||
resolve-from@4.0.0: {}
|
||||
|
||||
resolve@1.22.10:
|
||||
dependencies:
|
||||
is-core-module: 2.16.1
|
||||
path-parse: 1.0.7
|
||||
supports-preserve-symlinks-flag: 1.0.0
|
||||
|
||||
reusify@1.1.0: {}
|
||||
|
||||
rollup@4.39.0:
|
||||
|
@ -1997,11 +2148,13 @@ snapshots:
|
|||
dependencies:
|
||||
has-flag: 4.0.0
|
||||
|
||||
svelte-check@4.1.5(svelte@5.25.7)(typescript@5.8.3):
|
||||
supports-preserve-symlinks-flag@1.0.0: {}
|
||||
|
||||
svelte-check@4.1.5(picomatch@4.0.2)(svelte@5.25.7)(typescript@5.8.3):
|
||||
dependencies:
|
||||
'@jridgewell/trace-mapping': 0.3.25
|
||||
chokidar: 4.0.3
|
||||
fdir: 6.4.3
|
||||
fdir: 6.4.3(picomatch@4.0.2)
|
||||
picocolors: 1.1.1
|
||||
sade: 1.8.1
|
||||
svelte: 5.25.7
|
||||
|
|
42
src/app.css
42
src/app.css
|
@ -1,32 +1,32 @@
|
|||
:root {
|
||||
--primary-color: #0f4a84;
|
||||
--primary-hover: #3c82bb;
|
||||
--primary-light: #e1eef7;
|
||||
--primary-color: #0f4a84;
|
||||
--primary-hover: #3c82bb;
|
||||
--primary-light: #e1eef7;
|
||||
|
||||
--text-color: #1a365d;
|
||||
--text-light: #718096;
|
||||
--text-color: #1a365d;
|
||||
--text-light: #718096;
|
||||
|
||||
--bg-color: #f7fafc;
|
||||
--card-bg: #ffffff;
|
||||
--bg-color: #f7fafc;
|
||||
--card-bg: #ffffff;
|
||||
|
||||
--border-color: #cbd5e0;
|
||||
--switch-off: #e2e8f0;
|
||||
--switch-on: var(--primary-color);
|
||||
--switch-knob: #ffffff;
|
||||
--border-color: #cbd5e0;
|
||||
--switch-off: #e2e8f0;
|
||||
--switch-on: var(--primary-color);
|
||||
--switch-knob: #ffffff;
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family:
|
||||
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
||||
background-color: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
line-height: 1.6;
|
||||
min-height: 100vh;
|
||||
padding: 1rem;
|
||||
font-family:
|
||||
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
||||
background-color: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
line-height: 1.6;
|
||||
min-height: 100vh;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
|
14
src/app.d.ts
vendored
14
src/app.d.ts
vendored
|
@ -1,13 +1,13 @@
|
|||
// See https://svelte.dev/docs/kit/types#app.d.ts
|
||||
// for information about these interfaces
|
||||
declare global {
|
||||
namespace App {
|
||||
// interface Error {}
|
||||
// interface Locals {}
|
||||
// interface PageData {}
|
||||
// interface PageState {}
|
||||
// interface Platform {}
|
||||
}
|
||||
namespace App {
|
||||
// interface Error {}
|
||||
// interface Locals {}
|
||||
// interface PageData {}
|
||||
// interface PageState {}
|
||||
// interface Platform {}
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
|
|
18
src/app.html
18
src/app.html
|
@ -1,12 +1,12 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="%sveltekit.assets%/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
%sveltekit.head%
|
||||
</head>
|
||||
<body data-sveltekit-preload-data="hover">
|
||||
<div style="display: contents">%sveltekit.body%</div>
|
||||
</body>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="%sveltekit.assets%/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
%sveltekit.head%
|
||||
</head>
|
||||
<body data-sveltekit-preload-data="hover">
|
||||
<div style="display: contents">%sveltekit.body%</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,46 +1,46 @@
|
|||
<script lang="ts">
|
||||
import '../app.css';
|
||||
import '../app.css';
|
||||
|
||||
let { children } = $props();
|
||||
let { children } = $props();
|
||||
</script>
|
||||
|
||||
<div class="app">
|
||||
<main>
|
||||
{@render children()}
|
||||
</main>
|
||||
<main>
|
||||
{@render children()}
|
||||
</main>
|
||||
|
||||
<footer></footer>
|
||||
<footer></footer>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.app {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
}
|
||||
.app {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
main {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 1rem;
|
||||
width: 100%;
|
||||
max-width: 64rem;
|
||||
margin: 0 auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
main {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 1rem;
|
||||
width: 100%;
|
||||
max-width: 64rem;
|
||||
margin: 0 auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
footer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 12px;
|
||||
}
|
||||
footer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
@media (min-width: 480px) {
|
||||
footer {
|
||||
padding: 12px 0;
|
||||
}
|
||||
}
|
||||
@media (min-width: 480px) {
|
||||
footer {
|
||||
padding: 12px 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -2,97 +2,97 @@
|
|||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>游戏王辅助工具</title>
|
||||
<meta name="description" content="YGO Auxiliary Tools" />
|
||||
<title>游戏王辅助工具</title>
|
||||
<meta name="description" content="YGO Auxiliary Tools" />
|
||||
</svelte:head>
|
||||
|
||||
<section>
|
||||
<div class="index-container">
|
||||
<ul class="tool-list">
|
||||
<li><a href="/ritual-beast">灵兽特招记录</a></li>
|
||||
<li><a href="/simultaneous-equation-cannons">连栗砲固定式计算器</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="index-container">
|
||||
<ul class="tool-list">
|
||||
<li><a href="/ritual-beast">灵兽特招记录</a></li>
|
||||
<li><a href="/simultaneous-equation-cannons">连栗砲固定式计算器</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--primary-color: #0f4a84;
|
||||
--primary-hover: #3c82bb;
|
||||
--primary-light: #e1eef7;
|
||||
:root {
|
||||
--primary-color: #0f4a84;
|
||||
--primary-hover: #3c82bb;
|
||||
--primary-light: #e1eef7;
|
||||
|
||||
--text-color: #1a365d;
|
||||
--text-light: #718096;
|
||||
--text-color: #1a365d;
|
||||
--text-light: #718096;
|
||||
|
||||
--bg-color: #f7fafc;
|
||||
--card-bg: #ffffff;
|
||||
--bg-color: #f7fafc;
|
||||
--card-bg: #ffffff;
|
||||
|
||||
--border-color: #cbd5e0;
|
||||
--switch-off: #e2e8f0;
|
||||
--switch-on: var(--primary-color);
|
||||
--switch-knob: #ffffff;
|
||||
}
|
||||
--border-color: #cbd5e0;
|
||||
--switch-off: #e2e8f0;
|
||||
--switch-on: var(--primary-color);
|
||||
--switch-knob: #ffffff;
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex: 0.6;
|
||||
}
|
||||
.index-container {
|
||||
background: var(--card-bg);
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
|
||||
padding: 1.5rem;
|
||||
width: 100%;
|
||||
max-width: 360px;
|
||||
margin: 0 auto;
|
||||
section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex: 0.6;
|
||||
}
|
||||
.index-container {
|
||||
background: var(--card-bg);
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
|
||||
padding: 1.5rem;
|
||||
width: 100%;
|
||||
max-width: 360px;
|
||||
margin: 0 auto;
|
||||
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
@media (max-height: 600px) {
|
||||
.index-container {
|
||||
position: static;
|
||||
transform: none;
|
||||
margin: 2rem auto;
|
||||
}
|
||||
}
|
||||
@media (max-height: 600px) {
|
||||
.index-container {
|
||||
position: static;
|
||||
transform: none;
|
||||
margin: 2rem auto;
|
||||
}
|
||||
}
|
||||
|
||||
.tool-list {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
.tool-list {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.tool-list li a {
|
||||
display: block;
|
||||
padding: 0.75rem 1rem;
|
||||
background-color: var(--primary-light);
|
||||
color: var(--primary-color);
|
||||
text-decoration: none;
|
||||
border-radius: 8px;
|
||||
font-weight: 500;
|
||||
transition: all 0.2s ease;
|
||||
border: 1px solid var(--border-color);
|
||||
text-align: center;
|
||||
}
|
||||
.tool-list li a {
|
||||
display: block;
|
||||
padding: 0.75rem 1rem;
|
||||
background-color: var(--primary-light);
|
||||
color: var(--primary-color);
|
||||
text-decoration: none;
|
||||
border-radius: 8px;
|
||||
font-weight: 500;
|
||||
transition: all 0.2s ease;
|
||||
border: 1px solid var(--border-color);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tool-list li a:hover {
|
||||
background-color: var(--primary-color);
|
||||
color: white;
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.tool-list li a:hover {
|
||||
background-color: var(--primary-color);
|
||||
color: white;
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,218 +1,218 @@
|
|||
<script lang="ts">
|
||||
import type { RitualBeastType } from './+page.ts';
|
||||
import type { RitualBeastType } from './+page.ts';
|
||||
|
||||
let { data } = $props();
|
||||
let { data } = $props();
|
||||
|
||||
let rb = $derived(data.rb.map((rb: RitualBeastType) => ({ ...rb })));
|
||||
let announcement = $state('');
|
||||
let rb = $derived(data.rb.map((rb: RitualBeastType) => ({ ...rb })));
|
||||
let announcement = $state('');
|
||||
|
||||
function handleToggle(index: number, checked: boolean) {
|
||||
rb[index].special_summon = checked;
|
||||
announcement = `${rb[index].name} ${checked ? '已特招' : '未特招'}`;
|
||||
}
|
||||
function handleReset() {
|
||||
rb = data.rb.map((rb) => ({ ...rb, special_summon: false }));
|
||||
announcement = `已重置所有灵兽特招状态`;
|
||||
}
|
||||
function handleToggle(index: number, checked: boolean) {
|
||||
rb[index].special_summon = checked;
|
||||
announcement = `${rb[index].name} ${checked ? '已特招' : '未特招'}`;
|
||||
}
|
||||
function handleReset() {
|
||||
rb = data.rb.map((rb) => ({ ...rb, special_summon: false }));
|
||||
announcement = `已重置所有灵兽特招状态`;
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="container" role="region" aria-label="灵兽特招记录">
|
||||
<h1 id="ritual-beast-title">灵兽特招记录</h1>
|
||||
<div class="ritual-beast-list" role="list" aria-labelledby="ritual-beast-title">
|
||||
{#each rb as _rb, index (_rb.id)}
|
||||
<div class="ritual-beast-item" role="listitem">
|
||||
<span id={`rb-name-${index}`}>{_rb.name}</span>
|
||||
<label class="switch">
|
||||
<input
|
||||
type="checkbox"
|
||||
bind:checked={_rb.special_summon}
|
||||
onchange={(e: Event) => handleToggle(index, (e.target as HTMLInputElement).checked)}
|
||||
aria-labelledby={`rb-name-${index}`}
|
||||
aria-checked={_rb.special_summon}
|
||||
/>
|
||||
<span class="slider round" aria-hidden="true"></span>
|
||||
</label>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
<button type="reset" id="resetButton" onclick={handleReset} aria-label="重置">重置</button>
|
||||
<h1 id="ritual-beast-title">灵兽特招记录</h1>
|
||||
<div class="ritual-beast-list" role="list" aria-labelledby="ritual-beast-title">
|
||||
{#each rb as _rb, index (_rb.id)}
|
||||
<div class="ritual-beast-item" role="listitem">
|
||||
<span id={`rb-name-${index}`}>{_rb.name}</span>
|
||||
<label class="switch">
|
||||
<input
|
||||
type="checkbox"
|
||||
bind:checked={_rb.special_summon}
|
||||
onchange={(e: Event) => handleToggle(index, (e.target as HTMLInputElement).checked)}
|
||||
aria-labelledby={`rb-name-${index}`}
|
||||
aria-checked={_rb.special_summon}
|
||||
/>
|
||||
<span class="slider round" aria-hidden="true"></span>
|
||||
</label>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
<button type="reset" id="resetButton" onclick={handleReset} aria-label="重置">重置</button>
|
||||
|
||||
<div aria-live="polite" class="sr-only">
|
||||
{announcement}
|
||||
</div>
|
||||
<div aria-live="polite" class="sr-only">
|
||||
{announcement}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--primary-color: #0f4a84;
|
||||
--primary-hover: #3c82bb;
|
||||
--primary-light: #e1eef7;
|
||||
:root {
|
||||
--primary-color: #0f4a84;
|
||||
--primary-hover: #3c82bb;
|
||||
--primary-light: #e1eef7;
|
||||
|
||||
--text-color: #1a365d;
|
||||
--text-light: #718096;
|
||||
--text-color: #1a365d;
|
||||
--text-light: #718096;
|
||||
|
||||
--bg-color: #f7fafc;
|
||||
--card-bg: #ffffff;
|
||||
--border-color: #cbd5e0;
|
||||
--switch-off: #e2e8f0;
|
||||
--switch-on: var(--primary-color);
|
||||
--switch-knob: #ffffff;
|
||||
}
|
||||
--bg-color: #f7fafc;
|
||||
--card-bg: #ffffff;
|
||||
--border-color: #cbd5e0;
|
||||
--switch-off: #e2e8f0;
|
||||
--switch-on: var(--primary-color);
|
||||
--switch-knob: #ffffff;
|
||||
}
|
||||
|
||||
.container {
|
||||
background: var(--card-bg);
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
|
||||
padding: 1.5rem;
|
||||
width: 100%;
|
||||
max-width: 360px;
|
||||
margin: 2rem auto;
|
||||
}
|
||||
.container {
|
||||
background: var(--card-bg);
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
|
||||
padding: 1.5rem;
|
||||
width: 100%;
|
||||
max-width: 360px;
|
||||
margin: 2rem auto;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 1.5rem;
|
||||
color: var(--text-color);
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
}
|
||||
h1 {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 1.5rem;
|
||||
color: var(--text-color);
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ritual-beast-list {
|
||||
display: grid;
|
||||
gap: 0.75rem;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
.ritual-beast-list {
|
||||
display: grid;
|
||||
gap: 0.75rem;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.ritual-beast-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0.75rem 1rem;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--border-color);
|
||||
transition:
|
||||
transform 0.2s,
|
||||
box-shadow 0.2s;
|
||||
}
|
||||
.ritual-beast-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0.75rem 1rem;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--border-color);
|
||||
transition:
|
||||
transform 0.2s,
|
||||
box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.ritual-beast-item span {
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
.ritual-beast-item span {
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 44px;
|
||||
height: 24px;
|
||||
}
|
||||
.switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 44px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
}
|
||||
.switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.switch input:focus-visible + .slider {
|
||||
outline: 2px solid var(--primary-color);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
.switch input:focus-visible + .slider {
|
||||
outline: 2px solid var(--primary-color);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: var(--switch-off);
|
||||
transition: all 0.3s ease;
|
||||
border-radius: 34px;
|
||||
}
|
||||
.slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: var(--switch-off);
|
||||
transition: all 0.3s ease;
|
||||
border-radius: 34px;
|
||||
}
|
||||
|
||||
.slider:before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
left: 2px;
|
||||
bottom: 2px;
|
||||
background-color: var(--switch-knob);
|
||||
transition: all 0.3s ease;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.slider:before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
left: 2px;
|
||||
bottom: 2px;
|
||||
background-color: var(--switch-knob);
|
||||
transition: all 0.3s ease;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
input:checked + .slider {
|
||||
background-color: var(--switch-on);
|
||||
}
|
||||
input:checked + .slider {
|
||||
background-color: var(--switch-on);
|
||||
}
|
||||
|
||||
input:checked + .slider:before {
|
||||
transform: translateX(20px);
|
||||
}
|
||||
input:checked + .slider:before {
|
||||
transform: translateX(20px);
|
||||
}
|
||||
|
||||
/* Reset Button */
|
||||
button#resetButton {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0.75rem;
|
||||
background-color: var(--primary-color);
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
/* Reset Button */
|
||||
button#resetButton {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0.75rem;
|
||||
background-color: var(--primary-color);
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
button#resetButton:hover {
|
||||
background-color: var(--primary-hover);
|
||||
}
|
||||
button#resetButton:hover {
|
||||
background-color: var(--primary-hover);
|
||||
}
|
||||
|
||||
button#resetButton:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
button#resetButton:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
border: 0;
|
||||
}
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/* Responsive Grid for Landscape Mode */
|
||||
@media (min-width: 640px) and (orientation: landscape),
|
||||
(max-width: 640px) and (orientation: landscape) {
|
||||
.container {
|
||||
max-width: 600px;
|
||||
}
|
||||
/* Responsive Grid for Landscape Mode */
|
||||
@media (min-width: 640px) and (orientation: landscape),
|
||||
(max-width: 640px) and (orientation: landscape) {
|
||||
.container {
|
||||
max-width: 600px;
|
||||
}
|
||||
|
||||
.ritual-beast-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 0.75rem;
|
||||
}
|
||||
}
|
||||
.ritual-beast-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* Portrait mode fallback to one column */
|
||||
@media (orientation: portrait) {
|
||||
.ritual-beast-list {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
/* Portrait mode fallback to one column */
|
||||
@media (orientation: portrait) {
|
||||
.ritual-beast-list {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
.container {
|
||||
max-width: 800px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 1024px) {
|
||||
.container {
|
||||
max-width: 800px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
import type { PageLoad } from './$types';
|
||||
|
||||
export interface RitualBeastType {
|
||||
id: number;
|
||||
name: string;
|
||||
special_summon: boolean;
|
||||
id: number;
|
||||
name: string;
|
||||
special_summon: boolean;
|
||||
}
|
||||
|
||||
export const load: PageLoad = () => {
|
||||
const data: RitualBeastType[] = [
|
||||
{ id: 1, name: '企鹅(兽)', special_summon: false },
|
||||
{ id: 2, name: '川豚(兽)', special_summon: false },
|
||||
{ id: 3, name: '新蕾拉(人兽)', special_summon: false },
|
||||
{ id: 4, name: '星龙', special_summon: false },
|
||||
{ id: 5, name: '火狮(兽)', special_summon: false },
|
||||
{ id: 6, name: '老蕾拉(人)', special_summon: false },
|
||||
{ id: 7, name: '薇茵达(人兽)', special_summon: false },
|
||||
{ id: 8, name: '长老(人)', special_summon: false },
|
||||
{ id: 9, name: '雯(人)', special_summon: false },
|
||||
{ id: 10, name: '雷鹰(兽)', special_summon: false }
|
||||
];
|
||||
return {
|
||||
rb: data as RitualBeastType[]
|
||||
};
|
||||
const data: RitualBeastType[] = [
|
||||
{ id: 1, name: '企鹅(兽)', special_summon: false },
|
||||
{ id: 2, name: '川豚(兽)', special_summon: false },
|
||||
{ id: 3, name: '新蕾拉(人兽)', special_summon: false },
|
||||
{ id: 4, name: '星龙', special_summon: false },
|
||||
{ id: 5, name: '火狮(兽)', special_summon: false },
|
||||
{ id: 6, name: '老蕾拉(人)', special_summon: false },
|
||||
{ id: 7, name: '薇茵达(人兽)', special_summon: false },
|
||||
{ id: 8, name: '长老(人)', special_summon: false },
|
||||
{ id: 9, name: '雯(人)', special_summon: false },
|
||||
{ id: 10, name: '雷鹰(兽)', special_summon: false }
|
||||
];
|
||||
return {
|
||||
rb: data as RitualBeastType[]
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,194 +1,194 @@
|
|||
<script lang="ts">
|
||||
const { data } = $props();
|
||||
let totalCards = $state<number | null>(null);
|
||||
let xyzRank = $state<number | null>(null);
|
||||
let fusionRank = $state<number | null>(null);
|
||||
let targetRank = $state<number | null>(null);
|
||||
const { data } = $props();
|
||||
let totalCards = $state<number | null>(null);
|
||||
let xyzRank = $state<number | null>(null);
|
||||
let fusionRank = $state<number | null>(null);
|
||||
let targetRank = $state<number | null>(null);
|
||||
|
||||
let isValidCombo = $derived(
|
||||
xyzRank !== null && fusionRank !== null ? 2 * xyzRank + fusionRank === totalCards : false
|
||||
);
|
||||
let isValidCombo = $derived(
|
||||
xyzRank !== null && fusionRank !== null ? 2 * xyzRank + fusionRank === totalCards : false
|
||||
);
|
||||
|
||||
let canActivateEffect = $derived(
|
||||
xyzRank !== null && fusionRank !== null && targetRank !== null
|
||||
? xyzRank + fusionRank === targetRank
|
||||
: false
|
||||
);
|
||||
let canActivateEffect = $derived(
|
||||
xyzRank !== null && fusionRank !== null && targetRank !== null
|
||||
? xyzRank + fusionRank === targetRank
|
||||
: false
|
||||
);
|
||||
</script>
|
||||
|
||||
<div class="equation-calculator" role="region" aria-label={data.SEC.title}>
|
||||
<h1 id="main-title">{data.SEC.title}</h1>
|
||||
<h1 id="main-title">{data.SEC.title}</h1>
|
||||
|
||||
<!-- Phase 1 -->
|
||||
<div class="calc-phase">
|
||||
<h2>{data.SEC.phase1}</h2>
|
||||
<div class="calc-input">
|
||||
<label>
|
||||
{data.SEC.totalCards}
|
||||
<input type="number" bind:value={totalCards} />
|
||||
</label>
|
||||
</div>
|
||||
<!-- Phase 1 -->
|
||||
<div class="calc-phase">
|
||||
<h2>{data.SEC.phase1}</h2>
|
||||
<div class="calc-input">
|
||||
<label>
|
||||
{data.SEC.totalCards}
|
||||
<input type="number" bind:value={totalCards} />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="calc-input">
|
||||
<label>
|
||||
{data.SEC.xyzRank}
|
||||
<input type="number" bind:value={xyzRank} />
|
||||
</label>
|
||||
</div>
|
||||
<div class="calc-input">
|
||||
<label>
|
||||
{data.SEC.xyzRank}
|
||||
<input type="number" bind:value={xyzRank} />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="calc-input">
|
||||
<label>
|
||||
{data.SEC.fusionRank}
|
||||
<input type="number" bind:value={fusionRank} />
|
||||
</label>
|
||||
</div>
|
||||
<div class="calc-input">
|
||||
<label>
|
||||
{data.SEC.fusionRank}
|
||||
<input type="number" bind:value={fusionRank} />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{#if totalCards !== 0}
|
||||
<div class={`result-feedback ${isValidCombo ? 'result-valid' : 'result-invalid'}`}>
|
||||
{isValidCombo ? data.SEC.validCombo : data.SEC.invalidCombo}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{#if totalCards !== 0}
|
||||
<div class={`result-feedback ${isValidCombo ? 'result-valid' : 'result-invalid'}`}>
|
||||
{isValidCombo ? data.SEC.validCombo : data.SEC.invalidCombo}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<!-- Phase 2 -->
|
||||
<div class="calc-phase">
|
||||
<h2>{data.SEC.phase2}</h2>
|
||||
<div class="calc-input">
|
||||
<label>
|
||||
{data.SEC.targetRank}
|
||||
<input type="number" bind:value={targetRank} />
|
||||
</label>
|
||||
</div>
|
||||
<!-- Phase 2 -->
|
||||
<div class="calc-phase">
|
||||
<h2>{data.SEC.phase2}</h2>
|
||||
<div class="calc-input">
|
||||
<label>
|
||||
{data.SEC.targetRank}
|
||||
<input type="number" bind:value={targetRank} />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{#if targetRank !== 0}
|
||||
<div class={`result-feedback ${canActivateEffect ? 'result-valid' : 'result-invalid'}`}>
|
||||
{canActivateEffect ? data.SEC.validEffect : data.SEC.invalidEffect}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{#if targetRank !== 0}
|
||||
<div class={`result-feedback ${canActivateEffect ? 'result-valid' : 'result-invalid'}`}>
|
||||
{canActivateEffect ? data.SEC.validEffect : data.SEC.invalidEffect}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<!-- Effect Description -->
|
||||
<div class="effect-description">
|
||||
<p>{data.SEC.effectText}</p>
|
||||
</div>
|
||||
<!-- Effect Description -->
|
||||
<div class="effect-description">
|
||||
<p>{data.SEC.effectText}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--primary-color: #0f4a84;
|
||||
--primary-hover: #3c82bb;
|
||||
--primary-light: #e1eef7;
|
||||
:root {
|
||||
--primary-color: #0f4a84;
|
||||
--primary-hover: #3c82bb;
|
||||
--primary-light: #e1eef7;
|
||||
|
||||
--text-color: #1a365d;
|
||||
--text-light: #718096;
|
||||
--text-color: #1a365d;
|
||||
--text-light: #718096;
|
||||
|
||||
--bg-color: #f7fafc;
|
||||
--card-bg: #ffffff;
|
||||
--bg-color: #f7fafc;
|
||||
--card-bg: #ffffff;
|
||||
|
||||
--border-color: #cbd5e0;
|
||||
}
|
||||
--border-color: #cbd5e0;
|
||||
}
|
||||
|
||||
.equation-calculator {
|
||||
background: var(--card-bg);
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
|
||||
padding: 1.5rem;
|
||||
width: 100%;
|
||||
max-width: 480px;
|
||||
margin: 2rem auto;
|
||||
font-family:
|
||||
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
||||
color: var(--text-color);
|
||||
line-height: 1.6;
|
||||
}
|
||||
.equation-calculator {
|
||||
background: var(--card-bg);
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
|
||||
padding: 1.5rem;
|
||||
width: 100%;
|
||||
max-width: 480px;
|
||||
margin: 2rem auto;
|
||||
font-family:
|
||||
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
||||
color: var(--text-color);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.equation-calculator h1 {
|
||||
color: var(--primary-color);
|
||||
text-align: center;
|
||||
margin-bottom: 1.5rem;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
.equation-calculator h1 {
|
||||
color: var(--primary-color);
|
||||
text-align: center;
|
||||
margin-bottom: 1.5rem;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.calc-phase {
|
||||
background-color: var(--primary-light);
|
||||
border-radius: 8px;
|
||||
padding: 1.25rem;
|
||||
margin-bottom: 1.5rem;
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
.calc-phase {
|
||||
background-color: var(--primary-light);
|
||||
border-radius: 8px;
|
||||
padding: 1.25rem;
|
||||
margin-bottom: 1.5rem;
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.calc-phase h2 {
|
||||
color: var(--primary-color);
|
||||
font-size: 1.25rem;
|
||||
margin-bottom: 1rem;
|
||||
padding-bottom: 0.5rem;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
.calc-phase h2 {
|
||||
color: var(--primary-color);
|
||||
font-size: 1.25rem;
|
||||
margin-bottom: 1rem;
|
||||
padding-bottom: 0.5rem;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.calc-input {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.calc-input {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.calc-input label {
|
||||
display: block;
|
||||
margin-bottom: 0.5rem;
|
||||
color: var(--text-color);
|
||||
font-weight: 500;
|
||||
}
|
||||
.calc-input label {
|
||||
display: block;
|
||||
margin-bottom: 0.5rem;
|
||||
color: var(--text-color);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.calc-input input[type='number'] {
|
||||
width: 100%;
|
||||
padding: 0.75rem;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 6px;
|
||||
background-color: var(--card-bg);
|
||||
color: var(--text-color);
|
||||
font-size: 1rem;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.calc-input input[type='number'] {
|
||||
width: 100%;
|
||||
padding: 0.75rem;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 6px;
|
||||
background-color: var(--card-bg);
|
||||
color: var(--text-color);
|
||||
font-size: 1rem;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.calc-input input[type='number']:focus {
|
||||
outline: none;
|
||||
border-color: var(--primary-color);
|
||||
box-shadow: 0 0 0 2px var(--primary-light);
|
||||
}
|
||||
.calc-input input[type='number']:focus {
|
||||
outline: none;
|
||||
border-color: var(--primary-color);
|
||||
box-shadow: 0 0 0 2px var(--primary-light);
|
||||
}
|
||||
|
||||
.result-feedback {
|
||||
padding: 0.75rem;
|
||||
border-radius: 6px;
|
||||
margin-top: 1rem;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
}
|
||||
.result-feedback {
|
||||
padding: 0.75rem;
|
||||
border-radius: 6px;
|
||||
margin-top: 1rem;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.result-valid {
|
||||
background-color: rgba(16, 185, 129, 0.1);
|
||||
color: #065f46;
|
||||
}
|
||||
.result-valid {
|
||||
background-color: rgba(16, 185, 129, 0.1);
|
||||
color: #065f46;
|
||||
}
|
||||
|
||||
.result-invalid {
|
||||
background-color: rgba(239, 68, 68, 0.1);
|
||||
color: #991b1b;
|
||||
}
|
||||
.result-invalid {
|
||||
background-color: rgba(239, 68, 68, 0.1);
|
||||
color: #991b1b;
|
||||
}
|
||||
|
||||
.effect-description {
|
||||
font-size: 0.875rem;
|
||||
color: var(--text-color);
|
||||
line-height: 1.5;
|
||||
padding: 0.75rem;
|
||||
background-color: var(--primary-light);
|
||||
border-radius: 6px;
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
.effect-description {
|
||||
font-size: 0.875rem;
|
||||
color: var(--text-color);
|
||||
line-height: 1.5;
|
||||
padding: 0.75rem;
|
||||
background-color: var(--primary-light);
|
||||
border-radius: 6px;
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
.equation-calculator {
|
||||
padding: 2rem;
|
||||
}
|
||||
@media (min-width: 640px) {
|
||||
.equation-calculator {
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
.calc-phase {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
}
|
||||
.calc-phase {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,38 +1,38 @@
|
|||
import type { PageLoad } from '../$types';
|
||||
|
||||
interface SimultaneousEquationCannonsType {
|
||||
title: string;
|
||||
phase1: string;
|
||||
phase2: string;
|
||||
totalCards: string;
|
||||
xyzRank: string;
|
||||
fusionRank: string;
|
||||
targetRank: string;
|
||||
validCombo: string;
|
||||
invalidCombo: string;
|
||||
validEffect: string;
|
||||
invalidEffect: string;
|
||||
effectText: string;
|
||||
title: string;
|
||||
phase1: string;
|
||||
phase2: string;
|
||||
totalCards: string;
|
||||
xyzRank: string;
|
||||
fusionRank: string;
|
||||
targetRank: string;
|
||||
validCombo: string;
|
||||
invalidCombo: string;
|
||||
validEffect: string;
|
||||
invalidEffect: string;
|
||||
effectText: string;
|
||||
}
|
||||
|
||||
export const load: PageLoad = () => {
|
||||
const data: SimultaneousEquationCannonsType = {
|
||||
title: '连栗炮固定式计算器',
|
||||
phase1: '第一阶段:除外条件',
|
||||
phase2: '第二阶段:效果结算',
|
||||
totalCards: '双方手牌+场上卡总数',
|
||||
xyzRank: '超量怪兽阶级(2只相同)',
|
||||
fusionRank: '融合怪兽阶级',
|
||||
targetRank: '目标怪兽等级/阶级',
|
||||
validCombo: '✔️ 条件满足:2×超量阶级 + 融合阶级 = 总卡数',
|
||||
invalidCombo: '❌ 不满足条件:2×超量阶级 + 融合阶级 ≠ 总卡数',
|
||||
validEffect: '✔️ 效果可发动:超量 + 融合阶级 = 目标阶级',
|
||||
invalidEffect: '❌ 无法发动:阶级总和与目标不匹配',
|
||||
effectText:
|
||||
'从额外牌组将等级·阶级合计等于双方手牌·场上卡数量的2只同阶级超量怪兽和1只融合怪兽除外,' +
|
||||
'然后选择对手1只表侧怪兽,将阶级合计等于该怪兽等级的1超量+1融合返回额外牌组,之后对手场上卡全部除外。'
|
||||
};
|
||||
return {
|
||||
SEC: data as SimultaneousEquationCannonsType
|
||||
};
|
||||
const data: SimultaneousEquationCannonsType = {
|
||||
title: '连栗炮固定式计算器',
|
||||
phase1: '第一阶段:除外条件',
|
||||
phase2: '第二阶段:效果结算',
|
||||
totalCards: '双方手牌+场上卡总数',
|
||||
xyzRank: '超量怪兽阶级(2只相同)',
|
||||
fusionRank: '融合怪兽阶级',
|
||||
targetRank: '目标怪兽等级/阶级',
|
||||
validCombo: '✔️ 条件满足:2×超量阶级 + 融合阶级 = 总卡数',
|
||||
invalidCombo: '❌ 不满足条件:2×超量阶级 + 融合阶级 ≠ 总卡数',
|
||||
validEffect: '✔️ 效果可发动:超量 + 融合阶级 = 目标阶级',
|
||||
invalidEffect: '❌ 无法发动:阶级总和与目标不匹配',
|
||||
effectText:
|
||||
'从额外牌组将等级·阶级合计等于双方手牌·场上卡数量的2只同阶级超量怪兽和1只融合怪兽除外,' +
|
||||
'然后选择对手1只表侧怪兽,将阶级合计等于该怪兽等级的1超量+1融合返回额外牌组,之后对手场上卡全部除外。'
|
||||
};
|
||||
return {
|
||||
SEC: data as SimultaneousEquationCannonsType
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
import adapter from '@sveltejs/adapter-auto';
|
||||
import adapter from '@sveltejs/adapter-node';
|
||||
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
// Consult https://svelte.dev/docs/kit/integrations
|
||||
// for more information about preprocessors
|
||||
preprocess: vitePreprocess(),
|
||||
// Consult https://svelte.dev/docs/kit/integrations
|
||||
// for more information about preprocessors
|
||||
preprocess: vitePreprocess(),
|
||||
|
||||
kit: {
|
||||
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
|
||||
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
|
||||
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
|
||||
adapter: adapter()
|
||||
}
|
||||
kit: {
|
||||
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
|
||||
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
|
||||
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
|
||||
adapter: adapter({
|
||||
out: 'build'
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
{
|
||||
"extends": "./.svelte-kit/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"resolveJsonModule": true,
|
||||
"skipLibCheck": true,
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"moduleResolution": "bundler"
|
||||
}
|
||||
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
|
||||
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
|
||||
//
|
||||
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
|
||||
// from the referenced tsconfig.json - TypeScript does not merge them in
|
||||
"extends": "./.svelte-kit/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"resolveJsonModule": true,
|
||||
"skipLibCheck": true,
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"moduleResolution": "bundler"
|
||||
}
|
||||
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
|
||||
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
|
||||
//
|
||||
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
|
||||
// from the referenced tsconfig.json - TypeScript does not merge them in
|
||||
}
|
||||
|
|
|
@ -2,5 +2,5 @@ import { sveltekit } from '@sveltejs/kit/vite';
|
|||
import { defineConfig } from 'vite';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [sveltekit()]
|
||||
plugins: [sveltekit()]
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue