晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
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/themes/betheme/muffin-options/fields/preview/ |
Upload File : |
(function($) {
/* globals jQuery */
"use strict";
var MfnFieldPreview = (function() {
var $head = $('head'),
$preview = $('.mfn-preview .button-preview'),
$group = $preview.closest('.mfn-card-group'),
$condition = $('.condition', $group);
var text = $preview.first().text();
var systemFonts = [
'Arial',
'Georgia',
'Tahoma',
'Times',
'Trebuchet',
'Verdana'
];
var font = {
'family' : '',
'style' : ''
};
/**
* Multiple
*/
function multiple( el, key ){
var $fields = el.closest('.form-control').find('input');
var value = [];
$fields.each(function(){
var val = $(this).val();
// auto px
if( val == parseInt(val, 10) ){
val = val + 'px';
}
if( ! val ){
val = 0;
}
value.push(val);
});
value = value.join(' ');
$head.find('#mfn-button-'+ key).remove();
$head.append('<style id="mfn-button-'+ key +'">.mfn-ui{--mfn-button-'+ key +':'+ value +'}</style>');
}
/**
* Font family
*/
function fontFamily( el ){
var val = el.val();
font['family'] = '';
if( -1 === $.inArray( val, systemFonts ) ){
if( typeof WebFont !== 'undefined' ){
font['family'] = val;
if( font['family'] ){
WebFont.load({
google: {
families: [font['family'] + ':400,' + font['style']],
text: text
}
});
}
}
}
$head.find('#mfn-button-font-family').remove();
if( val ){
$head.append('<style id="mfn-button-font-family">.mfn-ui{--mfn-button-font-family:"'+ val +'"}</style>');
}
}
/**
* Font
*/
function fontStyle( el ){
var val = el.val(),
key = el.data('key'),
weight, style;
// weight & style
if( 'weight-style' == key ){
font['style'] = val;
$head.find('#mfn-button-font-weight').remove();
$head.append('<style id="mfn-button-font-weight">.mfn-ui{--mfn-button-font-weight:'+ val.replace('italic', '') +'}</style>');
$head.find('#mfn-button-font-style').remove();
if( -1 === val.indexOf('italic') ){
$head.append('<style id="mfn-button-font-style">.mfn-ui{--mfn-button-font-style:normal}</style>');
} else {
$head.append('<style id="mfn-button-font-style">.mfn-ui{--mfn-button-font-style:italic}</style>');
}
if( font['family'] ){
WebFont.load({
google: {
families: [font['family'] + ':400,' + font['style']],
text: text
}
});
}
return true;
}
// auto px
if( val == parseInt(val, 10) ){
val = val + 'px';
}
$head.find('#mfn-button-'+ key).remove();
$head.append('<style id="mfn-button-'+ key +'">.mfn-ui{--mfn-button-'+ key +':'+ val +'}</style>');
}
/**
* Animation time
*/
function animationType( el ){
var val = el.val();
$('.mfn-ui').attr('data-animation',val);
}
/**
* Animation time
*/
function animationTime( el ){
var val = el.val();
if( val == parseFloat(val) ){
val = val + 's';
}
$head.find('#mfn-button-transition').remove();
if( val ){
$head.append('<style id="mfn-button-transition">.mfn-ui{--mfn-button-transition:'+ val +'}</style>');
}
}
/**
* Gap
*/
function gap( el ){
var val = el.val();
if( val == parseFloat(val) ){
val = val + 'px';
}
$head.find('#mfn-button-gap').remove();
if( val ){
$head.append('<style id="mfn-button-gap">.mfn-ui{--mfn-button-gap:'+ val +'}</style>');
}
}
/**
* Color
*/
function color( el, val ){
var key = el.data('key'),
id = el.closest('.mfn-form-row').attr('id');
if( 'normal' != key ){
id += '-' + key;
}
// console.log([id, val]);
$head.find('#mfn-'+ id).remove();
if( val ){
$head.append('<style id="mfn-'+ id +'">.mfn-ui{--mfn-'+ id +':'+ val +'}</style>');
}
}
/**
* Box shadow
*/
function boxShadow( el, val ){
var key = el.data('key'),
id = el.closest('.mfn-form-row').attr('id');
$head.find('#mfn-'+ id).remove();
if( val ){
$head.append('<style id="mfn-'+ id +'">.mfn-ui{--mfn-'+ id +':'+ val +'}</style>');
}
}
/**
* Attach events to buttons
*/
function bind() {
$preview.on('click', function(e){
e.preventDefault();
})
$('.preview-font-family select').on('change', function() {
fontFamily( $(this) );
});
$('.preview-font input, .preview-font select').on('change', function(e) {
fontStyle( $(this) );
});
$('.preview-padding input').on('change', function() {
multiple( $(this), 'padding' );
});
$('.preview-border-width input').on('change', function() {
multiple( $(this), 'border-width' );
});
$('.preview-border-radius input').on('change', function() {
multiple( $(this), 'border-radius' );
});
$('.preview-gap input').on('change', function() {
gap( $(this) );
});
$('.preview-animation-time input').on('change', function() {
animationTime( $(this) );
});
$('.preview-animation-type select').on('change', function() {
animationType( $(this) );
});
$('.preview-color .has-colorpicker').on('change', function(e, value) {
color( $(this), $(this).val() );
});
$('.preview-box-shadow .mfn-field-value').on('change', function(e, value) {
boxShadow( $(this), $(this).val() );
});
}
/**
* Preview state on document ready
*/
function ready(){
if( mfn_fonts ){
systemFonts = systemFonts.concat( mfn_fonts );
}
$('.preview-font-family select').trigger('change');
$('.preview-font input, .preview-font select').trigger('change');
$('.preview-padding input').first().trigger('change');
$('.preview-border-width input').trigger('change');
$('.preview-border-radius input').trigger('change');
$('.preview-animation-type select').trigger('change');
$('.preview-animation-time input').trigger('change');
$('.preview-gap input').trigger('change');
$('.preview-color input.mfn-form-input').trigger('change');
}
/**
* Runs whole script.
*/
function init() {
bind();
ready();
}
/**
* Return
* Method to start the closure
*/
return {
init: init
};
})();
/**
* $(document).ready
* Specify a function to execute when the DOM is fully loaded.
*/
$(function() {
MfnFieldPreview.init();
});
})(jQuery);