Skip to content

Commit 0a1e926

Browse files
committed
Remove duplicate and magic numbers
1 parent 8910b95 commit 0a1e926

2 files changed

Lines changed: 5 additions & 18 deletions

File tree

script.js

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,32 +28,19 @@ document.addEventListener('DOMContentLoaded', () => {
2828
}
2929

3030
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
31-
anchor.addEventListener('click', function(e) {
31+
anchor.addEventListener('click', function (e) {
3232
e.preventDefault();
3333
const targetId = this.getAttribute('href');
34-
if (targetId === '#') return;
34+
if (targetId === '#') return;
3535
const targetElement = document.querySelector(targetId);
3636
if (targetElement) {
3737
const navbarHeight = document.querySelector('.navbar').offsetHeight;
38-
const targetPosition = targetElement.offsetTop - navbarHeight;
38+
const targetPosition = targetElement.offsetTop - navbarHeight;
3939
window.scrollTo({
4040
top: targetPosition,
4141
behavior: 'smooth'
4242
});
4343
}
4444
});
4545
});
46-
signupForm.addEventListener('submit', e => {
47-
if (passwordInput.value.length < 8) {
48-
e.preventDefault();
49-
passwordFeedback.style.display = 'block';
50-
passwordInput.focus();
51-
} else {
52-
const modal = bootstrap.Modal.getInstance(document.getElementById('signupModal'));
53-
modal.hide();
54-
const toast = new bootstrap.Toast(document.getElementById('signupToast'));
55-
toast.show();
56-
signupForm.reset();
57-
}
58-
});
5946
});

scss/custom.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ footer {
4949
}
5050

5151
.btn-primary:hover {
52-
background-color: #0d4112;
53-
border-color: #0d4112;
52+
background-color: darken($primary, 10%);
53+
border-color: darken($primary, 10%);
5454
}
5555

5656
.card {

0 commit comments

Comments
 (0)