Skip to content

Commit ff39ccf

Browse files
committed
555
1 parent 359a0c3 commit ff39ccf

14 files changed

Lines changed: 186 additions & 178 deletions

README.md

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -230,75 +230,75 @@ bun dev
230230

231231
#### Site Configuration (站点配置)
232232

233-
| 字段 | 说明 | 默认值 |
234-
|------|------|--------|
235-
| `site.baseAccount` | GitHub 用户名或组织名 | (必填) |
236-
| `site.type` | 账户类型:`"user"``"org"` | `"user"` |
237-
| `site.website.title` | 浏览器标签页标题 | `"GitHub Profile"` |
238-
| `site.website.favicon` | 网站图标路径(相对于 public 文件夹) | `"/favicon.svg"` |
233+
| 字段 | 说明 | 默认值 |
234+
| ---------------------- | ------------------------------------ | ------------------ |
235+
| `site.baseAccount` | GitHub 用户名或组织名 | (必填) |
236+
| `site.type` | 账户类型:`"user"``"org"` | `"user"` |
237+
| `site.website.title` | 浏览器标签页标题 | `"GitHub Profile"` |
238+
| `site.website.favicon` | 网站图标路径(相对于 public 文件夹) | `"/favicon.svg"` |
239239

240240
#### Theme Configuration (主题配置)
241241

242-
| 字段 | 说明 | 默认值 |
243-
|------|------|--------|
244-
| `theme.preset` | 主题预设名称 | `"default"` |
245-
| `theme.colors.accent` | 强调色(主题预设决定实际颜色) | - |
246-
| `theme.colors.heading` | 标题文字颜色类名 | - |
247-
| `theme.colors.body` | 正文文字颜色类名 | - |
248-
| `theme.colors.muted` | 辅助文字颜色类名 | - |
249-
| `theme.background.main` | 主背景色 | `#0d1117` |
250-
| `theme.background.gradient` | 背景渐变样式 | - |
242+
| 字段 | 说明 | 默认值 |
243+
| --------------------------- | ------------------------------ | ----------- |
244+
| `theme.preset` | 主题预设名称 | `"default"` |
245+
| `theme.colors.accent` | 强调色(主题预设决定实际颜色) | - |
246+
| `theme.colors.heading` | 标题文字颜色类名 | - |
247+
| `theme.colors.body` | 正文文字颜色类名 | - |
248+
| `theme.colors.muted` | 辅助文字颜色类名 | - |
249+
| `theme.background.main` | 主背景色 | `#0d1117` |
250+
| `theme.background.gradient` | 背景渐变样式 | - |
251251

252252
#### Base Section Configuration (主区域配置)
253253

254-
| 字段 | 说明 | 默认值 |
255-
|------|------|--------|
256-
| `sections.base.enabled` | 是否显示主区域 | `true` |
257-
| `sections.base.scrollTipLabel` | 滚动提示文字 | `"More Info"` |
258-
| `sections.base.logoSrc` | 自定义 Logo 图片 URL | - |
259-
| `sections.base.logoScale` | Logo 缩放比例 (0.5-2) | `1` |
260-
| `sections.base.disableLogo` | 是否禁用 Logo 显示 | `false` |
261-
| `sections.base.nameFontFamily` | 名称字体类名 | - |
262-
| `sections.base.nameSize` | 名称字体大小 (`sm`/`base`/`lg`/`xl`/`2xl`/`3xl`/`4xl`/`5xl`/`6xl`/`7xl`) | - |
263-
| `sections.base.nameText` | 自定义名称文本(覆盖 GitHub 显示名称) | - |
264-
| `sections.base.disableName` | 是否禁用名称显示 | `false` |
265-
| `sections.base.descriptionFontFamily` | 描述字体类名 | - |
266-
| `sections.base.descriptionSize` | 描述字体大小 (`sm`/`base`/`lg`/`xl`/`2xl`) | - |
267-
| `sections.base.descriptionText` | 自定义描述文本(覆盖 GitHub 简介) | - |
268-
| `sections.base.disableDescription` | 是否禁用描述显示 | `false` |
254+
| 字段 | 说明 | 默认值 |
255+
| ------------------------------------- | ------------------------------------------------------------------------ | ------------- |
256+
| `sections.base.enabled` | 是否显示主区域 | `true` |
257+
| `sections.base.scrollTipLabel` | 滚动提示文字 | `"More Info"` |
258+
| `sections.base.logoSrc` | 自定义 Logo 图片 URL | - |
259+
| `sections.base.logoScale` | Logo 缩放比例 (0.5-2) | `1` |
260+
| `sections.base.disableLogo` | 是否禁用 Logo 显示 | `false` |
261+
| `sections.base.nameFontFamily` | 名称字体类名 | - |
262+
| `sections.base.nameSize` | 名称字体大小 (`sm`/`base`/`lg`/`xl`/`2xl`/`3xl`/`4xl`/`5xl`/`6xl`/`7xl`) | - |
263+
| `sections.base.nameText` | 自定义名称文本(覆盖 GitHub 显示名称) | - |
264+
| `sections.base.disableName` | 是否禁用名称显示 | `false` |
265+
| `sections.base.descriptionFontFamily` | 描述字体类名 | - |
266+
| `sections.base.descriptionSize` | 描述字体大小 (`sm`/`base`/`lg`/`xl`/`2xl`) | - |
267+
| `sections.base.descriptionText` | 自定义描述文本(覆盖 GitHub 简介) | - |
268+
| `sections.base.disableDescription` | 是否禁用描述显示 | `false` |
269269

