diff --git a/package.json b/package.json index 1a4154a..6f4e82e 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ "sass": "^1.58.0", "unstated-next": "^1.1.0", "uuid": "^9.0.0", - "waterfalljs-layout": "^0.1.0", "web-vitals": "^2.1.4" }, "scripts": { diff --git a/src/assets/stylesheets/project.scss b/src/assets/stylesheets/project.scss index a1d111e..b33d0fa 100644 --- a/src/assets/stylesheets/project.scss +++ b/src/assets/stylesheets/project.scss @@ -56,7 +56,7 @@ border-radius: 10px; background-color: rgb(66, 66, 66); box-sizing: border-box; - height: 400px; + // height: 400px; display: flex; flex-direction: column; transition: 0.3s; diff --git a/src/assets/stylesheets/waterfall.scss b/src/assets/stylesheets/waterfall.scss index 4d89ea9..e214aad 100644 --- a/src/assets/stylesheets/waterfall.scss +++ b/src/assets/stylesheets/waterfall.scss @@ -1,20 +1,8 @@ -#react-waterfall-comps li > div { - transition: all 0.5s; - position: relative; - border-radius: 10px; - background-color: rgb(66, 66, 66); - padding: 10px; +.waterfall_outer { display: flex; - flex-direction: column; - transition: 0.3s; - cursor: pointer; -} -#react-waterfall-comps li > div:hover { - transform: translateY(-6px); - box-shadow: 0 30px 50px rgba(0, 0, 0, 0.3); - transition: all 0.3s; - background-color: #666666; -} -#react-waterfall-comps li > div > img { - width: 100%; -} + flex-direction: row; + flex-wrap: wrap; + .waterfall_column { + width: 40%; + } +} \ No newline at end of file diff --git a/src/components/Projects.js b/src/components/Projects.js index f6f9f99..9682c89 100644 --- a/src/components/Projects.js +++ b/src/components/Projects.js @@ -3,15 +3,16 @@ import { AnimationOnScroll } from "react-animation-on-scroll"; import "../assets/stylesheets/project.scss"; import { useContainer } from "unstated-next"; import GlobalStore from "../store/global"; -import { Image } from 'antd'; -import projects from '../assets/data/projects'; +import { Image } from "antd"; +import projects from "../assets/data/projects"; +import WaterfallPositionDemo from "./Waterfall"; const Project = () => { useEffect(() => { window.scrollTo(0, 0); }, []); - - const {bodySize} = useContainer(GlobalStore); + + const { bodySize } = useContainer(GlobalStore); const count = useMemo(() => { if (bodySize.width > 850) { return 3; @@ -25,6 +26,26 @@ const Project = () => {