Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced all the css into tailwind css on TimelineNav component #1787

Merged
merged 7 commits into from
Jan 5, 2024
14 changes: 9 additions & 5 deletions components/Timeline/TimelineNav/TimelineNav.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
import { Link } from 'react-scroll';
import historyData from '../historyData';
import styles from './TimelineNav.module.css';

const TimelineNav = () => {
return (
<section className={styles.timelineNav}>
<nav className={styles.timelineNavLinksContainer}>
<section className="px-16 sm:p-0">
<nav className="flex justify-around">
{Object.keys(historyData).map(year => (
<Link key={year} to={`event-${year}`} smooth className={styles.timelineNavLink}>
<Link
key={year}
to={`event-${year}`}
smooth
className="font-bold text-xl cursor-pointer opacity-60 hover:opacity-60 transition-all duration-100 ease-in-out hover:scale-[1.1]"
>
{year}
</Link>
))}
</nav>
<div className={styles.timelineNavSeperator} />
<div className="mt-4 bg-[#d7d7d7] h-1" />
</section>
);
};
Expand Down
32 changes: 0 additions & 32 deletions components/Timeline/TimelineNav/TimelineNav.module.css
Original file line number Diff line number Diff line change
@@ -1,35 +1,3 @@
.timelineNav {
padding: 0 4rem;
}

@media screen and (--small-viewport) {
.timelineNav {
padding: 0;
}
}

.timelineNavLinksContainer {
display: flex;
justify-content: space-around;
}

.timelineNavLink {
font-weight: 700;
font-size: 1.2rem;
cursor: pointer;
transition: transform opacity 100ms ease-in-out;
}

.timelineNavLink:not(:hover) {
opacity: 0.6;
}

.timelineNavLink:hover {
transform: scale(1.1);
}

.timelineNavSeperator {
margin-top: 1rem;
background-color: #d7d7d7;
height: 2px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,61 @@

exports[`TimelineNav should render with no props passed passed 1`] = `
<section
className="timelineNav"
className="px-16 sm:p-0"
>
<nav
className="timelineNavLinksContainer"
className="flex justify-around"
>
<Link
className="timelineNavLink"
className="font-bold text-xl cursor-pointer opacity-60 hover:opacity-60 transition-all duration-100 ease-in-out hover:scale-[1.1]"
offset={0}
smooth={true}
to="event-2011"
>
2011
</Link>
<Link
className="timelineNavLink"
className="font-bold text-xl cursor-pointer opacity-60 hover:opacity-60 transition-all duration-100 ease-in-out hover:scale-[1.1]"
offset={0}
smooth={true}
to="event-2013"
>
2013
</Link>
<Link
className="timelineNavLink"
className="font-bold text-xl cursor-pointer opacity-60 hover:opacity-60 transition-all duration-100 ease-in-out hover:scale-[1.1]"
offset={0}
smooth={true}
to="event-2014"
>
2014
</Link>
<Link
className="timelineNavLink"
className="font-bold text-xl cursor-pointer opacity-60 hover:opacity-60 transition-all duration-100 ease-in-out hover:scale-[1.1]"
offset={0}
smooth={true}
to="event-2015"
>
2015
</Link>
<Link
className="timelineNavLink"
className="font-bold text-xl cursor-pointer opacity-60 hover:opacity-60 transition-all duration-100 ease-in-out hover:scale-[1.1]"
offset={0}
smooth={true}
to="event-2019"
>
2019
</Link>
<Link
className="timelineNavLink"
className="font-bold text-xl cursor-pointer opacity-60 hover:opacity-60 transition-all duration-100 ease-in-out hover:scale-[1.1]"
offset={0}
smooth={true}
to="event-2021"
>
2021
</Link>
<Link
className="timelineNavLink"
className="font-bold text-xl cursor-pointer opacity-60 hover:opacity-60 transition-all duration-100 ease-in-out hover:scale-[1.1]"
offset={0}
smooth={true}
to="event-2023"
Expand All @@ -65,7 +65,7 @@ exports[`TimelineNav should render with no props passed passed 1`] = `
</Link>
</nav>
<div
className="timelineNavSeperator"
className="mt-4 bg-[#d7d7d7] h-1"
/>
</section>
`;