diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 42573cb9..00000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Sass -.sass-cache/ \ No newline at end of file diff --git a/assets/js/theme.js b/assets/js/theme.js index 0c83ac6c..70058537 100644 --- a/assets/js/theme.js +++ b/assets/js/theme.js @@ -73,7 +73,7 @@ } )(); function res() { headerH = jQuery('.site-header').height(); - jQuery('.hero-fullscreen-slideshow ').css('height',(w.outerHeight()-headerH+1)+'px'); + jQuery('.hero-slideshow-fullscreen').css('height',(w.outerHeight()-headerH+1)+'px'); } /** diff --git a/assets/sass/_sections.scss b/assets/sass/_sections.scss index 0e1c57f9..80b03873 100644 --- a/assets/sass/_sections.scss +++ b/assets/sass/_sections.scss @@ -42,11 +42,20 @@ } } } +.help-message { + padding: 10px 20px; + background-color: #f8f9f9; + border-radius: 2px; + border-bottom: 1px solid #f2f2f2; + p { + margin-bottom: 0px; + } + margin-bottom: 20px; +} /* Section: Hero ------------------------------*/ -.hero-fullscreen-slideshow { - height: 800px; +.hero-slideshow-wrapper { width: 100%; position: relative; background-color: #000000 !important; @@ -61,6 +70,16 @@ display: block; content: ""; } +} +.hero-slideshow-normal { + .container { + padding: 10% 0px; + position: relative; + z-index: 80; + + } +} +.hero-slideshow-fullscreen { .container { z-index: 80; position: relative; @@ -70,6 +89,7 @@ } } + /* Hero Text Style1. */ .hero-content-style1 { text-align: center; diff --git a/inc/customizer.php b/inc/customizer.php index 2720dc12..6e99195d 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -341,6 +341,54 @@ function onepress_customize_register( $wp_customize ) { ) ); + // Show hero full screen + $wp_customize->add_setting( 'onepress_hero_fullscreen', + array( + 'sanitize_callback' => 'onepress_sanitize_checkbox', + 'default' => '', + ) + ); + $wp_customize->add_control( 'onepress_hero_fullscreen', + array( + 'type' => 'checkbox', + 'label' => __('Make hero section full screen', 'onepress'), + 'section' => 'onepress_hero_settings', + 'description' => esc_html__('Check this box to make hero section full screen.', 'onepress'), + ) + ); + + // Hero content padding top + $wp_customize->add_setting( 'onepress_hero_pdtop', + array( + 'sanitize_callback' => 'onepress_sanitize_text', + 'default' => __('10', 'onepress'), + ) + ); + $wp_customize->add_control( 'onepress_hero_pdtop', + array( + 'label' => __('Padding Top:', 'onepress'), + 'section' => 'onepress_hero_settings', + 'description' => 'The hero content padding top in percent (%).', + 'active_callback' => 'onepress_hero_fullscreen_callback' + ) + ); + + // Hero content padding bottom + $wp_customize->add_setting( 'onepress_hero_pdbotom', + array( + 'sanitize_callback' => 'onepress_sanitize_text', + 'default' => __('10', 'onepress'), + ) + ); + $wp_customize->add_control( 'onepress_hero_pdbotom', + array( + 'label' => __('Padding Bottom:', 'onepress'), + 'section' => 'onepress_hero_settings', + 'description' => 'The hero content padding bottom in percent (%).', + 'active_callback' => 'onepress_hero_fullscreen_callback' + ) + ); + $wp_customize->add_section( 'onepress_hero_images' , array( 'priority' => 6, @@ -1403,6 +1451,14 @@ function onepress_sanitize_file_url( $file_url ) { return $output; } +function onepress_hero_fullscreen_callback ( $control ) { + if ( $control->manager->get_setting('onepress_hero_fullscreen')->value() == '' ) { + return true; + } else { + return false; + } +} + function onepress_sanitize_number( $input ) { return force_balance_tags( $input ); } diff --git a/section-parts/section-about.php b/section-parts/section-about.php index 510bdc73..a3b65ee8 100644 --- a/section-parts/section-about.php +++ b/section-parts/section-about.php @@ -12,7 +12,7 @@ ' . esc_html( $onepress_about_subtitle ) . ''; ?> ' . esc_html( $onepress_about_title ) . ''; ?> - +