Adds option to hide search input on header.
This commit is contained in:
parent
4e73c4f631
commit
ab2a4c49ee
|
@ -316,7 +316,7 @@ nav{
|
||||||
|
|
||||||
> li{
|
> li{
|
||||||
&.menu-item {
|
&.menu-item {
|
||||||
padding-right: 48px;
|
padding-left: 42px;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
|
@ -468,7 +468,7 @@ nav{
|
||||||
}
|
}
|
||||||
|
|
||||||
& > .navbar {
|
& > .navbar {
|
||||||
margin-right: 16px !important;
|
margin-right: 32px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tainacan-icon-menu,
|
.tainacan-icon-menu,
|
||||||
|
|
|
@ -92,10 +92,31 @@ function tainacan_customize_register( $wp_customize ) {
|
||||||
'description' => __( 'This checkbox shows the "Proudly Powered by Tainacan and Wordpress" sentence.', 'tainacan-interface' ),
|
'description' => __( 'This checkbox shows the "Proudly Powered by Tainacan and Wordpress" sentence.', 'tainacan-interface' ),
|
||||||
) );
|
) );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Header settings
|
||||||
|
*/
|
||||||
|
$wp_customize->add_section('tainacan_header_settings', array(
|
||||||
|
'title' => __( 'Header settings', 'tainacan-interface' ),
|
||||||
|
'priority' => 61,
|
||||||
|
));
|
||||||
|
|
||||||
|
// Hide search input on header
|
||||||
|
$wp_customize->add_setting( 'tainacan_hide_search_input', array(
|
||||||
|
'type' => 'theme_mod',
|
||||||
|
'default' => false,
|
||||||
|
'capability' => 'edit_theme_options',
|
||||||
|
'sanitize_callback' => 'tainacan_callback_sanitize_checkbox',
|
||||||
|
) );
|
||||||
|
$wp_customize->add_control( 'tainacan_hide_search_input', array(
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'settings' => 'tainacan_hide_search_input',
|
||||||
|
'section' => 'tainacan_header_settings',
|
||||||
|
'label' => __( 'Hide search icon and input', 'tainacan-interface' ),
|
||||||
|
) );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Social Share Links
|
* Social Share Links
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$wp_customize->add_section('tainacan_social_share', array(
|
$wp_customize->add_section('tainacan_social_share', array(
|
||||||
'title' => __( 'Social Share', 'tainacan-interface' ),
|
'title' => __( 'Social Share', 'tainacan-interface' ),
|
||||||
'priority' => 171,
|
'priority' => 171,
|
||||||
|
@ -1748,7 +1769,8 @@ function tainacan_get_color_scheme_css( $colors ) {
|
||||||
.tainacan-slide-main-view .slide-control-arrow .icon .tainacan-icon::before {
|
.tainacan-slide-main-view .slide-control-arrow .icon .tainacan-icon::before {
|
||||||
color: {$colors['tainacan_link_color']};
|
color: {$colors['tainacan_link_color']};
|
||||||
}
|
}
|
||||||
.tainacan-slides-list #tainacan-slide-container .tainacan-slide-item.active-item img {
|
.tainacan-slides-list #tainacan-slide-container .tainacan-slide-item.active-item img,
|
||||||
|
.tainacan-slides-list #tainacan-slide-container .swiper-slide.swiper-slide-active img {
|
||||||
border-bottom: 4px solid {$colors['tainacan_link_color']};
|
border-bottom: 4px solid {$colors['tainacan_link_color']};
|
||||||
}
|
}
|
||||||
/** Abas no modal de termos */
|
/** Abas no modal de termos */
|
||||||
|
@ -1909,14 +1931,12 @@ function tainacan_get_color_scheme_css( $colors ) {
|
||||||
.slide-control-arrow .icon .tainacan-icon::before {
|
.slide-control-arrow .icon .tainacan-icon::before {
|
||||||
color: {$colors['tainacan_link_color']};
|
color: {$colors['tainacan_link_color']};
|
||||||
}
|
}
|
||||||
#tainacan-slide-container .tainacan-slide-item.active-item.active-item img {
|
|
||||||
border-bottom: 4px solid {$colors['tainacan_link_color']} !important;
|
|
||||||
}
|
|
||||||
.metadata-menu .metadata-menu-header hr {
|
.metadata-menu .metadata-menu-header hr {
|
||||||
background-color: {$colors['backtransparent']};
|
background-color: {$colors['backtransparent']};
|
||||||
}
|
}
|
||||||
|
|
||||||
.slide-title-area .play-button .icon {
|
.slide-title-area .play-button .icon,
|
||||||
|
.slide-title-area .play-button:hover .icon {
|
||||||
border: 3px solid {$colors['tainacan_link_color']};
|
border: 3px solid {$colors['tainacan_link_color']};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,19 +41,27 @@
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="btn-group" style="padding: 0.6rem 0rem;">
|
<div class="btn-group" style="padding: 0.6rem 0rem;">
|
||||||
|
|
||||||
|
<?php if (!get_theme_mod('tainacan_hide_search_input', false)) : ?>
|
||||||
<form class="form-horizontal my-2 my-md-0 tainacan-search-form d-none d-md-block" [formGroup]="searchForm" role="form" (keyup.enter)="onSubmit()" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
<form class="form-horizontal my-2 my-md-0 tainacan-search-form d-none d-md-block" [formGroup]="searchForm" role="form" (keyup.enter)="onSubmit()" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="text" name="s" placeholder="<?php esc_attr_e( 'Search', 'tainacan-interface' ); ?>" class="form-control" formControlName="searchText" size="50">
|
<input type="text" name="s" placeholder="<?php esc_attr_e( 'Search', 'tainacan-interface' ); ?>" class="form-control" formControlName="searchText" size="50">
|
||||||
<span class="text-midnight-blue input-group-btn tainacan-icon tainacan-icon-search form-control-feedback"></span>
|
<span class="text-midnight-blue input-group-btn icon form-control-feedback">
|
||||||
|
<i class="tainacan-icon tainacan-icon-search"></i>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div class="dropdown tainacan-form-dropdown d-md-none">
|
<div class="dropdown tainacan-form-dropdown d-md-none">
|
||||||
<a class="btn btn-link text-midnight-blue px-1 dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="tainacan-icon tainacan-icon-search"></i><i class="tainacan-icon tainacan-icon-close"></i></a>
|
<a class="btn btn-link text-midnight-blue px-1 dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
<i class="tainacan-icon tainacan-icon-search"></i>
|
||||||
|
<i class="tainacan-icon tainacan-icon-close"></i>
|
||||||
|
</a>
|
||||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
|
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
|
||||||
<?php get_search_form(); ?>
|
<?php get_search_form(); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue