Partnership
The Partnership component renders detailed partner spotlights with a logo and multiple paragraphs of rich text. Content is provided through a partners prop, typically from src/data/representation/partnership/ files.
Overview
Section titled “Overview”File: src/components/Partnership.astro
Data Config: src/data/representation/partnership/*.ts
Used On: Representation pages (e.g., Finland)
This component is ideal for:
- Highlighting formal partnerships and collaborations
- Showing detailed descriptions alongside a partner logo
- Using rich text with links and emphasis
import type { ImageMetadata } from 'astro';
export interface Partner { logo: ImageMetadata; alt: string; content: string[]; // Paragraphs, supports HTML}
interface Props { partners: Partner[];}Prop Details
Section titled “Prop Details”partners: Array of partner definitions rendered in orderlogo: Imported image using Astro assetsalt: Logo alt text for accessibilitycontent: Array of paragraph strings. HTML is supported viaset:html
-
Import the component and partner data:
---import Partnership from '../../components/Partnership.astro';import { finlandPartners } from '../../data/representation/partnership/finlandPartnership';--- -
Render the component and pass the data:
<Partnership partners={finlandPartners} /> -
Update partner content in the data file:
- Path:
src/data/representation/partnership/finlandPartnership.ts - Add or edit items in the
Partner[]array
- Path:
Data Configuration
Section titled “Data Configuration”Example Data File
Section titled “Example Data File”import type { Partner } from './types';import oamkLogo from '../../../assets/images/partners/oamk-logo.png';
export const finlandPartners: Partner[] = [ { logo: oamkLogo, alt: 'Oulu University of Applied Sciences', content: [ 'Study Nursing in Northern Finland at <strong>Oulu University of Applied Sciences</strong>!', '<a href="https://example.com" class="text-blue-800 underline hover:text-blue-900">Learn more</a>.', ], },];Styling Details
Section titled “Styling Details”- Background: White (
bg-white) - Padding:
pb-16(bottom spacing only) - Layout: Column on mobile, row on md+ screens
- Logo width:
w-60with auto height - Paragraph spacing:
pb-4on all but last paragraph
For Content Editors
Section titled “For Content Editors”Updating Partner Content
Section titled “Updating Partner Content”-
Open the partner data file:
- Repository:
finan-website - Path:
src/data/representation/partnership/finlandPartnership.ts
- Repository:
-
Edit or add paragraphs in the
contentarray:content: ['Updated paragraph text here.','<a href="https://example.com" class="text-blue-800 underline hover:text-blue-900">New link</a>.',], -
Add new partners by inserting another object in the array.
- HTML is allowed in
contentstrings, so be careful with tags. - Use
strongfor emphasis andatags for links.
Component Location
Section titled “Component Location”Referenced From:
src/pages/representation/finland.astro
Related Components
Section titled “Related Components”- Partners - Logo-only grid for homepage
- PublicationCard - Evidence-based sources on representation pages
- Committee - Companion section in representation pages