Skip to content

Commit

Permalink
Merge pull request #8 from AMC-website/logo-expansion
Browse files Browse the repository at this point in the history
Logo expansion
  • Loading branch information
harisudarsan1 authored Dec 4, 2023
2 parents 5e9865b + 6b496c2 commit 8928b2e
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 75 deletions.
1 change: 1 addition & 0 deletions src/components/Contact/ContactForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default function ContactForm() {

{inputs.map((input, index) => (
<Box
key = {index}
sx={{
display: "flex",
flexDirection: "column",
Expand Down
138 changes: 69 additions & 69 deletions src/components/Cursor.tsx
Original file line number Diff line number Diff line change
@@ -1,73 +1,73 @@
// import React, { useEffect, useState } from 'react';
// import { motion } from 'framer-motion';
import React, { useEffect, useState } from 'react';
import { motion } from 'framer-motion';

// const Cursor = ({ children }) => {
// const [position, setPosition] = useState({ x: 0, y: 0 });
// const handleMouseMove = (event) => {
// setPosition({ x: event.clientX, y: event.clientY });
// };
// useEffect(() => {
// window.addEventListener('mousemove', handleMouseMove);
const Cursor = ({ children }) => {
const [position, setPosition] = useState({ x: 0, y: 0 });
const handleMouseMove = (event) => {
setPosition({ x: event.clientX, y: event.clientY });
};
useEffect(() => {
window.addEventListener('mousemove', handleMouseMove);

// return () => {
// window.removeEventListener('mousemove', handleMouseMove);
// };
// }, []);
return () => {
window.removeEventListener('mousemove', handleMouseMove);
};
}, []);

// return (
// <div>
// {children}
// {false ? (
// <motion.div
// id="cursor"
// className="cursor"
// style={{
// position: 'fixed',
// height: '50px',
// width: '50px',
// borderRadius: '100%',
// border: '2px solid #ffff',
// zIndex: '9999',
// backgroundColor: 'transparent',
// left: `${position.x}px`,
// top: `${position.y}px`,
// transform: 'translate(-50%,-50%)',
// transition: 'scale 500ms ease-out',
// pointerEvents: 'none',
// }}
// />
// ) : (
// <div
// style={{
// width: '100%',
// height: '100%',
// display: 'flex',
// justifyContent: 'center',
// alignItems: 'center',
// }}
// >
// <div
// style={{
// width: '10px',
// height: '20px',
// backgroundColor: 'white',
// position: 'relative',
// transform: 'rotate(45deg)',
// }}
// />
// <div
// style={{
// width: '10px',
// height: '20px',
// backgroundColor: 'white',
// position: 'relative',
// transform: 'rotate(-45deg)',
// }}
// />
// </div>
// )}
// </div>
// );
// };
return (
<div>
{children}
{false ? (
<motion.div
id="cursor"
className="cursor"
style={{
position: 'fixed',
height: '50px',
width: '50px',
borderRadius: '100%',
border: '2px solid #ffff',
zIndex: '9999',
backgroundColor: 'transparent',
left: `${position.x}px`,
top: `${position.y}px`,
transform: 'translate(-50%,-50%)',
transition: 'scale 500ms ease-out',
pointerEvents: 'none',
}}
/>
) : (
<div
style={{
width: '100%',
height: '100%',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
}}
>
<div
style={{
width: '10px',
height: '20px',
backgroundColor: 'white',
position: 'relative',
transform: 'rotate(45deg)',
}}
/>
<div
style={{
width: '10px',
height: '20px',
backgroundColor: 'white',
position: 'relative',
transform: 'rotate(-45deg)',
}}
/>
</div>
)}
</div>
);
};

// export default Cursor;
export default Cursor;
5 changes: 4 additions & 1 deletion src/components/Home/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,19 @@ export default function Logo() {

return (
<img
src="logo new.png"
src="/logo new.png"
alt="drone image"
id="logo"
width={1080}
height={1080}
style={{
objectFit: 'cover',
height: ((true) ? logoHeight : logoHeight) + "%",
width: ((true) ? logoWidth : logoWidth) + "%",
marginBottom: 'auto',
marginTop: 'auto',
zIndex: (isAtTop ? 0 : 50),
userSelect: 'none',
}}
/>
)
Expand Down
7 changes: 5 additions & 2 deletions src/components/Navbar/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ export default function Logo() {

return (
<img
src="logo new.png"
src="/logo new.png"
alt="drone image"
id="logo"
width={1080}
height={1080}
style={{
objectFit: 'cover',
height: '70%',
Expand All @@ -55,7 +57,8 @@ export default function Logo() {
transition: 'transform 0.05s',
display:(isAtTop ? '' : 'none'),
transform: (true? ('translate('+logoLeft+'vw,0)'):('translate(36vw, 0)')),

userSelect: 'none',

}}
/>
)
Expand Down
2 changes: 1 addition & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function App({ Component, pageProps }: AppProps) {
</Box>

<Component {...pageProps} />
<Component {...pageProps} />
{/* <Component {...pageProps} /> */}

<Box width="100%">
<Footer />
Expand Down
7 changes: 5 additions & 2 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Members from '@/components/Member/members';
import MovingText from '@/components/MovingText';
import { bgColor, color, h4, h5, h6, titleColor } from '@/constants';
import Projects from '../components/Projects/projects';
import Image from 'next/image';

export default function Home() {
const breakPoint = useMediaQuery('(min-width:600px)');
Expand Down Expand Up @@ -118,9 +119,11 @@ export default function Home() {
justifyContent: 'space-between',
}}
>
<img
src="flight2.jpg"
<Image
src="/flight2.jpg"
alt="drone"
width={3936}
height={2624}
style={{
objectFit: 'cover',
height: breakPoint2 ? '100%' : '100%',
Expand Down

0 comments on commit 8928b2e

Please sign in to comment.