A dark Bootstrap 6 footer for agencies, clinics and local businesses. It puts the contact details up front: a call-to-action band, an address, phone and email card list with copy buttons, an opening-hours badge that shows whether the office is open right now, two link columns and a bottom bar with a language Menu. A Bootstrap 6 Toast confirms each copy.
How it works
The root <footer class="dfc-root"> uses data-bs-theme="dark", so Bootstrap's buttons, menu and toast render in dark mode whatever the visitor's OS setting is. .dfc-grid is one column on phones, two from md and four from lg (1024px).
Each li in .dfc-contact-list has an icon, the value and a .dfc-copy button. The value element carries data-dfc-copy-text. On click, script.js tries navigator.clipboard.writeText(). If that fails, for example in a sandboxed iframe, it falls back to a hidden textarea. It then swaps the icon to a check mark and shows .dfc-toast with Toast.getOrCreateInstance(...).show(), imported from the Bootstrap 6 bundle.
.dfc-open-badge reads data-dfc-hours="1-5 9-18" (weekdays 1 to 5, 9:00 to 18:00) and compares it with the visitor's local time. It then adds .dfc-is-open or .dfc-is-closed, so no hours text ever goes stale. The language switcher is a Bootstrap 6 Menu: the .dfc-lang-toggle button has data-bs-toggle="menu" and data-bs-placement="top-end", and the script moves .active and aria-current to the chosen menu-item and updates .dfc-lang-current.
Customization
--dfc-accenton.dfc-root: changes the headings, icons, links and the solid CTA button.--dfc-bg,--dfc-paneland--dfc-lineon.dfc-root: adjust the background, card surfaces and borders.--dfc-openand--dfc-closedon.dfc-root: change the badge colors for open and closed.data-dfc-hourson.dfc-open-badge: set your own days and hours, for example1-6 8-20.data-dfc-copy-texton each value: the exact text that gets copied (use it to drop line breaks from the address).- In the
[data-dfc-lang]click handler, uncomment the redirect hook to load the localized site.
Use cases
- Agencies: address, phone and email cards with copy buttons make contact easy
- Clinics: a badge shows whether the office is open or closed right now
- Local businesses: a call-to-action band invites visitors to get in touch
- Multilingual sites: a language menu sits in the bottom bar, and a toast confirms each copy
Accessibility
Contact items use <address>, tel: and mailto: links. Each copy button has a specific aria-label, such as "Copy phone number". The toast has role="status" with aria-live="polite", so screen readers announce the result. Menu keyboard support (arrow keys, Escape) comes from Bootstrap. Focus outlines use the accent color, and the light text has strong contrast on the navy background.
Bootstrap 6 notes
Built on Bootstrap 6.0.0-alpha.1, so alpha APIs can still change. The Bootstrap 5 dropdown with dropdown-menu becomes a .menu sibling with data-bs-toggle="menu", and dropup becomes data-bs-placement="top-end". Toasts are imported as an ES module (there is no window.bootstrap), and btn-primary is now btn-solid theme-primary. Icons come from Bootstrap Icons.