Skip to content

Added tilt effect from react-tilt #398

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

Merged
merged 2 commits into from
Jul 9, 2024
Merged
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: 2 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@
"react-hot-toast": "^2.4.1",
"react-i18next": "^14.1.2",
"react-icons": "^5.2.1",
"react-parallax-tilt": "^1.7.231",
"react-router-dom": "^6.24.0",
"react-share": "^5.1.0",
"react-slick": "^0.30.2",
"react-switch": "^7.0.0",
"react-tilt": "^1.0.2",
"react-tooltip": "^5.26.4",
"recoil": "^0.7.7",
"slick-carousel": "^1.8.1",
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/components/Showcase.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import editor from "../assets/editor.png";
import { useTranslation } from 'react-i18next';
import Tilt from 'react-parallax-tilt';

const Showcase: React.FC = () => {
const { t } = useTranslation();
Expand Down Expand Up @@ -43,7 +44,9 @@ const Showcase: React.FC = () => {
))}
</div>
<div className="mt-10 md:mt-0 md:w-1/2 flex justify-center">
<img src={editor} alt="Code Editor" className="max-w-full mx-20 h-auto rounded-lg shadow-md" />
<Tilt className="ml-0">
<img src={editor} alt="Code Editor" className="max-w-full h-auto rounded-lg shadow-md" />
</Tilt>
</div>
</div>
</div>
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/pages/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ import { Link } from "react-router-dom";
import about from '../assets/about.png'
import bgHero from "../assets/bgHero.png";
import { useTranslation } from 'react-i18next';
import Tilt from 'react-parallax-tilt';

function About() {
const { t } = useTranslation();

return (
<div className="w-full text-[#000435] bg-white dark:text-white dark:bg-[#000435] py-16 px-4"style={{ backgroundImage: `url(${bgHero})`, backgroundSize: 'cover', backgroundPosition: 'center' }} >
<div className="max-w-[1240px] mx-auto grid md:grid-cols-2">
<Tilt>
<img className="w-[550px] mx-auto my-4" src={about} alt="About Us" />
</Tilt>
<div className="flex flex-col justify-center">
<p className="bg-gradient-to-r from-blue-600 via-blue-500 to-white inline-block text-transparent bg-clip-text text-4xl font-bold py-1" >
👨‍💻 {t('about.aboutHeading')}
Expand Down
Loading