Skip to content

Commit 6ed6b4b

Browse files
authored
Merge pull request #3 from bbinya1224/ui-change
modify: UI-change
2 parents 6af9b81 + a7d6639 commit 6ed6b4b

File tree

40 files changed

+526
-255
lines changed

40 files changed

+526
-255
lines changed

README.md

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,13 @@
22

33
> https://bbinya1224.github.io/
44
5-
## 주인장의 사담
5+
깃허브로 블로그를 드디어 만들었습니다!
66

7-
미루고 미루던 깃허브로 블로그 만들기를 이제서야 시작해보네요. <br /> UI 디자인은
8-
무엇을 봐도 제 마음에 들지 않아서 [fuwari](https://fuwari.vercel.app/) 템플릿의
9-
디자인을 참고하였습니다.
7+
UI에 있어서 엄청난 수정이 있었어요.
8+
심플함을 좀 더 추구하고, 가독성에 있어서 신경을 쓰고 있습니다.
9+
나름 마음에 드는 UI가 되었어요. 지속적으로 모바일에도 술술 읽히도록 쪼꼼쪼꼼
10+
수정작업이 들어갈것 같아요.
1011

11-
[티스토리](https://bbinya.tistory.com/) 에서
12+
[티스토리](https://bbinya.tistory.com/) 에서
1213
[벨로그](https://velog.io/@subin1224/posts) 그리고 지금 깃허브 블로그로 정착하여
13-
글을 열심히 써볼 예정인데요, <br />벨로그에 있는 글들을 먼저 옮기면서 그동안
14-
공부해 왔던부분(따로 노션에다가 간략히 정리했던..)들을 다듬어서 포스팅하려고
15-
합니다. <br />그러면서 추가하고 싶은 기능들을 하나씩 feat 해볼까합니다.
16-
17-
네이버 블로그를 이용하여 일상글 및 리뷰도 포스팅 하고 있는데 뭔가 느낌이 블로그
18-
덕후가 되어가고 있는것같아요. 😂
19-
20-
## TODO LIST
21-
22-
> 포스팅외에 추가하고 싶은 기능들을 작성 했습니다.
23-
24-
- [x] About Me 작성
25-
- [x] Category 및 Tag 기능 추가
26-
- [x] 댓글 기능
27-
- [x] 시스템 모드에 따라 다크모드/라이트모드 전환
28-
- [x] Skeleton UI 적용하기
29-
- [x] PostList 페이징 처리하기
14+
글을 열심히 써볼 예정입니다!

app/blog/(main)/layout.tsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import type { ReactNode } from "react";
2+
import PostListProvider from "@/app/provider/PostListProvider";
3+
import getAllPosts from "@/entities/post/api/getAllPosts";
4+
import Nav from "@/widgets/header/ui/Nav";
5+
import Sidebar from "@/widgets/sidebar/ui/Sidebar";
6+
7+
const Layout = ({ children }: { children: ReactNode }) => {
8+
const posts = getAllPosts();
9+
10+
return (
11+
<PostListProvider initialPosts={posts}>
12+
<main className="flex flex-col gap-6 lg:flex-row lg:gap-24">
13+
<div className="flex-1">
14+
<Nav />
15+
{children}
16+
</div>
17+
<aside className="w-full shrink-0 border-gray-100 lg:w-[320px] lg:border-l dark:border-gray-800">
18+
<div className="sticky top-20">
19+
<Sidebar />
20+
</div>
21+
</aside>
22+
</main>
23+
</PostListProvider>
24+
);
25+
};
26+
27+
export default Layout;

app/blog/(main)/lists/page.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import CategoryCollection from "@/widgets/category-collection/ui/CategoryCollection";
2+
3+
export default function ListsPage() {
4+
return <CategoryCollection />;
5+
}

app/blog/layout.tsx

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,12 @@
11
import type { ReactNode } from "react";
2-
import PostListProvider from "@/app/provider/PostListProvider";
3-
import getAllPosts from "@/entities/post/api/getAllPosts";
4-
import Footer from "@/widgets/footer/ui/Footer";
52
import Header from "@/widgets/header/ui/Header";
6-
import Sidebar from "@/widgets/sidebar/ui/Sidebar";
73

84
const Layout = ({ children }: { children: ReactNode }) => {
9-
const posts = getAllPosts();
10-
115
return (
12-
<PostListProvider initialPosts={posts}>
13-
<section className="relative mx-auto max-w-[var(--page-width)] pb-8">
14-
<div className="fixed top-0 left-1/2 z-50 w-full max-w-[var(--page-width)] -translate-x-1/2">
15-
<div className="mx-4">
16-
<Header />
17-
</div>
18-
</div>
19-
<main className="mx-4 mt-[7rem] mb-4 flex flex-col-reverse gap-8 lg:flex-row">
20-
<Sidebar />
21-
{children}
22-
</main>
23-
<Footer />
24-
</section>
25-
</PostListProvider>
6+
<section className="relative mx-auto max-w-[var(--page-width)] px-4 pt-16 pb-8 sm:px-8">
7+
<Header />
8+
{children}
9+
</section>
2610
);
2711
};
2812

app/blog/posts/[slug]/page.tsx

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Metadata } from "next";
22
import Script from "next/script";
3+
import getAllPosts from "@/entities/post/api/getAllPosts";
34
import getPostBySlug from "@/entities/post/lib/getPostBySlug";
4-
55
import PostDetail from "@/widgets/post/ui/PostDetail";
66

77
type PageProps = {
@@ -22,13 +22,16 @@ const PostDetailPage = async ({ params }: PageProps) => {
2222
datePublished: post.date,
2323
author: {
2424
"@type": "Person",
25-
name: "삔아",
25+
name: "삔야",
2626
url: "https://bbinya1224.github.io/blog/about-me",
2727
},
2828
publisher: {
2929
"@type": "Person",
30-
name: "삔아",
30+
name: "삔야",
3131
},
32+
image: post.thumbnail
33+
? `https://bbinya1224.github.io${post.thumbnail}`
34+
: undefined,
3235
mainEntityOfPage: {
3336
"@type": "WebPage",
3437
"@id": `https://bbinya1224.github.io/blog/posts/${slug}`,
@@ -42,7 +45,7 @@ const PostDetailPage = async ({ params }: PageProps) => {
4245
type="application/ld+json"
4346
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
4447
/>
45-
<section className="card-base mx-auto h-full w-full max-w-4xl shadow-xl">
48+
<section className="mx-auto h-full w-full max-w-4xl">
4649
<PostDetail post={post} />
4750
</section>
4851
</>
@@ -51,8 +54,6 @@ const PostDetailPage = async ({ params }: PageProps) => {
5154

5255
export default PostDetailPage;
5356

54-
import getAllPosts from "@/entities/post/api/getAllPosts";
55-
5657
export const generateStaticParams = () => {
5758
const posts = getAllPosts();
5859
return posts.map((post) => ({ slug: post.slug }));
@@ -77,16 +78,24 @@ export async function generateMetadata({
7778
title: post.title,
7879
description: post.description || post.title,
7980
keywords: post.tag || [],
80-
authors: [{ name: "삔아" }],
81+
authors: [{ name: "삔야" }],
8182
openGraph: {
8283
title: post.title,
8384
description: post.description || post.title,
8485
url,
85-
siteName: "삔아's Blog",
86+
siteName: "삔야's Blog",
8687
type: "article",
8788
publishedTime: post.date,
88-
authors: ["삔아"],
89+
authors: ["삔야"],
8990
locale: "ko_KR",
91+
images: post.thumbnail
92+
? [
93+
{
94+
url: post.thumbnail,
95+
alt: post.title,
96+
},
97+
]
98+
: undefined,
9099
},
91100
alternates: {
92101
canonical: url,

app/layout.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Provider as JotaiProvider } from "jotai";
44
import type { Metadata } from "next";
55
import { ThemeProvider } from "next-themes";
66
import type { ReactNode } from "react";
7+
import NextTopLoader from "nextjs-toploader";
78

89
const RootLayout = ({ children }: { children: ReactNode }) => {
910
return (
@@ -17,6 +18,7 @@ const RootLayout = ({ children }: { children: ReactNode }) => {
1718
</head>
1819

1920
<body>
21+
<NextTopLoader showSpinner={false} color="#fbbf24" />
2022
<JotaiProvider>
2123
<ThemeProvider attribute="class" enableSystem>
2224
{children}
@@ -30,15 +32,15 @@ const RootLayout = ({ children }: { children: ReactNode }) => {
3032
export const metadata: Metadata = {
3133
metadataBase: new URL("https://bbinya1224.github.io"),
3234
title: {
33-
default: "삔아's Blog",
34-
template: "%s | 삔아's Blog",
35+
default: "삔야's Blog",
36+
template: "%s | 삔야's Blog",
3537
},
36-
description: "프론트엔드 개발자 삔아 기술 블로그",
38+
description: "프론트엔드 개발자 삔야 기술 블로그",
3739
openGraph: {
3840
type: "website",
3941
locale: "ko_KR",
4042
url: "https://bbinya1224.github.io",
41-
siteName: "삔아's Blog",
43+
siteName: "삔야's Blog",
4244
},
4345
robots: {
4446
index: true,

package-lock.json

Lines changed: 63 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@
3636
"next-mdx-remote": "^5.0.0",
3737
"next-sitemap": "^4.2.3",
3838
"next-themes": "^0.4.6",
39+
"nextjs-toploader": "^3.9.17",
3940
"npm": "^11.6.2",
4041
"react": "^19.2.3",
4142
"react-dom": "^19.2.3",
43+
"react-intersection-observer": "^10.0.0",
4244
"react-loading-skeleton": "^3.5.0",
4345
"rehype-pretty-code": "^0.14.1",
4446
"remark": "^15.0.1",

0 commit comments

Comments
 (0)