- Add Next.js frontend service (nextjs) with Dockerfile and source - Update docker-compose.yml: image names, Drupal 11.3.3, nextjs service - Add docker-compose.override.yml.disabled for dev hot-reload - Add install-headless-modules.sh for OAuth/JSON:API module setup - Add README.md with full setup and configuration guide - Update nginx/Dockerfile and nginx.conf.template for cms. subdomain - Update drupal/Dockerfile PHP-FPM build args - Gitignore **/.vscode/ to prevent IDE workspace files from being tracked
34 lines
865 B
TypeScript
34 lines
865 B
TypeScript
"use client"
|
|
|
|
import { useEffect, useState } from "react"
|
|
|
|
/**
|
|
* Renders a mailto link only after client mount so the email is not in the
|
|
* server-rendered HTML, reducing harvestability by bots that scan static HTML.
|
|
* Parts are hardcoded so they live in the JS bundle, not in page HTML.
|
|
*/
|
|
export function ObfuscatedEmail({ className }: { className?: string }) {
|
|
const [email, setEmail] = useState<string | null>(null)
|
|
|
|
useEffect(() => {
|
|
const localPart = "robert"
|
|
const domain = "nasarek"
|
|
const tld = "dev"
|
|
setEmail(`${localPart}@${domain}.${tld}`)
|
|
}, [])
|
|
|
|
if (!email) {
|
|
return (
|
|
<span className={className}>
|
|
<noscript>robert [at] nasarek [dot] dev</noscript>
|
|
<span aria-hidden>…</span>
|
|
</span>
|
|
)
|
|
}
|
|
|
|
return (
|
|
<a href={`mailto:${email}`} className={className}>
|
|
{email}
|
|
</a>
|
|
)
|
|
}
|