File tree Expand file tree Collapse file tree 14 files changed +148
-13
lines changed Expand file tree Collapse file tree 14 files changed +148
-13
lines changed Original file line number Diff line number Diff line change 5
5
// max-width: 1200px;
6
6
// margin: 0 auto;
7
7
}
8
+ .mainWrap {
9
+ @media (min-width : 768px ) {
10
+ display : flex ;
11
+ flex-direction : column ;
12
+ min-height : 100vh ;
13
+ }
14
+ }
Original file line number Diff line number Diff line change @@ -11,11 +11,13 @@ const Layout: React.FC<AppProps> = ({ children }) => {
11
11
const [ searchVisible , setSearchVisible ] = useState < boolean > ( false ) ;
12
12
return (
13
13
< >
14
- < Header setSearchVisible = { setSearchVisible } />
15
- < main className = { styles . main } > { children } </ main >
14
+ < div className = { styles . mainWrap } >
15
+ < Header setSearchVisible = { setSearchVisible } />
16
+ < main className = { styles . main } > { children } </ main >
17
+ < Footer />
18
+ </ div >
16
19
< Back />
17
20
< Search visible = { searchVisible } setVisible = { setSearchVisible } />
18
- < Footer />
19
21
</ >
20
22
) ;
21
23
} ;
Original file line number Diff line number Diff line change 1
1
.archivesWrap {
2
2
max-width : 1170px ;
3
- width : 100% ;
4
3
padding-right : 16px ;
5
4
padding-left : 16px ;
6
5
margin-right : auto ;
Original file line number Diff line number Diff line change @@ -20,6 +20,22 @@ const Archives: React.FC = () => {
20
20
</ h2 >
21
21
</ div >
22
22
</ article >
23
+ < article className = { styles . post } >
24
+ < div className = { styles . inner } >
25
+ < div className = { styles . date } > 2021/8/7</ div >
26
+ < h2 >
27
+ < a > Autumn is a second spring when every leaf is a flower</ a >
28
+ </ h2 >
29
+ </ div >
30
+ </ article >
31
+ < article className = { styles . post } >
32
+ < div className = { styles . inner } >
33
+ < div className = { styles . date } > 2021/8/7</ div >
34
+ < h2 >
35
+ < a > Autumn is a second spring when every leaf is a flower</ a >
36
+ </ h2 >
37
+ </ div >
38
+ </ article >
23
39
</ li >
24
40
</ ul >
25
41
</ div >
Original file line number Diff line number Diff line change
1
+ .container {
2
+ max-width : 1170px ;
3
+ padding-right : 16px ;
4
+ padding-left : 16px ;
5
+ margin-right : auto ;
6
+ margin-left : auto ;
7
+ }
8
+ .innerWrap {
9
+ max-width : 700px ;
10
+ margin-left : auto ;
11
+ margin-right : auto ;
12
+ }
13
+ .postInfo {
14
+ text-transform : uppercase ;
15
+ font-size : 0.875rem ;
16
+ color : #a1a6b1 ;
17
+ color : var (--text-color-light );
18
+ margin-bottom : 1rem ;
19
+ }
20
+
21
+ span {
22
+ margin-right : 6px ;
23
+ margin-bottom : 8px ;
24
+ display : inline-flex ;
25
+ align-items : baseline ;
26
+ }
27
+ .tag {
28
+ border : 1px solid #e8e9eb ;
29
+ border : 1px solid var (--border-color );
30
+ padding : 1px 6px ;
31
+ border-radius : 3px ;
32
+ font-size : 0.75rem ;
33
+ }
34
+ .tags {
35
+ & ::after {
36
+ content : ' /' ;
37
+ margin-left : 8px ;
38
+ }
39
+ }
40
+ .date {
41
+ & ::after {
42
+ content : ' /' ;
43
+ margin-left : 8px ;
44
+ }
45
+ }
46
+ .title {
47
+ margin-top : 0 ;
48
+ margin-bottom : 1.5rem ;
49
+ h1 {
50
+ color : #1a202b ;
51
+ color : var (--text-color-dark );
52
+ font-weight : 400 ;
53
+ line-height : 1.3 ;
54
+ margin-bottom : 1rem ;
55
+ }
56
+ }
Original file line number Diff line number Diff line change
1
+ import React from 'react' ;
2
+ import styles from './index.less' ;
3
+ const Details = ( ) => {
4
+ return (
5
+ < div className = { styles . main } >
6
+ < div className = { styles . container } >
7
+ < div className = { styles . innerWrap } >
8
+ < div >
9
+ < div className = { styles . title } >
10
+ < h1 > 标题sad撒按时</ h1 >
11
+ </ div >
12
+ < div className = { styles . postInfo } >
13
+ < span className = { styles . tags } > React</ span >
14
+ < span className = { styles . date } > 2019-2-2</ span >
15
+ < span className = { styles . viewer } > 2000</ span >
16
+ < span className = { styles . tag } > sddsdsd</ span >
17
+ </ div >
18
+ < article >
19
+ < p >
20
+ 在 nodejs
21
+ 中,之前一直推荐的是url.parse方法来解析参数,不过这个方法已经不推荐了,现在推荐的是
22
+ WHATWG 网址的 API。
23
+ </ p >
24
+ < p >
25
+ 因为网上找到的都还是之前的方法,这里特此记录下,在 nodejs 中,如何使用 URL 类 或
26
+ URLSearchParams 类来获取请求的参数。
27
+ </ p >
28
+ </ article >
29
+ </ div >
30
+ </ div >
31
+ </ div >
32
+ </ div >
33
+ ) ;
34
+ } ;
35
+
36
+ export default Details ;
Original file line number Diff line number Diff line change 1
1
.container {
2
2
padding-top : 20px ;
3
3
max-width : 1170px ;
4
- width : 100% ;
5
4
padding-right : 16px ;
6
5
display : flex ;
7
6
flex-direction : row ;
Original file line number Diff line number Diff line change @@ -84,7 +84,18 @@ const Home: React.FC = () => {
84
84
) ;
85
85
} ) }
86
86
</ ul >
87
- < div className = { styles . right } > 个人中心</ div >
87
+ < div className = { styles . right } >
88
+ < p > 关于我</ p >
89
+ Saima is a Ghost theme with high focus on typography and reading experience. It's sleek
90
+ and clutter free UI design will encourage your visitors to stay and read on your site
91
+ longer. This theme is perfect for a personal and professional blog. Also this theme can be
92
+ used in any collaborative and multi author blog. For example travel blog, technology blog,
93
+ lifestyle blog, health blog etc. This theme comes with light and dark mode you can set
94
+ default color mode to dark or light. Also your visitor can choose their preferred mode. Do
95
+ you write programming / coding related article or tutorial? this theme already comes with
96
+ code syntax highlighter. It also let your user copy by a single click of a button. are not
97
+ all these features amazing?
98
+ </ div >
88
99
</ div >
89
100
</ section >
90
101
) ;
Original file line number Diff line number Diff line change 1
1
.tagsWrap {
2
2
max-width : 1170px ;
3
- width : 100% ;
4
3
padding-right : 16px ;
5
4
padding-left : 16px ;
6
5
margin-right : auto ;
Original file line number Diff line number Diff line change 4
4
width : 100% ;
5
5
.container {
6
6
max-width : 1170px ;
7
- width : 100% ;
8
7
padding-right : 16px ;
9
8
padding-left : 16px ;
10
9
margin-right : auto ;
You can’t perform that action at this time.
0 commit comments