diff --git a/src/App.js b/src/App.js index b2d07d9..95f1ded 100644 --- a/src/App.js +++ b/src/App.js @@ -14,8 +14,12 @@ import SignUp from "./account/SignUp"; import Complete from "./account/Complete"; import Calendarr from "./calendar/Calendarr"; import MentoCalendar from "./calendarMento/MentoCalendar"; + +import SearchBoard from "./search/SearchBoard"; + import UploadPost from "./uploadPost/UploadPost"; + function App() { return (
@@ -30,6 +34,7 @@ function App() { }> } /> + } /> } /> } /> diff --git a/src/account/LogIn.js b/src/account/LogIn.js index d95e721..3f9695e 100644 --- a/src/account/LogIn.js +++ b/src/account/LogIn.js @@ -119,7 +119,6 @@ const LogIn = () => {
- {/* */}

{message}

diff --git a/src/account/LogIn.module.css b/src/account/LogIn.module.css index bd445ed..ef40330 100644 --- a/src/account/LogIn.module.css +++ b/src/account/LogIn.module.css @@ -1,6 +1,5 @@ .login { - padding-left: 30vh; - padding-right: 24.7vh; + padding: auto; position: absolute; top: 50%; left: 50%; @@ -11,10 +10,10 @@ display: flex; justify-content: center; align-items: center; - padding-bottom: 40px; + padding-bottom: 30px; } .login .logo img { - width: 150px; + width: 200px; } .rect { @@ -44,8 +43,9 @@ .input_rect { width: 502px; height: 52px; - margin-left: 74px; - margin-right: 74px; + margin: auto; + /* margin-left: 74px; + margin-right: 74px; */ border: 1.5px solid #ff8bc5; border-radius: 20px; display: flex; @@ -104,6 +104,7 @@ justify-content: center; align-items: center; } + .btn button { width: 326px; height: 60px; @@ -112,7 +113,7 @@ border: none; } .buttonlogin { - margin-top: 44px; + margin-top: 30px; margin-bottom: 15px; background-color: #fc389a; } @@ -120,6 +121,7 @@ background-color: #ffe812; } .warning { + padding-top: 10px; color: red; font-size: small; } diff --git a/src/account/SignUp.module.css b/src/account/SignUp.module.css index 5dd9b37..0885625 100644 --- a/src/account/SignUp.module.css +++ b/src/account/SignUp.module.css @@ -10,6 +10,11 @@ padding-bottom: 40px; } +.logo img { + width: 200px; + height: 40px; +} + .signup_rect { border-radius: 30px; text-align: center; @@ -50,7 +55,7 @@ display: none; } .gender input[type="radio"] + label { - width: 240px; + width: 245px; height: 30px; border-radius: 10px; display: inline-block; @@ -95,3 +100,7 @@ label { .signup_input input:focus { border: 1px solid red; } + +.signup_input p { + font-size: small; +} diff --git a/src/banner/Slider.jsx b/src/banner/Slider.jsx index 84edf6a..ee69272 100644 --- a/src/banner/Slider.jsx +++ b/src/banner/Slider.jsx @@ -45,9 +45,7 @@ export default function Slider() { pagination={{ clickable: true }} > -
- -
+
diff --git a/src/header/search/Search.js b/src/header/search/Search.js index 03eb62b..86fce91 100644 --- a/src/header/search/Search.js +++ b/src/header/search/Search.js @@ -8,6 +8,7 @@ export default function Search() { const onChange = (e) => { setSearch(e.target.value); }; + const filterResult = member.filter((p) => { return ( p.title diff --git a/src/search/SearchBoard.jsx b/src/search/SearchBoard.jsx new file mode 100644 index 0000000..97649f5 --- /dev/null +++ b/src/search/SearchBoard.jsx @@ -0,0 +1,67 @@ +import React, { useState, useEffect } from "react"; +import { useNavigate } from "react-router-dom"; + +import heart from "./heart.png"; + +import Header from "../header/Header"; + +import styles from "./searchboard.module.css"; + +export default function SearchBoard() { + const navigate = useNavigate(); + const [data, setData] = useState([]); + + useEffect(() => { + // API 호출 + fetch("https://api.zionhann.shop/app/makeup/posts/images") + .then((response) => response.json()) + .then((data) => setData(data.data)); + }, []); + + const handleContainerClick = (num) => { + navigate("/post/" + num); + }; + + const truncate = (str, n) => { + return str?.length > n ? str.substr(0, n - 1) + "..." : str; + }; + + if (data.length === 0) return <>loading...; + + return ( +
+
+
+ {[...Array(4)].map((_, colIndex) => ( +
+ {[...Array(4)].map((_, rowIndex) => { + const itemIndex = rowIndex * 4 + colIndex; + const item = data[itemIndex]; + if (!item) return null; + return ( +
+
handleContainerClick(item.photo_id)} + style={{ backgroundImage: `url(${item.imageUrl})` }} + > +
+ {truncate(item.text, 12)} +
+ + heartimg +
+
+ ); + })} +
+ ))} +
+
+ ); +} diff --git a/src/search/heart.png b/src/search/heart.png new file mode 100644 index 0000000..91af87d Binary files /dev/null and b/src/search/heart.png differ diff --git a/src/search/searchboard.module.css b/src/search/searchboard.module.css new file mode 100644 index 0000000..f478ea2 --- /dev/null +++ b/src/search/searchboard.module.css @@ -0,0 +1,66 @@ +.searchboard .container { + display: flex; + justify-content: center; + white-space: pre-line; + margin-bottom: 111px; + background-color: #efc4b8; + padding-top: 127px; + padding-bottom: 127px; +} + +.bottom > .rect { + width: 220px; + height: 220px; + margin-left: 8px; + margin-top: 8px; + display: flex; + background-size: cover; + background-repeat: no-repeat; + position: relative; +} + +.rect:hover .hoverText { + display: flex; + margin-top: 234px; + margin-left: 5px; + font-family: "Pretendard-Regular"; + font-weight: 400; + font-size: 12px; +} + +.hoverText { + display: none; +} + +.bottom { + width: 236px; + height: 267px; + border-color: white; + border-style: solid; + border-radius: 5px; + background-color: white; + box-shadow: 0px 0px 25px rgba(0, 0, 0, 0.15); + margin-bottom: 29px; + margin-right: 25px; +} + +.bottom:hover { + box-shadow: 0px 0px 25px rgba(255, 135, 159, 0.4); +} + +.heart { + position: absolute; + width: 24px; + height: 19px; + margin-top: 234px; + left: 195px; +} + +.title { + font-family: "Pretendard-Regular"; + font-size: 30px; + font-weight: bold; + padding-top: 146px; + padding-bottom: 30px; + padding-left: 241px; +}