File tree Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 34
34
</ div >
35
35
</ div >
36
36
< div class ="sign-in-btn ">
37
- < a
38
- href ="https://github.com/login/oauth/authorize?client_id=23c78f66ab7964e5ef97 "
39
- > Sign In < span > With GitHub</ span >
37
+ < button onclick ="goToAuthPage() ">
38
+ Sign In < span > With GitHub</ span >
40
39
< img src ="images/github.png " class ="user-avatar " />
41
- </ a >
40
+ </ button >
42
41
</ div >
43
42
< div class ="user-info ">
44
43
< span id ="user-name "> </ span >
Original file line number Diff line number Diff line change @@ -81,21 +81,23 @@ img {
81
81
order : 3 ;
82
82
}
83
83
84
- .sign-in-btn a {
84
+ .sign-in-btn button {
85
85
position : absolute;
86
86
right : 10px ;
87
87
margin : 10px ;
88
88
height : 30px ;
89
+ width : fit-content;
89
90
padding : 5px ;
90
91
background-color : var (--blue-color );
91
92
color : var (--white-color );
92
93
cursor : pointer;
93
94
border : 2px solid var (--white-color );
94
95
border-radius : 6px ;
95
96
text-decoration : none;
97
+ font-size : 16px ;
96
98
}
97
99
98
- .sign-in-btn a img {
100
+ .sign-in-btn button img {
99
101
height : 15px ;
100
102
width : 15px ;
101
103
position : relative;
@@ -465,7 +467,7 @@ footer {
465
467
justify-content : space-between;
466
468
}
467
469
468
- .sign-in-btn a {
470
+ .sign-in-btn button {
469
471
position : static;
470
472
}
471
473
Original file line number Diff line number Diff line change
1
+ function goToAuthPage ( ) {
2
+ const authUrl = `https://github.com/login/oauth/authorize?client_id=23c78f66ab7964e5ef97&}&state=${ window . location . href } ` ;
3
+
4
+ window . open ( authUrl , '_self' ) ;
5
+ }
6
+
1
7
async function getSelfUser ( endpoint = '/users/self' ) {
2
8
try {
3
9
const res = await fetch ( `${ API_BASE_URL } ${ endpoint } ` , {
You can’t perform that action at this time.
0 commit comments