diff --git a/public/pic/element/dark.png b/public/pic/element/dark.png new file mode 100644 index 0000000..a007558 Binary files /dev/null and b/public/pic/element/dark.png differ diff --git a/public/pic/element/earth.png b/public/pic/element/earth.png new file mode 100644 index 0000000..6cf8759 Binary files /dev/null and b/public/pic/element/earth.png differ diff --git a/public/pic/element/fire.png b/public/pic/element/fire.png new file mode 100644 index 0000000..017a868 Binary files /dev/null and b/public/pic/element/fire.png differ diff --git a/public/pic/element/light.png b/public/pic/element/light.png new file mode 100644 index 0000000..76109f3 Binary files /dev/null and b/public/pic/element/light.png differ diff --git a/public/pic/element/water.png b/public/pic/element/water.png new file mode 100644 index 0000000..1701e5f Binary files /dev/null and b/public/pic/element/water.png differ diff --git a/public/pic/role/knight.png b/public/pic/role/knight.png new file mode 100644 index 0000000..6623b25 Binary files /dev/null and b/public/pic/role/knight.png differ diff --git a/public/pic/role/mage.png b/public/pic/role/mage.png new file mode 100644 index 0000000..008c2ba Binary files /dev/null and b/public/pic/role/mage.png differ diff --git a/public/pic/role/ranger.png b/public/pic/role/ranger.png new file mode 100644 index 0000000..6cf501e Binary files /dev/null and b/public/pic/role/ranger.png differ diff --git a/public/pic/role/soulweaver.png b/public/pic/role/soulweaver.png new file mode 100644 index 0000000..2ce649a Binary files /dev/null and b/public/pic/role/soulweaver.png differ diff --git a/public/pic/role/thief.png b/public/pic/role/thief.png new file mode 100644 index 0000000..869a420 Binary files /dev/null and b/public/pic/role/thief.png differ diff --git a/public/pic/role/warrior.png b/public/pic/role/warrior.png new file mode 100644 index 0000000..9096013 Binary files /dev/null and b/public/pic/role/warrior.png differ diff --git a/public/pic/star.png b/public/pic/star.png new file mode 100644 index 0000000..f5cb03d Binary files /dev/null and b/public/pic/star.png differ diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 532bcfd..9a9532d 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -13,7 +13,7 @@ interface NavItem { const navItems: NavItem[] = [ { path: "/", label: "对战阵容" }, // { path: "/home", label: "主页" }, - // { path: "/characters", label: "角色列表" }, + { path: "/characters", label: "角色列表" }, // { path: "/builds", label: "配装攻略" }, // { path: "/battles", label: "对战信息" }, // { path: "/news", label: "资讯中心" }, diff --git a/src/pages/CharacterDetail.tsx b/src/pages/CharacterDetail.tsx index 098afe2..b8853cc 100644 --- a/src/pages/CharacterDetail.tsx +++ b/src/pages/CharacterDetail.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useEffect } from 'react'; export interface Skill { name: string; @@ -42,6 +42,10 @@ interface CharacterDetailProps { } const CharacterDetail: React.FC = ({ character }) => { + useEffect(() => { + window.scrollTo({ top: 0, behavior: 'auto' }); + }, []); + const renderStars = (count: number) => { return Array(count) .fill(0) @@ -74,141 +78,128 @@ const CharacterDetail: React.FC = ({ character }) => { return (
-
- {/* 角色基本信息 */} -
-
-
- {character.name} +
+ {/* 左侧:头像+导航 */} + + + {/* 右侧:详细内容 */} +
+ {/* 基础属性 */} +
+

Base Stats

+
+
+ + Attack: {character.baseStats.attack} +
+
+ + Health: {character.baseStats.health} +
+
+ + Defense: {character.baseStats.defense} +
+
+ + Speed: {character.baseStats.speed}
-
-
+ - {/* 基础属性 */} -
-

Base Stats

-
-
- - Attack: {character.baseStats.attack} -
-
- - Health: {character.baseStats.health} -
-
- - Defense: {character.baseStats.defense} -
-
- - Speed: {character.baseStats.speed} -
-
-
- - {/* 技能列表 */} -
- {character.skills.map((skill, index) => ( -
-
-

- {skill.name} -

-
- {renderSkillType(skill.type)} - {renderSoulBurn(skill.soulBurn)} -
-
-

{skill.description}

- - {skill.enhancements && skill.enhancements.length > 0 && ( -
-

- Skill Enhancements -

-
- {skill.enhancements.map((enhancement, idx) => ( -
-
- {renderStars(enhancement.stars)} -
-
- {enhancement.attack && ( - - Attack {enhancement.attack} - - )} - {enhancement.health && ( - - Health {enhancement.health} - - )} - {enhancement.defense && ( - - Defense {enhancement.defense} - - )} - {enhancement.effectiveness && ( - - Effectiveness {enhancement.effectiveness} - - )} -
-
- ))} + {/* 技能列表 */} +
+ {character.skills.map((skill, index) => ( +
+
+

{skill.name}

+
+ {renderSkillType(skill.type)} + {renderSoulBurn(skill.soulBurn)}
- )} -
- ))} -
- - {/* 印记集中 */} -
-

- Imprint Concentration -

- {character.imprintConcentration.map((imprint, index) => ( -
-

- {imprint.type} -

-
- {imprint.values.map((value, idx) => ( -
- {value.rank} - {value.value} +

{skill.description}

+ {skill.enhancements && skill.enhancements.length > 0 && ( +
+

Skill Enhancements

+
+ {skill.enhancements.map((enhancement, idx) => ( +
+
{renderStars(enhancement.stars)}
+
+ {enhancement.attack && ( + Attack {enhancement.attack} + )} + {enhancement.health && ( + Health {enhancement.health} + )} + {enhancement.defense && ( + Defense {enhancement.defense} + )} + {enhancement.effectiveness && ( + Effectiveness {enhancement.effectiveness} + )} +
+
+ ))} +
- ))} + )}
-
- ))} -
+ ))} + + + {/* 印记集中 */} +
+

Imprint Concentration

+ {character.imprintConcentration.map((imprint, index) => ( +
+

{imprint.type}

+
+ {imprint.values.map((value, idx) => ( +
+ {value.rank} + {value.value} +
+ ))} +
+
+ ))} +
+
); diff --git a/src/pages/Characters.tsx b/src/pages/Characters.tsx index 855d40a..b7f1dba 100644 --- a/src/pages/Characters.tsx +++ b/src/pages/Characters.tsx @@ -51,7 +51,7 @@ const Characters: React.FC = () => { element: "fire", class: "Fire Warrior", imageUrl: - "https://readdy.ai/api/search-image?query=anime%20style%20game%20character%20portrait%20of%20a%20female%20warrior%20with%20pink%20hair%20and%20red%20eyes%2C%20fantasy%20RPG%20character%20icon%2C%20detailed%20face%2C%20high%20quality%2C%20digital%20art&width=100&height=100&seq=1&orientation=squarish", + "https://epic7db.com/images/heroes/abigail.webp", }, { id: 2,