Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e6098c0
Merge pull request #2 from ArchAIve-Project/main
JunHammy Jul 4, 2025
147adb5
Added basic section and carditem for catalogue
JunHammy Jul 4, 2025
15a8a67
Made catalogue section scrollable
JunHammy Jul 4, 2025
348b052
Added GalleryLayout
JunHammy Jul 4, 2025
de70851
Adding margin to left and right of the last card of each section
JunHammy Jul 4, 2025
2ab45b5
made homepage responsive
Prakhar896 Jul 4, 2025
4502693
Added framer motion for zooming in of item card on hover
JunHammy Jul 4, 2025
9154997
fixed vertical scrillong bug while hover
JunHammy Jul 4, 2025
5094442
Fixed hovering overlay, added chevron arrows for scrolling
JunHammy Jul 5, 2025
dc935cb
Added more scrolling for chevron buttons
JunHammy Jul 5, 2025
703bb21
fixed item card spacings
JunHammy Jul 5, 2025
caf4567
Added meeting minutes section
JunHammy Jul 9, 2025
3b0b6b3
Added visual feedback for selected card item in MMSection
JunHammy Jul 9, 2025
5c62a76
Added dialog for card item onClick
JunHammy Jul 9, 2025
ef315c4
Modified dialog to use a custom size modal
JunHammy Jul 9, 2025
0718e53
Disabled scrolling for CatalogueItemView
JunHammy Jul 9, 2025
35e1f05
Added framer motion animation for catalogueItemView
JunHammy Jul 9, 2025
b28be50
Ignored package-lock.json
JunHammy Jul 10, 2025
85b522d
Removed console.log debug code
JunHammy Jul 10, 2025
b96c66f
Cleaned up code
JunHammy Jul 10, 2025
866eee3
Fixed usestate import in catalogue
JunHammy Jul 10, 2025
a7c800b
Changed route for catalogue to /catalogue instead of /gallery/catalogue
JunHammy Jul 10, 2025
a115cd9
Remove use of useCallBack and updatedHoverPosition as a dependency in…
JunHammy Jul 10, 2025
2965ec3
Centered hover overlay
JunHammy Jul 10, 2025
0ebd7eb
Shifted arrow overlay to a new component
JunHammy Jul 10, 2025
8260945
Added useState for isSelected for selectedTitle
JunHammy Jul 10, 2025
7aa7386
Merge pull request #7 from ArchAIve-Project/prakhar
Prakhar896 Jul 10, 2025
976e19e
Removed showDetails variable in Catalogue
JunHammy Jul 10, 2025
0c081f8
Remove scrollbar, included a wider variety of images for cardItem
JunHammy Jul 10, 2025
5ea881c
Fixed animation for trasitioning of modals
JunHammy Jul 10, 2025
0dbad37
Changed var name for selectedMMTitle to selectedMMBook
JunHammy Jul 10, 2025
a281365
Made catalogue item view responsive
JunHammy Jul 10, 2025
767dd49
Commented out animation code for catalogueItemView
JunHammy Jul 10, 2025
bf4a8c3
Fixed indentation in core.css
JunHammy Jul 10, 2025
5d1bd6a
Merge pull request #6 from ArchAIve-Project/junhan
Prakhar896 Jul 10, 2025
425a6a8
Merge branch 'main' of https://github.com/ArchAIve-Project/Frontend
Prakhar896 Jul 10, 2025
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
4,444 changes: 0 additions & 4,444 deletions package-lock.json

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@emotion/react": "^11.14.0",
"@reduxjs/toolkit": "^2.8.2",
"axios": "^1.9.0",
"framer-motion": "^12.23.0",
"next-themes": "^0.4.6",
"react": "^19.1.0",
"react-dom": "^19.1.0",
Expand Down
24 changes: 24 additions & 0 deletions src/GalleryLayout.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React, { useEffect } from 'react'
import { useDispatch } from 'react-redux'
import { Outlet, useNavigate } from 'react-router';
import Navbar from './components/Navbar';

function GalleryLayout() {
const dispatch = useDispatch();
const navigate = useNavigate();

useEffect(() => {
console.log("Gallery layout mounted.");
}, [])

return (
<div>
<div className='defaultLayout'>
<Navbar />
</div>
<Outlet />
</div>
)
}

export default GalleryLayout
41 changes: 41 additions & 0 deletions src/components/Catalogue/arrowOverlay.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { Box, Icon } from "@chakra-ui/react";
import { FaChevronLeft, FaChevronRight } from "react-icons/fa";

const ArrowOverlay = ({ direction, isDisabled, onClick }) => {
const isLeft = direction === "left";

return (
<Box
position="absolute"
top={0}
bottom={0}
left={isLeft ? 0 : "auto"}
right={isLeft ? "auto" : 0}
width="100px"
display="flex"
alignItems="center"
justifyContent={isLeft ? "flex-start" : "flex-end"}
zIndex={1}
px={3}
bgGradient={isLeft ? "to-r" : "to-l"}
gradientFrom="rgb(255, 255, 255)"
gradientTo="rgba(255, 255, 255, 0)"
cursor={isDisabled ? "not-allowed" : "pointer"}
pointerEvents={isDisabled ? "none" : "auto"}
opacity={isDisabled ? 0.3 : 1}
transition="opacity 0.3s ease, background 0.3s ease"
onClick={onClick}
>
<Icon
as={isLeft ? FaChevronLeft : FaChevronRight}
color="black"
boxSize={8}
mx={1}
transition="transform 0.2s ease"
_hover={!isDisabled ? { transform: "scale(1.2)" } : {}}
/>
</Box>
);
};

