The social links in the footer are driven entirely by one data file, so adding a platform is a data change rather than a component change. This document covers how they render and what an entry has to supply.
This document explains how the social media links are displayed and how to add new social media links to the codebase.
The social media links are displayed using the Footer component located in Footer.tsx. This component creates a grid layout to showcase the social media links.
- Grid Layout: The social media links are displayed in a responsive grid layout using Material-UI's
GridandTooltipcomponents. - Social Media Icons: Each social media link is displayed as an icon button with a tooltip.
- Contact Buttons: "Email me" (to
profile.email) and "Resume" (toprofile.resumePath) arePillButtons, with values from profile.ts. The footer's root element carries thecontactID that/contactredirects to. - Policy Links: Two
PanelLinks at the end of the footer open the privacy and cookie policy dialog and reopen the consent banner's switches ("Cookie settings"); see Consent Banner.
flowchart LR
accTitle: Social Media Links Display Flow
accDescr: Footer component imports socials data, maps to grid items, displays social media icons with tooltips and links to each platform
A[Footer Component] -->|Imports| B[Socials Data]
B --> C[Maps Socials to Grid Items]
C --> D[Displays Social Media Icons]
D --> E[Social Media Icon]
D --> F[Social Media Tooltip]
D --> G[Social Media Link]
To add new social media links, update the socials array in socials.ts.
-
Open the socials.ts file.
-
Add a new object to the socials array with the following structure:
{ name: 'Social Media Name', url: 'https://social-media-url.com', icon: SocialMediaIconComponent, color: '#colorCode', }
The icon value is the component itself, not an element: Footer invokes it as social.icon({}), so pass an export from icons.tsx such as GitHubIcon. The color value tints the icon and its drop shadow on hover, falling back to the theme's primary.main when absent, and name does triple duty as the tooltip text, the accessible label, and the suffix of the analytics event, which is built as `footer-${social.name.toLowerCase()}` and therefore keeps any spaces in the name.
- Components Overview
- Data Architecture - How the socials array reaches the footer
- Images & Icons - Where the icon components come from