mirror of
https://github.com/soconnor0919/personal-website.git
synced 2026-02-05 08:16:31 -05:00
Add resume/switcher
This commit is contained in:
@@ -1,8 +1,17 @@
|
||||
'use client';
|
||||
|
||||
import { useState } from 'react';
|
||||
import { Tabs, TabsList, TabsTrigger, TabsContent } from '~/components/ui/tabs';
|
||||
import { Badge } from '~/components/ui/badge';
|
||||
import { Card, CardHeader, CardContent, CardTitle, CardDescription } from '~/components/ui/card';
|
||||
import { Download } from 'lucide-react';
|
||||
import Link from 'next/link';
|
||||
|
||||
export default function CVPage() {
|
||||
const [activeTab, setActiveTab] = useState('cv');
|
||||
|
||||
return (
|
||||
<div className="space-y-8">
|
||||
<div className="space-y-6">
|
||||
<section className="prose prose-zinc dark:prose-invert max-w-none">
|
||||
<h1 className="text-2xl font-bold">Curriculum Vitae 📄</h1>
|
||||
<p className="text-lg text-muted-foreground">
|
||||
@@ -10,26 +19,83 @@ export default function CVPage() {
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<div className="bg-white shadow-sm rounded-lg overflow-hidden">
|
||||
<object
|
||||
data="/cv.pdf"
|
||||
type="application/pdf"
|
||||
className="w-full h-[calc(100vh-18rem)] lg:h-[calc(100vh-15rem)]"
|
||||
>
|
||||
<div className="flex flex-col items-center justify-center p-8">
|
||||
<p className="text-lg text-muted-foreground">
|
||||
Your browser doesn't support PDF preview.
|
||||
</p>
|
||||
<a
|
||||
href="/cv.pdf"
|
||||
download
|
||||
className="mt-4 inline-flex items-center justify-center px-4 pt-2 pb-0 border border-transparent text-sm font-medium rounded-md text-white bg-primary hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary"
|
||||
<Tabs value={activeTab} onValueChange={setActiveTab}>
|
||||
<TabsList>
|
||||
<TabsTrigger value="cv">CV</TabsTrigger>
|
||||
<TabsTrigger value="resume">Resume</TabsTrigger>
|
||||
</TabsList>
|
||||
|
||||
<TabsContent value="cv">
|
||||
<div className="bg-background shadow-sm rounded-lg overflow-hidden">
|
||||
<object
|
||||
data="/cv.pdf"
|
||||
type="application/pdf"
|
||||
className="w-full h-[calc(100vh-20.5rem)] lg:h-[calc(100vh-18rem)]"
|
||||
>
|
||||
Download PDF
|
||||
</a>
|
||||
<Card>
|
||||
<CardHeader className="pb-2">
|
||||
<div className="flex items-center justify-between">
|
||||
<CardTitle>PDF Preview Not Supported</CardTitle>
|
||||
</div>
|
||||
<CardDescription className="text-base">
|
||||
Your browser doesn't support PDF preview.
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="flex flex-wrap gap-2 mt-2">
|
||||
<Link
|
||||
href="/cv.pdf"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Badge variant="secondary" className="capitalize">
|
||||
<Download className="h-4 w-4" />
|
||||
Download CV
|
||||
</Badge>
|
||||
</Link>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</object>
|
||||
</div>
|
||||
</object>
|
||||
</div>
|
||||
</TabsContent>
|
||||
|
||||
<TabsContent value="resume">
|
||||
<div className="bg-background shadow-sm rounded-lg overflow-hidden">
|
||||
<object
|
||||
data="/resume.pdf"
|
||||
type="application/pdf"
|
||||
className="w-full h-[calc(100vh-20.5rem)] lg:h-[calc(100vh-18rem)]"
|
||||
>
|
||||
|
||||
<Card>
|
||||
<CardHeader className="pb-2">
|
||||
<div className="flex items-center justify-between">
|
||||
<CardTitle>PDF Preview Not Supported</CardTitle>
|
||||
</div>
|
||||
<CardDescription className="text-base">
|
||||
Your browser doesn't support PDF preview.
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="flex flex-wrap gap-2 mt-2">
|
||||
<Link
|
||||
href="/resume.pdf"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Badge variant="secondary" className="capitalize">
|
||||
<Download className="h-4 w-4" />
|
||||
Download Resume
|
||||
</Badge>
|
||||
</Link>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</object>
|
||||
</div>
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ export default function HomePage() {
|
||||
</section>
|
||||
|
||||
{/* Featured Projects Section */}
|
||||
<section className="space-y-4">
|
||||
<section className="space-y-6">
|
||||
<div className="flex items-center justify-between">
|
||||
<h2 className="text-2xl font-bold">Featured Projects 🌟</h2>
|
||||
<Link
|
||||
|
||||
@@ -17,7 +17,7 @@ export default function ProjectsPage() {
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="space-y-8">
|
||||
<div className="space-y-6">
|
||||
<section className="prose prose-zinc dark:prose-invert max-w-none">
|
||||
<h1 className="text-2xl font-bold">Featured Projects 🌟</h1>
|
||||
<p className="text-lg text-muted-foreground">
|
||||
|
||||
@@ -58,7 +58,7 @@ export default function PublicationsPage() {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="space-y-8">
|
||||
<div className="space-y-6">
|
||||
<section className="prose prose-zinc dark:prose-invert max-w-none">
|
||||
<h1 className="text-2xl font-bold">Publications 📚</h1>
|
||||
<p className="text-lg text-muted-foreground">
|
||||
|
||||
Reference in New Issue
Block a user