270270
#### Members Section Configuration (成员区域配置)
271271

272-
| 字段 | 说明 | 默认值 |
273-
|------|------|--------|
274-
| `sections.members.enabled` | 是否显示成员区域 | `true` |
275-
| `sections.members.title.title` | 区域标题 | `"Group Members"` |
276-
| `sections.members.title.description` | 区域描述 | `"A young, active and innovative team"` |
277-
| `sections.members.title.accentColor` | 渐变色类名 | - |
278-
| `sections.members.countLabel` | 成员数量标签后缀 | `"members"` |
279-
| `sections.members.hiddenUsers` | 隐藏成员占位数量 | `0` |
280-
| `sections.members.owner` | 组织所有者用户名(显示特殊标识) | - |
281-
| `sections.members.appendUsers` | 额外添加的成员用户名列表 | `[]` |
282-
| `sections.members.separatorColor` | 分隔线颜色类名 | - |
272+
| 字段 | 说明 | 默认值 |
273+
| ------------------------------------ | -------------------------------- | --------------------------------------- |
274+
| `sections.members.enabled` | 是否显示成员区域 | `true` |
275+
| `sections.members.title.title` | 区域标题 | `"Group Members"` |
276+
| `sections.members.title.description` | 区域描述 | `"A young, active and innovative team"` |
277+
| `sections.members.title.accentColor` | 渐变色类名 | - |
278+
| `sections.members.countLabel` | 成员数量标签后缀 | `"members"` |
279+
| `sections.members.hiddenUsers` | 隐藏成员占位数量 | `0` |
280+
| `sections.members.owner` | 组织所有者用户名(显示特殊标识) | - |
281+
| `sections.members.appendUsers` | 额外添加的成员用户名列表 | `[]` |
282+
| `sections.members.separatorColor` | 分隔线颜色类名 | - |
283283

284284
#### Projects Section Configuration (项目区域配置)
285285

286-
| 字段 | 说明 | 默认值 |
287-
|------|------|--------|
288-
| `sections.projects.enabled` | 是否显示项目区域 | `true` |
289-
| `sections.projects.title.title` | 区域标题 | `"Featured Projects"` |
290-
| `sections.projects.title.description` | 区域描述 | `"A collection of open source work and experiments"` |
291-
| `sections.projects.title.accentColor` | 渐变色类名 | - |
292-
| `sections.projects.emptyText` | 无项目时显示文字 | `"No projects found"` |
293-
| `sections.projects.hideViewAll` | 是否隐藏"查看全部仓库"链接 | `false` |
294-
| `sections.projects.hiddenRepos` | 要隐藏的仓库名称列表 | `[]` |
286+
| 字段 | 说明 | 默认值 |
287+
| ------------------------------------- | -------------------------- | ---------------------------------------------------- |
288+
| `sections.projects.enabled` | 是否显示项目区域 | `true` |
289+
| `sections.projects.title.title` | 区域标题 | `"Featured Projects"` |
290+
| `sections.projects.title.description` | 区域描述 | `"A collection of open source work and experiments"` |
291+
| `sections.projects.title.accentColor` | 渐变色类名 | - |
292+
| `sections.projects.emptyText` | 无项目时显示文字 | `"No projects found"` |
293+
| `sections.projects.hideViewAll` | 是否隐藏"查看全部仓库"链接 | `false` |
294+
| `sections.projects.hiddenRepos` | 要隐藏的仓库名称列表 | `[]` |
295295

