Advertisement
Guenni007

avia_layout

Sep 28th, 2024
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 15.57 KB | None | 0 0
  1. <?php
  2. /**
  3.  * General Layout Tab
  4.  * ==================
  5.  *
  6.  * @since 4.8.2
  7.  */
  8. if( ! defined( 'ABSPATH' ) ) {  exit;  }    // Exit if accessed directly
  9.  
  10. global $avia_config, $avia_pages, $avia_elements;
  11.  
  12.  
  13. $frontend_label = __( 'A rough preview of the frontend.', 'avia_framework' );
  14.  
  15. $avia_elements[] =  array(
  16.             'slug'  => 'layout',
  17.             'id'    => 'default_layout_target',
  18.             'type'  => 'target',
  19.             'std'   => "
  20.                     <style type='text/css'>
  21.                         .avprev-layout-container, .avprev-layout-container *{
  22.                             box-sizing: border-box;
  23.                         }
  24.                         #boxed .avprev-layout-container{ padding:0 23px; border:1px solid #e1e1e1; background-color: #555;}
  25.                         #av-framed-box .avprev-layout-container{ padding:23px; border:1px solid #e1e1e1; background-color: #555;}
  26.                         .avprev-layout-container-inner{border:none; overflow: hidden;}
  27.                         .avprev-layout-container-inner{border: 1px solid #e1e1e1; background:#fff;}
  28.                         .avprev-layout-content-container{overflow:hidden; margin:0 auto; position:relative;}
  29.                         .avprev-layout-container-sizer{margin:0 auto; position:relative; z-index:5;}
  30.                         .avprev-layout-content-container .avprev-layout-container-sizer{display:table;}
  31.                         .avprev-layout-content-container .avprev-layout-container-sizer .av-cell{display:table-cell; padding: 20px;}
  32.                         .avprev-layout-content-container .avprev-layout-container-sizer:after{ background: #F8F8F8; position: absolute; top: 0; left: 99%; width: 100%; height: 100%; content: ''; z-index:1;}
  33.                         .avprev-layout-header{border-bottom:1px solid #e1e1e1; padding:20px; overflow: hidden;}
  34.                         .avprev-layout-slider{border-bottom:1px solid #e1e1e1; padding:30px 20px; background:#3B740F url('" . AVIA_IMG_URL . "layout/diagonal-bold-light.png') top left repeat; color:#fff;}
  35.                         .avprev-layout-content{border-right:1px solid #e1e1e1; width:73%; }
  36.                         .avprev-layout-sidebar{border-left:1px solid #e1e1e1; background:#f8f8f8; left:-1px; position:relative; min-height:141px;}
  37.                         .avprev-layout-menu-description{float:left;}
  38.                         .avprev-layout-menu{float:right; color:#999;}
  39.  
  40.  
  41.                         #header_right .avprev-layout-header{border-left:1px solid #e1e1e1; width:130px; float:right; border-bottom:none;}
  42.                         #header_left .avprev-layout-header{border-right:1px solid #e1e1e1; width:130px; float:left; border-bottom:none;}
  43.  
  44.                         #header_right .avprev-layout-content-container{border-right:1px solid #e1e1e1; right:-1px;}
  45.                         #header_left  .avprev-layout-content-container{border-left:1px solid #e1e1e1; left:-1px;}
  46.  
  47.                         #header_left .avprev-layout-menu, #header_right .avprev-layout-menu{float:none; padding-top:23px; clear:both; }
  48.                         #header_left .avprev-layout-divider, #header_right .avprev-layout-divider{display:none;}
  49.                         #header_left .avprev-layout-menuitem, #header_right .avprev-layout-menuitem{display:block; border-bottom:1px dashed #e1e1e1; padding:3px;}
  50.                         #header_left .avprev-layout-menuitem-first, #header_right .avprev-layout-menuitem-first{border-top:1px dashed #e1e1e1;}
  51.                         #header_left .avprev-layout-header .avprev-layout-container-sizer, #header_right .avprev-layout-header .avprev-layout-container-sizer{width:100%!important;}
  52.  
  53.  
  54.                         #header_right .avprev-layout-menu, #header_right .avprev-layout-menu{float:none; padding-top:23px; clear:both; }
  55.                         #header_right .avprev-layout-divider, #header_right .avprev-layout-divider{display:none;}
  56.                         #header_right .avprev-layout-menuitem, #header_right .avprev-layout-menuitem{display:block; border-bottom:1px dashed #e1e1e1; padding:3px;}
  57.                         #header_right .avprev-layout-menuitem-first, #header_right .avprev-layout-menuitem-first{border-top:1px dashed #e1e1e1;}
  58.                         #header_right .avprev-layout-header .avprev-layout-container-sizer, #header_right .avprev-layout-header .avprev-layout-container-sizer{width:100%!important;}
  59.  
  60.  
  61.                         .avprev-layout-container-widget{display:none; border:1px solid #e1e1e1; padding:7px; font-size:12px; margin-top:5px; text-align:center;}
  62.                         .avprev-layout-container-social{margin-top:5px; text-align:center;}
  63.                         .av-active .pr-icons{display:block; }
  64.  
  65.                         #header_left .avprev-layout-container-widget.av-active,
  66.                         #header_right .avprev-layout-container-widget.av-active{display:block;}
  67.                         #header_left .avprev-layout-container-social.av-active,
  68.                         #header_right .avprev-layout-container-widget.av-social{display:block;}
  69.  
  70.                         #av-framed-box .avprev-layout-container-inner{border:none;}
  71.                         #boxed .avprev-layout-container-inner{border:none;}
  72.  
  73.                     </style>
  74.  
  75.                     <small class='live_bg_small'>{$frontend_label}</small>
  76.                     <div class='avprev-layout-container'>
  77.                         <div class='avprev-layout-container-inner'>
  78.                             <div class='avprev-layout-header'>
  79.                                 <div class='avprev-layout-container-sizer'>
  80.                                     <strong class='avprev-layout-menu-description'>Logo + Main Menu Area</strong>
  81.                                     <div class='avprev-layout-menu'>
  82.                                     <span class='avprev-layout-menuitem avprev-layout-menuitem-first'>Home</span>
  83.                                     <span class='avprev-layout-divider'>|</span>
  84.                                     <span class='avprev-layout-menuitem'>About</span>
  85.                                     <span class='avprev-layout-divider'>|</span>
  86.                                     <span class='avprev-layout-menuitem'>Contact</span>
  87.                                     </div>
  88.                                 </div>
  89.  
  90.                                 <div class='avprev-layout-container-social'>
  91.                                     {$iconSpan}
  92.                                 </div>
  93.  
  94.                                 <div class='avprev-layout-container-widget'>
  95.                                     <strong>Widgets</strong>
  96.                                 </div>
  97.  
  98.                             </div>
  99.  
  100.                             <div class='avprev-layout-content-container'>
  101.                                 <div class='avprev-layout-slider'>
  102.                                     <strong>Fullwidth Area (eg: Fullwidth Slideshow)</strong>
  103.                                 </div>
  104.  
  105.                                 <div class='avprev-layout-container-sizer'>
  106.                                     <div class='avprev-layout-content av-cell'><strong>Content Area</strong><p>This is the content area. The content area holds all your blog entries, pages, products etc</p></div>
  107.                                     <div class='avprev-layout-sidebar av-cell'><strong>Sidebar</strong><p>This area holds all your sidebar widgets</p>
  108.                                     </div>
  109.                                 </div>
  110.                             </div>
  111.  
  112.                         </div>
  113.                     </div>
  114.  
  115.  
  116.                     ",
  117.             'nodescription' => true
  118.     );
  119.  
  120. //START TAB CONTAINER
  121. $avia_elements[] = array(
  122.             'slug'          => 'layout',
  123.             'type'          => 'visual_group_start',
  124.             'id'            => 'avia_layout_container_start',
  125.             'class'         => 'avia_tab_container avia_set',
  126.             'nodescription' => true
  127.         );
  128.  
  129.  
  130. // START TAB
  131. $avia_elements[] = array(
  132.             'slug'          => 'layout',
  133.             'name'          => __( 'Layout', 'avia_framework' ),
  134.             'type'          => 'visual_group_start',
  135.             'id'            => 'avia_layout_tab1_start',
  136.             'class'         => 'avia_tab avia_tab2',
  137.             'nodescription' => true
  138.         );
  139.  
  140.  
  141.  
  142. $avia_elements[] = array(
  143.             'slug'      => 'layout',
  144.             'name'      => __( 'Stretched Or Boxed Layout', 'avia_framework' ),
  145.             'desc'      => __( 'The stretched layout expands from the left side of the viewport to the right.', 'avia_framework' ),
  146.             'id'        => 'color-body_style',
  147.             'type'      => 'select',
  148.             'std'       => 'stretched',
  149.             'class'     => 'av_2columns av_col_1',
  150.             'no_first'  => true,
  151.             'target'    => array( 'default_slideshow_target, #avia_default_layout_target::.avia_control_container::set_id' ),
  152.             'globalcss' => true,
  153.             'subtype'   => array(
  154.                                 __( 'Stretched layout', 'avia_framework' )  => 'stretched',
  155.                                 __( 'Boxed Layout', 'avia_framework' )      => 'boxed',
  156.                                 __( 'Fixed Frame', 'avia_framework' )       => 'av-framed-box'
  157.                             )
  158.         );
  159.  
  160. $numbers = array();
  161. for( $i = 1; $i <= 75; $i++ )
  162. {
  163.     $numbers[ $i . 'px' ] = $i;
  164. }
  165.  
  166. $avia_elements[] = array(
  167.             'slug'      => 'layout',
  168.             'name'      => __( 'Frame Width', 'avia_framework' ),
  169.             'desc'      => __( 'Modify the frame color by changing the Body Background in', 'avia_framework' ) .
  170.                                 " <a href='#goto_styling'>" .
  171.                                 __( 'General Styling', 'avia_framework' ) .
  172.                                 '</a>',
  173.             'id'        => 'color-frame_width',
  174.             'type'      => 'select',
  175.             'std'       => '20',
  176.             'class'     => 'av_2columns av_col_2',
  177.             'required' => array( 'color-body_style', '{contains}framed' ),
  178.             'no_first'  => true,
  179.             'globalcss' => true,
  180.             'subtype'   => $numbers
  181.         );
  182.  
  183. $avia_elements[] = array(
  184.             'slug'      => 'layout',
  185.             'name'      => __( 'Logo And Main Menu', 'avia_framework' ),
  186.             'desc'      => __( 'You can place your logo and main menu at the top of your site or within a sidebar', 'avia_framework' ),
  187.             'id'        => 'header_position',
  188.             'type'      => 'select',
  189.             'std'       => 'header_top',
  190.             'class'     => 'av_2columns av_col_2',
  191.             'target'    => array( 'default_layout_target, #avia_default_slideshow_target::.avprev-layout-container, .avprev-design-container::set_id_single' ),
  192.             'no_first'  => true,
  193.             'globalcss' => true,
  194.             'subtype'   => array(
  195.                                 __( 'Top Header', 'avia_framework' )    => 'header_top',
  196.                                 __( 'Left Sidebar', 'avia_framework' )  => 'header_left header_sidebar',
  197.                                 __( 'Right Sidebar', 'avia_framework' ) => 'header_right header_sidebar',
  198.                             )
  199.         );
  200.  
  201.  
  202. $avia_elements[] = array(
  203.             'slug'      => 'layout',
  204.             'name'      => __( 'Content Alignment', 'avia_framework' ),
  205.             'desc'      => __( 'If the window width exceeds the maximum content width, where do you want to place your content', 'avia_framework' ),
  206.             'id'        => 'layout_align_content',
  207.             'type'      => 'select',
  208.             'std'       => 'content_align_center',
  209.             'class'     => 'av_2columns av_col_1',
  210.             'required'  => array( 'header_position', '{contains}header_sidebar' ),
  211.             'no_first'  => true,
  212.             'globalcss' => true,
  213.             'subtype'   => array(
  214.                                 __( 'Center Content', 'avia_framework' )        => 'content_align_center',
  215.                                 __( 'Position at the Left', 'avia_framework' )  => 'content_align_left',
  216.                                 __( 'Position at the Right', 'avia_framework' ) => 'content_align_right',
  217.                             )
  218.         );
  219.  
  220.  
  221. $avia_elements[] = array(
  222.             'slug'      => 'layout',
  223.             'name'      => __( 'Sticky Sidebar Menu', 'avia_framework' ),
  224.             'desc'      => __( 'You can choose if you want a sticky sidebar that does not scroll with the content', 'avia_framework' ),
  225.             'id'        => 'sidebarmenu_sticky',
  226.             'type'      => 'select',
  227.             'std'       => 'conditional_sticky',
  228.             'class'     => 'av_2columns av_col_2',
  229.             'required'  => array( 'header_position', '{contains}header_sidebar' ),
  230.             'no_first'  => true,
  231.             'globalcss' => true,
  232.             'subtype'   => array(
  233.                                 __( 'Sticky if Sidebar is smaller than the screen height, scroll otherwise', 'avia_framework' ) => 'conditional_sticky',
  234.                                 __( 'Always Sticky', 'avia_framework' ) => 'always_sticky',
  235.                                 __( 'Never Sticky', 'avia_framework' )  => 'never_sticky',
  236.                             )
  237.         );
  238.  
  239. $avia_elements[] = array(
  240.             'slug'      => 'layout',
  241.             'name'      => __( 'Main Menu Sidebar', 'avia_framework' ),
  242.             'desc'      => __( 'You can choose to use the main menu area to also display widget areas', 'avia_framework' ),
  243.             'id'        => 'sidebarmenu_widgets',
  244.             'type'      => 'select_sidebar',
  245.             'std'       => '',
  246.             'no_first'  => true,
  247.             'required'  => array( 'header_position', '{contains}header_sidebar' ),
  248.             'target'    => array( 'default_layout_target::.avprev-layout-container-widget::set_active' ),
  249.             'exclude'   => array(), /*eg: 'Displayed Everywhere'*/
  250.             'additions' => array(
  251.                                 'No widgets'                        => '',
  252.                                 /* 'Display Widgets by page logic'  => 'av-auto-widget-logic', */
  253.                                 'Display a specific Widget Area'    => '%result%'
  254.                             ),
  255.             'globalcss' => true
  256.         );
  257.  
  258. $avia_elements[] = array(
  259.             'slug'      => 'layout',
  260.             'name'      => __( 'Display Social Icons Below Main Menu', 'avia_framework' ),
  261.             'desc'      => __( 'Check to display. You can set your social icons at', 'avia_framework' ) .
  262.                                 ' <a href="#goto_social">' .
  263.                                     __( 'Social Profiles', 'avia_framework' ) .
  264.                                 '</a>',
  265.             'id'        => 'sidebarmenu_social',
  266.             'type'      => 'checkbox',
  267.             'std'       => '',
  268.             'target'    => array( 'default_layout_target::.avprev-layout-container-social::set_active' ),
  269.             'required'  => array( 'header_position', '{contains}header_sidebar' ),
  270.             'globalcss' => true
  271.         );
  272.  
  273.  
  274.  
  275. // END TAB
  276. $avia_elements[] = array(
  277.             'slug'          => 'layout',
  278.             'type'          => 'visual_group_end',
  279.             'id'            => 'avia_layout_tab1_end',
  280.             'nodescription' => true
  281.         );
  282.  
  283.  
  284. // START TAB
  285. $avia_elements[] = array(
  286.             'slug'          => 'layout',
  287.             'name'          => __( 'Dimensions', 'avia_framework' ),
  288.             'type'          => 'visual_group_start',
  289.             'id'            => 'avia_layout_tab2_start',
  290.             'class'         => 'avia_tab avia_tab2',
  291.             'nodescription' => true
  292.         );
  293.  
  294. $avia_elements[] = array(
  295.             'slug'      => 'layout',
  296.             'name'      => __( 'Responsive Site', 'avia_framework' ),
  297.             'desc'      => __( 'If enabled the size of your website will adapt and change the layout to fit smaller screens, like tablets or mobile phones', 'avia_framework' ),
  298.             'id'        => 'responsive_active',
  299.             'type'      => 'checkbox',
  300.             'std'       => 'enabled',
  301.             'globalcss' => true
  302.         );
  303.  
  304. $avia_elements[] = array(
  305.             'slug'      => 'layout',
  306.             'name'      => __( 'Maximum Container Width', 'avia_framework' ),
  307.             'desc'      => __( 'Enter the maximum content width for your site. Pixel and % are allowed eg: 1130px, 1310px, 100% ', 'avia_framework' ),
  308.             'id'        => 'responsive_size',
  309.             'type'      => 'text',
  310.             'std'       => '1310px',
  311.             'required'  => array( 'responsive_active', '{contains}enabled' ),
  312.             'globalcss' => true
  313.         );
  314.  
  315. $avia_elements[] = array(
  316.             'slug'      => 'layout',
  317.             'name'      => __( 'Content | Sidebar Ratio', 'avia_framework' ),
  318.             'desc'      => __( 'Here you can choose the width of your content and sidebar. First Number indicates the content width, second number indicates sidebar width.', 'avia_framework' ) .'<br/><strong>'.__( 'Note:', 'avia_framework' ) .'</strong> '.
  319.                                 __( 'If you want to disable sidebars you can do so in the', 'avia_framework' ) .
  320.                                 " <a href='#goto_sidebars'>" .
  321.                                     __( 'Sidebar Settings', 'avia_framework' ) .
  322.                                 '</a>',
  323.             'id'        => 'content_width',
  324.             'type'      => 'select',
  325.             'std'       => '73',
  326.             'target'    => array( 'default_layout_target::.avprev-layout-content::width' ),
  327.             'no_first'  => true,
  328.             'globalcss' => true,
  329.             'subtype'   => array(
  330.                                 '80% | 20%' => '80',
  331.                                 '79% | 21%' => '79',
  332.                                 '78% | 22%' => '78',
  333.                                 '77% | 23%' => '77',
  334.                                 '76% | 24%' => '76',
  335.                                 '75% | 25%' => '75',
  336.                                 '74% | 26%' => '74',
  337.                                 '73% | 27%' => '73',
  338.                                 '72% | 28%' => '72',
  339.                                 '71% | 29%' => '71',
  340.  
  341.                                 '70% | 30%' => '70',
  342.                                 '69% | 31%' => '69',
  343.                                 '68% | 32%' => '68',
  344.                                 '67% | 33%' => '67',
  345.                                 '66% | 34%' => '66',
  346.                                 '65% | 35%' => '65',
  347.                                 '64% | 36%' => '64',
  348.                                 '63% | 37%' => '63',
  349.                                 '62% | 38%' => '62',
  350.                                 '61% | 39%' => '61',
  351.  
  352.                                 '60% | 40%' => '60',
  353.                                 '59% | 41%' => '59',
  354.                                 '58% | 42%' => '58',
  355.                                 '57% | 43%' => '57',
  356.                                 '56% | 44%' => '56',
  357.                                 '55% | 45%' => '55',
  358.                                 '54% | 46%' => '54',
  359.                                 '53% | 47%' => '53',
  360.                                 '52% | 48%' => '52',
  361.                                 '51% | 49%' => '51',
  362.                                 '50% | 50%' => '50'
  363.                             )
  364.         );
  365.  
  366. $numbers = array();
  367. for( $i = 100; $i >= 50; $i-- )
  368. {
  369.     $numbers[ $i . '%' ] = $i;
  370. }
  371.  
  372. $avia_elements[] = array(
  373.             'slug'      => 'layout',
  374.             'name'      => __( 'Content + Sidebar Width', 'avia_framework' ),
  375.             'desc'      => __( 'Here you can enter the combined width of content and sidebar', 'avia_framework' ),
  376.             'id'        => 'combined_width',
  377.             'type'      => 'select',
  378.             'std'       => '100',
  379.             'target'    => array( 'default_layout_target::.avprev-layout-container-sizer::width' ),
  380.             'no_first'  => true,
  381.             'globalcss' => true,
  382.             'subtype'   => $numbers
  383.         );
  384.  
  385.  
  386. // END TAB
  387. $avia_elements[] = array(
  388.             'slug'          => 'layout',
  389.             'type'          => 'visual_group_end',
  390.             'id'            => 'avia_layout_tab2_end',
  391.             'nodescription' => true
  392.         );
  393.  
  394. //END TAB CONTAINER
  395. $avia_elements[] = array(
  396.             'slug'          => 'layout',
  397.             'type'          => 'visual_group_end',
  398.             'id'            => 'avia_layout_container_end',
  399.             'nodescription' => true
  400.         );
  401.  
  402.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement