Page Structure
SSH Portfolio has a fixed layout structure with four main pages:ui/model.go
Layout Components
The UI is divided into three main sections:ui/model.go
1. Tab Bar (Top)
The tab bar shows navigation between pages:ui/model.go
2. Content Area (Middle)
The main content area displays the current page:ui/model.go
3. Status Bar (Bottom)
The status bar shows keyboard shortcuts:ui/model.go
Navigation Model
Page Navigation (Left/Right)
Move between pages using arrow keys or vim keys:ui/model.go
←orh: Previous page→orl: Next page- Cannot go left from Home or right from Contact
Vertical Navigation (Up/Down)
Skills and Projects pages support vertical scrolling:ui/skills.go
↑ork: Previous item↓orj: Next item
Quit
ui/model.go
q: Quit applicationCtrl+C: Force quit
Page Layouts
Home Page (Centered)
The home page centers all content vertically and horizontally:ui/home.go
Skills Page (Two-Column)
The skills page uses a two-column layout with a divider:ui/skills.go
│)
Projects Page (Two-Column)
Similar to skills, projects use a two-column layout:ui/projects.go
Contact Page (Centered Card)
The contact page centers a bordered card:ui/contact.go
Terminal Size Adaptation
The UI adapts to different terminal sizes:Window Size Changes
ui/model.go
- Content width and height
- Tab bar fill spacing
- Status bar width
- Text wrapping and alignment
Minimum Size Handling
ui/model.go
Recommended Minimum Size
- Width: 80 columns (minimum), 100+ recommended
- Height: 24 rows (minimum), 30+ recommended
Content Rendering
Each page receives the content dimensions and renders accordingly:ui/model.go
Customizing Layout
Changing Column Widths
Modify the width calculations inui/skills.go or ui/projects.go:
Adjusting Padding
Change padding values in style definitions:Modifying Borders
Change border styles:Adding Pages
To add a new page:- Update the
Pageenum inui/model.go:
- Create a new model file (e.g.,
ui/blog.go) - Add the model to
Modelstruct - Update navigation logic and view rendering
- Rebuild the application
Best Practices
- Test multiple sizes: Always test your layout in various terminal sizes
- Keep content readable: Ensure sufficient width for text content
- Respect boundaries: Don’t exceed content width/height
- Use consistent spacing: Maintain padding consistency across pages
- Handle edge cases: Test with very small terminals (80x24)
- Consider accessibility: Use clear visual hierarchy and readable text