feat: diy模式区分入口

This commit is contained in:
streakingman
2022-10-08 22:51:41 +08:00
parent e6449f9d8c
commit 34e89fe232
28 changed files with 210 additions and 21 deletions
+98
View File
@@ -0,0 +1,98 @@
{
"title": "标题",
"desc": "描述",
"bgm": "/sound-disco.mp3",
"dark": true,
"backgroundColor": "#8dac85",
"pure": true,
"backgroundBlur": false,
"icons": [
{
"name": "1",
"content": "/1.png",
"clickSound": "button-click",
"tripleSound": "triple"
},
{
"name": "2",
"content": "/2.png",
"clickSound": "button-click",
"tripleSound": "triple"
},
{
"name": "3",
"content": "/3.png",
"clickSound": "button-click",
"tripleSound": "triple"
},
{
"name": "4",
"content": "/4.png",
"clickSound": "button-click",
"tripleSound": "triple"
},
{
"name": "5",
"content": "/5.png",
"clickSound": "button-click",
"tripleSound": "triple"
},
{
"name": "6",
"content": "/6.png",
"clickSound": "button-click",
"tripleSound": "triple"
},
{
"name": "7",
"content": "/7.png",
"clickSound": "button-click",
"tripleSound": "triple"
},
{
"name": "8",
"content": "/8.png",
"clickSound": "button-click",
"tripleSound": "triple"
},
{
"name": "9",
"content": "/9.png",
"clickSound": "button-click",
"tripleSound": "triple"
},
{
"name": "10",
"content": "/10.png",
"clickSound": "button-click",
"tripleSound": "triple"
}
],
"sounds": [
{
"name": "sound-undo",
"src": "/sound-undo.mp3"
},
{
"name": "sound-shift",
"src": "/sound-shift.mp3"
},
{
"name": "sound-wash",
"src": "/sound-wash.mp3"
},
{
"name": "button-click",
"src": "/sound-button-click.mp3"
},
{
"name": "triple",
"src": "/sound-triple.mp3"
}
],
"operateSoundMap": {
"shift": "sound-shift",
"undo": "sound-undo",
"wash": "sound-wash"
}
}
+19
View File
@@ -0,0 +1,19 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
root: 'diy',
publicDir: './public',
build: {
outDir: 'diy-dist',
},
define: {
__DIY__: true,
},
server: {
host: true,
port: 5556,
},
});
+38
View File
@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./public/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="无限道具版羊了个羊、可以通关的羊了个羊"
/>
<title>有解的羊了个羊</title>
<style>
html,
body {
margin: 0;
padding: 0;
background-color: white;
transition: background-color 0.3s 0.4s;
color: rgb(0 0 0 / 60%);
}
a {
color: currentColor;
text-decoration: inherit;
}
#root {
transition: opacity 0.5s;
}
</style>
</head>
<body>
<div id="root"></div>
<script>
// vite没有global,手动声明
var global = global || window;
</script>
<script type="module" src="./main.tsx"></script>
</body>
</html>
+15
View File
@@ -0,0 +1,15 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from '../src/App';
import '../src/styles/global.scss';
import '../src/styles/utils.scss';
import { domRelatedOptForTheme } from '../src/utils';
import theme from './diy.theme.json';
domRelatedOptForTheme(theme);
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>
<App theme={theme} />
</React.StrictMode>
);
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.