Layout Components
Structural components that organize content and provide consistent page layouts.Section
A full-width section component with optional backgrounds, headings, and decorative elements.Usage
Props
HTML id attribute for anchor links and navigation
Small uppercase heading displayed above the title (rendered with Text component type=“heading”)
Main section title (rendered with Text component type=“title”)
Override the default HTML element for the title (e.g., “h1”)
Descriptive text displayed below the title
If
true, section takes full viewport height (h-screen)If
true, uses darker background variant (bg-slate-100 dark:bg-[#0B1120]/95)If
true, renders decorative blob background graphicControls blob background color inversion
Features
- Decorative Graphics: Includes SVG blob tear graphics positioned absolutely
- Pattern Background: Subtle dot pattern overlay
- Container Integration: Wraps content in Container component
- Centered Headers: Title, heading, and description centered by default
- Responsive Spacing:
py-8 lg:py-24for vertical padding - Border Top: Visual separation with
border-t border-gray-200 dark:border-gray-800
Background Pattern
The component includes a subtle SVG dot pattern:Source Reference
Location:~/workspace/source/components/layout/Section.vue:1
Container
A simple centered container with max-width constraints.Usage
Features
- Centered: Uses
m-autofor horizontal centering - Responsive Width:
w-10/12on mobile,xl:w-8/12on extra-large screens - Overflow Hidden: Prevents content overflow
- Simple Implementation: Minimal wrapper component
Implementation
Source Reference
Location:~/workspace/source/components/layout/Container.vue:1
Stack
A utility component for adding consistent vertical spacing between child elements.Usage
Props
Tailwind spacing value for vertical gaps (generates
space-y-{spacing} and gap-y-{spacing})Implementation
Generates dynamic spacing classes:Source Reference
Location:~/workspace/source/components/layout/Stack.vue:1
Navbar
A fixed navigation bar with mobile menu, dark mode toggle, and logo.Usage
Features
- Fixed Position: Stays at top with
fixed top-0 z-50 - Backdrop Blur: Modern glass effect with
backdrop-blur-md - Responsive Menu: Hamburger menu on mobile, horizontal nav on desktop
- Dark Mode Toggle: Sun/moon icon button
- Logo Display: Image with optional text on larger screens
- Active Link Highlighting: Uses
router-link-activeclass
Navigation Items
The component includes hardcoded navigation:Mobile Menu
The mobile menu is controlled by reactive state:Dark Mode Toggle
Integrates with Nuxt Color Mode:Source Reference
Location:~/workspace/source/components/layout/Navbar.vue:1
Footer
Site footer with social media links and legal information.Usage
Props
If
true, uses darker background variant to match sectionsFeatures
- Social Links: LinkedIn, GitHub, CodePen with icons
- Copyright: Dynamic year using
new Date().getFullYear() - Legal Links: Privacy Policy and Legal Notice
- Responsive Layout: Stacked on mobile, side-by-side on desktop
- Icon Integration: Uses Icon component for social media
Social Media Links
Hardcoded social links:Source Reference
Location:~/workspace/source/components/layout/Footer.vue:1
Col
A column layout component using slots for flexible multi-column layouts.Usage
Props
Number of columns to create (generates numbered slots from 1 to n)
Implementation
Dynamically creates slots based on the number prop:Features
- Flexbox Layout: Uses
flex flex-colfor vertical stacking - Equal Width: Each column gets
flex-1for equal distribution - Named Slots: Access columns using
#1,#2, etc. - Dynamic: Number of columns determined at runtime
Source Reference
Location:~/workspace/source/components/layout/Col.vue:1
Best Practices
Section
- Always provide an
idfor anchor navigation - Use
headingfor context,titlefor main message - Toggle
hasBackgroundto create visual rhythm - Use
fullSizesparingly (hero sections only)
Container
- Use for all main content areas
- Nest inside Section for page structure
- Don’t nest Container components
Stack
- Use for vertical content grouping
- Default spacing (4) works for most cases
- Increase spacing for distinct sections (6-8)
Navbar
- Customize navigation items in component source
- Ensure logo path is correct
- Test mobile menu on various screen sizes
- Consider accessibility for menu toggle
Footer
- Update social links with actual URLs
- Ensure legal pages exist before linking
- Match
hasBackgroundwith last Section
Col
- Use CSS Grid for complex layouts instead
- Best for simple 2-3 column layouts
- Remember slots are numbered from 1, not 0
- Columns stack vertically on all screen sizes (no responsive breakpoints)