File tree Expand file tree Collapse file tree 4 files changed +27
-30
lines changed Expand file tree Collapse file tree 4 files changed +27
-30
lines changed Original file line number Diff line number Diff line change 1
- import Link from 'next/link' ;
2
1
import btnStyles from '@/styles/ButtonLink.module.scss' ;
3
2
3
+ /* The component supports the use of target with the property "openNewTab" to open the
4
+ link in a new tab.*/
5
+
4
6
export default function ButtonLink ( {
5
7
customClassName,
6
8
link,
7
9
children,
8
10
styles,
11
+ openNewTab,
9
12
} ) {
10
13
return (
11
- < Link href = { link } >
12
- < a
13
- className = { `${ btnStyles . btn } ${ btnStyles [ customClassName ] } ` }
14
- style = { styles }
15
- >
16
- { children }
17
- </ a >
18
- </ Link >
14
+ < a
15
+ href = { link }
16
+ className = { `${ btnStyles . btn } ${ btnStyles [ customClassName ] } ` }
17
+ style = { styles }
18
+ target = { openNewTab ? '_blank' : undefined }
19
+ rel = 'noopener noreferrer'
20
+ >
21
+ { children }
22
+ </ a >
19
23
) ;
20
24
}
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ export default function TwoColumn({
15
15
customInnerClass,
16
16
customBtnClass,
17
17
linkText = 'Learn more' ,
18
- secondTextColumn
18
+ secondTextColumn,
19
+ openNewTab,
19
20
} ) {
20
21
// Add rowOrder="row-reverse" prop to the component to reverse its order on desktop
21
22
@@ -44,7 +45,11 @@ export default function TwoColumn({
44
45
) }
45
46
< div className = { styles . content } > { content } </ div >
46
47
{ link && (
47
- < ButtonLink link = { link } customClassName = { customBtnClass } >
48
+ < ButtonLink
49
+ link = { link }
50
+ customClassName = { customBtnClass }
51
+ openNewTab = { openNewTab }
52
+ >
48
53
{ linkText }
49
54
</ ButtonLink >
50
55
) }
@@ -57,7 +62,6 @@ export default function TwoColumn({
57
62
alt = { altTag }
58
63
className = { styles . img }
59
64
layout = 'fill'
60
- priority
61
65
/>
62
66
</ div >
63
67
) }
Original file line number Diff line number Diff line change @@ -136,46 +136,36 @@ export default function AboutUs() {
136
136
< TwoColumn
137
137
title = 'Wanna learn more?'
138
138
content = { '' }
139
- rowOrder = 'row'
140
139
image = '/images/svg/close-curly-bracket.svg'
141
140
color = { primary }
142
141
bgColor = { lightBgColor }
143
142
customInnerClass = 'wanna-learn-more'
144
143
/>
145
144
< TwoColumn
146
- title = {
147
- < div >
148
- Junior < br /> Developers
149
- </ div >
150
- }
145
+ title = { < div > Junior Developers</ div > }
151
146
content = {
152
147
'If you are a junior web developer looking for some guidance and mentoring, ' +
153
148
'we invite you to join us and start coding our platform. ' +
154
149
"You will learn how to code in a team environment by following issue's " +
155
150
'instructions and submitting your code to our repository through a ' +
156
151
'PR while guided throughout the entire process.\n'
157
152
}
158
- rowOrder = 'row'
159
153
linkText = 'Our wiki'
154
+ openNewTab
160
155
link = 'https://github.com/Web-Dev-Path/web-dev-path/wiki'
161
156
customBtnClass = 'inverted-grey'
162
157
color = { primary }
163
158
bgColor = { lightBgColor }
164
159
customInnerClass = 'two-text-columns'
165
160
secondTextColumn = {
166
161
< TwoColumn
167
- title = {
168
- < div >
169
- Experienced < br /> Developers
170
- </ div >
171
- }
162
+ title = { < div > Experienced Developers</ div > }
172
163
content = {
173
164
'If you are an experienced and patient-loving developer, ' +
174
165
'a true rockstar who wants to mentor juniors, ' +
175
166
"it will be wonderful to have your help to review those PR's, " +
176
167
'write detailed issues and guide the developers when necessary.\n'
177
168
}
178
- rowOrder = 'row'
179
169
linkText = 'Contact us'
180
170
link = '/contact'
181
171
customBtnClass = 'inverted-grey'
Original file line number Diff line number Diff line change 122
122
margin : 0 ;
123
123
}
124
124
125
- .inner__content {
125
+ .inner__content {
126
126
flex-basis : 70% ;
127
127
}
128
128
141
141
}
142
142
143
143
& .two-text-columns {
144
- justify-content : center ;
145
- gap : 170px ;
144
+ justify-content : space-evenly ;
146
145
147
146
.inner {
148
147
padding : 0px ;
160
159
line-height : 2.5rem ;
161
160
}
162
161
163
- .inner {
162
+ .inner {
164
163
margin : 0px ;
165
164
padding : 0px ;
166
165
}
169
168
flex-basis : unset ;
170
169
171
170
@include desktop {
172
- width : 400 px ;
171
+ width : 25 rem ;
173
172
}
174
173
}
175
174
You can’t perform that action at this time.
0 commit comments