1616 < h2 class ="title "> Sign in</ h2 >
1717 < div class ="input-field ">
1818 < i class ="fas fa-user "> </ i >
19- < input type ="text " placeholder ="Username " />
19+ < input type ="text " placeholder ="Username " required />
2020 </ div >
2121 < div class ="input-field ">
2222 < i class ="fas fa-lock toggle-password " id ="toggle-password "> </ i >
23- < input type ="password " id ="password-input " placeholder ="Password " required />
23+ < input type ="password " id ="password-input " placeholder ="Password " required />
2424 </ div >
2525 < div class ="remember-me ">
2626 < input type ="checkbox " id ="remember-me " />
@@ -39,23 +39,23 @@ <h2 class="title">Sign in</h2>
3939 < h2 class ="title "> Sign up</ h2 >
4040 < div class ="input-field ">
4141 < i class ="fas fa-user "> </ i >
42- < input type ="text " placeholder ="Username " />
42+ < input type ="text " placeholder ="Username " required />
4343 </ div >
4444 < div class ="input-field ">
4545 < i class ="fas fa-code-branch "> </ i >
4646 < input type ="text " placeholder ="Git Username " />
4747 </ div >
4848 < div class ="input-field ">
4949 < i class ="fas fa-envelope "> </ i >
50- < input type ="email " placeholder ="Email " />
50+ < input type ="email " placeholder ="Email " required />
5151 </ div >
5252 < div class ="input-field ">
53- < i class ="fas fa-lock toggle-password " id ="toggle-password "> </ i >
54- < input type ="password " id ="password-input " placeholder ="Password " minlength ="8 " />
53+ < i class ="fas fa-lock toggle-password " id ="toggle-password-signup "> </ i >
54+ < input type ="password " id ="password-input-signup " placeholder ="Password " minlength ="8 " required />
5555 </ div >
5656 < div class ="remember-me ">
57- < input type ="checkbox " id ="remember-me " />
58- < label for ="remember-me "> Remember Me</ label >
57+ < input type ="checkbox " id ="remember-me-signup " />
58+ < label for ="remember-me-signup "> Remember Me</ label >
5959 </ div >
6060 < input type ="submit " class ="btn " value ="Sign up " />
6161 < p class ="social-text "> Or Sign up with social platforms</ p >
@@ -76,19 +76,18 @@ <h2 class="title">Sign up</h2>
7676 </ a >
7777 < div class ="panel left-panel ">
7878 < div class ="content ">
79- < h3 > New here ?</ h3 >
79+ < h3 > New here?</ h3 >
8080 < p >
81- Discover new experiences and profiles with awesome-github-profiles < br > Get access to exclusive content and features. < br > Create your account.
81+ Discover new experiences and profiles with awesome-github-profiles. Get access to exclusive content and features. Create your account.
8282 </ p >
8383 < button class ="btn transparent " id ="sign-up-btn ">
8484 Sign up
8585 </ button >
8686 </ div >
87- < img src ="img/log.svg " class ="image " alt ="" />
8887 </ div >
8988 < div class ="panel right-panel ">
9089 < div class ="content ">
91- < h3 > One of us ?</ h3 >
90+ < h3 > One of us?</ h3 >
9291 < p >
9392 Welcome to our community
9493 </ p >
@@ -100,6 +99,24 @@ <h3>One of us ?</h3>
10099 </ div >
101100 </ div >
102101 </ div >
102+
103103 < script src ="login.js "> </ script >
104+ < script >
105+ document . getElementById ( 'toggle-password' ) . addEventListener ( 'click' , function ( ) {
106+ const passwordInput = document . getElementById ( 'password-input' ) ;
107+ const type = passwordInput . getAttribute ( 'type' ) === 'password' ? 'text' : 'password' ;
108+ passwordInput . setAttribute ( 'type' , type ) ;
109+ this . classList . toggle ( 'fa-eye' ) ;
110+ this . classList . toggle ( 'fa-eye-slash' ) ;
111+ } ) ;
112+
113+ document . getElementById ( 'toggle-password-signup' ) . addEventListener ( 'click' , function ( ) {
114+ const passwordInput = document . getElementById ( 'password-input-signup' ) ;
115+ const type = passwordInput . getAttribute ( 'type' ) === 'password' ? 'text' : 'password' ;
116+ passwordInput . setAttribute ( 'type' , type ) ;
117+ this . classList . toggle ( 'fa-eye' ) ;
118+ this . classList . toggle ( 'fa-eye-slash' ) ;
119+ } ) ;
120+ </ script >
104121 </ body >
105- </ html >
122+ </ html >
0 commit comments