first commit

This commit is contained in:
Manish
2024-03-12 11:17:45 +05:45
commit c4d4fe8483
3759 changed files with 1811003 additions and 0 deletions

View File

@ -0,0 +1,50 @@
/* Contact Form Dynamic */
$(function() {
// Get the form.
var form = $('#contact-form');
// Get the messages div.
var formMessages = $('.form-messege');
// Set up an event listener for the contact form.
$(form).submit(function(e) {
// Stop the browser from submitting the form.
e.preventDefault();
// Serialize the form data.
var formData = $(form).serialize();
// Submit the form using AJAX.
$.ajax({
type: 'POST',
url: $(form).attr('action'),
data: formData
})
.done(function(response) {
// Make sure that the formMessages div has the 'success' class.
$(formMessages).removeClass('error');
$(formMessages).addClass('success');
// Set the message text.
$(formMessages).text(response);
// Clear the form.
$('#contact-form input,#contact-form textarea').val('');
})
.fail(function(data) {
// Make sure that the formMessages div has the 'error' class.
$(formMessages).removeClass('success');
$(formMessages).addClass('error');
// Set the message text.
if (data.responseText !== '') {
$(formMessages).text(data.responseText);
} else {
$(formMessages).text('Oops! An error occured and your message could not be sent.');
}
});
});
});

View File

@ -0,0 +1,42 @@
/* global wp, jQuery */
/**
* File customizer.js.
*
* Theme Customizer enhancements for a better user experience.
*
* Contains handlers to make Theme Customizer preview reload changes asynchronously.
*/
( function( $ ) {
// Site title and description.
wp.customize( 'blogname', function( value ) {
value.bind( function( to ) {
$( '.site-title a' ).text( to );
} );
} );
wp.customize( 'blogdescription', function( value ) {
value.bind( function( to ) {
$( '.site-description' ).text( to );
} );
} );
// Header text color.
wp.customize( 'header_textcolor', function( value ) {
value.bind( function( to ) {
if ( 'blank' === to ) {
$( '.site-title, .site-description' ).css( {
clip: 'rect(1px, 1px, 1px, 1px)',
position: 'absolute',
} );
} else {
$( '.site-title, .site-description' ).css( {
clip: 'auto',
position: 'relative',
} );
$( '.site-title a, .site-description' ).css( {
color: to,
} );
}
} );
} );
}( jQuery ) );

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,72 @@
$(function () {
var LocsA = [
{
lat: 40.740178,
lon: -74.190194,
title: "Chtwan",
html: [
'<div class="ltn__map-item">',
'<h3 class="ltn__location-name">Chitwan,Nepal</h3>',
'<h5 class="ltn__location-single-info"><i class="fas fa-map-marked-alt"></i>Chitwan, Nepal</h5>',
'<h4 class="ltn__location-single-info"><i class="fas fa-phone-volume"></i>0123456789</h4>',
'<div class="btn-wrapper">',
"</div>",
"</div>",
].join(""),
icon: "img/icons/map-marker-2.png",
animation: google.maps.Animation.BOUNCE,
},
{
lat: 40.733617,
lon: -74.17115,
title: "Location 2",
html: [
'<div class="ltn__map-item">',
'<h3 class="ltn__location-name">Boston, New York</h3>',
'<h5 class="ltn__location-single-info"><i class="fas fa-map-marked-alt"></i>5816 S. Coulter Street Amarillo, TX 79119</h5>',
'<h4 class="ltn__location-single-info"><i class="fas fa-phone-volume"></i>0123456789</h4>',
'<div class="btn-wrapper">',
'<a href="contact.html" class="btn btn-transparent btn-border btn-effect-4"><i class="fas fa-location-arrow"></i> Get An Appointment</a>',
'<a href="#" class="btn btn-transparent btn-border btn-effect-3"><i class="fas fa-globe"></i> View Website</a>',
"</div>",
"</div>",
].join(""),
icon: "img/icons/map-marker-2.png",
animation: google.maps.Animation.BOUNCE,
},
{
lat: 40.743011,
lon: -74.2471,
title: "Location 3",
html: [
'<div class="ltn__map-item">',
'<h3 class="ltn__location-name">Boston, New York</h3>',
'<h5 class="ltn__location-single-info"><i class="fas fa-map-marked-alt"></i>5816 S. Coulter Street Amarillo, TX 79119</h5>',
'<h4 class="ltn__location-single-info"><i class="fas fa-phone-volume"></i>0123456789</h4>',
'<div class="btn-wrapper">',
'<a href="contact.html" class="btn btn-transparent btn-border btn-effect-4"><i class="fas fa-location-arrow"></i> Get An Appointment</a>',
'<a href="#" class="btn btn-transparent btn-border btn-effect-3"><i class="fas fa-globe"></i> View Website</a>',
"</div>",
"</div>",
].join(""),
icon: "img/icons/map-marker-2.png",
animation: google.maps.Animation.BOUNCE,
},
];
new Maplace({
locations: LocsA,
controls_on_map: true,
map_options: {
zoom: 13,
scrollwheel: false,
stopover: true,
},
stroke_options: {
strokeColor: "#f10",
strokeOpacity: 0.8,
strokeWeight: 2,
fillColor: "#f10",
fillOpacity: 0.4,
},
}).Load();
});