export default ArrowOverlay;
170 changes: 170 additions & 0 deletions src/components/Catalogue/cardItem.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
// CardItem.jsx
import { Box, Card, Image, Text } from "@chakra-ui/react";
import React, { useState, useRef, useEffect } from "react";
import { motion, AnimatePresence } from "framer-motion";

const MotionBox = motion.create(Box);

const images = [
"https://images.unsplash.com/photo-1555041469-a586c61ea9bc?auto=format&fit=crop&w=1770&q=80",
"https://images.unsplash.com/photo-1519389950473-47ba0277781c?auto=format&fit=crop&w=1770&q=80",
"https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=1770&q=80",
"https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=1770&q=80",
];

const CardItem = ({ itemTitle, itemDescription, selectedTitle, index }) => {
const [isHovered, setIsHovered] = useState(false);
const [isSelected, setIsSelected] = useState(selectedTitle === itemTitle);
const cardRef = useRef(null);
const [hoverPos, setHoverPos] = useState({ top: 0, left: 0 });
const scrollContainerRef = useRef(null);
const hoverTimeoutRef = useRef(null);

useEffect(() => {
setIsSelected(selectedTitle === itemTitle);
}, [selectedTitle, itemTitle]);

const updateHoverPosition = () => {
const rect = cardRef.current?.getBoundingClientRect();
if (rect) {
const scaleFactor = 1.1;
const scaledWidth = 280 * scaleFactor;
const cardCenterX = rect.left + rect.width / 2;
let left = cardCenterX - scaledWidth / 2;
const top = rect.top - 20;

const viewportWidth = window.innerWidth;
const rightEdge = left + scaledWidth;
const leftBoundary = 10;
const rightBoundary = viewportWidth - scaledWidth - 10;

if (left < leftBoundary) left = leftBoundary;
else if (rightEdge > viewportWidth - leftBoundary)
left = rightBoundary;

setHoverPos({ top, left });
}
};

const handleMouseEnter = () => {
hoverTimeoutRef.current = setTimeout(() => {
updateHoverPosition();
setIsHovered(true);
}, 1000);
};

const handleMouseLeave = () => {
clearTimeout(hoverTimeoutRef.current);
setIsHovered(false);
};

useEffect(() => {
if (isHovered) {
let node = cardRef.current;
while (node) {
const style = window.getComputedStyle(node);
if (
style.overflow === "auto" ||
style.overflowX === "auto" ||
style.overflow === "scroll" ||
style.overflowX === "scroll"
) {
scrollContainerRef.current = node;
break;
}
node = node.parentNode;
}

window.addEventListener("scroll", updateHoverPosition, true);
window.addEventListener("resize", updateHoverPosition);
if (scrollContainerRef.current) {
scrollContainerRef.current.addEventListener(
"scroll",
updateHoverPosition
);
}

return () => {
window.removeEventListener("scroll", updateHoverPosition, true);
window.removeEventListener("resize", updateHoverPosition);
if (scrollContainerRef.current) {
scrollContainerRef.current.removeEventListener(
"scroll",
updateHoverPosition
);
}
};
}
}, [isHovered]);

const imageSrc = images[index % images.length];

return (
<>
<Box
ref={cardRef}
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
transition="all 0.1s ease-in-out"
cursor="pointer"
w="280px"
border={isSelected ? "1px solid" : "none"}
borderColor={isSelected ? "blue.600" : "transparent"}
bg={isSelected ? "gray.100" : "white"}
borderRadius="md"
boxShadow={isSelected ? "lg" : "md"}
>
<Card.Root
overflow="hidden"
boxShadow={isSelected ? "lg" : "md"}
transition="all 0.3s ease-in-out"
>
<Image src={imageSrc} alt={itemTitle} />
<Card.Body>
<Card.Title>{itemTitle}</Card.Title>
</Card.Body>
</Card.Root>
</Box>

<AnimatePresence>
{isHovered && (
<MotionBox
initial={{ opacity: 0, scale: 0.95 }}
animate={{ opacity: 1, scale: 1.1 }}
exit={{ opacity: 0, scale: 0.95 }}
transition={{ duration: 0.25, ease: "easeInOut" }}
style={{
transformOrigin: "top center",
position: "fixed",
top: hoverPos.top,
left: hoverPos.left + 15,
zIndex: 10,
pointerEvents: "auto",
width: "280px",
}}
onMouseLeave={handleMouseLeave}
onMouseEnter={() => setIsHovered(true)}
borderRadius="md"
border={isSelected ? "1px solid" : "none"}
borderColor={isSelected ? "blue.600" : "transparent"}
boxShadow={
isSelected
? "0 0 15px 2px rgba(66,153,225,0.6)"
: "2xl"
}
>
<Card.Root overflow="hidden">
<Image src={imageSrc} alt={itemTitle} />
<Card.Body>
<Card.Title>{itemTitle}</Card.Title>
<Text mt={2}>{itemDescription}</Text>
</Card.Body>
</Card.Root>
</MotionBox>
)}
</AnimatePresence>
</>
);
};

export default CardItem;
Loading