Skip to content

Commit 59c8ca3

Browse files
style: fix the spacing postioning
1 parent f52d989 commit 59c8ca3

File tree

3 files changed

+11
-16
lines changed

3 files changed

+11
-16
lines changed

src/components/ExperienceTabs.jsx

+6-11
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,28 @@ import Timeline from "./Timeline";
66
const ExperienceTabs = () => {
77
const [activeTab, setActiveTab] = useState(EXPERIENCE_TABS[1]?.tabName);
88
return (
9-
<div className="mt-10 flex h-full w-full flex-col items-center p-2">
10-
<div className="mb-5 flex h-20 w-1/2 items-center justify-center gap-5 md:gap-10">
9+
<div className="container mt-10 flex-col items-center p-2">
10+
<div className="mb-5 flex items-center justify-center gap-20">
1111
{EXPERIENCE_TABS.map(({ tabName, tabIcon: Icon }) => (
1212
<button
1313
key={tabName}
1414
onClick={() => setActiveTab(tabName)}
15-
className={`relative flex w-full items-center justify-center gap-2 p-2 pb-2 font-medium leading-5 md:text-lg md:leading-7 ${
15+
className={`relative flex items-center justify-center gap-3 p-2 pb-2 font-medium leading-5 md:text-lg md:leading-7 ${
1616
activeTab === tabName
1717
? "text-custom-violet dark:text-custom-yellow"
1818
: "text-gray-500 dark:text-gray-100"
1919
}`}
2020
>
21-
<Icon
22-
className={`text-2xl md:text-3xl ${activeTab === tabName ? "text-light-blue" : ""}`}
23-
/>
21+
<Icon className="text-2xl" />
2422
{tabName}
2523
{activeTab === tabName && (
26-
<motion.div
27-
layoutId="underline"
28-
className="absolute bottom-0 left-0 right-0 h-0.5 rounded bg-light-blue"
29-
/>
24+
<motion.div layoutId="underline" className="absolute" />
3025
)}
3126
</button>
3227
))}
3328
</div>
3429

35-
<div className="h-full sm:w-10/12 md:mt-2">
30+
<div className="h-full w-full md:mt-2">
3631
<AnimatePresence mode="wait">
3732
<motion.div
3833
key={activeTab}

src/components/Timeline.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { EXPERIENCE } from "../utils/constants";
44
const Timeline = ({ type }) => {
55
return (
66
<div className="relative mx-auto flex flex-col space-y-8 px-6">
7-
<div className="line absolute inset-0 left-8 h-full w-2 rounded-xl bg-custom-violet shadow-md md:left-0 md:right-0 md:mx-auto" />
7+
<div className="line absolute inset-0 left-8 h-full w-2 rounded-xl bg-gradient-to-t from-light-blue to-custom-violet shadow-md md:left-0 md:right-0 md:mx-auto" />
88
{type == "work"
99
? EXPERIENCE.work.map(
1010
(

src/components/TimelineCard.jsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const TimelineCard = ({
1010
}) => {
1111
return (
1212
<div className="relative">
13-
<div className="xs:absolute flex h-6 w-6 cursor-pointer items-center justify-center rounded-full border-2 border-custom-violet bg-white duration-300 hover:scale-105 md:left-0 md:right-0 md:mx-auto dark:border-custom-yellow">
13+
<div className="flex h-6 w-6 cursor-pointer items-center justify-center rounded-full border-2 border-custom-violet bg-white duration-300 hover:scale-105 xs:absolute md:left-0 md:right-0 md:mx-auto dark:border-custom-yellow">
1414
<a href={link || "#"}>
1515
<img
1616
src={logo}
@@ -21,14 +21,14 @@ const TimelineCard = ({
2121
</div>
2222

2323
<div
24-
className={`${index % 2 === 1 ? "xs:pl-9 md:ml-auto md:pl-6" : "xs:pl-9 md:mr-auto md:pr-6"} xs:pt-0 relative pt-3 md:w-1/2`}
24+
className={`${index % 2 === 1 ? "xs:pl-9 md:ml-auto md:pl-6" : "xs:pl-9 md:mr-auto md:pr-6"} relative pt-3 xs:pt-0 md:w-1/2`}
2525
>
2626
<div
27-
className={`xs:left-7 absolute inset-0 left-1 top-1 h-4 w-4 rotate-45 transform rounded-sm bg-slate-500 shadow-lg ${index % 2 === 1 ? "md:left-4" : "md:left-auto md:right-3 md:pl-7"}`}
27+
className={`${index % 2 === 1 ? "md:left-4" : "md:left-auto md:right-3 md:pl-7"} absolute inset-0 left-1 top-1 h-4 w-4 rotate-45 transform rounded-sm bg-slate-500 shadow-lg xs:left-7`}
2828
></div>
2929

3030
<div
31-
className={`xs:left-0 xs:-top-1 relative -left-1 rounded-lg bg-slate-100 p-6 shadow-lg`}
31+
className={`${index % 2 === 1 ? "" : "md:left-0.5"} relative -left-1 rounded-lg bg-slate-100 p-6 shadow-lg xs:-top-1 xs:left-0`}
3232
>
3333
<h4 className="text-sm font-semibold text-dark-blue">
3434
{score && <span>{score}</span>} {degree}

0 commit comments

Comments
 (0)