Website config Update
This commit is contained in:
86
README.md
86
README.md
@@ -25,28 +25,45 @@ An Arch Linux terminal-themed portfolio website with Hyprland-style TUI componen
|
||||
|
||||
## Configuration
|
||||
|
||||
Everything in the site is configurable from `src/lib/config.ts`. This file is the single source of truth for UI, layout, TUI behavior, colors, and per-page settings. Edit it to personalize the website to your needs.
|
||||
The site configuration is now **modular** — split into focused files in `src/lib/config/` for easier maintenance. You can still import everything from `$lib/config` for backward compatibility.
|
||||
|
||||
### Main Config Sections
|
||||
- `user`: Profile info (name, username, bio, social links)
|
||||
- `skills`, `projects`, `models`, `hackathons`: Content arrays shown in pages
|
||||
- `layout`: Sizes and page margins (navbar height, container width)
|
||||
- `breakpoints`: Responsive breakpoints (mobile/tablet/desktop)
|
||||
- `fonts`: Font stacks and weights
|
||||
- `colorPalette`: Terminal and UI colors (semantic and base colors)
|
||||
- `terminalButtons`: Terminal header buttons colors (close/minimize/maximize)
|
||||
- `terminalSettings`: Typing presets, delays, cursor visibility, prompt style
|
||||
- `tuiStyle`: Styling options for border, spacing, font sizes, buttons, etc.
|
||||
- `tuiText`: Labels, hints, prefixes, and text labels for interactive elements
|
||||
- `animations`: Animation durations and easing for UI interactions
|
||||
- `scrollbar`: Scrollbar appearance settings
|
||||
- `navbar`: Navbar sizes and theme button settings
|
||||
- `modelViewer`: 3D viewer camera, lighting, and text strings
|
||||
- `particles`: 3D background particles (count, opacity, motion)
|
||||
- `loadingScreen`: Loading text and colors
|
||||
- `keyboardShortcuts`: Map keyboard actions to keys
|
||||
- `effects`: Misc effects like selection background and backdrop blur
|
||||
- `pageMeta`: Per-route metadata (title, description, icon, keywords)
|
||||
### Config File Structure
|
||||
|
||||
```
|
||||
src/lib/config/
|
||||
├── index.ts # Barrel export (re-exports all modules)
|
||||
├── user.ts # User profile, socials, skills
|
||||
├── layout.ts # Layout dimensions, breakpoints, fonts, navbar, scrollbar
|
||||
├── theme.ts # Colors, animations, effects, loading screen
|
||||
├── content.ts # Projects, 3D models, hackathon cards
|
||||
├── terminal.ts # Terminal settings, TUI styling, speed presets, shortcuts
|
||||
└── navigation.ts # Navigation links, site metadata, page meta
|
||||
```
|
||||
|
||||
### Import Examples
|
||||
|
||||
```typescript
|
||||
// Barrel import (backward compatible)
|
||||
import { user, colorPalette, projects } from '$lib/config';
|
||||
|
||||
// Direct imports (smaller bundles, faster builds)
|
||||
import { user, skills } from '$lib/config/user';
|
||||
import { colorPalette, animations } from '$lib/config/theme';
|
||||
import { projects, models, cards } from '$lib/config/content';
|
||||
import { terminalSettings, keyboardShortcuts } from '$lib/config/terminal';
|
||||
import { navigation, site, pageMeta } from '$lib/config/navigation';
|
||||
```
|
||||
|
||||
### Config Modules
|
||||
|
||||
| File | Contents |
|
||||
|------|----------|
|
||||
| `user.ts` | `user`, `skills` |
|
||||
| `layout.ts` | `layout`, `breakpoints`, `fonts`, `navbar`, `scrollbar` |
|
||||
| `theme.ts` | `colorPalette`, `terminalButtons`, `loadingScreen`, `effects`, `animations` |
|
||||
| `content.ts` | `projects`, `models`, `cards`, `sortedCards` + types |
|
||||
| `terminal.ts` | `terminalSettings`, `tuiStyle`, `tuiText`, `pageSpeedSettings`, `pageAutoscrollSettings`, `speedPresets`, `modelViewer`, `particles`, `keyboardShortcuts` |
|
||||
| `navigation.ts` | `navigation`, `site`, `pageMeta` |
|
||||
|
||||
### Example: Key config snippets
|
||||
```typescript
|
||||
@@ -96,19 +113,24 @@ export const tuiStyle = {
|
||||
};
|
||||
```
|
||||
|
||||
### How to customize
|
||||
- Change any color in `colorPalette` to affect both inline coloring and semantic tokens like `(&primary)`/`(&error)`.
|
||||
- Update `terminalSettings` to control typing speed, delays, and the TUI icon.
|
||||
- Modify `tuiStyle` to adjust spacing, rounded corners, and button sizes.
|
||||
- Use `keyboardShortcuts` to remap keys (e.g., toggle theme, skip animation).
|
||||
- Per-page speeds are controlled by `pageSpeedSettings` (preset or numeric multiplier).
|
||||
### How to Customize
|
||||
|
||||
### Where to look for types & utilities
|
||||
- `src/lib/components/tui/types.ts` — main TerminalLine types
|
||||
- `src/lib/components/tui/utils.ts` — parsing utilities and style helpers
|
||||
- `src/lib/stores/theme.ts` — theme store & `toggleMode()`
|
||||
- Edit `config/user.ts` to update your profile, socials, and skills
|
||||
- Edit `config/content.ts` to add projects, models, or hackathon entries
|
||||
- Edit `config/theme.ts` to change colors, animations, or loading screen
|
||||
- Edit `config/terminal.ts` to adjust typing speed, TUI styling, or shortcuts
|
||||
- Edit `config/layout.ts` to change dimensions, breakpoints, or navbar settings
|
||||
- Edit `config/navigation.ts` to add/remove nav links or update page metadata
|
||||
|
||||
If you change a value in `config.ts`, the UI should pick it up on next reload. Some values (fonts, CSS variables) may also require adjusting CSS variables or Tailwind config.
|
||||
Changes take effect on next reload. Some values (fonts, CSS variables) may also require adjusting CSS or Tailwind config.
|
||||
|
||||
### Where to Look for Types & Utilities
|
||||
|
||||
- `src/lib/config/` — All configuration modules
|
||||
- `src/lib/components/tui/types.ts` — TerminalLine types
|
||||
- `src/lib/components/tui/utils.ts` — Parsing utilities and style helpers
|
||||
- `src/lib/stores/theme.ts` — Theme store & `toggleMode()`
|
||||
- `src/lib/index.ts` — Helper functions (barrel export)
|
||||
|
||||
## Speed Presets
|
||||
|
||||
|
||||
Reference in New Issue
Block a user