Skip to content

Commit

Permalink
Merge pull request #52 from KakaoTech-BootCamp-Team-2/dev
Browse files Browse the repository at this point in the history
🚀 Deploy
  • Loading branch information
sayyyho authored Aug 27, 2024
2 parents 3fc7e02 + 2732934 commit 6e7c6e0
Show file tree
Hide file tree
Showing 26 changed files with 479 additions and 280 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ yarn-debug.log*
yarn-error.log*

node_modules
/dist
10 changes: 4 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
}
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"notebook.defaultFormatter": "esbenp.prettier-vscode"
}
176 changes: 0 additions & 176 deletions dist/assets/index-BqHKD4MV.js

This file was deleted.

Binary file removed dist/assets/kaboologo-uRFU_VBh.png
Binary file not shown.
13 changes: 0 additions & 13 deletions dist/index.html

This file was deleted.

26 changes: 13 additions & 13 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"axios": "^1.7.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.26.0",
"react-router-dom": "^6.26.1",
"zustand": "^4.5.4"
},
"devDependencies": {
Expand Down
42 changes: 0 additions & 42 deletions src/App.css

This file was deleted.

22 changes: 18 additions & 4 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
import { useState } from "react";
import {
BrowserRouter as Router,
Routes,
Route,
Link,
useLocation,
} from "react-router-dom";
import Header from "./components/Common/Header";
import HomeMain from "./pages/homepages/HomeMain";
import GlobalStyle from "./components/Common/GlobalStyle";
import { PeopleListPage } from "./pages/PeopleListPage";
import ChatPage from "./pages/chat/ChatPage";

function App() {
return (
<>
<GlobalStyle />
<PeopleListPage></PeopleListPage>
</>
<Router>
<Routes>
<Route path="/" element={<HomeMain />}></Route>
<Route path="/chat" element={<ChatPage />}></Route>
</Routes>
</Router>
);
}

Expand Down
Binary file added src/assets/images/smiles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 18 additions & 10 deletions src/components/Common/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,29 @@ import React from "react";
import * as styles from "./Header.styled";
import logo from "../../assets/images/kaboologo.png";
import peoplelogo from "../../assets/images/peoplelogo.png";
import { useNavigate } from "react-router-dom";

function Header() {
const navigate = useNavigate();
return (
<styles.HeaderContainer>
<styles.LogoWrapper>
<styles.Logo src={logo} alt="Logo" />
<styles.ServiceName>카부카부</styles.ServiceName>
</styles.LogoWrapper>
<styles.HeaderSubContainer>
<styles.LogoWrapper
onClick={() => {
navigate("/");
}}
>
<styles.Logo src={logo} alt="Logo" />
<styles.ServiceName>카부커넥션</styles.ServiceName>
</styles.LogoWrapper>

<styles.NavBar>
<styles.NavItem href="/">카부 게시판</styles.NavItem>
<styles.NavItem href="#about">카부 프로젝트</styles.NavItem>
<styles.NavItem href="#services">카부 편의</styles.NavItem>
<styles.NavItem href="#contact">카부 커넥션</styles.NavItem>
</styles.NavBar>
<styles.NavBar>
<styles.NavItem href="/">카부 게시판</styles.NavItem>
<styles.NavItem href="/">카부 프로젝트</styles.NavItem>
<styles.NavItem href="/">카부 편의</styles.NavItem>
<styles.NavItem href="/chat">카부 커넥션</styles.NavItem>
</styles.NavBar>
</styles.HeaderSubContainer>
<styles.PeopleLogoWrapper>
<styles.PeopleLogo src={peoplelogo} />
</styles.PeopleLogoWrapper>
Expand Down
29 changes: 18 additions & 11 deletions src/components/Common/Header.styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,34 @@ import { css } from "@emotion/react";
export const HeaderContainer = styled.header`
display: flex;
align-items: center;
justify-content: flex-start;
background-color: rgb(255, 255, 255, 0.5);
justify-content: center;
background-color: rgb(255, 255, 255, 0.5)
color: white;
width: 100%;
height: 100px;
width: 100vw;
height: 150px;
backdrop-filter: blur(10px);
`;
export const HeaderSubContainer = styled.div`
display: flex;
align-items: center;
justify-content: flex-start;
width: 90%;
height: 100%;
`;

export const Logo = styled.img`
height: 55px;
height: 100px;
`;
export const LogoWrapper = styled.div`
width: 200px;
width: 300px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
justify-content: flex-start;
`;

export const ServiceName = styled.h1`
font-size: 30px;
font-size: 35px;
font-weight: bold;
color: black;
margin-left: 10px;
Expand All @@ -35,13 +42,14 @@ export const NavBar = styled.nav`
display: flex;
gap: 20px;
margin-left: 40px;
width: 400px;
`;

export const NavItem = styled.a`
color: #715f00;
text-decoration: none;
font-size: 15px;
font-weight: 500;
font-size: 17px;
font-weight: 600;
&:hover {
text-decoration: underline;
Expand All @@ -61,7 +69,6 @@ export const PeopleLogoWrapper = styled.button`
align-items: center;
width: 40px;
height: 100%;
margin-left: 630px;
border: none;
background-color: transparent; /* 배경 색상 제거 */
Expand Down
2 changes: 1 addition & 1 deletion src/components/Common/Layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { LayoutContainer, MainContent } from "./Layout.styled";
const Layout = ({ children }) => {
return (
<>
<Background />
<Background></Background>
<LayoutContainer>
<Header />
<MainContent>{children}</MainContent>
Expand Down
33 changes: 33 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
html, body {
margin: 0;
padding: 0;
height: 200%;
width: 100%;
display: flex;
align-items: flex-start;
justify-content: center;
background-color: aqua;
}
#root, #app {
height: 100%;
width: 200%;
display: flex;
align-items: center;
justify-content: center;
background-color: red;
}
*/

/* 전체 화면을 채우는 컨테이너 설정
.container {
width: 100%;
height: 200vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
background-color: blanchedalmond;
} */
6 changes: 3 additions & 3 deletions src/pages/Homepage/HomePage.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from "react";
import Layout from "../../components/Common/Layout";

import ChatMain from "../../pages/chat/ChatMain";
function HomePage() {
return (
<Layout>
<h1>햄스터</h1>
<Layout children={ChatMain}>
<h1>햄스터</h1>
<h1>햄스터</h1>
<h1>햄스터</h1>
<h1>햄스터22</h1>
</Layout>
);
}
Expand Down
31 changes: 31 additions & 0 deletions src/pages/chat/ChatList.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import React from "react";
import * as styles from "./styled/ChatList.styled";
import smile from "../../assets/images/smiles.png";
const ChatList = (props) => {
const truncatedContent =
props.content.length > 20
? `${props.content.slice(0, 15)}...`
: props.content;

return (
<styles.TotalWrapper>
<styles.ContentWrapper>
<styles.ProfileWrapper>
<styles.Profile src={smile}></styles.Profile>
</styles.ProfileWrapper>
<styles.NameContentWrapper>
<styles.UserName>{props.name}</styles.UserName>
<styles.TalkContent>{truncatedContent}</styles.TalkContent>
</styles.NameContentWrapper>
</styles.ContentWrapper>
<styles.TimeAlramWrapper>
<styles.Time>{props.time}</styles.Time>
<styles.AlramWrapper>
<styles.Alram>{props.alramcount}</styles.Alram>
</styles.AlramWrapper>
</styles.TimeAlramWrapper>
</styles.TotalWrapper>
);
};

export default ChatList;
Loading

0 comments on commit 6e7c6e0

Please sign in to comment.