A portfolio website footer for freelance designers and small studios, built with plain CSS and vanilla JavaScript. It combines a large contact call to action, a live availability status that names the next free month, the designer's local time and a quiet colophon, so this personal site footer answers the questions clients ask before they send an email.
How it works
The root .pfa-root holds a short .pfa-strip and footer.pfa-footer. The .pfa-hero row pairs the .pfa-heading and .pfa-mail-link with the .pfa-status availability card. Below it, .pfa-grid has four columns: .pfa-time (local time), two nav link lists (Index and Elsewhere) and the studio address. The .pfa-colophon line and the .pfa-legal row close the footer.
The script runs on DOMContentLoaded for every .pfa-root. It adds the lead time from data-pfa-lead-weeks to today; if that lands after the 10th, the start moves to the next month. The month names are written into .pfa-busy-month and .pfa-free-month, so the card never shows a stale date. The clock formats the time in the zone from data-pfa-timezone with Intl.DateTimeFormat, shows the GMT offset, compares it with the visitor's offset ("3 h behind you") and toggles .is-online during studio hours on weekdays. It refreshes every 30 seconds.
.pfa-copy copies the address with the Clipboard API, falls back to execCommand('copy'), and if both are blocked it selects the address so it can be copied by hand. .pfa-top scrolls back up and moves focus to the element named in data-pfa-target. The copyright year in .pfa-year is computed too.
Customization
data-pfa-timezoneanddata-pfa-cityon.pfa-root: an IANA zone such asAmerica/New_Yorkand the city name shown under the clock.data-pfa-startanddata-pfa-end: studio hours (24-hour) that switch the presence line and the green.pfa-presence-dot.data-pfa-lead-weeks: how many weeks ahead you are booked; the card updates both month names.--pfa-accentinstyle.css: the orange of underlines, the status dot and the arrows.--pfa-bg,--pfa-inkand--pfa-muted: page colour, text and secondary text.data-pfa-copyon.pfa-copy: the address that is copied; keep it equal to themailto:link..pfa-slots: the number of open slots shown in the card.
Use cases
- Freelance designer portfolios: clients see when the next project can start
- Small design and development studios: the contact email and studio address sit side by side
- Remote freelancers: the local time and offset set expectations for reply times
- Personal sites and blogs: the colophon line explains how the site was made
Accessibility
Link columns are nav elements labelled by their h3 headings, the contact block is an address, and the time is in a time element. Copy and back-to-top results are announced in the polite live region .pfa-live. External profile links carry hidden text in .pfa-sr. Links and buttons have a 2px orange :focus-visible outline and tap targets of at least 40px, and transitions are off with prefers-reduced-motion: reduce.
Usage notes
Rename the heading ids if you place two footers on one page.