296296
#### Footer Section Configuration (页脚配置)
297297

298-
| 字段 | 说明 | 默认值 |
299-
|------|------|--------|
300-
| `sections.footer.enabled` | 是否显示页脚 | `true` |
301-
| `sections.footer.customText` | 自定义页脚文字 | - |
298+
| 字段 | 说明 | 默认值 |
299+
| ------------------------------- | ------------------------- | ------- |
300+
| `sections.footer.enabled` | 是否显示页脚 | `true` |
301+
| `sections.footer.customText` | 自定义页脚文字 | - |
302302
| `sections.footer.hideBuiltWith` | 是否隐藏"Built with" 署名 | `false` |
303303

304304
### 仓库过滤配置

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
.then(config => {
2828
// Support both flat structure (config.website) and nested structure (config.site.website)
2929
const websiteConfig = config.website || config.site?.website;
30-
30+
3131
if (websiteConfig) {
3232
if (websiteConfig.title) {
3333
document.title = websiteConfig.title;

public/config.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"baseAccount": "deepwn",
44
"type": "org",
55
"website": {
6-
"title": "deePwn = Developer + Researcher",
6+
"title": "deePwn = DevOps + Pentest",
77
"favicon": "/deepwn.png"
88
}
99
},
@@ -17,6 +17,13 @@
1717
"disableDescription": false,
1818
"scrollTipLabel": "Scroll Down"
1919
},
20+
"projects": {
21+
"title": {
22+
"title": "Featured Projects",
23+
"description": "A collection of our works"
24+
},
25+
"hiddenRepos": ["deepwn.github.io"]
26+
},
2027
"members": {
2128
"title": {
2229
"title": "Group Members",
@@ -28,13 +35,6 @@
2835
"appendUsers": ["sususu416"],
2936
"separatorColor": "border-white/10"
3037
},
31-
"projects": {
32-
"title": {
33-
"title": "Featured Projects",
34-
"description": "A collection of our works"
35-
},
36-
"hiddenRepos": ["deepwn.github.io"]
37-
},
3838
"footer": {
3939
"customText": ""
4040
}

src/App.tsx

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function App2() {
3737

3838
// Handle new config structure (site object)
3939
const siteConfig = cfg.site || cfg;
40-
40+
4141
// Determine account type from config first, fallback to 'user'
4242
const accountType: 'user' | 'org' = siteConfig.type === 'org' ? 'org' : 'user';
4343

@@ -52,7 +52,9 @@ function App2() {
5252
// Fetch repos with resolved account type for correct API endpoint
5353
const hiddenRepos = cfg.sections?.projects?.hiddenRepos || [];
5454
setLoadingStage('get repos...');
55-
const userRepos = await fetchRepos(siteConfig.baseAccount, resolvedAccountType, { hidden_repos: hiddenRepos });
55+
const userRepos = await fetchRepos(siteConfig.baseAccount, resolvedAccountType, {
56+
hidden_repos: hiddenRepos,
57+
});
5658
setRepos(userRepos);
5759

5860
// Fetch members only for organizations
@@ -63,7 +65,7 @@ function App2() {
6365

6466
// Get members configuration
6567
const membersConfig = cfg.sections?.members;
66-
68+
6769
const append_users = membersConfig?.appendUsers || [];
6870
const hidden_users = membersConfig?.hiddenUsers;
6971
const ownerUsername = membersConfig?.owner;
@@ -161,11 +163,18 @@ function App2() {
161163
const customBackground = themeConfig?.background;
162164

163165
return (
164-
<div className="relative w-full min-h-screen overflow-x-hidden font-sans text-white selection:bg-green-500/30" style={customBackground?.main ? { background: customBackground.main } : undefined}>
166+
<div
167+
className="relative w-full min-h-screen overflow-x-hidden font-sans text-white selection:bg-green-500/30"
168+
style={customBackground?.main ? { background: customBackground.main } : undefined}
169+
>
165170
{/* Background Animation - Fixed at bottom layer */}
166171
<div className="fixed inset-0 z-0">
167172
<GlitchScreen
168-
glitchColors={customColors?.accent ? ['#2b4539', customColors.accent, '#61b3dc'] : ['#2b4539', '#61dca3', '#61b3dc']}
173+
glitchColors={
174+
customColors?.accent
175+
? ['#2b4539', customColors.accent, '#61b3dc']
176+
: ['#2b4539', '#61dca3', '#61b3dc']
177+
}
169178
glitchSpeed={60}
170179
smooth={true}
171180
outerVignette={true}
@@ -176,7 +185,10 @@ function App2() {
176185

177186
{/* Custom background gradient override */}
178187
{customBackground?.gradient && (
179-
<div className="fixed inset-0 z-0 pointer-events-none" style={{ background: customBackground.gradient }} />
188+
<div
189+
className="fixed inset-0 z-0 pointer-events-none"
190+
style={{ background: customBackground.gradient }}
191+
/>
180192
)}
181193

182194
{/* Main Content - Above background */}

src/components/BaseInfoText.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export function BaseInfoText({
8787
{name}
8888
</h1>
8989
)}
90-
90+
9191
{/* Bio with gradient - always show DecryptingText (shows encrypted state first, then reveals) */}
9292
{!disableDescription && (
9393
<div className={`${descriptionFontFamily || ''}`}>

src/components/BaseLogo.tsx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ export function BaseLogo({ profile, customLogoSrc, logoScale = 1, logoShape }: B
2222
const scaledSize = baseSize * logoScale;
2323

2424
// Determine border-radius class based on logoShape (default to circle if undefined)
25-
const shapeClass = {
26-
circle: 'rounded-full',
27-
square: 'rounded-none',
28-
none: '',
29-
}[logoShape || 'circle'] || 'rounded-full';
25+
const shapeClass =
26+
{
27+
circle: 'rounded-full',
28+
square: 'rounded-none',
29+
none: '',
30+
}[logoShape || 'circle'] ?? 'rounded-full';
3031

3132
return (
3233
<div className="relative inline-block">
@@ -39,17 +40,20 @@ export function BaseLogo({ profile, customLogoSrc, logoScale = 1, logoShape }: B
3940
speed={45}
4041
src={avatarSrc}
4142
mask={true}
42-
shape={logoShape}
43+
className={shapeClass}
44+
preserveAspectRatio={logoShape === 'none'}
4345
>
4446
{/* Fallback content when animation completes */}
4547
{avatarSrc ? (
4648
<img
4749
src={avatarSrc}
4850
alt={avatarAlt}
49-
className={`object-cover w-full h-full ${shapeClass}`}
51+
className={`w-full h-full ${shapeClass} ${logoShape === 'none' ? 'object-contain' : 'object-cover'}`}
5052
/>
5153
) : (
52-
<div className={`w-full h-full bg-gradient-to-br from-green-600 to-blue-600 flex items-center justify-center text-2xl font-bold ${shapeClass}`}>
54+
<div
55+
className={`w-full h-full bg-gradient-to-br from-green-600 to-blue-600 flex items-center justify-center text-2xl font-bold ${shapeClass}`}
56+
>
5357
{avatarFallback}
5458
</div>
5559
)}

src/components/BaseSection.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,14 @@ export function BaseSection({
5252

5353
<div className="relative z-20 w-full max-w-6xl mx-auto text-center space-y-6 animate-fade-in-up">
5454
{/* Avatar with Glow Effect */}
55-
{showLogo && <BaseLogo profile={profile} customLogoSrc={logoSrc} logoScale={logoScale} logoShape={logoShape} />}
55+
{showLogo && (
56+
<BaseLogo
57+
profile={profile}
58+
customLogoSrc={logoSrc}
59+
logoScale={logoScale}
60+
logoShape={logoShape}
61+
/>
62+
)}
5663

5764
{/* Name & Bio */}
5865
<BaseInfoText

0 commit comments

Comments
 (0)