Skip to content

Pillars Component

The Pillars component showcases FiNAN’s four foundational values: Humanity, Empowerment, Research, and Professional Development. It features a two-column header layout followed by a 4-column grid of interactive cards with icons.

File: src/components/Pillars.astro Data Config: src/data/pillarsConfig.ts Used On: Homepage (active)

This component is ideal for:

  • Communicating organizational values and mission pillars
  • Creating visual hierarchy for core principles
  • Providing interactive navigation to detailed value pages
  • Building trust through transparent mission statements

This component has no props - all content is configured through the data file.

interface PillarCard {
title: string; // Card heading
description: string; // Card body text
icon: string; // SVG icon path
href: string; // Link destination
}
interface PillarsData {
section: {
subtitle: string; // Small text above title
title: string; // Main heading (supports HTML)
description: string; // Paragraph text
buttons: {
primary: {
text: string;
href: string;
};
secondary: {
text: string;
href: string;
};
};
};
cards: PillarCard[]; // Array of 4 pillars
}
src/data/pillarsConfig.ts
export const pillarsConfig: PillarsData = {
section: {
subtitle: 'Our Foundation',
title: 'Four Pillars<br />of Commitment',
description: 'FiNAN is built on four core pillars that guide our mission and values.',
buttons: {
primary: {
text: 'Be a member',
href: '/membership',
},
secondary: {
text: 'Learn more about FiNAN',
href: '/about',
},
},
},
cards: [
{
title: 'Humanity',
description: 'Helping to achieve the Sustainable Development Goals (SDGs).',
icon: '/assets/icons/pillars/pillars-humanity.svg',
href: '#',
},
{
title: 'Empowerment',
description: 'Giving voice to Filipino Nurses living in the Nordic Region.',
icon: '/assets/icons/pillars/pillars-empowerment.svg',
href: '#',
},
{
title: 'Research',
description: 'Evidence-based practice in decision-making and policies.',
icon: '/assets/icons/pillars/pillars-research.svg',
href: '#',
},
{
title: 'Professional Development',
description: 'Professional Networking and Continuing Education',
icon: '/assets/icons/pillars/pillars-professional-development.svg',
href: '#',
},
],
};
  1. Import the component in your Astro page:

    ---
    import Pillars from '../components/Pillars.astro';
    ---
  2. Add to page layout with no props:

    <Pillars />
  3. Update content by editing src/data/pillarsConfig.ts:

    • Modify cards array to change pillar content
    • Update button links and section text
    • Ensure SVG icons exist in /public/assets/icons/pillars/
┌─────────────────────────────────────────────────────────────┐
│ Subtitle │
│ │
│ ┌──────────────┬─────────────────────────────────────┐ │
│ │ Title │ Description │ │
│ │ │ │ │
│ │ │ [Primary Button] [Secondary Btn →] │ │
│ └──────────────┴─────────────────────────────────────┘ │
│ │
│ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ │
│ │ 🔹 │ │ 🔹 │ │ 🔹 │ │ 🔹 │ │
│ │ │ │ │ │ │ │ │ │
│ │Title │ │Title │ │Title │ │Title │ │
│ │Text..│ │Text..│ │Text..│ │Text..│ │
│ └──────┘ └──────┘ └──────┘ └──────┘ │
└─────────────────────────────────────────────────────────────┘
  • Background: Light gray (bg-gray-50)
  • Padding: Responsive vertical padding (16-24 on md+)
  • Card Layout: 4-column grid on large screens, 2-column on medium, 1-column on mobile
  • Cards: White background with border, hover effects (border color + shadow)
  • Icons: 8x8 sizing (h-8 w-8)
  • Interactive: Cards are <a> tags with full-card clickability
  • Hover State: Blue border and shadow on hover

Each pillar requires an SVG icon file located in:

public/
└── assets/
└── icons/
└── pillars/
├── pillars-humanity.svg
├── pillars-empowerment.svg
├── pillars-research.svg
└── pillars-professional-development.svg

Icon Guidelines:

  • Format: SVG (scalable vector graphics)
  • Size: 32x32px or 64x64px
  • Style: Simple, single-color or two-tone
  • Color: Should work with light background

To update pillar descriptions or titles:

  1. Navigate to the data file:

    • Repository: finan-website
    • Path: src/data/pillarsConfig.ts
  2. Edit the cards array:

    cards: [
    {
    title: 'Humanity',
    description: 'Updated description here', // ← Modify this
    icon: '/assets/icons/pillars/pillars-humanity.svg',
    href: '#',
    },
    // ... other cards
    ]
  3. Save and commit changes:

    Terminal window
    git add src/data/pillarsConfig.ts
    git commit -m "docs: update pillar descriptions"
    git push

