Skip to content
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

Feat/responsive 1차 #42

Merged
merged 44 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
95085e4
desing: Banner
Youngho-kr Feb 20, 2024
78e8016
feat: header
Youngho-kr Feb 21, 2024
7b5bf88
feat: Header, Banner responsive
Youngho-kr Feb 21, 2024
ef71299
fix: introducePage responsive
Youngho-kr Feb 21, 2024
3b9962c
feat: footer responsive
Youngho-kr Feb 21, 2024
e37273a
fix: Banner /middle, /final
Youngho-kr Feb 21, 2024
f405afa
setup: mobile interface
Youngho-kr Feb 21, 2024
d7be073
feat: Browser responsive
Youngho-kr Feb 21, 2024
29bd86b
setup: Mobile interface
Youngho-kr Feb 22, 2024
267f350
feat: header responsive
Youngho-kr Feb 22, 2024
93310b9
feat: Footer responsive
Youngho-kr Feb 22, 2024
8ef31d5
모바일화면_소개페이지 수정
Feb 22, 2024
085a8be
모바일화면_소개페이지 수정
Feb 22, 2024
da5ccd1
Merge branch 'feat/responsive' of https://github.com/CSPCLAB/cspc_app…
Feb 22, 2024
938c017
모바일화면_소개페이지 수정
Feb 22, 2024
920b2bc
feat: LoginPage responsive
Youngho-kr Feb 22, 2024
4644f37
fix: LoginForm
Youngho-kr Feb 22, 2024
11bc612
fix: Banner
Youngho-kr Feb 22, 2024
53587a7
ApplyGuide
YSHyeonn Feb 22, 2024
2fbbe5d
feat: Add mobile main page
ljy2855 Feb 22, 2024
5beb7b6
Merge branch 'feat/responsive' of https://github.com/CSPCLAB/cspc_app…
ljy2855 Feb 22, 2024
dc099a4
fix: Footer padding, align
Youngho-kr Feb 22, 2024
cb4aac2
feat: Add main page api call
ljy2855 Feb 22, 2024
a65a325
ApplyProgress Done
YSHyeonn Feb 22, 2024
61717bd
main page 여백 수정
YSHyeonn Feb 22, 2024
61d0af0
모바일화면_소개페이지 수정
Feb 22, 2024
245f5e0
Mobile IntroducePage : delete scroll
Feb 22, 2024
6f3cabc
메인레이아웃 변경
Feb 22, 2024
f6685e0
feat: Loginsecond responsive
Youngho-kr Feb 22, 2024
9fede40
mainpage에서 넘어가는 위치 수정
YSHyeonn Feb 22, 2024
df28a56
소개 page 수정
YSHyeonn Feb 22, 2024
9299397
banner size
YSHyeonn Feb 22, 2024
1209774
feat: ApplySecond, ApplyForm
Youngho-kr Feb 22, 2024
f965830
Mobile : IntroducePage 줄간격 수정
Feb 23, 2024
2194a01
Mobile 지원하기 관련 페이지 내용 추가(pages 코드 복붙)
Feb 23, 2024
95e5758
ApplyPage 내용 삭제
Feb 23, 2024
6e59424
Mobile : ResultPage /document_fail
Feb 23, 2024
536ad4b
Mobile : ResultPage DocumentPass (이미지 문제 빼고)
Feb 23, 2024
ca9ba4f
feat: Apply-Complete responsive
Youngho-kr Feb 23, 2024
c20b7a6
feat: ApplyFirst responsive
Youngho-kr Feb 23, 2024
1878497
fix: LoginPage recruitprocess size
Youngho-kr Feb 23, 2024
ceb4457
feat:ResultPage(doc/final, fail/pass 수정_docPass 이미지 문제 미해결)
Feb 23, 2024
c27289a
feat: ResultPage/documentPass 수정
Feb 23, 2024
5ec3a1e
fast image
YSHyeonn Feb 23, 2024
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
90 changes: 90 additions & 0 deletions package-lock.json

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

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@
"react-async": "^10.0.1",
"react-bootstrap": "^2.7.0",
"react-confetti": "^6.1.0",
"react-device-detect": "^2.2.3",
"react-dom": "^18.2.0",
"react-ga": "^3.3.1",
"react-icons": "^4.7.1",
"react-router-dom": "^6.8.0",
"react-scripts": "5.0.1",
"react-slick": "^0.30.2",
"slick-carousel": "^1.8.1",
"web-vitals": "^2.1.4"
},
"scripts": {
Expand Down
11 changes: 11 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,15 @@
to {
transform: rotate(360deg);
}
}