View File

@ -0,0 +1,99 @@
/**
* File navigation.js.
*
* Handles toggling the navigation menu for small screens and enables TAB key
* navigation support for dropdown menus.
*/
( function() {
const siteNavigation = document.getElementById( 'site-navigation' );
// Return early if the navigation doesn't exist.
if ( ! siteNavigation ) {
return;
}
const button = siteNavigation.getElementsByTagName( 'button' )[ 0 ];
// Return early if the button doesn't exist.
if ( 'undefined' === typeof button ) {
return;
}
const menu = siteNavigation.getElementsByTagName( 'ul' )[ 0 ];
// Hide menu toggle button if menu is empty and return early.
if ( 'undefined' === typeof menu ) {
button.style.display = 'none';
return;
}
if ( ! menu.classList.contains( 'nav-menu' ) ) {
menu.classList.add( 'nav-menu' );
}
// Toggle the .toggled class and the aria-expanded value each time the button is clicked.
button.addEventListener( 'click', function() {
siteNavigation.classList.toggle( 'toggled' );
if ( button.getAttribute( 'aria-expanded' ) === 'true' ) {
button.setAttribute( 'aria-expanded', 'false' );
} else {
button.setAttribute( 'aria-expanded', 'true' );
}
} );
// Remove the .toggled class and set aria-expanded to false when the user clicks outside the navigation.
document.addEventListener( 'click', function( event ) {
const isClickInside = siteNavigation.contains( event.target );
if ( ! isClickInside ) {
siteNavigation.classList.remove( 'toggled' );
button.setAttribute( 'aria-expanded', 'false' );
}
} );
// Get all the link elements within the menu.
const links = menu.getElementsByTagName( 'a' );
// Get all the link elements with children within the menu.
const linksWithChildren = menu.querySelectorAll( '.menu-item-has-children > a, .page_item_has_children > a' );
// Toggle focus each time a menu link is focused or blurred.
for ( const link of links ) {
link.addEventListener( 'focus', toggleFocus, true );
link.addEventListener( 'blur', toggleFocus, true );
}
// Toggle focus each time a menu link with children receive a touch event.
for ( const link of linksWithChildren ) {
link.addEventListener( 'touchstart', toggleFocus, false );
}
/**
* Sets or removes .focus class on an element.
*/
function toggleFocus() {
if ( event.type === 'focus' || event.type === 'blur' ) {
let self = this;
// Move up through the ancestors of the current link until we hit .nav-menu.
while ( ! self.classList.contains( 'nav-menu' ) ) {
// On li elements toggle the class .focus.
if ( 'li' === self.tagName.toLowerCase() ) {
self.classList.toggle( 'focus' );
}
self = self.parentNode;
}
}
if ( event.type === 'touchstart' ) {
const menuItem = this.parentNode;
event.preventDefault();
for ( const link of menuItem.parentNode.children ) {
if ( menuItem !== link ) {
link.classList.remove( 'focus' );
}
}
menuItem.classList.toggle( 'focus' );
}
}
}() );

File diff suppressed because it is too large Load Diff