Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sloved the issue number #963 #965

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,15 @@
emailjs.init("oUbB-IqXyvbW5JlV9");
})();
</script>
<!-- github - mayanksaininh -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.12/css/intlTelInput.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.12/js/intlTelInput.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.12/js/utils.min.js"></script>
<!-- github- mayanksaininh-->
</head>

<body>
<div class="circle-container">
<!-- <div class="circle-container">
<div class="circle" style="background-color: #55a5ea; left: 504px; top: 59px; scale: 1;"></div>
<div class="circle" style="background-color: #55a5ea; left: 504px; top: 59px; scale: 0.95;"></div>
<div class="circle" style="background-color: #55a5ea; left: 504px; top: 59px; scale: 0.9;"></div>
Expand All @@ -68,7 +73,7 @@
<div class="circle" style="background-color: #fff; left: 504px; top: 59px; scale: 0.8;"></div>
<div class="circle" style="background-color: #fff; left: 504px; top: 59px; scale: 0.8;"></div>
<div class="circle" style="background-color: #fff; left: 504px; top: 59px; scale: 0.8;"></div>
</div>
</div> -->

<header class="header">
<a href="#" class="logo"><img src="./images/logomain.png" alt="" style="width: 100px; height: 70px" /></a>
Expand Down Expand Up @@ -212,8 +217,8 @@ <h2 class="text-trans-none">
required />
<span id="name-error" class="error"></span>
<!-- Validation error message for Name -->
<input type="number" id="number" name="phone" pattern="[0-9]{10,12}" required placeholder="Contact Number"
minlength="10" maxlength="12" class="contact-form-phone" />
<input type="tel" id="phoneInput" class = "contact-form-phone" name="phone" pattern="[0-9]{10,12}" required placeholder="Contact Number"
minlength="10" maxlength="12" class="contact-form-phone" min = "0"/>
<span id="phone-error" class="error"></span>
<!-- Validation error message for Contact Number -->
<input type="email" name="email" placeholder="Email" id="mail" class="contact-form-email" required />
Expand Down
16 changes: 14 additions & 2 deletions main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1073,8 +1073,9 @@ body.night {

.contact-form-txt,
.contact-form-email,
.contact-form-phone,
.contact-form-txtarea {

.contact-form-txtarea
{
height: 40px;
color: #000;
border: 2px solid #bcbcbc;
Expand Down Expand Up @@ -1911,4 +1912,15 @@ input:checked+.slider:before {
::-webkit-scrollbar-thumb {
background: linear-gradient(#1f3959, rgb(10, 21, 56));
border-radius: 10px;
}
.contact-form-phone{
height: 40px;
width: 75rem;
color: #000;
border: 2px solid #bcbcbc;
border-radius: 10px;
outline: none;
margin-bottom: 20px;
padding: 15px;
transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
24 changes: 23 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
// Smooth scrolling when clicking the Explore Projects button done by https://github.com/Mahimatestgithub
// Smooth scrolling when clicking the Explore Projects button done by https://github.com/

//............Code done by github - mayanksaininh.....................................
const phoneInput = document.querySelector("#phoneInput");

// Initialize intlTelInput
const iti = window.intlTelInput(phoneInput, {
utilsScript: "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.12/js/utils.min.js"
});

// Set initial country based on the user's location
iti.promise.then(() => {
const countryCode = iti.getSelectedCountryData().iso2;
iti.setCountry(countryCode);
});

// Listen for the country change event
phoneInput.addEventListener("countrychange", function() {
const countryCode = iti.getSelectedCountryData().iso2;
console.log("Selected country code:", countryCode);
});

//.................. mayanksaininh...............................................
document
.querySelector(".explore-button")
.addEventListener("click", function (e) {
Expand Down