.browserApp {
min-width: 1920px;
}

.mobileApp {
width: 100vw;

/* overflow-x: hidden; */
/* overflow-y:visible; */
}
64 changes: 49 additions & 15 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import React, { useEffect } from "react";
import React, { useState, useEffect } from "react";
import "./App.css";
import { Routes, Route, Navigate, useLocation } from "react-router-dom";
import { useAsync } from "react-async";
import "bootstrap/dist/css/bootstrap.min.css";

import { Container, Row, Col } from "react-bootstrap";

// layouts
import MainLayout from "./components/Layouts/MainLayout";
import ApplyBanner from "./components/Layouts/Banner";
Expand All @@ -14,47 +16,79 @@ import Main from "./pages/MainPage/Main";
import Apply from "./pages/ApplyPage/Apply";
import Introduce from "./pages/IntroducePage/Introduce";
import { Login } from "./pages/LoginPage/Login";
import ApplyGuide from "./pages/ApplyPage/components/Guide/ApplyGuide";
import { ApplyGuide, Mobile_ApplyGuide } from "./pages/ApplyPage/components/Guide/ApplyGuide";
import NotAllowApply from "pages/NotAllowPage/NotAllowApply";
import { MiddleResult } from "pages/ResultPage/MiddleResult";
import { FinalResult } from "pages/ResultPage/FinalResult";
import NotFound from "pages/NotFound";

//mobile pages
import Introduce2 from "./mobile/IntroducePage/Introduce";
import MiddleResult2 from "./mobile/ResultPage/ResultPage/MiddleResult";
import FinalResult2 from "./mobile/ResultPage/ResultPage/FinalResult";

// apis
import { get_recruit_info } from "apis/get_recruit";

// hooks
import usePageTracking from "./hooks/ga_tracking";

import ReactGA from "react-ga";

const gaTrackingId = process.env.REACT_APP_GA_TRACKING_ID;
ReactGA.initialize(gaTrackingId);
import { isBrowser, isMobile } from "react-device-detect";

const App = () => {
usePageTracking();
return (
<ScrollToTop>
<RenderContent />
</ScrollToTop>
);
};

const RenderContent = () => {
if (isBrowser) {
return (
<div className="browserApp">
<Routes>
<Route element={<MainLayout />} errorElement={<NotFound></NotFound>}>
<Route path="*" element={<Navigate to="/error" />} />
<Route path="/" element={<Main />} />
<Route path="/error" element={<NotFound />} />
<Route path="/introduce" element={<Introduce />} />
<Route path="/notallow" element={<NotAllowApply />} />
<Route path="/apply" element={<ApplyCheck />} />
{/* <Route path="/login" element={<LoginCheck />} /> */}
<Route path="/login" element={<Login />} />

{/* <Route element={<ApplyBanner />}> */}
<Route path="/middle" element={<MiddleResult />} />
<Route path="/final" element={<FinalResult />} />
{/* </Route> */}
<Route path="/applyGuide" element={<ApplyGuide />} />
</Route>
</Routes>
</div>
);
} else if (isMobile) {
return (
<Routes>
<Route element={<MainLayout />} errorElement={<NotFound></NotFound>}>
<Route path="*" element={<Navigate to="/error" />} />
<Route path="/" element={<Main />} />
<Route path="/error" element={<NotFound />} />
<Route path="/introduce" element={<Introduce />} />
<Route path="/introduce" element={<Introduce2 />} />
<Route path="/notallow" element={<NotAllowApply />} />
<Route path="/apply" element={<ApplyCheck />} />
{/* <Route path="/login" element={<LoginCheck />} /> */}
<Route path="/login" element={<Login />} />

<Route element={<ApplyBanner />}>
<Route path="/middle" element={<MiddleResult />} />
<Route path="/final" element={<FinalResult />} />
</Route>
<Route path="/applyGuide" element={<ApplyGuide />} />
{/* <Route element={<ApplyBanner />}> */}
<Route path="/middle" element={<MiddleResult2 />} />
<Route path="/final" element={<FinalResult2 />} />
{/* </Route> */}
<Route path="/applyGuide" element={<Mobile_ApplyGuide />} />
</Route>
</Routes>
</ScrollToTop>
);
);
}
};

