Skip to content

Commit f1d60b9

Browse files
Merge pull request #45 from ShipFriend0516/feature/lightmode
[Feature] Footer 다크모드 지원
2 parents 69823bd + 6da71c5 commit f1d60b9

File tree

5 files changed

+34
-24
lines changed

5 files changed

+34
-24
lines changed

app/entities/common/Footer.tsx

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
1+
'use client';
12
import Link from 'next/link';
3+
import useToast from '@/app/hooks/useToast';
24

35
const Footer = () => {
6+
const toast = useToast();
7+
48
return (
59
<footer
6-
className={'w-screen bg-gray-950 min-h-96 flex flex-col justify-between'}
10+
className={
11+
'w-screen bg-neutral-200 dark:bg-gray-950 min-h-96 flex flex-col justify-between'
12+
}
713
>
814
<section
915
className={'footer w-full flex flex-col md:flex-row justify-center'}
1016
>
1117
<div className={'footer-col'}>
1218
<b>BLOG</b>
13-
<div>
14-
<p
15-
className={
16-
'text-left text-gray-100 font-serif whitespace-pre-wrap'
17-
}
18-
>
19+
<div className={'text-weak'}>
20+
<p className={'text-left font-serif whitespace-pre-wrap'}>
1921
a developer who never stops growing.
2022
</p>
21-
<p
22-
className={
23-
'text-left text-gray-100 font-serif whitespace-pre-wrap'
24-
}
25-
>
23+
<p className={'text-left font-serif whitespace-pre-wrap'}>
2624
성장을 멈추지 않는 개발자.
2725
</p>
2826
</div>
@@ -48,7 +46,7 @@ const Footer = () => {
4846
<div className={'footer-col'}>
4947
<b>Subscribe</b>
5048
<form className={'flex flex-col gap-4'}>
51-
<p className={'text-gray-300'}>새 글을 구독해보세요</p>
49+
<p className={'text-default'}>새 글을 구독해보세요</p>
5250
<input
5351
className={
5452
'border-b bg-transparent px-4 py-1.5 inset-3 outline-black'
@@ -63,9 +61,13 @@ const Footer = () => {
6361
/>
6462
<button
6563
className={
66-
'rounded-md border bg-transparent py-3 w-1/2 shadow-lg hover:bg-white hover:text-black transition'
64+
'rounded-md border bg-transparent py-3 w-1/2 border-black hover:shadow-lg hover:bg-white hover:text-black transition'
6765
}
6866
aria-label={'구독 버튼'}
67+
onClick={(e) => {
68+
e.preventDefault();
69+
toast.error('새 글 구독은 아직 지원하지 않는 기능입니다.');
70+
}}
6971
>
7072
Subscribe
7173
</button>

app/globals.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
--text-default: #000000;
1212
--text-overlay: #FFFFFF;
1313
--bg-overlay: #1e201e;
14+
--text-weak: #474b4e;
1415
}
1516
.dark {
1617
--background: #1e201e;
@@ -19,6 +20,7 @@
1920
--text-default: #FFFFFF;
2021
--text-overlay: #000000;
2122
--bg-overlay: #ededed;
23+
--text-weak: rgba(255, 255, 255, 0.7);
2224
}
2325

2426

@@ -118,6 +120,11 @@ section.footer > div.footer-col b {
118120
font-weight: bold;
119121
}
120122

123+
section.footer input {
124+
background-color: white;
125+
border-radius: 4px;
126+
}
127+
121128
section.footer a:hover {
122129
border-bottom: 1px solid white;
123130
}

app/page.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ export default function Home() {
2424
getPosts();
2525
}, []);
2626

27+
const linkedinLink =
28+
'https://www.linkedin.com/in/%EC%A0%95%EC%9A%B0-%EC%84%9C-9a0b79312/';
29+
const githubLink = 'https://github.com/ShipFriend0516';
30+
2731
return (
2832
<main className="w-full max-w-4xl mx-auto grid gap-16 p-8">
2933
{/* Hero Section */}
@@ -66,16 +70,11 @@ export default function Home() {
6670
학습과 성장을 추구합니다.
6771
</p>
6872
<div className="flex gap-4">
69-
<a href={'https://github.com/ShipFriend0516'} target={'_blank'}>
70-
<FaGithub className="w-5 h-5 text-default hover:text-gray-100 hover:scale-125 transition cursor-pointer" />
73+
<a href={githubLink} target={'_blank'}>
74+
<FaGithub className="w-5 h-5 text-default hover:scale-125 transition cursor-pointer" />
7175
</a>
72-
<a
73-
href={
74-
'https://www.linkedin.com/in/%EC%A0%95%EC%9A%B0-%EC%84%9C-9a0b79312/'
75-
}
76-
target={'_blank'}
77-
>
78-
<FaLinkedin className="w-5 h-5 text-default hover:text-gray-100 hover:scale-125 transition cursor-pointer" />
76+
<a href={linkedinLink} target={'_blank'}>
77+
<FaLinkedin className="w-5 h-5 text-default hover:scale-125 transition cursor-pointer" />
7978
</a>
8079
</div>
8180
</div>

app/series/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const SeriesListPage = () => {
3232
}
3333

3434
return (
35-
<section className={'w-full p-10'}>
35+
<section className={'w-full p-10 max-w-5xl mx-auto'}>
3636
<h1 className={'text-4xl font-bold mt-4'}>시리즈</h1>
3737
<p className={'text-lg mb-4'}>시리즈별로 글을 확인해보세요.</p>
3838
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">

tailwind.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ const config: Config = {
66
'./components/**/*.{js,ts,jsx,tsx,mdx}',
77
'./app/**/*.{js,ts,jsx,tsx,mdx}',
88
],
9+
darkMode: 'class',
910
theme: {
1011
extend: {
1112
colors: {
1213
default: 'var(--text-default)',
1314
background: 'var(--background)',
1415
foreground: 'var(--foreground)',
1516
overlay: 'var(--bg-overlay)',
17+
weak: 'var(--text-weak)',
1618
},
1719
textColor: {
1820
overlay: 'var(--text-overlay)',

0 commit comments

Comments
 (0)