If you need to update pillar icons:

  1. Prepare your SVG icon:

    • Export as SVG from design tool
    • Optimize using SVGOMG
    • Ensure dimensions are square (e.g., 32x32px)
  2. Add to the project:

    • Place file in public/assets/icons/pillars/
    • Use kebab-case naming: pillars-your-pillar-name.svg
  3. Update the config:

    icon: '/assets/icons/pillars/pillars-your-pillar-name.svg',
  4. Test the icon:

    Terminal window
    pnpm dev
    # Visit http://localhost:4321 and verify icon displays
What to UpdateWhere in Config
Pillar titlecards[n].title
Pillar descriptioncards[n].description
Pillar linkcards[n].href
Pillar iconcards[n].icon
Section headingsection.title
Button linkssection.buttons.primary.href

Referenced From:

  • src/pages/index.astro:28 (active on homepage)

Each pillar card is a clickable link (<a> tag) with:

  • Default State: White background, gray border
  • Hover State: Blue border (border-blue-900), elevated shadow
  • Focus State: Browser default outline for keyboard navigation
  • Cursor: Pointer cursor on hover
  • Transition: Smooth transition on all properties

The component is optimized for exactly 4 cards:

  • Large screens (lg+): 4 columns
  • Medium screens (md): 2 columns × 2 rows
  • Mobile: 1 column × 4 rows

If you need a different number of pillars, consider:

  • Using a different component pattern
  • Adjusting grid columns in the component file

The title field supports HTML for line breaks:

title: 'Four Pillars<br />of Commitment',

This creates responsive line breaks for better visual hierarchy.

Current pillar cards use href: '#' (no navigation). To make them functional:

  1. Create dedicated pillar pages:

    src/pages/pillars/humanity.astro
    src/pages/pillars/empowerment.astro
    src/pages/pillars/research.astro
    src/pages/pillars/professional-development.astro
  2. Update hrefs in config:

    {
    title: 'Humanity',
    href: '/pillars/humanity', // ← Update from '#'
    // ...
    }
  • Semantic HTML with <section> wrapper
  • Heading hierarchy: <h2> for main title, <h3> for card titles
  • Descriptive link text within cards
  • Image alt text for icons: ${card.title} icon
  • Keyboard navigable (Tab key to move between cards)
  • Sufficient color contrast for text
  • Focus visible on interactive elements
  • Statistics - Similar layout with 3 cards instead of 4
  • OurAdvocacy - Similar card grid for advocacy areas
  • Partners - Similar grid layout pattern

Causes:

  1. SVG file doesn’t exist at specified path
  2. Incorrect file path in config
  3. SVG file has errors or invalid markup

Solutions:

  • Verify file exists: ls public/assets/icons/pillars/
  • Check path starts with /assets/ (not /public/assets/)
  • Validate SVG using online validator
  • Check browser console for 404 errors

Solution: Verify you have exactly 4 cards in the cards array. The grid is optimized for 4 items.

Build error: “Cannot find module ‘pillarsConfig’”

Section titled “Build error: “Cannot find module ‘pillarsConfig’””

Solution: Ensure the data file exists at src/data/pillarsConfig.ts and exports pillarsConfig.

Solution: Ensure cards are <a> tags (not <div>). Check that href attribute is present.

  • Zero JavaScript: Pure HTML/CSS component
  • Static data: Content embedded at build time
  • SVG icons: Small file size, scalable without quality loss
  • CSS: Minimal Tailwind utilities, tree-shaken in production
  • Hover effects: CSS-only transitions (hardware accelerated)
  • Keep titles short: 1-3 words maximum
  • Descriptions are concise: 1-2 sentences
  • Action-oriented language: Focus on impact and outcomes
  • Consistent length: All descriptions roughly same length
  • Clear value proposition: Immediately convey purpose
  • Maintain 4 pillars: Avoid adding/removing without redesigning layout
  • Consistent icon style: All icons should have similar visual weight
  • Icon meaning: Icons should visually represent the pillar concept
  • Color harmony: Icons should work with FiNAN’s color palette
  • Meaningful destinations: Don’t use # in production
  • Consistent navigation: All cards should link somewhere
  • External links: Add target="_blank" rel="noopener" if linking externally
  • Track interactions: Consider adding analytics events

Potential improvements for this component:

  • Support for variable number of pillars (responsive grid)
  • Animated icons on hover
  • Expandable cards with more detail
  • Progress indicators or metrics per pillar
  • Video or image backgrounds for cards
  • Modal overlays instead of page navigation