Skip to content

Commit a1ff3a3

Browse files
committed
refactor(home): split Home.vue into components, utils and shared css
- Extract 8 section components (NavBar, Hero, Features, Install, Usage, Uninstall, Contributors, Footer) + reusable FeatureCard, UsageTable, CodeBlock, UninstallItem - Move theme/github state into composables (utils/theme.ts, utils/github.ts) and shared actions into utils/actions.ts - Move quick/advanced settings and typing modes data into data/usage.ts - Replace style.css with assets/shared.css (theme vars + common classes) - Fix table/tab text color not following theme by restoring :root specificity - Home.vue reduced from ~3000 lines to layout-only; no visual/logic change
1 parent 45ced66 commit a1ff3a3

23 files changed

Lines changed: 3161 additions & 3202 deletions

components.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ export {}
1111
/* prettier-ignore */
1212
declare module 'vue' {
1313
export interface GlobalComponents {
14+
CodeBlock: typeof import('./src/components/CodeBlock.vue')['default']
15+
ContributorsSection: typeof import('./src/components/ContributorsSection.vue')['default']
1416
ElAlert: typeof import('element-plus/es')['ElAlert']
1517
ElAvatar: typeof import('element-plus/es')['ElAvatar']
1618
ElButton: typeof import('element-plus/es')['ElButton']
@@ -19,8 +21,18 @@ declare module 'vue' {
1921
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
2022
ElTabPane: typeof import('element-plus/es')['ElTabPane']
2123
ElTabs: typeof import('element-plus/es')['ElTabs']
24+
FeatureCard: typeof import('./src/components/FeatureCard.vue')['default']
25+
FeaturesSection: typeof import('./src/components/FeaturesSection.vue')['default']
26+
FooterSection: typeof import('./src/components/FooterSection.vue')['default']
27+
HeroSection: typeof import('./src/components/HeroSection.vue')['default']
28+
InstallSection: typeof import('./src/components/InstallSection.vue')['default']
2229
InteractiveInstaller: typeof import('./src/components/InteractiveInstaller.vue')['default']
30+
NavBar: typeof import('./src/components/NavBar.vue')['default']
2331
RouterLink: typeof import('vue-router')['RouterLink']
2432
RouterView: typeof import('vue-router')['RouterView']
33+
UninstallItem: typeof import('./src/components/UninstallItem.vue')['default']
34+
UninstallSection: typeof import('./src/components/UninstallSection.vue')['default']
35+
UsageSection: typeof import('./src/components/UsageSection.vue')['default']
36+
UsageTable: typeof import('./src/components/UsageTable.vue')['default']
2537
}
2638
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"build": "run-p type-check \"build-only {@}\" --",
99
"preview": "vite preview",
1010
"build-only": "vite build",
11-
"type-check": "vue-tsc --build",
11+
"type-check": "vue-tsc --noEmit",
1212
"lint": "eslint .",
1313
"lint:fix": "eslint . --fix"
1414
},

0 commit comments

Comments
 (0)