feat: implement dynamic resume links and add English and Turkish resume PDFs

This commit is contained in:
Poyraz
2026-06-30 12:53:42 +03:00
parent f41728564b
commit eaac0f977e
5 changed files with 9 additions and 4 deletions
+3 -2
View File
@@ -14,6 +14,7 @@ import {
} from "poyraz-ui/atoms"; } from "poyraz-ui/atoms";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "poyraz-ui/molecules"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "poyraz-ui/molecules";
import { import {
getResumeHref,
LINK_DIRECTORY, LINK_DIRECTORY,
LINK_DIRECTORY_CATEGORIES, LINK_DIRECTORY_CATEGORIES,
SOCIAL_LINKS, SOCIAL_LINKS,
@@ -158,7 +159,7 @@ export function LinksContent() {
<div className="grid gap-2 sm:grid-cols-2"> <div className="grid gap-2 sm:grid-cols-2">
{TOP_ICON_LINKS.map((item) => { {TOP_ICON_LINKS.map((item) => {
const href = item.id === "cv" ? `/resume-${locale}.pdf` : item.href; const href = item.id === "cv" ? getResumeHref(locale) : item.href;
return ( return (
<a <a
key={item.id} key={item.id}
@@ -228,7 +229,7 @@ export function LinksContent() {
<div className="grid gap-2"> <div className="grid gap-2">
{filteredItems.map((item) => { {filteredItems.map((item) => {
const href = item.id === "cv" ? `/resume-${locale}.pdf` : item.href; const href = item.id === "cv" ? getResumeHref(locale) : item.href;
const isStaticOrExternal = item.external || item.id === "rss" || item.id === "cv" || href.endsWith(".xml") || href.endsWith(".pdf"); const isStaticOrExternal = item.external || item.id === "rss" || item.id === "cv" || href.endsWith(".xml") || href.endsWith(".pdf");
const CardContent = ( const CardContent = (
<Card className="rounded-2xl border-border p-3 transition-all hover:-translate-y-0.5 hover:border-red-600/40"> <Card className="rounded-2xl border-border p-3 transition-all hover:-translate-y-0.5 hover:border-red-600/40">
+2 -2
View File
@@ -26,7 +26,7 @@ import {
SheetTrigger, SheetTrigger,
} from "poyraz-ui/molecules"; } from "poyraz-ui/molecules";
import { useKeyboardShortcutLabel } from "@/lib/use-keyboard-shortcut-label"; import { useKeyboardShortcutLabel } from "@/lib/use-keyboard-shortcut-label";
import { NAV_LINKS, SOCIAL_LINKS, TOP_ICON_LINKS } from "@/lib/links"; import { getResumeHref, NAV_LINKS, SOCIAL_LINKS, TOP_ICON_LINKS } from "@/lib/links";
const SearchCommand = dynamic( const SearchCommand = dynamic(
() => import("@/components/search-command").then((mod) => mod.SearchCommand), () => import("@/components/search-command").then((mod) => mod.SearchCommand),
@@ -58,7 +58,7 @@ export function SiteNavbar() {
<div className="space-y-3"> <div className="space-y-3">
<div className="flex items-center justify-end gap-2 border-b border-border pb-3"> <div className="flex items-center justify-end gap-2 border-b border-border pb-3">
{TOP_ICON_LINKS.map((item) => { {TOP_ICON_LINKS.map((item) => {
const href = item.id === "cv" ? `/resume-${locale}.pdf` : item.href; const href = item.id === "cv" ? getResumeHref(locale) : item.href;
return ( return (
<a <a
key={item.id} key={item.id}
+4
View File
@@ -101,6 +101,10 @@ export const TOP_ICON_LINKS = [
}, },
] as const; ] as const;
export function getResumeHref(locale: string) {
return `/${locale === "en" ? "en" : "tr"}/resume.pdf`;
}
export type LinkDirectoryCategory = "navigation" | "social" | "resources"; export type LinkDirectoryCategory = "navigation" | "social" | "resources";
export type LinkDirectoryItem = { export type LinkDirectoryItem = {