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

merge : 댓글,og 태그,모바일 반응형 구현 #37

Merged
merged 5 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
170 changes: 170 additions & 0 deletions client/package-lock.json

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

2 changes: 2 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"dependencies": {
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@giscus/react": "^3.0.0",
"@mui/icons-material": "^5.15.6",
"@reduxjs/toolkit": "^2.0.1",
"@testing-library/jest-dom": "^5.17.0",
Expand All @@ -16,6 +17,7 @@
"http-proxy-middleware": "^2.0.6",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-helmet-async": "^2.0.4",
"react-hook-form": "^7.49.2",
"react-markdown": "^9.0.1",
"react-query": "^3.39.3",
Expand Down
Binary file added client/public/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 1 addition & 7 deletions client/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,8 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="icon" href="%PUBLIC_URL%/icon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
Expand Down
10 changes: 7 additions & 3 deletions client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@ import { Route, Routes } from "react-router-dom";
import LaindingPage from "./components/views/LandingPage/LandingPage";
import LoginPage from "./components/views/LoginPage/LoginPage";
import RegisterPage from "./components/views/RegisterPage/RegisterPage";
import { ThemeProvider } from "styled-components";
import styled, { ThemeProvider } from "styled-components";
import { dark, light } from "./styles/theme";
import { useSelector } from "react-redux";
import PostPage from "./components/views/PostPage/PostPage";
const Wrapper = styled.div`
background-color: ${(props) => props.theme.bgColor};
color: ${(props) => props.theme.textColor};
`;

function App() {
const isDark = useSelector((state) => state.darkmode.isDark);
const theme = isDark ? dark : light;
return (
<>
<Wrapper>
<ThemeProvider theme={theme}>
<GlobalStyles />
<Routes>
Expand All @@ -22,7 +26,7 @@ function App() {
<Route path="/post/:failename" element={<PostPage />} />
</Routes>
</ThemeProvider>
</>
</Wrapper>
);
}

Expand Down
29 changes: 29 additions & 0 deletions client/src/components/common/Comment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React from "react";
import Giscus from "@giscus/react";
import { useSelector } from "react-redux";

function Comment() {
const isDark = useSelector((state) => state.darkmode.isDark);
const theme = isDark ? "dark" : "light";
return (
<>
<Giscus
id="comments"
repo="sheepdog13/blogcomment"
repoId="R_kgDOLZClrw"
category="Announcements"
categoryId="DIC_kwDOLZClr84CdlHA"
mapping="title"
term="Welcome to @giscus/react component!"
reactionsEnabled="1"
emitMetadata="0"
inputPosition="bottom"
theme={theme}
lang="ko"
loading="lazy"
/>
</>
);
}

export default Comment;
Loading