Skip to content

Commit

Permalink
Fixes for backgrounds, and mobile nav
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Powers committed May 22, 2013
1 parent 8f29444 commit 9f4ef5d
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 7 deletions.
26 changes: 21 additions & 5 deletions editor/editor.color.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,22 @@ function __construct( ){

add_filter('pl_settings_array', array(&$this, 'add_settings'));
add_filter('pless_vars', array(&$this, 'add_less_vars'));
if( $this->background );
add_action( 'wp_enqueue_scripts', array(&$this, 'background_fit'));

if($this->background)
add_filter('wp_enqueue_scripts', array(&$this, 'background_fit'));

// add_filter('pagelines_body_classes', array(&$this, 'add_body_classes'));



}

function add_body_classes($classes){

$classes[] = ( pl_setting('supersize_bg') ) ? 'fit-bg' : '';

return $classes;

}

function add_less_vars( $vars ){
Expand All @@ -40,9 +54,11 @@ function background( $bg_color ){
$image = $this->background;

if($image && $fit){

$background = $bg_color;
}
elseif($image && !$fit){

} elseif($image && !$fit){

$repeat = pl_setting('page_background_image_repeat');
$pos_x = pl_setting('page_background_image_pos_hor');
$pos_y = pl_setting('page_background_image_pos_vert');
Expand Down Expand Up @@ -218,7 +234,7 @@ function options(){
'key' => 'page_background_image_attach',
'type' => 'select',
'label' => __( 'Set Background Attachment', 'pagelines' ),
'default' => 'scroll',
'default' => 'fixed',
'opts' => array(
'scroll' => array('name' => __( 'Scroll', 'pagelines' )),
'fixed' => array('name' => __( 'Fixed', 'pagelines' )),
Expand Down
2 changes: 2 additions & 0 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
</div>
</footer>
</div>

</div>
<div id="supersized"></div>
</div>
<?php

Expand Down
4 changes: 2 additions & 2 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
do_action('override_pagelines_body_output');

else: ?>
<div id="site" class="boxed-wrap site-wrap <?php echo pagelines_layout_mode();?>">
<div id="site" class="site-wrap <?php echo pagelines_layout_mode();?>">

<?php pagelines_register_hook('pagelines_before_page'); // Hook ?>
<div class="site-translate">
<div class="boxed-wrap site-translate">
<div id="fixed-top" class="pl-fixed-top" data-region="fixed-top">
<?php pagelines_template_area('pagelines_fixed_top', 'fixed_top'); // Hook ?>
</div>
Expand Down
4 changes: 4 additions & 0 deletions less/pl-structure.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
body {
position:relative;
zoom:1;

.site-wrap{
background: @bodyBackground;
position: relative;
z-index: 0;
}


}

Expand Down

0 comments on commit 9f4ef5d

Please sign in to comment.