refactor: separating each section of pages in about

This commit is contained in:
Alvalen 2025-01-15 12:08:54 +07:00
parent 43a3d944ea
commit e89217aad8
13 changed files with 672 additions and 724 deletions

View file

@ -1,33 +1,64 @@
import { motion } from "framer-motion";
import Stack from "./stack";
import Tools from "./tools";
function Wrapper({ children }) {
return (
<div className="mx-auto container gap-4 p-10 grid grid-cols-1 mt-10">
<motion.div
className="flex justify-center items-center flex-col mb-5 "
initial={{
opacity: 0,
x: -200,
}}
whileInView={{
opacity: 1,
x: 0,
}}
transition={{
delay: 0.5,
type: "spring",
}}>
{children}
</motion.div>
</div>
);
}
export default function Skills() {
return (
<section className="grid gap-8 md:gap-12">
<div className="text-center space-y-2">
<h2 className="text-3xl font-bold mt-3 text-black">
Skills and Expertise
</h2>
<p className="text-muted-foreground max-w-[800px] mx-auto">
Explore some skills I&apos;m proficient in to deliver high-quality
solutions.
</p>
</div>
<div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6 md:gap-8">
<div className="flex flex-col items-center gap-2">
<CodepenIcon className="w-12 h-12" />
<div className="font-medium">Web Development</div>
</div>
<div className="flex flex-col items-center gap-2">
<WebhookIcon className="w-12 h-12" />
<div className="font-medium">REST API</div>
</div>
<div className="flex flex-col items-center gap-2">
<ActivityIcon className="w-12 h-12" />
<div className="font-medium">Machine Learning</div>
</div>
<div className="flex flex-col items-center gap-2">
<MobileIcon className="w-12 h-12" />
<div className="font-medium">Mobile Development</div>
</div>
{/* <div className="flex flex-col items-center gap-2">
<>
<Wrapper>
<section className="grid gap-8 md:gap-12">
<div className="text-center space-y-2">
<h2 className="text-3xl font-bold mt-3 text-black">
Skills and Expertise
</h2>
<p className="text-muted-foreground max-w-[800px] mx-auto">
Explore some skills I&apos;m proficient in to
deliver high-quality solutions.
</p>
</div>
<div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6 md:gap-8">
<div className="flex flex-col items-center gap-2">
<CodepenIcon className="w-12 h-12" />
<div className="font-medium">Web Development</div>
</div>
<div className="flex flex-col items-center gap-2">
<WebhookIcon className="w-12 h-12" />
<div className="font-medium">REST API</div>
</div>
<div className="flex flex-col items-center gap-2">
<ActivityIcon className="w-12 h-12" />
<div className="font-medium">Machine Learning</div>
</div>
<div className="flex flex-col items-center gap-2">
<MobileIcon className="w-12 h-12" />
<div className="font-medium">
Mobile Development
</div>
</div>
{/* <div className="flex flex-col items-center gap-2">
<CloudIcon className="w-12 h-12" />
<div className="font-medium">Cloud Computing</div>
</div>
@ -43,8 +74,14 @@ export default function Skills() {
<PackageIcon className="w-12 h-12" />
<div className="font-medium">Product Management</div>
</div> */}
</div>
</section>
</Wrapper>
<div className=" mx-auto container gap-4 p-10 grid grid-cols-1 md:grid-cols-2 mt-10 mb-24">
<Stack />
<Tools />
</div>
</section>
</>
);
}
@ -87,130 +124,6 @@ function CodepenIcon(props) {
);
}
function BarChartIcon(props) {
return (
<svg
{...props}
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round">
<line x1="12" x2="12" y1="20" y2="10" />
<line x1="18" x2="18" y1="20" y2="4" />
<line x1="6" x2="6" y1="20" y2="16" />
</svg>
);
}
function CloudIcon(props) {
return (
<svg
{...props}
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round">
<path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z" />
</svg>
);
}
function ComputerIcon(props) {
return (
<svg
{...props}
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round">
<rect width="14" height="8" x="5" y="2" rx="2" />
<rect width="20" height="8" x="2" y="14" rx="2" />
<path d="M6 18h2" />
<path d="M12 18h6" />
</svg>
);
}
function PackageIcon(props) {
return (
<svg
{...props}
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round">
<path d="m7.5 4.27 9 5.15" />
<path d="M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z" />
<path d="m3.3 7 8.7 5 8.7-5" />
<path d="M12 22V12" />
</svg>
);
}
function ProjectorIcon(props) {
return (
<svg
{...props}
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round">
<path d="M5 7 3 5" />
<path d="M9 6V3" />
<path d="m13 7 2-2" />
<circle cx="9" cy="13" r="3" />
<path d="M11.83 12H20a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h2.17" />
<path d="M16 16h2" />
</svg>
);
}
function TypeIcon(props) {
return (
<svg
{...props}
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round">
<polyline points="4 7 4 4 20 4 20 7" />
<line x1="9" x2="15" y1="20" y2="20" />
<line x1="12" x2="12" y1="4" y2="20" />
</svg>
);
}
function WebhookIcon(props) {
return (
<svg

View file

@ -1,6 +1,22 @@
import { motion } from "framer-motion";
export default function Stack() {
return (
<>
<motion.div
className="flex justify-center items-center flex-col mb-5 "
initial={{
opacity: 0,
x: -200,
}}
whileInView={{
opacity: 1,
x: 0,
}}
transition={{
delay: 0.5,
type: "spring",
}}>
<h2 className="text-2xl md:text-xl font-normal mb-3 md:tracking-[.3rem] lg:tracking-[.5rem] uppercase ">
Language & Framework
</h2>
@ -23,6 +39,6 @@ export default function Stack() {
<span className="text-black font-bold">Laravel</span> |{" "}
<span className="text-black font-medium">Python</span>
</p>
</>
</motion.div>
);
}

View file

@ -1,6 +1,22 @@
import { motion } from "framer-motion";
export default function Tools() {
return (
<>
<motion.div
className="flex justify-start items-center flex-col mb-5 "
initial={{
opacity: 0,
x: 200,
}}
whileInView={{
opacity: 1,
x: 0,
}}
transition={{
delay: 0.6,
type: "spring",
}}>
<h2 className="text-2xl md:text-xl font-normal mb-3 md:tracking-[.3rem] lg:tracking-[.5rem] uppercase">
Tools
</h2>
@ -21,6 +37,6 @@ export default function Tools() {
</span>{" "}
|{" "}
</p>
</>
</motion.div>
);
}