Commit 86e65a6a authored by Choi Ga Young's avatar Choi Ga Young
Browse files

Merge remote-tracking branch 'origin/kimpen' into rkyoung7

parents 0c3b8467 1d1194ff
......@@ -13,6 +13,7 @@
# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
......
# Getting Started with Create React App
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will reload if you make edits.\
You will also see any lint errors in the console.
### `npm test`
Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `npm run build`
Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `npm run eject`
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
### Analyzing the Bundle Size
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
### Making a Progressive Web App
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
### Advanced Configuration
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
### Deployment
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
......@@ -4,22 +4,34 @@ import SignupPage from "./pages/SignupPage";
import HomePage from "./pages/HomePage";
import SchedulePage from "./pages/SchedulePage";
import ScheduleEditPage from "./pages/ScheduleEditPage";
import ToDoPage from "./pages/ToDoPage";
import StudyPlanListPage from "./pages/StudyPlanListPage";
import StudyPlanPage from "./pages/StudyPlanPage";
import StudyPlanEditPage from "./pages/StudyPlanEditPage";
import SubjectEditPage from "./pages/SubjectEditPage";
import AdminPage from "./pages/AdminPage";
import PrivateRoute from "./components/PrivateRoute";
import Err from "./pages/ErrorPage";
import ErrorPage from "./pages/ErrorPage";
function App() {
return (
<Router basename={process.env.PUBLIC_URL}>
<div id="box" className="container mx-sm-auto">
<div id="box" className="container position-relative vh-100 mx-sm-auto">
<Switch>
<Route exact path="/" component={Err} />
<Route exact path="/" component={LoginPage} />
<Route path="/login" component={LoginPage} />
<Route path="/signup" component={SignupPage} />
<Route path="/home" component={HomePage} />
<Route path="/schedule/edit" component={ScheduleEditPage} />
<Route path="/schedule" component={SchedulePage} />
<Route path="/todo" component={ToDoPage} />
<Route path="/studyplan/edit" component={StudyPlanEditPage} />
<Route path="/studyplan/:" component={StudyPlanPage} />
<Route path="/studyplan" component={StudyPlanListPage} />
<Route path="/subject/edit" component={SubjectEditPage} />
<PrivateRoute path="/admin" component={AdminPage} role="admin" />
<Route component={ErrorPage} />
</Switch>
</div>
</Router>
......
import { useHistory } from "react-router-dom";
import styles from "./buttons.module.scss";
const BackBtn = () => {
const history = useHistory();
return (
<button className={`btn btn-outline-crimson position-absolute border-0 shadow-none p-0 ${styles.backBtn}`} onClick={() => history.goBack()}>
<i className={`bi bi-arrow-left-square ${styles.icon}`}></i>
</button>
)
}
export default BackBtn
\ No newline at end of file
import { Link } from "react-router-dom";
import styles from "./buttons.module.scss";
const EditBtn = ({ pathname }) => {
return (
<Link className={`position-absolute ${styles.editBtn}`} to={"/" + pathname}>
<i className={`bi bi-plus-circle ${styles.icon}`}></i>
</Link>
)
}
export default EditBtn
\ No newline at end of file
import { Link } from "react-router-dom";
import styles from "./buttons.module.scss";
const HomeBtn = () => {
return (
<Link className={`btn btn-outline-crimson position-absolute ${styles.homeBtn}`} to="/home">
<i className={`bi bi-house-door-fill fs-4 ${styles.icon}`}></i>
</Link>
)
}
export default HomeBtn
\ No newline at end of file
.homeBtn {
top: 10px;
right: 10px;
& .icon {
color: crimson;
&:hover, :active {
color: #fff;
}
}
}
.editBtn {
bottom: 10px;
right: 10px;
& .icon {
color: crimson;
font-size: 2.5em;
}
}
.backBtn {
top: 4px;
right: 10px;
& .icon {
font-size: 2.3em;
}
&:hover, &:visited {
background-color: #fff;
& .icon {
color: crimson;
}
}
}
\ No newline at end of file
import { Link } from "react-router-dom";
import styles from "./menu.module.scss";
const Menu = () => {
return (
<></>
<>
<button className="btn btn-crimson shadow-none mt-2" type="button" data-bs-toggle="collapse" data-bs-target="#menuContent" aria-controls="menuContent" aria-expanded="false" aria-label="menu">
<i className="bi bi-list fs-4"></i>
</button>
<div className={`collapse collapse-horizontal position-absolute top-0 start-0 h-100 ${styles.content}`} id="menuContent">
<div style={{ transition: ".15s ease" }}>
<button type="button" className={`btn-close btn-close btn-lg position-absolute ${styles.close}`} data-bs-toggle="collapse" data-bs-target="#menuContent" aria-controls="menuContent" aria-expanded="true" aria-label="menu"></button>
<div className="d-flex flex-column align-items-center my-5">
<h1 className="my-3">김수빈 </h1>
<h2 className="my-2">목표 95% 달성!</h2>
</div>
<div className="d-flex flex-column justify-content-between py-4 ps-3" style={{ backgroundColor: "crimson" }}>
<div className="user-select-none w-75">
<h2>To-do</h2>
<div className="d-flex mt-2">
<p className={`form-check-label border-bottom border-dark border-2 fs-5 pb-1 me-3 ${styles.title}`}>sdasdsasdasdsadsadsadsadsadsadsadaddad</p>
<input className={`form-check-input rounded-0 border-dark shadow-none mt-1 ${styles.checkBox}`} type="checkbox" id="inlineCheckbox1" value="" aria-label="checkbox" />
</div>
<div className="d-flex">
<p className={`form-check-label border-bottom border-dark border-2 fs-5 pb-1 me-3 ${styles.title}`}>sdasdsadad</p>
<input className={`form-check-input rounded-0 border-dark shadow-none mt-1 ${styles.checkBox}`} type="checkbox" id="inlineCheckbox1" value="" aria-label="checkbox" />
</div>
<div className="d-flex">
<p className={`form-check-label border-bottom border-dark border-2 fs-5 pb-1 me-3 ${styles.title}`}>sdasdsadad</p>
<input className={`form-check-input rounded-0 border-dark shadow-none mt-1 ${styles.checkBox}`} type="checkbox" id="inlineCheckbox1" value="" aria-label="checkbox" />
</div>
<Link className="d-flex justify-content-center text-dark text-decoration-none" to="/todo">
<i className="bi bi-plus-lg me-2"></i>
<p className="mb-0">더보기</p>
</Link>
</div>
<div className="d-flex flex-column">
<Link className="text-dark text-decoration-none" to="/schedule"><i className="bi bi-check"></i>일정</Link>
<Link className="text-dark text-decoration-none" to="/studyplan"><i className="bi bi-check"></i>학업별 계획</Link>
</div>
<p className={`position-absolute bottom-0 text-dark ${styles.logout}`}>로그아웃</p>
</div>
</div>
</div>
</>
)
}
......
.content {
background-color: #fff;
z-index: 1;
overflow: hidden;
& .close {
top: 10px;
right: 10px;
}
& .title {
overflow: hidden;
text-overflow: ellipsis;
width: 86%;
}
& .checkBox {
width: 1.5em;
height: 1.5em;
background-color: crimson;
&:checked {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='currentColor' d='M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}
}
& .logout {
right: 10px;
cursor: pointer;
}
}
\ No newline at end of file
import { Link } from "react-router-dom";
const ErrorPage = () => {
return (
<div className="d-flex bg-white" id="notfound">
<div className="notfound">
<img src="./ku-tiger.png" />
<h1>404</h1>
<h2 className="text-center">Oops! Page Not Be Found</h2>
<div className="d-flex flex-column justify-content-center align-items-center vh-100">
<img className="mb-5" src={process.env.PUBLIC_URL + '/ku-tiger.png'} alt="어흥이" />
<h2>Oops! Page Not Be Found</h2>
<p>Sorry but the page you are looking for does not exist, have been removed. name changed or is temporarily unavailable</p>
<a className="text-center" href="/login">Back to login</a>
</div>
<Link to="/login" style={{ color: "crimson" }}>Back to login</Link>
</div>
)
}
......
import Menu from "../components/Menu/Menu.js";
import EditBtn from "../components/Buttons/EditBtn.js";
const HomePage = () => {
return (
<></>
<>
<Menu />
<EditBtn pathname="schedule/edit" />
</>
)
}
......
import Menu from "../components/Menu/Menu.js";
import HomeBtn from "../components/Buttons/HomeBtn.js";
const SchedulePage = () => {
return (
<></>
<>
<Menu />
<HomeBtn />
</>
)
}
......
const StudyPlanEditPage = () => {
return (
<></>
)
}
export default StudyPlanEditPage
\ No newline at end of file
import Menu from "../components/Menu/Menu.js";
import HomeBtn from "../components/Buttons/HomeBtn.js";
const StudyPlanListPage = () => {
return (
<>
<Menu />
<HomeBtn />
</>
)
}
export default StudyPlanListPage
\ No newline at end of file
import Menu from "../components/Menu/Menu.js";
import BackBtn from "../components/Buttons/BackBtn.js";
import EditBtn from "../components/Buttons/EditBtn.js";
const StudyPlanPage = () => {
return (
<>
<Menu />
<BackBtn />
<EditBtn pathname="studyplan/edit" />
</>
)
}
export default StudyPlanPage
\ No newline at end of file
const SubjectEditPage = () => {
return (
<></>
)
}
export default SubjectEditPage
\ No newline at end of file
import Menu from "../components/Menu/Menu.js";
import HomeBtn from "../components/Buttons/HomeBtn.js";
const ToDoPage = () => {
return (
<>
<Menu />
<HomeBtn />
</>
)
}
export default ToDoPage
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment