diff --git a/README.md b/README.md
index def2232..e6581d4 100644
--- a/README.md
+++ b/README.md
@@ -27,7 +27,7 @@
- 撤销:撤销上一次操作,无限次数
- 洗牌:哗啦哗啦,无限次数
- 关卡:50 关玩到爽,可直接跳
-- 主题:金轮
、ikun
主题等(露出黑脚)
+- 主题:金轮
、骚猪
、ikun
主题等(露出黑脚)
开心就好 😄
diff --git a/index.html b/index.html
index e59b10c..ddb3297 100644
--- a/index.html
+++ b/index.html
@@ -31,8 +31,8 @@
// 如果您基于此项目二创,可以删除以下代码
// 否则请标明原仓库地址
setTimeout(()=>{
- const {host} = location
- if(host!=='localhost'&&!host.endsWith('streakingman.com')){
+ const {hostname} = location
+ if(hostname!=='localhost'&&!hostname.endsWith('streakingman.com')){
const a = document.createElement('a')
a.setAttribute('href','https://github.com/StreakingMan/solvable-sheep-game')
a.setAttribute('target','_blank')
diff --git a/src/App.tsx b/src/App.tsx
index 136dd02..a2bfd74 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -14,9 +14,10 @@ import { Icon, Theme } from './themes/interface';
import { fishermanTheme } from './themes/fisherman';
import { jinlunTheme } from './themes/jinlun';
import { ikunTheme } from './themes/ikun';
+import { pddTheme } from './themes/pdd';
// 主题
-const themes = [defaultTheme, fishermanTheme, jinlunTheme, ikunTheme];
+const themes = [defaultTheme, fishermanTheme, jinlunTheme, ikunTheme, pddTheme];
// 最大关卡
const maxLevel = 50;
@@ -370,7 +371,7 @@ const App: FC = () => {
return (
<>
-
有解的羊了个羊(DEMO)
+ {curTheme.title}
diff --git a/src/themes/default/index.ts b/src/themes/default/index.ts
index 83ec3f6..5a0e86a 100644
--- a/src/themes/default/index.ts
+++ b/src/themes/default/index.ts
@@ -29,6 +29,7 @@ export const defaultSounds: Theme['sounds'] = [
];
export const defaultTheme: Theme = {
+ title: '有解的羊了个羊(DEMO)',
name: '默认',
icons: icons.map((icon) => ({
name: icon,
diff --git a/src/themes/fisherman/index.tsx b/src/themes/fisherman/index.tsx
index caca800..2185bd7 100644
--- a/src/themes/fisherman/index.tsx
+++ b/src/themes/fisherman/index.tsx
@@ -16,6 +16,7 @@ const fishes = Object.entries(imagesUrls).map(([key, value]) => ({
}));
export const fishermanTheme: Theme = {
+ title: '🐟鱼了个鱼🐟',
name: '钓鱼佬',
icons: fishes.map(({ name, content }) => ({
name,
diff --git a/src/themes/ikun/index.tsx b/src/themes/ikun/index.tsx
index 5df2b02..5747922 100644
--- a/src/themes/ikun/index.tsx
+++ b/src/themes/ikun/index.tsx
@@ -52,6 +52,7 @@ const icons = Object.entries(imagesUrls).map(([key, value]) => ({
}));
export const ikunTheme: Theme = {
+ title: '🐔鸡了个鸡🐔',
name: 'iKun',
bgm,
icons: icons.map(({ name, content }) => ({
diff --git a/src/themes/interface.ts b/src/themes/interface.ts
index 642e9bd..50a0e9f 100644
--- a/src/themes/interface.ts
+++ b/src/themes/interface.ts
@@ -13,6 +13,7 @@ interface Sound {
}
export interface Theme {
+ title: string;
name: string;
bgm?: string;
icons: Icon[];
diff --git a/src/themes/jinlun/index.tsx b/src/themes/jinlun/index.tsx
index ca35e08..78ab71c 100644
--- a/src/themes/jinlun/index.tsx
+++ b/src/themes/jinlun/index.tsx
@@ -24,6 +24,7 @@ const icons = Object.entries(imagesUrls).map(([key, value]) => ({
}));
export const jinlunTheme: Theme = {
+ title: '🐎马了个马🐎',
name: '金轮',
icons: icons.map(({ name, content }) => ({
name,
diff --git a/src/themes/pdd/images/10.png b/src/themes/pdd/images/10.png
new file mode 100644
index 0000000..30750ee
Binary files /dev/null and b/src/themes/pdd/images/10.png differ
diff --git a/src/themes/pdd/images/2.png b/src/themes/pdd/images/2.png
new file mode 100644
index 0000000..1ba0a13
Binary files /dev/null and b/src/themes/pdd/images/2.png differ
diff --git a/src/themes/pdd/images/3.png b/src/themes/pdd/images/3.png
new file mode 100644
index 0000000..bca71c8
Binary files /dev/null and b/src/themes/pdd/images/3.png differ
diff --git a/src/themes/pdd/images/6.png b/src/themes/pdd/images/6.png
new file mode 100644
index 0000000..93bf62f
Binary files /dev/null and b/src/themes/pdd/images/6.png differ
diff --git a/src/themes/pdd/images/7.png b/src/themes/pdd/images/7.png
new file mode 100644
index 0000000..e84e99a
Binary files /dev/null and b/src/themes/pdd/images/7.png differ
diff --git a/src/themes/pdd/images/8.png b/src/themes/pdd/images/8.png
new file mode 100644
index 0000000..8a95da1
Binary files /dev/null and b/src/themes/pdd/images/8.png differ
diff --git a/src/themes/pdd/images/9.png b/src/themes/pdd/images/9.png
new file mode 100644
index 0000000..482488b
Binary files /dev/null and b/src/themes/pdd/images/9.png differ
diff --git a/src/themes/pdd/index.tsx b/src/themes/pdd/index.tsx
new file mode 100644
index 0000000..dad417c
--- /dev/null
+++ b/src/themes/pdd/index.tsx
@@ -0,0 +1,30 @@
+// 骚猪主题
+import React from 'react';
+import { Theme } from '../interface';
+import { DefaultSoundNames, defaultSounds } from '../default';
+import bgm from './sounds/bgm.mp3';
+
+const imagesUrls = import.meta.glob('./images/*.png', {
+ import: 'default',
+ eager: true,
+});
+
+const images = Object.entries(imagesUrls).map(([key, value]) => ({
+ name: key.slice(9, -4),
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-ignore
+ content:
,
+}));
+
+export const pddTheme: Theme = {
+ title: '🐷猪了个猪🐷',
+ name: '骚猪',
+ bgm,
+ icons: images.map(({ name, content }) => ({
+ name,
+ content,
+ clickSound: 'button-click',
+ tripleSound: 'triple',
+ })),
+ sounds: defaultSounds,
+};
diff --git a/src/themes/pdd/sounds/bgm.mp3 b/src/themes/pdd/sounds/bgm.mp3
new file mode 100644
index 0000000..574bc13
Binary files /dev/null and b/src/themes/pdd/sounds/bgm.mp3 differ