feat: render portfolio routes from live localized database content
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { ContactItem } from './IsoTypes';
|
||||
|
||||
import IsometricScene from './IsometricScene';
|
||||
import {
|
||||
MailIcon,
|
||||
@@ -8,45 +8,16 @@ import {
|
||||
TelegramIcon,
|
||||
} from './IsoElements';
|
||||
import styles from './IsometricFooter.module.css';
|
||||
import { messagesByLocale, type Locale } from '@/i18n/content';
|
||||
import type { PortfolioProps } from '@/server/content';
|
||||
import { FooterInteraction } from './FooterInteraction';
|
||||
|
||||
export const contacts: ContactItem[] = [
|
||||
{
|
||||
id: 'phone',
|
||||
name: 'Phone',
|
||||
label: '09388263077',
|
||||
href: 'tel:09388263077',
|
||||
Icon: PhoneIcon,
|
||||
},
|
||||
{
|
||||
id: 'linkedin',
|
||||
name: 'LinkedIn',
|
||||
label: '@amiirkhl',
|
||||
href: 'https://linkedin.com/in/amiirkhl',
|
||||
Icon: LinkedInIcon,
|
||||
},
|
||||
{
|
||||
id: 'github',
|
||||
name: 'GitHub',
|
||||
label: 'git.amiirkhl.ir',
|
||||
href: 'https://git.amiirkhl.ir',
|
||||
Icon: GitHubIcon,
|
||||
},
|
||||
{
|
||||
id: 'telegram',
|
||||
name: 'Telegram',
|
||||
label: '@amiirkhl',
|
||||
href: 'https://t.me/amiirkhl',
|
||||
Icon: TelegramIcon,
|
||||
},
|
||||
];
|
||||
const contactIcons = { phone: PhoneIcon, linkedin: LinkedInIcon, github: GitHubIcon, telegram: TelegramIcon };
|
||||
|
||||
export default function IsometricFooter({ locale }: { locale: Locale }) {
|
||||
const copy = messagesByLocale[locale].footer;
|
||||
const localizedContacts = contacts.map((contact) => ({
|
||||
export default function IsometricFooter({ portfolio }: PortfolioProps) {
|
||||
const copy = portfolio.messages.footer;
|
||||
const localizedContacts = portfolio.profile.contacts.filter(contact => contact.href).map((contact) => ({
|
||||
...contact,
|
||||
name: copy[contact.id],
|
||||
name: copy[contact.id], Icon: contactIcons[contact.id],
|
||||
}));
|
||||
return (
|
||||
<FooterInteraction className={styles.footerContainer}>
|
||||
@@ -61,9 +32,9 @@ export default function IsometricFooter({ locale }: { locale: Locale }) {
|
||||
</p>
|
||||
|
||||
{/* Email Pill Button */}
|
||||
<div className={styles.emailWrapper} data-reveal="scale">
|
||||
{portfolio.profile.email && <div className={styles.emailWrapper} data-reveal="scale">
|
||||
<a
|
||||
href="mailto:amirhosseinkhalili901@gmail.com"
|
||||
href={`mailto:${portfolio.profile.email}`}
|
||||
className={styles.emailPill}
|
||||
aria-label={copy.emailLabel}
|
||||
>
|
||||
@@ -71,15 +42,15 @@ export default function IsometricFooter({ locale }: { locale: Locale }) {
|
||||
<MailIcon size={16} color="currentColor" />
|
||||
</span>
|
||||
<span className={styles.emailText} dir="ltr">
|
||||
amirhosseinkhalili901@gmail.com
|
||||
{portfolio.profile.email}
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>}
|
||||
</header>
|
||||
|
||||
{/* 3D Isometric SVG Scene */}
|
||||
<div className={styles.sceneContainer} data-footer-reveal>
|
||||
<IsometricScene ariaLabel={copy.sceneLabel} />
|
||||
<IsometricScene ariaLabel={copy.sceneLabel} contacts={portfolio.profile.contacts} />
|
||||
</div>
|
||||
|
||||
{/* Responsive Synchronized Contact Cards Section */}
|
||||
|
||||
Reference in New Issue
Block a user