Add massive collection of CSS, JavaScript and theme assets that were previously excluded: **CSS Files (681 total):** - HVAC plugin-specific styles (hvac-*.css): 34 files including dashboard, certificates, registration, mobile nav, accessibility fixes, animations, and welcome popup - Theme framework files (Astra, builder systems, layouts): 200+ files - Plugin compatibility styles (WooCommerce, WPForms, Elementor, Contact Form 7): 150+ files - WordPress core and editor styles: 50+ files - Responsive and RTL language support: 200+ files **JavaScript Files (400+ total):** - HVAC plugin functionality (hvac-*.js): 27 files including menu systems, dashboard enhancements, profile sharing, mobile responsive features, accessibility, and animations - Framework and library files: jQuery plugins, GSAP, AOS, Swiper, Chart.js, Lottie, Isotope - Plugin compatibility scripts: WPForms, WooCommerce, Elementor, Contact Form 7, LifterLMS - WordPress core functionality: customizer, admin, block editor compatibility - Third-party integrations: Stripe, SMTP, analytics, search functionality **Assets:** - Certificate background images and logos - Comprehensive theme styling infrastructure - Mobile-responsive design systems - Cross-browser compatibility assets - Performance-optimized minified versions **Updated .gitignore:** - Fixed asset directory whitelisting patterns to properly include CSS/JS/images - Added proper directory structure recognition (!/assets/css/, !/assets/js/, etc.) - Maintains security by excluding sensitive files while including essential assets This commit provides the complete frontend infrastructure needed for: - Full theme functionality and styling - Plugin feature implementations - Mobile responsiveness and accessibility - Cross-browser compatibility - Performance optimization - Developer workflow support
153 lines
3.8 KiB
JavaScript
153 lines
3.8 KiB
JavaScript
/**
|
|
* Sticky Header Metabox
|
|
*
|
|
* @package Astra Addon
|
|
* @since 1.0.0
|
|
*/
|
|
|
|
(function( $ ) {
|
|
|
|
function toggle_sticky_header_options( value ) {
|
|
if ( 'enabled' == value ) {
|
|
$( '#stick-header-meta-options' ).slideDown();
|
|
toggle_sticky_header_opacity();
|
|
} else {
|
|
$( '#stick-header-meta-options' ).slideUp();
|
|
$( '.sticky-header-bg-opc-wrap' ).slideUp();
|
|
}
|
|
}
|
|
|
|
$( '#stick-header-meta' ).each(function(index, el) {
|
|
var value = $( el ).val();
|
|
toggle_sticky_header_options( value );
|
|
$( el ).change(function(event) {
|
|
value = $( el ).val();
|
|
toggle_sticky_header_options( value );
|
|
});
|
|
});
|
|
|
|
$( '#stick-header-meta-options input' ).click(function() {
|
|
toggle_sticky_header_opacity();
|
|
});
|
|
|
|
function toggle_sticky_header_opacity() {
|
|
var checkedValues = $( '#stick-header-meta-options input[type=checkbox]:checked' ).map((_, element) => {
|
|
return element.value;
|
|
}).get();
|
|
|
|
if (checkedValues.length === 0) {
|
|
$( '.sticky-header-bg-opc-wrap' ).slideUp();
|
|
} else {
|
|
$( '.sticky-header-bg-opc-wrap' ).slideDown();
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Below Header meta option
|
|
*/
|
|
toggle_sticky_suppl_options();
|
|
$( '#ast-below-header-display').click(function(){
|
|
toggle_sticky_suppl_options();
|
|
toggle_stick_wrapper();
|
|
})
|
|
|
|
function toggle_sticky_suppl_options(){
|
|
if ( $( '#ast-below-header-display' ).is(':checked')) {
|
|
$( '.sticky-below-header-meta-wrapper' ).slideUp();
|
|
}
|
|
else{
|
|
$( '.sticky-below-header-meta-wrapper' ).slideDown();
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Above Header meta option
|
|
*/
|
|
toggle_sticky_above_header_options();
|
|
$( '#ast-above-header-display').click(function(){
|
|
toggle_sticky_above_header_options();
|
|
toggle_stick_wrapper();
|
|
})
|
|
|
|
function toggle_sticky_above_header_options(){
|
|
if ( $( '#ast-above-header-display' ).is(':checked')) {
|
|
$( '.sticky-above-header-meta-wrapper' ).slideUp();
|
|
}
|
|
else{
|
|
$( '.sticky-above-header-meta-wrapper' ).slideDown();
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Above Header meta option
|
|
*/
|
|
toggle_sticky_primary_header_options();
|
|
$( '#ast-main-header-display').click(function(){
|
|
toggle_sticky_primary_header_options();
|
|
toggle_stick_wrapper();
|
|
})
|
|
|
|
function toggle_sticky_primary_header_options(){
|
|
if ( $( '#ast-main-header-display' ).is(':checked')) {
|
|
$( '.stick-main-header-meta-wrapper' ).slideUp();
|
|
}
|
|
else{
|
|
$( '.stick-main-header-meta-wrapper' ).slideDown();
|
|
}
|
|
}
|
|
/**
|
|
* Header meta option disabled
|
|
*/
|
|
toggle_stick_wrapper();
|
|
|
|
function toggle_stick_wrapper(){
|
|
//Main Header & Above Header & Below Header
|
|
if( $('#ast-main-header-display').length && $('#ast-above-header-display').length && $('#ast-below-header-display').length)
|
|
{
|
|
if ( $( '#ast-main-header-display' ).is(':checked') &&
|
|
$( '#ast-above-header-display' ).is(':checked') &&
|
|
$( '#ast-below-header-display' ).is(':checked'))
|
|
{
|
|
$( '.stick-header-wrapper' ).slideUp();
|
|
}
|
|
else{
|
|
$( '.stick-header-wrapper' ).slideDown();
|
|
}
|
|
}
|
|
//Main Header & Above Header
|
|
else if( $('#ast-main-header-display').length && $('#ast-above-header-display').length)
|
|
{
|
|
if ( $( '#ast-main-header-display' ).is(':checked') &&
|
|
$( '#ast-above-header-display' ).is(':checked'))
|
|
{
|
|
$( '.stick-header-wrapper' ).slideUp();
|
|
}
|
|
else{
|
|
$( '.stick-header-wrapper' ).slideDown();
|
|
}
|
|
}
|
|
//Main Header & Below Header
|
|
else if( $('#ast-main-header-display').length && $('#ast-below-header-display').length)
|
|
{
|
|
if ( $( '#ast-main-header-display' ).is(':checked') &&
|
|
$( '#ast-below-header-display' ).is(':checked'))
|
|
{
|
|
$( '.stick-header-wrapper' ).slideUp();
|
|
}
|
|
else{
|
|
$( '.stick-header-wrapper' ).slideDown();
|
|
}
|
|
}
|
|
//Main Header
|
|
else{
|
|
if ( $( '#ast-main-header-display' ).is(':checked') )
|
|
{
|
|
$( '.stick-header-wrapper' ).slideUp();
|
|
}
|
|
else{
|
|
$( '.stick-header-wrapper' ).slideDown();
|
|
}
|
|
}
|
|
}
|
|
|
|
})( jQuery );
|