Skip to content

Commit ce54d5f

Browse files
committed
Merge branch 'gh-pages' of https://github.com/YooAshu/awesome-github-profiles into gh-pages
2 parents dd296be + fb7eac7 commit ce54d5f

File tree

9 files changed

+371
-97
lines changed

9 files changed

+371
-97
lines changed

index.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap"
1111
rel="stylesheet"
1212
/>
13+
<link rel="stylesheet" href="styles/modal.css">
1314
<link rel="stylesheet" href="styles/styles.css" />
1415
<link rel="stylesheet" href="styles/pagination.css" />
1516
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
@@ -60,6 +61,17 @@
6061
<a href="https://github.com/recodehive/awesome-github-profiles/issues/new?assignees=&labels=%E2%9E%95+profile&projects=&template=add_profile.md&title=Add+Profile%3A+" class="navbar-links">Add Profile</a>
6162
<a href="pages/blog.html" class="navbar-links">Learn</a>
6263
<a href="login.html">Login</a>
64+
65+
<div class="toggle-switch">
66+
<input type="checkbox" id="theme-toggle">
67+
<label for="theme-toggle">
68+
<div class="switch-button">
69+
<span class="material-icons sun-icon">wb_sunny</span>
70+
<span class="material-icons moon-icon">brightness_2</span>
71+
</div>
72+
</label>
73+
</div>
74+
</div>
6375
</div>
6476

6577
<div class="side-icons">
@@ -198,6 +210,19 @@ <h5>We focus on quality content for the right people at the right time⏱️. Wh
198210
<!-- Toast Notification Container -->
199211
<div id="toast-container"></div>
200212

213+
<!-- Profile Add Modal -->
214+
<div id="profileModal" class="modal">
215+
<div class="modal-content">
216+
<span class="close-button" id="closeModal">&times;</span>
217+
<img src="assets/recode-hive.png" alt="Recode Hive Icon" class="navbar-icon">
218+
<h2>Join the Recode Hive Community</h2>
219+
<p>Become part of an exclusive community of developers. Showcase your GitHub profile and connect with like-minded individuals to explore new opportunities.</p>
220+
<a href="https://github.com/recodehive/awesome-github-profiles/issues/new?assignees=&labels=%E2%9E%95+profile&projects=&template=add_profile.md&title=Add+Profile%3A+"
221+
class="add-profile-button">Add Your Profile</a>
222+
</div>
223+
</div>
224+
225+
<script src="scripts/profileModal.js"></script>
201226

202227
<script src="https://www.gstatic.com/firebasejs/7.14.6/firebase-app.js"></script>
203228
<script src="https://www.gstatic.com/firebasejs/7.14.6/firebase-database.js"></script>

login.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ form.sign-in-form {
8888
}
8989

