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

Feature: Added Interactive Card Hover Animations #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/nextjs/components/BuildCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const BuildCard = ({
<TrackedLink
id={name}
href={link}
className="card card-compact lg:w-1/3 max-w-xs bg-white shadow-lg rounded-[46px]"
className="transition ease-in-out delay-150 hover:-translate-y-1 hover:scale-110 duration-1000 card-anchor card card-compact lg:w-1/3 max-w-xs bg-white shadow-lg rounded-[46px]"
>
<div className="w-full h-[220px] relative">
<Image src={src} alt={name} fill className="w-full object-center object-cover" />
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/components/ChallengeCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const Card = ({
link: string;
}) => {
return (
<div className="flex flex-col lg:w-1/3 max-w-xs shadow-lg bg-white rounded-[46px] p-5 py-8 mt-4">
<div className="transition ease-in-out hover:-translate-y-1 hover:scale-110 duration-1000 flex flex-col lg:w-1/3 max-w-xs shadow-lg bg-white rounded-[46px] p-5 py-8 mt-4">
<div className="flex w-full h-[150px] relative">
<Image src={src} fill alt="Dex Challenge" className="w-full object-contain" />
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/components/LearnMoreCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const LearnMoreCard = ({
<TrackedLink
id={name}
href={link}
className="flex flex-col lg:w-[30%] max-w-xs shadow-lg bg-white rounded-[42px] p-5 mt-4"
className="transition ease-in-out hover:-translate-y-1 hover:scale-110 duration-1000 card-anchor flex flex-col lg:w-[30%] max-w-xs shadow-lg bg-white rounded-[42px] p-5 mt-4"
>
<div className="w-full h-[220px] relative mb-4">
<Image src={src} alt={name} fill className="w-full object-center object-cover" />
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ h4 {
line-height: 1;
}

a:hover {
a:hover:not(.card-anchor) {
@apply opacity-80;
@apply transition-opacity;
}
Expand Down