// ApplyPage 이동 권한 확인 후 이동
Expand Down
5 changes: 4 additions & 1 deletion src/components/ApplyCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ const MainApplyCard = () => {
return (
<div className="MainApplyCard">
<div className="MainApplyCardBox">
<img src={img} className="MainApplyCardImg" />
<img
src={"https://dev.cspc.me/media/main_apply_img.png"}
className="MainApplyCardImg"
/>
<div className="MainApplyCardLetterBox WhiteWord">
2024 1학기 신입부원 모집
</div>
Expand Down
65 changes: 62 additions & 3 deletions src/components/ApplyProgress.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ const ApplyProgress = () => {
</div>
</div>

<img src={right_vector} className="right1"></img>
<img
src={"https://dev.cspc.me/media/applyguide_right_vector.png"}
className="right1"
></img>

<div className="secondCircle">
<div className="circleTitle2">면접</div>
Expand All @@ -42,7 +45,10 @@ const ApplyProgress = () => {
</div>
</div>

<img src={right_vector} className="right2"></img>
<img
src={"https://dev.cspc.me/media/applyguide_right_vector.png"}
className="right2"
></img>

<div className="thirdCircle">
<div className="circleTitle2">합류</div>
Expand All @@ -61,4 +67,57 @@ const ApplyProgress = () => {
);
};

export default ApplyProgress;
const Mobile_ApplyProgress = () => {
const { data, error, isLoading } = useAsync({ promiseFn: get_recruit_info });

const format = "m/d";

if (isLoading) return "Loading...";
if (error) return `Something went wrong: ${error.message}`;
if (data)
return (
<Container>
<Row style={{ marginTop: "5rem" }}>
<Col className="M_process">지원 절차</Col>
</Row>
<Row className="mt-3">
<Col className="M_guideLine"></Col>
</Row>

<Row className="mt-5 justify-content-center">
<Col className="M_FirstCircle col-4 mx-3">
<div className="M_CircleTitle1">서류</div>
<div className="M_CircleContent1">
{dateFormat(data.start_time, format)} ~{" "}
{dateFormat(data.document_deadline, format)}
</div>
</Col>

<Col className="M_FirstCircle col-4">
<div className="M_CircleTitle1">면접</div>
<div className="M_CircleContent1">
{dateFormat(data.interview_start_time, format)} ~{" "}
{dateFormat(data.interview_end_time, format)}
</div>
</Col>
<Col className="M_FirstCircle col-4 mx-3">
<div className="M_CircleTitle1">합류</div>
<div className="M_CircleContent1">
{dateFormat(data.announce_final_time, "m")}월 중 예정
</div>
</Col>
</Row>
<Row>
<Col className="mt-5 d-flex justify-content-center">
<Link to="/login">
<button className="M_ApplyButton">
<div className="M_ApplyLetter">지원하기</div>
</button>
</Link>
</Col>
</Row>
</Container>
);
};

export { ApplyProgress, Mobile_ApplyProgress };
Loading