9090
.input-field input {
91+
9192
background: none;
9293
outline: none;
9394
border: none;
@@ -100,6 +101,24 @@ form.sign-in-form {
100101
.input-field input::placeholder {
101102
color: #aaa;
102103
font-weight: 500;
104+
padding-right: 2.5rem;
105+
106+
}
107+
.toggle-password {
108+
position: absolute;
109+
right: 15px; /* Align the icon to the right */
110+
cursor: pointer;
111+
}
112+
113+
.toggle-password i {
114+
color: #acacac; /* Style for the eye icon */
115+
font-size: 1.1rem;
116+
transition: color 0.3s ease;
117+
}
118+
119+
/* Hover effect for eye icon */
120+
.toggle-password:hover i {
121+
color: #333;
103122
}
104123

105124
.social-text {

login.html

Lines changed: 68 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>Register & Login</title>
77
<link rel="stylesheet" href="login.css" />
8-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" />
8+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" />
9+
910

1011
</head>
1112
<body>
@@ -18,16 +19,24 @@ <h2 class="title">Sign in</h2>
1819
<i class="fas fa-user"></i>
1920
<input type="text" placeholder="Username" />
2021
</div>
21-
<div class="input-field">
22+
<div class="input-field input-field-password">
2223
<i class="fas fa-lock"></i>
23-
<input type="password" id="password-signin" placeholder="Password" />
24+
<input type="password" id="password" placeholder="&nbsp;&nbsp;&nbsp;Password" />
2425
<span class="toggle-password">
25-
<i class="fas fa-eye" id="togglePasswordSignIn" onclick="togglePassword('password-signin', this)" style="cursor: pointer;"></i>
26+
<i class="fas fa-eye" id="togglePassword"></i>
2627
</span>
2728
</div>
29+
2830
<input type="submit" value="Login" class="btn solid" />
29-
</form>
31+
<p class="social-text">Or Sign in with social platforms</p>
32+
<div class="social-media">
33+
3034

35+
<a href="https://github.com/YourGitHubProfile" target="_blank">
36+
<img src="https://upload.wikimedia.org/wikipedia/commons/9/91/Octicons-mark-github.svg" alt="GitHub" width="40" height="40" style="margin-left: 5px;">
37+
</a>
38+
</div>
39+
</form>
3140
<form action="#" class="sign-up-form">
3241
<h2 class="title">Sign up</h2>
3342
<div class="input-field">
@@ -38,18 +47,68 @@ <h2 class="title">Sign up</h2>
3847
<i class="fas fa-envelope"></i>
3948
<input type="email" placeholder="Email" />
4049
</div>
41-
<div class="input-field-password">
50+
<div class="input-field input-field-password">
4251
<i class="fas fa-lock"></i>
43-
<input type="password" id="password-signup" placeholder="Password" />
52+
<input type="password" id="password" placeholder="&nbsp;&nbsp;&nbsp; Password" />
4453
<span class="toggle-password">
45-
<i class="fas fa-eye" id="togglePasswordSignUp" onclick="togglePassword('password-signup', this)" style="cursor: pointer;"></i>
54+
<i class="fas fa-eye" id="togglePassword"></i>
4655
</span>
4756
</div>
57+
4858
<input type="submit" class="btn" value="Sign up" />
59+
<p class="social-text">Or Sign up with social platforms</p>
60+
<div class="social-media">
61+
62+
<a href="https://github.com/YourGitHubProfile" target="_blank">
63+
<img src="https://upload.wikimedia.org/wikipedia/commons/9/91/Octicons-mark-github.svg" alt="GitHub" width="40" height="40" style="margin-left: 5px;">
64+
</a>
65+
</div>
4966
</form>
5067
</div>
5168
</div>
52-
<script src="login.js"></script>
69+
70+
<div class="panels-container">
71+
<a href="index.html" class="homeBtn">
72+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 20" width="30" height="30">
73+
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
74+
</svg>
75+
</a>
76+
<div class="panel left-panel">
77+
<div class="content">
78+
<h3>New here ?</h3>
79+
<p>
80+
Discover new experiences and profiles with awesome-github-profiles <br>Get access to exclusive content and features. <br> Create your account.
81+
</p>
82+
<a href="index.html" class="homeBtn">
83+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 20" width="30" height="30">
84+
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
85+
</svg>
86+
</a>
87+
<button class="btn transparent" id="sign-up-btn">
88+
Sign up
89+
</button>
90+
</div>
91+
<img src="img/log.svg" class="image" alt="" />
92+
</div>
93+
<div class="panel right-panel">
94+
95+
<div class="content">
96+
97+
<h3>One of us ?</h3>
98+
<p>
99+
Welcome to our community
100+
</p>
101+
<button class="btn transparent" id="sign-in-btn">
102+
Sign in
103+
</button>
104+
105+
</div>
106+
<img src="img/register.svg" class="image" alt="" />
107+
</div>
108+
109+
</div>
110+
53111
</div>
112+
<script src="login.js"></script>
54113
</body>
55114
</html>

login.js

Lines changed: 101 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,107 @@
1-
const sign_in_btn = document.querySelector("#sign-in-btn");
2-
const sign_up_btn = document.querySelector("#sign-up-btn");
3-
const container = document.querySelector(".container");
4-
5-
sign_up_btn.addEventListener("click", () => {
6-
container.classList.add("sign-up-mode");
7-
});
8-
9-
sign_in_btn.addEventListener("click", () => {
10-
container.classList.remove("sign-up-mode");
11-
});
12-
13-
// Sign in form submission
14-
document.querySelector(".sign-in-form").addEventListener('submit', function(event) {
15-
event.preventDefault();
16-
17-
// Get the input values
18-
const username = document.querySelector(".sign-in-form input[type='text']").value;
19-
const password = document.querySelector(".sign-in-form input[type='password']").value;
20-
21-
// Dummy login logic for demo purposes
22-
if (username === 'admin' && password === 'password') {
23-
alert('Login successful!');
1+
// Wait until the DOM is fully loaded before executing
2+
document.addEventListener('DOMContentLoaded', () => {
3+
4+
// Toggle password visibility for both sign-in and sign-up forms
5+
const togglePasswordIcons = document.querySelectorAll('.toggle-password');
6+
7+
togglePasswordIcons.forEach(iconWrapper => {
8+
iconWrapper.addEventListener('click', function () {
9+
const passwordField = this.previousElementSibling;
10+
const icon = this.querySelector('i');
11+
12+
// Toggle password visibility
13+
const isPasswordVisible = passwordField.type === 'password';
14+
passwordField.type = isPasswordVisible ? 'text' : 'password';
15+
16+
// Toggle icon between eye and eye-slash
17+
icon.classList.toggle('fa-eye', !isPasswordVisible);
18+
icon.classList.toggle('fa-eye-slash', isPasswordVisible);
19+
});
20+
});
21+
22+
// Toggle between sign-in and sign-up mode
23+
const sign_in_btn = document.querySelector("#sign-in-btn");
24+
const sign_up_btn = document.querySelector("#sign-up-btn");
25+
const container = document.querySelector(".container");
26+
27+
sign_up_btn.addEventListener("click", () => {
28+
container.classList.add("sign-up-mode");
29+
});
30+
31+
sign_in_btn.addEventListener("click", () => {
32+
container.classList.remove("sign-up-mode");
33+
});
34+
35+
// Sign-in form submission
36+
document.querySelector(".sign-in-form").addEventListener('submit', function(event) {
37+
event.preventDefault();
38+
39+
// Get the input values
40+
const username = document.querySelector(".sign-in-form input[type='text']").value;
41+
const password = document.querySelector(".sign-in-form input[type='password']").value;
42+
43+
// Dummy login logic for demo purposes
44+
if (username === 'admin' && password === 'password') {
45+
alert('Login successful!');
46+
// Redirect to dashboard page
47+
window.location.href = 'index.html';
48+
} else {
49+
alert('Invalid username or password');
50+
}
51+
});
52+
53+
// Sign-up form submission
54+
document.querySelector(".sign-up-form").addEventListener('submit', function(event) {
55+
event.preventDefault();
56+
57+
// Get the input values
58+
const username = document.querySelector(".sign-up-form input[type='text']").value;
59+
const email = document.querySelector(".sign-up-form input[type='email']").value;
60+
const password = document.querySelector(".sign-up-form input[type='password']").value;
61+
62+
if (username === '' || email === '' || password === '') {
63+
alert('Please fill in all fields');
64+
return;
65+
}
66+
67+
// Dummy signup logic for demo purposes
68+
localStorage.setItem('username', username);
69+
localStorage.setItem('email', email);
70+
localStorage.setItem('password', password);
71+
localStorage.setItem('isLoggedIn', 'true');
72+
73+
alert('Signup successful!');
2474
// Redirect to dashboard page
2575
window.location.href = 'index.html';
26-
} else {
27-
alert('Invalid username or password');
76+
});
77+
78+
// Check password strength for sign-up form
79+
function checkPasswordStrength() {
80+
const password = document.querySelector(".sign-up-form input[type='password']").value;
81+
const strengthWeak = document.getElementById('strength-weak');
82+
const strengthMedium = document.getElementById('strength-medium');
83+
const strengthStrong = document.getElementById('strength-strong');
84+
85+
let strength = 0;
86+
87+
if (password.length >= 8) strength++;
88+
if (password.match(/[A-Z]/)) strength++;
89+
if (password.match(/[a-z]/)) strength++;
90+
if (password.match(/[0-9]/)) strength++;
91+
if (password.match(/[^a-zA-Z0-9]/)) strength++;
92+
93+
// Reset classes
94+
strengthWeak.className = '';
95+
strengthMedium.className = '';
96+
strengthStrong.className = '';
97+
98+
// Apply strength classes based on criteria
99+
if (strength >= 1) strengthWeak.className = 'weak';
100+
if (strength >= 3) strengthMedium.className = 'medium';
101+
if (strength >= 5) strengthStrong.className = 'strong';
28102
}
29-
});
30-
31-
// Sign up form submission
32-
document.querySelector(".sign-up-form").addEventListener('submit', function(event) {
33-
event.preventDefault();
34-
35-
// Get the input values
36-
const username = document.querySelector(".sign-up-form input[type='text']").value;
37-
const email = document.querySelector(".sign-up-form input[type='email']").value;
38-
const password = document.querySelector(".sign-up-form input[type='password']").value;
39103

40-
if (username === '' || email === '' || password === '') {
41-
alert('Please fill in all fields');
42-
return;
43-
}
44-
45-
// Dummy signup logic for demo purposes
46-
localStorage.setItem('username', username);
47-
localStorage.setItem('email', email);
48-
localStorage.setItem('password', password);
49-
localStorage.setItem('isLoggedIn', 'true');
104+
// Monitor password input on the sign-up form to check password strength
105+
document.querySelector(".sign-up-form input[type='password']").addEventListener('input', checkPasswordStrength);
50106

51-
alert('Signup successful!');
52-
// Redirect to dashboard page
53-
window.location.href = 'index.html';
54107
});
55-
56-
// Toggle password visibility
57-
function togglePassword(fieldId, icon) {
58-
const field = document.getElementById(fieldId);
59-
const isPassword = field.type === 'password';
60-
61-
// Toggle between 'password' and 'text'
62-
field.type = isPassword ? 'text' : 'password';
63-
64-
// Change the icon class between eye and eye-slash
65-
icon.classList.toggle('fa-eye-slash', isPassword);
66-
icon.classList.toggle('fa-eye', !isPassword);
67-
}
68-
69-
// Check password strength
70-
function checkPasswordStrength() {
71-
const password = document.querySelector(".sign-up-form input[type='password']").value;
72-
const strengthWeak = document.getElementById('strength-weak');
73-
const strengthMedium = document.getElementById('strength-medium');
74-
const strengthStrong = document.getElementById('strength-strong');
75-
76-
let strength = 0;
77-
78-
if (password.length >= 8) strength++;
79-
if (password.match(/[A-Z]/)) strength++;
80-
if (password.match(/[a-z]/)) strength++;
81-
if (password.match(/[0-9]/)) strength++;
82-
if (password.match(/[^a-zA-Z0-9]/)) strength++;
83-
84-
strengthWeak.className = '';
85-
strengthMedium.className = '';
86-
strengthStrong.className = '';
87-
88-
if (strength >= 1) strengthWeak.className = 'weak';
89-
if (strength >= 3) strengthMedium.className = 'medium';
90-
if (strength >= 5) strengthStrong.className = 'strong';
91-
}
92-
93-
// Call the checkPasswordStrength function on password input
94-
document.querySelector(".sign-up-form input[type='password']").addEventListener('input', checkPasswordStrength);

0 commit comments

Comments
 (0)