mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-22 16:10:40 +07:00
feat: drop site Zalo, widen resume header, remove contact download button
- site: Zalo removed from SocialId, Profile, social.ts, ContactLinks, strings and icons.tsx; the resume QR block keeps Zalo by owner decision - resume: .header-photo 72 -> 96px, .header-info margin-left 12 -> 24px, .header-qr gap 18 -> 50px so the Telegram code sits clear of Zalo - contact: <DownloadResume /> removed from the Contact section and ContactPage; DownloadResume() + DownloadButton() and the dead .download-resume-button rule deleted, Hero CTA untouched
This commit is contained in:
1 parent
2573977508
commit
25b0ead76a
15 files changed
+19
-73
No files matched your search
@@ -1717,13 +1717,6 @@
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
/* Resume download button variant of the contact tile */
|
||||
.download-resume-button {
|
||||
justify-content: center;
|
||||
padding: 12px 20px;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.contact-links {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { motion } from "motion/react"
|
||||
import { DownloadResume } from "@/components/sections/DownloadResume"
|
||||
import { SectionHeading } from "@/components/ui/SectionHeading"
|
||||
import { ContactLinks } from "@/components/ui/ContactLinks"
|
||||
import { InView } from "@/components/ui/InView"
|
||||
@@ -23,7 +22,6 @@ export function Contact() {
|
||||
|
||||
<SectionHeading title={strings.contact.heading[lang]} tag={strings.common.contactTag[lang]} />
|
||||
<ContactLinks />
|
||||
<DownloadResume />
|
||||
</motion.section>
|
||||
</InView>
|
||||
)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { resumeAvailable, resumeUrlFor, resumeLanguages, resumeLanguageLabels } from '@/data/resume'
|
||||
import type { Language } from '@/types'
|
||||
import { resumeUrlFor, resumeLanguages, resumeLanguageLabels } from '@/data/resume'
|
||||
import { useState, useRef, useEffect } from 'react'
|
||||
import { useLanguage } from '@/hooks/useLanguage'
|
||||
import { strings } from '@/i18n/strings'
|
||||
@@ -10,7 +9,7 @@ interface DownloadResumeDropdownProps {
|
||||
targetBlank?: boolean
|
||||
}
|
||||
|
||||
function DownloadResumeDropdown({ className, wrapperClassName, targetBlank = false }: DownloadResumeDropdownProps) {
|
||||
export function DownloadResumeDropdown({ className, wrapperClassName, targetBlank = false }: DownloadResumeDropdownProps) {
|
||||
const { lang } = useLanguage()
|
||||
const [open, setOpen] = useState(false)
|
||||
const ref = useRef<HTMLDivElement>(null)
|
||||
@@ -70,35 +69,3 @@ function DownloadResumeDropdown({ className, wrapperClassName, targetBlank = fal
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
function DownloadButton({ lang }: { lang: Language }) {
|
||||
const { lang: currentLang } = useLanguage()
|
||||
return (
|
||||
<a
|
||||
href={resumeUrlFor(lang)}
|
||||
download
|
||||
className="contact-link download-resume-button"
|
||||
>
|
||||
<svg viewBox="0 0 24 24" fill="currentColor" width="24" height="24">
|
||||
<path d="M12 2a1 1 0 0 1 1 1v9.586l2.707-2.707a1 1 0 1 1 1.414 1.414l-4.5 4.5a1 1 0 0 1-1.414 0l-4.5-4.5a1 1 0 0 1 1.414-1.414L11 12.586V3a1 1 0 0 1 1-1zm-7 16a1 1 0 1 1 0 2h14a1 1 0 1 1 0-2H5z" />
|
||||
</svg>
|
||||
<div className="link-label">{strings.common.resumeDownload[currentLang]} {resumeLanguageLabels[lang]}</div>
|
||||
</a>
|
||||
)
|
||||
}
|
||||
|
||||
export function DownloadResume() {
|
||||
if (!resumeAvailable) return null
|
||||
|
||||
return (
|
||||
<div style={{ marginTop: '32px' }}>
|
||||
{resumeLanguages.length > 1 ? (
|
||||
<DownloadResumeDropdown />
|
||||
) : (
|
||||
<DownloadButton lang={resumeLanguages[0]} />
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export { DownloadResumeDropdown , DownloadButton}
|
||||
@@ -2,14 +2,14 @@ import { motion } from "motion/react"
|
||||
import { profile } from "@/data/profile"
|
||||
import { useLanguage } from "@/hooks/useLanguage"
|
||||
import { strings } from "@/i18n/strings"
|
||||
import { GithubIcon, LinkedinIcon, MailIcon, TelegramIcon, ZaloIcon } from "@/components/ui/icons"
|
||||
import { GithubIcon, LinkedinIcon, MailIcon, TelegramIcon } from "@/components/ui/icons"
|
||||
import type { Language, SocialId } from "@/types"
|
||||
|
||||
type ContactEntry = {
|
||||
id: SocialId
|
||||
href: string
|
||||
external: boolean
|
||||
labelKey: 'email' | 'github' | 'linkedin' | 'telegram' | 'zalo'
|
||||
labelKey: 'email' | 'github' | 'linkedin' | 'telegram'
|
||||
sub: Record<Language, string>
|
||||
icon: React.ReactNode
|
||||
}
|
||||
@@ -19,7 +19,6 @@ const entries: ContactEntry[] = [
|
||||
{ id: 'github', href: profile.githubUrl, external: true, labelKey: 'github', sub: { en: `@${profile.githubHandle}`, vi: `@${profile.githubHandle}` }, icon: <GithubIcon size={24} /> },
|
||||
{ id: 'linkedin', href: profile.linkedinUrl, external: true, labelKey: 'linkedin', sub: { en: `@${profile.linkedinHandle}`, vi: `@${profile.linkedinHandle}` }, icon: <LinkedinIcon size={24} /> },
|
||||
{ id: 'telegram', href: profile.telegramUrl, external: true, labelKey: 'telegram', sub: { en: `@${profile.telegramHandle}`, vi: `@${profile.telegramHandle}` }, icon: <TelegramIcon size={24} /> },
|
||||
{ id: 'zalo', href: profile.zaloUrl, external: true, labelKey: 'zalo', sub: strings.contact.zaloSub, icon: <ZaloIcon size={24} /> },
|
||||
]
|
||||
|
||||
export function ContactLinks() {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { motion } from "motion/react"
|
||||
import { socialLinks } from "@/data/social"
|
||||
import { useLanguage } from "@/hooks/useLanguage"
|
||||
import { strings } from "@/i18n/strings"
|
||||
import { GithubIcon, LinkedinIcon, MailIcon, TelegramIcon, ZaloIcon } from "@/components/ui/icons"
|
||||
import { GithubIcon, LinkedinIcon, MailIcon, TelegramIcon } from "@/components/ui/icons"
|
||||
import type { SocialId } from "@/types"
|
||||
|
||||
const icons: Record<SocialId, React.ReactNode> = {
|
||||
@@ -10,7 +10,6 @@ const icons: Record<SocialId, React.ReactNode> = {
|
||||
linkedin: <LinkedinIcon size={20} />,
|
||||
email: <MailIcon size={20} />,
|
||||
telegram: <TelegramIcon size={20} />,
|
||||
zalo: <ZaloIcon size={20} />,
|
||||
}
|
||||
|
||||
export function SocialLinks() {
|
||||
|
||||
@@ -43,11 +43,3 @@ export function TelegramIcon({ size = 20 }: IconProps) {
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
|
||||
export function ZaloIcon({ size = 20 }: IconProps) {
|
||||
return (
|
||||
<svg viewBox="0 0 24 24" width={size} height={size} aria-hidden="true" fill="currentColor">
|
||||
<path d="M12.49 10.272v-.45h1.347v6.322h-.77a.576.576 0 0 1-.577-.573v.001a3.27 3.27 0 0 1-1.938.632a3.284 3.284 0 0 1-3.284-3.282a3.284 3.284 0 0 1 3.284-3.282a3.27 3.27 0 0 1 1.937.632zM6.919 7.79v.205c0 .382-.051.694-.3 1.06l-.03.034a8 8 0 0 0-.242.285L2.024 14.8h4.895v.768a.576.576 0 0 1-.577.576H0v-.362c0-.443.11-.641.25-.847L4.858 9.23H.192V7.79zm8.551 8.354a.48.48 0 0 1-.48-.48V7.79h1.441v8.354zM20.693 9.6a3.306 3.306 0 1 1 .002 6.612a3.306 3.306 0 0 1-.002-6.612m-10.14 5.253a1.932 1.932 0 1 0 0-3.863a1.932 1.932 0 0 0 0 3.863m10.14-.003a1.945 1.945 0 1 0 0-3.89a1.945 1.945 0 0 0 0 3.89" fillRule="evenodd" />
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
@@ -20,7 +20,6 @@ export const profile: Profile = {
|
||||
linkedinHandle: "dong-nz",
|
||||
telegramUrl: "https://t.me/dongdn",
|
||||
telegramHandle: "dongdn",
|
||||
zaloUrl: "https://zaloapp.com/qr/p/14ic4cmkuegf",
|
||||
currentInterests: [
|
||||
"AI in logistics",
|
||||
"Digital twins",
|
||||
|
||||
@@ -10,5 +10,4 @@ export const socialLinks: {
|
||||
{ id: 'linkedin', href: profile.linkedinUrl, external: true },
|
||||
{ id: 'email', href: `mailto:${profile.email}`, external: false },
|
||||
{ id: 'telegram', href: profile.telegramUrl, external: true },
|
||||
{ id: 'zalo', href: profile.zaloUrl, external: true },
|
||||
]
|
||||
@@ -32,7 +32,6 @@ export const strings = {
|
||||
linkedin: {en: 'View LinkedIn profile', vi: 'Xem hồ sơ LinkedIn'},
|
||||
email: {en: 'Send email', vi: 'Gửi email'},
|
||||
telegram: {en: 'Open Telegram chat', vi: 'Mở chat Telegram'},
|
||||
zalo: {en: 'Open Zalo profile', vi: 'Mở hồ sơ Zalo'},
|
||||
},
|
||||
},
|
||||
footer: {
|
||||
@@ -92,8 +91,6 @@ export const strings = {
|
||||
github: {en: 'GitHub', vi: 'GitHub'},
|
||||
linkedin: {en: 'LinkedIn', vi: 'LinkedIn'},
|
||||
telegram: {en: 'Telegram', vi: 'Telegram'},
|
||||
zalo: {en: 'Zalo', vi: 'Zalo'},
|
||||
zaloSub: {en: 'Chat on Zalo', vi: 'Chat qua Zalo'},
|
||||
},
|
||||
projectDetail: {
|
||||
notFound: {en: 'Project Not Found', vi: 'Không tìm thấy dự án'},
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { SectionHeading } from '@/components/ui/SectionHeading'
|
||||
import { DownloadResume } from '@/components/sections/DownloadResume'
|
||||
import { ContactLinks } from '@/components/ui/ContactLinks'
|
||||
import { motion } from 'motion/react'
|
||||
import { InView } from '@/components/ui/InView'
|
||||
@@ -22,7 +21,6 @@ export function ContactPage() {
|
||||
>
|
||||
<SectionHeading title={strings.contact.heading[lang]} tag={strings.common.contactTag[lang]} />
|
||||
<ContactLinks />
|
||||
<DownloadResume />
|
||||
</motion.section>
|
||||
</InView>
|
||||
)
|
||||
|
||||
+1
-2
@@ -2,7 +2,7 @@ export type Language = 'en' | 'vi';
|
||||
|
||||
export type Palette = 'red' | 'blue';
|
||||
|
||||
export type SocialId = 'github' | 'linkedin' | 'email' | 'telegram' | 'zalo';
|
||||
export type SocialId = 'github' | 'linkedin' | 'email' | 'telegram';
|
||||
|
||||
export type ProjectCategory =
|
||||
| "software-engineering"
|
||||
@@ -83,7 +83,6 @@ export interface Profile {
|
||||
linkedinHandle: string;
|
||||
telegramUrl: string;
|
||||
telegramHandle: string;
|
||||
zaloUrl: string;
|
||||
currentInterests: string[];
|
||||
roles: string[];
|
||||
philosophy: PhilosophyPoint[];
|
||||
|
||||
Reference in new issue
Block a user