Skip to content

Commit

Permalink
Merge pull request #121 from cau-likelion-org/refactor/#120
Browse files Browse the repository at this point in the history
[REFACTOR] 검색 페이지 코드 리팩터링
  • Loading branch information
rbgksqkr authored Jun 19, 2024
2 parents bb1bcec + 2ff5eea commit 10fadf5
Show file tree
Hide file tree
Showing 46 changed files with 1,079 additions and 975 deletions.
94 changes: 2 additions & 92 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"react-icons": "^4.12.0",
"react-markdown": "^9.0.1",
"react-markdown-editor-lite": "^1.3.4",
"react-query": "^3.39.3",
"react-quill": "^2.0.0",
"react-responsive": "^9.0.2",
"react-select": "^5.8.0",
Expand Down
1 change: 1 addition & 0 deletions src/apis/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const getSearchResult = async (keyword: string): Promise<ISearchResult |
};
return searchResultList;
}

return { kind: 'searchResult', data };
};

Expand Down
4 changes: 1 addition & 3 deletions src/apis/history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ const baseURL = process.env.NEXT_PUBLIC_SERVER_URL;

// 특정 문서의 전체 편집 목록 불러오기
export const getDocHistories = async (title: string) => {
console.log(title);
try {
const response = await axios.get(`${baseURL}history/${title}/`);
return response.data;
} catch (error) {
console.log(error);
return false;
console.error(error);
}
};
116 changes: 60 additions & 56 deletions src/app/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,28 @@
font-weight: normal;
font-style: normal;
}

@font-face {
font-family: 'Pretendard';
src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/[email protected]/Pretendard-Light.woff') format('woff');
font-weight: 300;
font-style: normal;
}

@font-face {
font-family: 'Pretendard';
src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/[email protected]/Pretendard-Regular.woff') format('woff');
font-weight: 400;
font-style: normal;
}

@font-face {
font-family: 'Pretendard';
src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/[email protected]/Pretendard-SemiBold.woff') format('woff');
font-weight: 600;
font-style: normal;
}

@font-face {
font-family: 'Pretendard';
src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/[email protected]/Pretendard-Bold.woff') format('woff');
Expand All @@ -30,75 +34,75 @@
}

html {
-webkit-text-size-adjust: none;
width: 100%;
height: 100%;
margin: 0;
font-size: 62.5%;
overflow: scroll;
scroll-snap-type: y mandatory;
scroll-padding-top: 65px;
scrollbar-width: none;
-ms-overflow-style: none;
display: flex;
justify-content: center;
background: #4c4df5;
background-image: linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
background-size:
100px 100px,
100px 100px;
background-position:
-1px -1px,
-1px -1px;
-webkit-text-size-adjust: none;
width: 100%;
height: 100%;
margin: 0;
font-size: 62.5%;
overflow: scroll;
scroll-snap-type: y mandatory;
scroll-padding-top: 65px;
scrollbar-width: none;
-ms-overflow-style: none;
display: flex;
justify-content: center;
background: #4c4df5;
background-image: linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
background-size:
100px 100px,
100px 100px;
background-position:
-1px -1px,
-1px -1px;
}

html::-webkit-scrollbar {
display: none;
display: none;
}

body {
width: 100%;
height: fit-content;
/* 화면 스크롤 방지를 위해 최소높이 지정 */
min-height: 100%;
margin: 0;
padding: 0;
/* 드래그 방지 */
/* -webkit-user-select: none;
width: 100%;
height: fit-content;
/* 화면 스크롤 방지를 위해 최소높이 지정 */
min-height: 100%;
margin: 0;
padding: 0;
/* 드래그 방지 */
/* -webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none; */
}
}

@media (min-width:0px) {
html {
font-size: 8px;
}
@media (min-width:0px) {
html {
font-size: 8px;
}
}

/* 타블렛) 화면 너비: 576 ~ */
@media (min-width:576px) {
html {
font-size: 10px;
}
/* 타블렛) 화면 너비: 768 ~ */
@media (min-width: 768px) {
html {
font-size: 10px;
}
}

/* 데스크톱) 화면 너비: 1024 ~ */
@media (min-width: 1024px) {
html {
font-size: 10px;
}
/* 데스크톱) 화면 너비: 1024 ~ */
@media (min-width: 1024px) {
html {
font-size: 10px;
}
}

img {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
-webkit-user-drag: none;
-khtml-user-drag: none;
-moz-user-drag: none;
-o-user-drag: none;
}
img {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
-webkit-user-drag: none;
-khtml-user-drag: none;
-moz-user-drag: none;
-o-user-drag: none;
}
4 changes: 1 addition & 3 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ export const metadata: Metadata = {
authors: [{ name: '중하하 2기' }],
creator: '중하하 2기',
publisher: '중하하 2기',
icons: {
icon: '/img/icon.png',
},
keywords: ['중앙대학교', '멋쟁이 사자처럼', '멋사', '멋사 위키', '중앙대학교 멋사'],
openGraph: {
title: '멋사 중앙대 위키',
Expand All @@ -33,6 +30,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
<html>
<head>
<link rel="manifest" href="/manifest.json" />
<link rel="icon" href="/img/icon.png" type="image/png" sizes="32x32" />
</head>
<body>
<RecoidContextProvider>
Expand Down
Loading

0 comments on commit 10fadf5

Please sign in to comment.