File tree 6 files changed +85
-7
lines changed
6 files changed +85
-7
lines changed Original file line number Diff line number Diff line change
1
+ import { PropsWithChildren } from 'react'
2
+ import styled from 'styled-components'
3
+
4
+ import MaxWidthWrapper from 'components/max-width-wrapper'
5
+ import Spacer from 'components/spacer'
6
+
7
+ const Wrapper = styled . div `
8
+ h1 {
9
+ margin: 2rem 0 1rem;
10
+ font-size: 1.875rem;
11
+ }
12
+
13
+ h2 {
14
+ margin: 1rem 0;
15
+ font-size: 1.5rem;
16
+ }
17
+ `
18
+
19
+ export type ContentProps = PropsWithChildren < { } >
20
+
21
+ const Content = ( { children } : ContentProps ) => (
22
+ < Wrapper >
23
+ < Spacer size = "6.75rem" />
24
+
25
+ < MaxWidthWrapper > { children } </ MaxWidthWrapper >
26
+ </ Wrapper >
27
+ )
28
+
29
+ export default Content
Original file line number Diff line number Diff line change
1
+ import useTranslation from 'next-translate/useTranslation'
2
+ import Link from 'next/link'
3
+ import { useRouter } from 'next/router'
1
4
import styled from 'styled-components'
2
5
3
6
import MaxWidthWrapper from 'components/max-width-wrapper'
4
7
5
8
const Wrapper = styled . div `
6
9
padding: 2rem 0;
7
10
font-size: 0.875rem;
11
+
12
+ & > ${ MaxWidthWrapper } {
13
+ display: flex;
14
+ flex-wrap: wrap;
15
+ gap: 1.5rem;
16
+ }
17
+ `
18
+
19
+ const Copyright = styled . div `
20
+ flex: 1;
8
21
opacity: 0.8;
9
22
`
10
23
11
- const Footer = ( ) => (
12
- < Wrapper >
13
- < MaxWidthWrapper > © 2021-{ new Date ( ) . getFullYear ( ) } LinearMouse</ MaxWidthWrapper >
14
- </ Wrapper >
15
- )
24
+ const Links = styled . ol `
25
+ display: flex;
26
+ gap: 1rem;
27
+
28
+ &,
29
+ li {
30
+ margin: 0;
31
+ padding: 0;
32
+ }
33
+
34
+ a {
35
+ color: var(--color-text);
36
+ text-decoration: none;
37
+ font-weight: 500;
38
+ }
39
+ `
40
+
41
+ const Footer = ( ) => {
42
+ const { t } = useTranslation ( 'common' )
43
+
44
+ return (
45
+ < Wrapper >
46
+ < MaxWidthWrapper >
47
+ < Copyright > © 2021-{ new Date ( ) . getFullYear ( ) } LinearMouse</ Copyright >
48
+
49
+ < Links >
50
+ < a href = "https://crowdin.com/profile/lujjjh" target = "_blank" rel = "noreferrer noopener" >
51
+ { t ( 'footer.help_translate' ) }
52
+ </ a >
53
+ </ Links >
54
+ </ MaxWidthWrapper >
55
+ </ Wrapper >
56
+ )
57
+ }
16
58
17
59
export default Footer
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ const LanguageSelect = () => {
69
69
< span > { t ( 'navigation.language' ) } </ span >
70
70
< menu >
71
71
{ Object . entries ( localesToShow ) . map ( ( [ locale , language ] ) => (
72
- < Link key = { locale } href = "/ " locale = { locale } >
72
+ < Link key = { locale } href = "" locale = { locale } >
73
73
< a onClick = { ( ) => persistLocale ( locale ) } > { language } </ a >
74
74
</ Link >
75
75
) ) }
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ module.exports = {
34
34
] ,
35
35
pages : {
36
36
'*' : [ 'common' ] ,
37
- '/' : [ 'index' ]
37
+ '/' : [ 'index' ] ,
38
+ '/contributing' : [ 'contributing' ]
38
39
}
39
40
}
Original file line number Diff line number Diff line change 3
3
"github" : " GitHub" ,
4
4
"discussions" : " Discussions" ,
5
5
"language" : " Language"
6
+ },
7
+ "footer" : {
8
+ "help_translate" : " Help translate"
6
9
}
7
10
}
Original file line number Diff line number Diff line change
1
+ {
2
+ "title" : " Contributing | LinearMouse"
3
+ }
You can’t perform that action at this time.
0 commit comments