File tree Expand file tree Collapse file tree 2 files changed +96
-12
lines changed Expand file tree Collapse file tree 2 files changed +96
-12
lines changed Original file line number Diff line number Diff line change @@ -12,17 +12,47 @@ const Container = styled.div<{ $isMain: boolean }>`
12
12
header {
13
13
padding: 16px 0 24px;
14
14
color: gray;
15
- font-weight: 700;
16
15
17
- h1,
18
- a {
19
- margin: 0;
20
- }
16
+ ${ Inner } > div {
17
+ display: flex;
18
+ align-items: center;
19
+ justify-content: space-between;
20
+
21
+ h1,
22
+ a {
23
+ margin: 0;
24
+ }
25
+
26
+ a {
27
+ color: #333333;
28
+ text-decoration: none;
29
+ }
30
+
31
+ h1 > a {
32
+ font-weight: 700;
33
+ font-size: ${ ( { $isMain } ) => ( $isMain ? '32px' : '18px' ) } ;
34
+ }
21
35
22
- a {
23
- font-size: ${ ( { $isMain } ) => ( $isMain ? '32px' : '18px' ) } ;
24
- color: #333333;
25
- text-decoration: none;
36
+ nav {
37
+ ul {
38
+ all: unset;
39
+ display: flex;
40
+ gap: 12px;
41
+
42
+ li {
43
+ all: unset;
44
+ font-size: 1.125rem;
45
+
46
+ @media (max-width: 680px) {
47
+ font-size: 1.5rem;
48
+ }
49
+
50
+ &.selected {
51
+ font-weight: 700;
52
+ }
53
+ }
54
+ }
55
+ }
26
56
}
27
57
28
58
@media (max-width: 680px) {
@@ -35,16 +65,30 @@ const Container = styled.div<{ $isMain: boolean }>`
35
65
}
36
66
` ;
37
67
68
+ const isBrowser = typeof window !== 'undefined' ;
69
+
38
70
function Layout ( { pageTitle, children } : { pageTitle ?: string ; children : ReactNode } ) {
39
71
return (
40
72
< Container $isMain = { ! pageTitle } >
41
73
< GlobalStyle />
42
74
< title > { pageTitle } </ title >
43
75
< header >
44
76
< Inner >
45
- < h1 >
46
- < Link to = '/' > pyjun01</ Link >
47
- </ h1 >
77
+ < div >
78
+ < h1 >
79
+ < Link to = '/' > pyjun01</ Link >
80
+ </ h1 >
81
+ < nav >
82
+ < ul >
83
+ < li className = { isBrowser && window . location . pathname === '/' ? 'selected' : undefined } >
84
+ < Link to = '/' > Home</ Link >
85
+ </ li >
86
+ < li className = { isBrowser && window . location . pathname === '/about/' ? 'selected' : undefined } >
87
+ < Link to = '/about' > About</ Link >
88
+ </ li >
89
+ </ ul >
90
+ </ nav >
91
+ </ div >
48
92
</ Inner >
49
93
</ header >
50
94
< main >
Original file line number Diff line number Diff line change
1
+ import { Helmet } from 'react-helmet' ;
2
+
3
+ import { usePostList } from '../hooks/post' ;
4
+ import Layout from '../components/layout' ;
5
+ import List from '../components/List' ;
6
+
7
+ function IndexPage ( ) {
8
+ const data = usePostList ( ) ;
9
+
10
+ return (
11
+ < Layout >
12
+ < Helmet
13
+ htmlAttributes = { {
14
+ dir : 'ltr' ,
15
+ lang : 'ko' ,
16
+ } }
17
+ title = '개발자 박용준'
18
+ >
19
+ < meta property = 'og:title' content = '개발자 박용준' />
20
+ < meta property = 'og:url' content = 'https://pyjun01.github.io/about' />
21
+ < meta name = 'description' content = 'About' />
22
+ </ Helmet >
23
+ < div >
24
+ < a href = 'https://www.facebook.com/profile.php?id=100007085719197' target = '_blank' >
25
+ < img src = 'https://img.shields.io/badge/facebook-1877f2?style=flat-square& logo = facebook & logoColor = white ' />
26
+ </ a >
27
+ < a href = 'https://github.com/pyjun01' target = '_blank' >
28
+ < img src = 'https://img.shields.io/badge/GitHub-181717?style=flat-square& logo = GitHub & logoColor = white ' />
29
+ </ a >
30
+ < a href = 'https://www.linkedin.com/in/pyjun01/' target = '_blank' >
31
+ < img src = 'https://img.shields.io/badge/LinkedIn-0077B5?style=flat-square& logo = linkedin & logoColor = white ' />
32
+ </ a >
33
+ < img src = 'https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fpyjun01.github.io/about& count_bg = % 2379 C83D & title_bg = % 23555555 & icon = & icon_color = % 23E7 E7E7 & title = hits & edge_flat = false ' />
34
+ </ div >
35
+ 준비중...
36
+ </ Layout >
37
+ ) ;
38
+ }
39
+
40
+ export default IndexPage ;
You can’t perform that action at this time.
0 commit comments