generated from mate-academy/gulp-template
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: autofill, form submit, card hover effects
- Loading branch information
1 parent
59bb231
commit d92c33e
Showing
16 changed files
with
162 additions
and
21 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
(function () { | ||
function handleFormSubmit(formSelector, alertSelector, timeout = 2000) { | ||
const form = document.querySelector(formSelector); | ||
const alert = document.querySelector(alertSelector); | ||
|
||
if (!form || !alert) { | ||
console.error('Form or alert element not found'); | ||
return; | ||
} | ||
|
||
form.addEventListener('submit', (e) => { | ||
e.preventDefault(); | ||
|
||
const fields = form.querySelectorAll('input, textarea'); | ||
|
||
alert.style.transform = 'translateX(0)'; | ||
|
||
setTimeout(() => { | ||
alert.style.transform = 'translateX(150%)'; | ||
}, timeout); | ||
|
||
fields.forEach((field) => { | ||
field.value = ''; | ||
}); | ||
}); | ||
} | ||
|
||
handleFormSubmit('.footer__form', '.alert', 2000); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
import menu from './menu.js' | ||
import swiper from './swiper.js' | ||
import form from './form.js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
$font-primary: 'Poppins', sans-serif; | ||
$font-secondary: 'Open Sans', sans-serif; | ||
$border-radius: 30px; | ||
$big-tablet-min-width: 1024px; | ||
$tablet-min-width: 640px; | ||
$desktop-min-width: 1600px; | ||
$white: #fff; | ||
$c-gray: #f2f6fa; | ||
$dark-bg: #2c2c2c; | ||
$white: #fff; | ||
$main-text-color: #6c788b; | ||
$color-text-dark: #334563; | ||
$color-title: #253757; | ||
$color-link-bg: #2060f6; | ||
$aside-menu-bg: #a6aab9; | ||
$subtitle-color: #c0cdd7; | ||
$font-primary: 'Poppins', sans-serif; | ||
$font-secondary: 'Open Sans', sans-serif; | ||
$border-radius: 30px; | ||
$big-tablet-min-width: 1024px; | ||
$tablet-min-width: 640px; | ||
$desktop-min-width: 1600px; |