first commit
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
if ( ! function_exists( 'calla_elated_search_opener_icon_size' ) ) {
|
||||
function calla_elated_search_opener_icon_size() {
|
||||
$icon_size = calla_elated_options()->getOptionValue( 'header_search_icon_size' );
|
||||
|
||||
if ( ! empty( $icon_size ) ) {
|
||||
echo calla_elated_dynamic_css( '.eltdf-search-opener', array(
|
||||
'font-size' => calla_elated_filter_px( $icon_size ) . 'px'
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'calla_elated_style_dynamic', 'calla_elated_search_opener_icon_size' );
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'calla_elated_search_opener_icon_colors' ) ) {
|
||||
function calla_elated_search_opener_icon_colors() {
|
||||
$icon_color = calla_elated_options()->getOptionValue( 'header_search_icon_color' );
|
||||
$icon_hover_color = calla_elated_options()->getOptionValue( 'header_search_icon_hover_color' );
|
||||
|
||||
if ( ! empty( $icon_color ) ) {
|
||||
echo calla_elated_dynamic_css( '.eltdf-search-opener', array(
|
||||
'color' => $icon_color
|
||||
) );
|
||||
}
|
||||
|
||||
if ( ! empty( $icon_hover_color ) ) {
|
||||
echo calla_elated_dynamic_css( '.eltdf-search-opener:hover', array(
|
||||
'color' => $icon_hover_color
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'calla_elated_style_dynamic', 'calla_elated_search_opener_icon_colors' );
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'calla_elated_search_opener_text_styles' ) ) {
|
||||
function calla_elated_search_opener_text_styles() {
|
||||
$item_styles = calla_elated_get_typography_styles( 'search_icon_text' );
|
||||
|
||||
$item_selector = array(
|
||||
'.eltdf-search-icon-text'
|
||||
);
|
||||
|
||||
echo calla_elated_dynamic_css( $item_selector, $item_styles );
|
||||
|
||||
$text_hover_color = calla_elated_options()->getOptionValue( 'search_icon_text_color_hover' );
|
||||
|
||||
if ( ! empty( $text_hover_color ) ) {
|
||||
echo calla_elated_dynamic_css( '.eltdf-search-opener:hover .eltdf-search-icon-text', array(
|
||||
'color' => $text_hover_color
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'calla_elated_style_dynamic', 'calla_elated_search_opener_text_styles' );
|
||||
}
|
||||
@@ -0,0 +1,399 @@
|
||||
<?php
|
||||
|
||||
if ( ! function_exists( 'calla_elated_get_search_types_options' ) ) {
|
||||
function calla_elated_get_search_types_options() {
|
||||
$search_type_options = apply_filters( 'calla_elated_search_type_global_option', $search_type_options = array() );
|
||||
|
||||
return $search_type_options;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'calla_elated_search_options_map' ) ) {
|
||||
function calla_elated_search_options_map() {
|
||||
|
||||
calla_elated_add_admin_page(
|
||||
array(
|
||||
'slug' => '_search_page',
|
||||
'title' => esc_html__( 'Search', 'calla' ),
|
||||
'icon' => 'fa fa-search'
|
||||
)
|
||||
);
|
||||
|
||||
$search_page_panel = calla_elated_add_admin_panel(
|
||||
array(
|
||||
'title' => esc_html__( 'Search Page', 'calla' ),
|
||||
'name' => 'search_template',
|
||||
'page' => '_search_page'
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'name' => 'search_page_layout',
|
||||
'type' => 'select',
|
||||
'label' => esc_html__( 'Layout', 'calla' ),
|
||||
'default_value' => 'in-grid',
|
||||
'description' => esc_html__( 'Set layout. Default is in grid.', 'calla' ),
|
||||
'parent' => $search_page_panel,
|
||||
'options' => array(
|
||||
'in-grid' => esc_html__( 'In Grid', 'calla' ),
|
||||
'full-width' => esc_html__( 'Full Width', 'calla' )
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'name' => 'search_page_sidebar_layout',
|
||||
'type' => 'select',
|
||||
'label' => esc_html__( 'Sidebar Layout', 'calla' ),
|
||||
'description' => esc_html__( "Choose a sidebar layout for search page", 'calla' ),
|
||||
'default_value' => 'no-sidebar',
|
||||
'options' => calla_elated_get_custom_sidebars_options(),
|
||||
'parent' => $search_page_panel
|
||||
)
|
||||
);
|
||||
|
||||
$calla_custom_sidebars = calla_elated_get_custom_sidebars();
|
||||
if ( count( $calla_custom_sidebars ) > 0 ) {
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'name' => 'search_custom_sidebar_area',
|
||||
'type' => 'selectblank',
|
||||
'label' => esc_html__( 'Sidebar to Display', 'calla' ),
|
||||
'description' => esc_html__( 'Choose a sidebar to display on search page. Default sidebar is "Sidebar"', 'calla' ),
|
||||
'parent' => $search_page_panel,
|
||||
'options' => $calla_custom_sidebars,
|
||||
'args' => array(
|
||||
'select2' => true
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$search_panel = calla_elated_add_admin_panel(
|
||||
array(
|
||||
'title' => esc_html__( 'Search', 'calla' ),
|
||||
'name' => 'search',
|
||||
'page' => '_search_page'
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'parent' => $search_panel,
|
||||
'type' => 'select',
|
||||
'name' => 'search_type',
|
||||
'default_value' => 'fullscreen',
|
||||
'label' => esc_html__( 'Select Search Type', 'calla' ),
|
||||
'description' => esc_html__( "Choose a type of Select search bar (Note: Slide From Header Bottom search type doesn't work with Vertical Header)", 'calla' ),
|
||||
'options' => calla_elated_get_search_types_options()
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'parent' => $search_panel,
|
||||
'type' => 'select',
|
||||
'name' => 'search_icon_source',
|
||||
'default_value' => 'icon_pack',
|
||||
'label' => esc_html__( 'Select Search Icon Source', 'calla' ),
|
||||
'description' => esc_html__( 'Choose whether you would like to use icons from an icon pack or SVG icons', 'calla' ),
|
||||
'options' => calla_elated_get_icon_sources_array()
|
||||
)
|
||||
);
|
||||
|
||||
$search_icon_pack_container = calla_elated_add_admin_container(
|
||||
array(
|
||||
'parent' => $search_panel,
|
||||
'name' => 'search_icon_pack_container',
|
||||
'dependency' => array(
|
||||
'show' => array(
|
||||
'search_icon_source' => 'icon_pack'
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'parent' => $search_icon_pack_container,
|
||||
'type' => 'select',
|
||||
'name' => 'search_icon_pack',
|
||||
'default_value' => 'font_elegant',
|
||||
'label' => esc_html__( 'Search Icon Pack', 'calla' ),
|
||||
'description' => esc_html__( 'Choose icon pack for search icon', 'calla' ),
|
||||
'options' => calla_elated_icon_collections()->getIconCollectionsExclude( array( 'linea_icons', 'dripicons', 'simple_line_icons' ) )
|
||||
)
|
||||
);
|
||||
|
||||
$search_svg_path_container = calla_elated_add_admin_container(
|
||||
array(
|
||||
'parent' => $search_panel,
|
||||
'name' => 'search_icon_svg_path_container',
|
||||
'dependency' => array(
|
||||
'show' => array(
|
||||
'search_icon_source' => 'svg_path'
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'parent' => $search_svg_path_container,
|
||||
'type' => 'textarea',
|
||||
'name' => 'search_icon_svg_path',
|
||||
'label' => esc_html__( 'Search Icon SVG Path', 'calla' ),
|
||||
'description' => esc_html__( 'Enter your search icon SVG path here. Please remove version and id attributes from your SVG path because of HTML validation', 'calla' ),
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'parent' => $search_svg_path_container,
|
||||
'type' => 'textarea',
|
||||
'name' => 'search_close_icon_svg_path',
|
||||
'label' => esc_html__( 'Search Close Icon SVG Path', 'calla' ),
|
||||
'description' => esc_html__( 'Enter your search close icon SVG path here. Please remove version and id attributes from your SVG path because of HTML validation', 'calla' ),
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'parent' => $search_panel,
|
||||
'type' => 'yesno',
|
||||
'name' => 'search_in_grid',
|
||||
'default_value' => 'yes',
|
||||
'label' => esc_html__( 'Enable Grid Layout', 'calla' ),
|
||||
'description' => esc_html__( 'Set search area to be in grid. (Applied for Search covers header type)', 'calla' ),
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_section_title(
|
||||
array(
|
||||
'parent' => $search_panel,
|
||||
'name' => 'initial_header_icon_title',
|
||||
'title' => esc_html__( 'Initial Search Icon in Header', 'calla' )
|
||||
)
|
||||
);
|
||||
|
||||
$search_icon_pack_icon_styles_container = calla_elated_add_admin_container(
|
||||
array(
|
||||
'parent' => $search_panel,
|
||||
'name' => 'search_icon_pack_icon_styles_container',
|
||||
'dependency' => array(
|
||||
'show' => array(
|
||||
'search_icon_source' => 'icon_pack'
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'parent' => $search_icon_pack_icon_styles_container,
|
||||
'type' => 'text',
|
||||
'name' => 'header_search_icon_size',
|
||||
'default_value' => '',
|
||||
'label' => esc_html__( 'Icon Size', 'calla' ),
|
||||
'description' => esc_html__( 'Set size for icon', 'calla' ),
|
||||
'args' => array(
|
||||
'col_width' => 3,
|
||||
'suffix' => 'px'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$search_icon_color_group = calla_elated_add_admin_group(
|
||||
array(
|
||||
'parent' => $search_panel,
|
||||
'title' => esc_html__( 'Icon Colors', 'calla' ),
|
||||
'description' => esc_html__( 'Define color style for icon', 'calla' ),
|
||||
'name' => 'search_icon_color_group'
|
||||
)
|
||||
);
|
||||
|
||||
$search_icon_color_row = calla_elated_add_admin_row(
|
||||
array(
|
||||
'parent' => $search_icon_color_group,
|
||||
'name' => 'search_icon_color_row'
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'parent' => $search_icon_color_row,
|
||||
'type' => 'colorsimple',
|
||||
'name' => 'header_search_icon_color',
|
||||
'label' => esc_html__( 'Color', 'calla' )
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'parent' => $search_icon_color_row,
|
||||
'type' => 'colorsimple',
|
||||
'name' => 'header_search_icon_hover_color',
|
||||
'label' => esc_html__( 'Hover Color', 'calla' )
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'parent' => $search_panel,
|
||||
'type' => 'yesno',
|
||||
'name' => 'enable_search_icon_text',
|
||||
'default_value' => 'no',
|
||||
'label' => esc_html__( 'Enable Search Icon Text', 'calla' ),
|
||||
'description' => esc_html__( "Enable this option to show 'Search' text next to search icon in header", 'calla' )
|
||||
)
|
||||
);
|
||||
|
||||
$enable_search_icon_text_container = calla_elated_add_admin_container(
|
||||
array(
|
||||
'parent' => $search_panel,
|
||||
'name' => 'enable_search_icon_text_container',
|
||||
'dependency' => array(
|
||||
'show' => array(
|
||||
'enable_search_icon_text' => 'yes'
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$enable_search_icon_text_group = calla_elated_add_admin_group(
|
||||
array(
|
||||
'parent' => $enable_search_icon_text_container,
|
||||
'title' => esc_html__( 'Search Icon Text', 'calla' ),
|
||||
'name' => 'enable_search_icon_text_group',
|
||||
'description' => esc_html__( 'Define style for search icon text', 'calla' )
|
||||
)
|
||||
);
|
||||
|
||||
$enable_search_icon_text_row = calla_elated_add_admin_row(
|
||||
array(
|
||||
'parent' => $enable_search_icon_text_group,
|
||||
'name' => 'enable_search_icon_text_row'
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'parent' => $enable_search_icon_text_row,
|
||||
'type' => 'colorsimple',
|
||||
'name' => 'search_icon_text_color',
|
||||
'label' => esc_html__( 'Text Color', 'calla' )
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'parent' => $enable_search_icon_text_row,
|
||||
'type' => 'colorsimple',
|
||||
'name' => 'search_icon_text_color_hover',
|
||||
'label' => esc_html__( 'Text Hover Color', 'calla' )
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'parent' => $enable_search_icon_text_row,
|
||||
'type' => 'textsimple',
|
||||
'name' => 'search_icon_text_font_size',
|
||||
'label' => esc_html__( 'Font Size', 'calla' ),
|
||||
'default_value' => '',
|
||||
'args' => array(
|
||||
'suffix' => 'px'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'parent' => $enable_search_icon_text_row,
|
||||
'type' => 'textsimple',
|
||||
'name' => 'search_icon_text_line_height',
|
||||
'label' => esc_html__( 'Line Height', 'calla' ),
|
||||
'default_value' => '',
|
||||
'args' => array(
|
||||
'suffix' => 'px'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$enable_search_icon_text_row2 = calla_elated_add_admin_row(
|
||||
array(
|
||||
'parent' => $enable_search_icon_text_group,
|
||||
'name' => 'enable_search_icon_text_row2',
|
||||
'next' => true
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'parent' => $enable_search_icon_text_row2,
|
||||
'type' => 'selectblanksimple',
|
||||
'name' => 'search_icon_text_text_transform',
|
||||
'label' => esc_html__( 'Text Transform', 'calla' ),
|
||||
'default_value' => '',
|
||||
'options' => calla_elated_get_text_transform_array()
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'parent' => $enable_search_icon_text_row2,
|
||||
'type' => 'fontsimple',
|
||||
'name' => 'search_icon_text_google_fonts',
|
||||
'label' => esc_html__( 'Font Family', 'calla' ),
|
||||
'default_value' => '-1',
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'parent' => $enable_search_icon_text_row2,
|
||||
'type' => 'selectblanksimple',
|
||||
'name' => 'search_icon_text_font_style',
|
||||
'label' => esc_html__( 'Font Style', 'calla' ),
|
||||
'default_value' => '',
|
||||
'options' => calla_elated_get_font_style_array(),
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'parent' => $enable_search_icon_text_row2,
|
||||
'type' => 'selectblanksimple',
|
||||
'name' => 'search_icon_text_font_weight',
|
||||
'label' => esc_html__( 'Font Weight', 'calla' ),
|
||||
'default_value' => '',
|
||||
'options' => calla_elated_get_font_weight_array(),
|
||||
)
|
||||
);
|
||||
|
||||
$enable_search_icon_text_row3 = calla_elated_add_admin_row(
|
||||
array(
|
||||
'parent' => $enable_search_icon_text_group,
|
||||
'name' => 'enable_search_icon_text_row3',
|
||||
'next' => true
|
||||
)
|
||||
);
|
||||
|
||||
calla_elated_add_admin_field(
|
||||
array(
|
||||
'parent' => $enable_search_icon_text_row3,
|
||||
'type' => 'textsimple',
|
||||
'name' => 'search_icon_text_letter_spacing',
|
||||
'label' => esc_html__( 'Letter Spacing', 'calla' ),
|
||||
'default_value' => '',
|
||||
'args' => array(
|
||||
'suffix' => 'px'
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
add_action( 'calla_elated_options_map', 'calla_elated_search_options_map', 7 );
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/* ==========================================================================
|
||||
Search responsive styles - begin
|
||||
========================================================================== */
|
||||
/* common mixins - start */
|
||||
/* common mixins - end */
|
||||
/* mixins styles - start */
|
||||
/* mixins styles - end */
|
||||
/* ==========================================================================
|
||||
# Search template responsive style - begin
|
||||
========================================================================== */
|
||||
@media only screen and (max-width: 1024px) {
|
||||
.eltdf-search-page-holder article .eltdf-post-image {
|
||||
width: 80px;
|
||||
}
|
||||
.eltdf-search-page-holder article .eltdf-post-title-area {
|
||||
padding: 0 0 0 105px;
|
||||
min-height: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 680px) {
|
||||
.eltdf-search-page-holder article .eltdf-post-image {
|
||||
width: 60px;
|
||||
}
|
||||
.eltdf-search-page-holder article .eltdf-post-title-area {
|
||||
padding: 0 0 0 80px;
|
||||
min-height: 60px;
|
||||
}
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
# Search template responsive style - end
|
||||
========================================================================== */
|
||||
/* ==========================================================================
|
||||
# Fullscreen search responsive - start
|
||||
========================================================================== */
|
||||
@media only screen and (max-width: 1024px) {
|
||||
.eltdf-fullscreen-search-holder .eltdf-form-holder-inner {
|
||||
width: 75%;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
.eltdf-fullscreen-search-holder .eltdf-search-submit {
|
||||
font-size: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 480px) {
|
||||
.eltdf-fullscreen-search-holder .eltdf-form-holder-inner {
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
# Fullscreen search responsive - end
|
||||
========================================================================== */
|
||||
/* ==========================================================================
|
||||
Search responsive styles - end
|
||||
========================================================================== */
|
||||
|
||||
/*# sourceMappingURL=search-map-responsive.css.map */
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"search-map-responsive.css","sources":["search/assets/css/scss/search-map-responsive.scss","../../assets/css/scss/_variables.scss","../../assets/css/scss/_mixins.scss","search/assets/css/scss/responsive/common/_search-page-responsive.scss","search/types/fullscreen/assets/css/scss/responsive/_fullscreen-responsive.scss"],"names":[],"mappings":"AAAA;;gFAEgF;AEkKhF,2BAA2B;AAqL3B,yBAAyB;AAEzB,2BAA2B;AA+B3B,yBAAyB;AC1XzB;;6EAE6E;ADqZ5E,MAAM,MAAM,MAAM,MAAM,SAAS,EAAE,MAAM;ECjZtC,AAIQ,yBAJiB,CAErB,OAAO,CAEH,iBAAiB,CAAC;IACd,KAAK,EAAE,IAAI;GACd;EANT,AAQQ,yBARiB,CAErB,OAAO,CAMH,sBAAsB,CAAC;IACnB,OAAO,EAAE,WAAW;IACpB,UAAU,EAAE,IAAI;GACnB;;;ADkZZ,MAAM,MAAM,MAAM,MAAM,SAAS,EAAE,KAAK;EC3YrC,AAIQ,yBAJiB,CAErB,OAAO,CAEH,iBAAiB,CAAC;IACd,KAAK,EAAE,IAAI;GACd;EANT,AAQQ,yBARiB,CAErB,OAAO,CAMH,sBAAsB,CAAC;IACnB,OAAO,EAAE,UAAU;IACnB,UAAU,EAAE,IAAI;GACnB;;;AAIb;;6EAE6E;ACzC7E;;6EAE6E;AFqZ5E,MAAM,MAAM,MAAM,MAAM,SAAS,EAAE,MAAM;EEnZ1C,AAIQ,+BAJuB,CAIvB,wBAAwB,CAAC;IACrB,KAAK,EAAE,GAAG;GACb;;;AFmZR,MAAM,MAAM,MAAM,MAAM,SAAS,EAAE,KAAK;EEzZzC,AAWQ,+BAXuB,CAWvB,oBAAoB,CAAC;IACjB,SAAS,EAAE,IAAI;GAClB;;;AFwZR,MAAM,MAAM,MAAM,MAAM,SAAS,EAAE,KAAK;EErazC,AAkBQ,+BAlBuB,CAkBvB,wBAAwB,CAAC;IACrB,KAAK,EAAE,GAAG;GACb;;;AAGT;;6EAE6E;AJpB7E;;gFAEgF","sourceRoot":"../../../../../css"}
|
||||
@@ -0,0 +1,758 @@
|
||||
/* ==========================================================================
|
||||
Search styles - begin
|
||||
========================================================================== */
|
||||
/* common mixins - start */
|
||||
/* common mixins - end */
|
||||
/* mixins styles - start */
|
||||
/* mixins styles - end */
|
||||
/* ==========================================================================
|
||||
# Search opener - begin
|
||||
========================================================================== */
|
||||
.eltdf-search-opener {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.eltdf-search-opener .eltdf-search-opener-wrapper > * {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.eltdf-search-opener .eltdf-search-opener-wrapper > *:before {
|
||||
display: block;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.eltdf-search-opener.eltdf-search-opener-svg-path .eltdf-search-opener-wrapper > * {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.eltdf-search-opener.eltdf-search-opener-svg-path .eltdf-search-opener-wrapper > *,
|
||||
.eltdf-search-opener.eltdf-search-opener-svg-path .eltdf-search-opener-wrapper path {
|
||||
fill: currentColor;
|
||||
stroke: currentColor;
|
||||
}
|
||||
|
||||
.eltdf-light-header .eltdf-page-header > div:not(.eltdf-sticky-header):not(.fixed) .eltdf-search-opener,
|
||||
.eltdf-light-header .eltdf-top-bar .eltdf-search-opener {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.eltdf-light-header .eltdf-page-header > div:not(.eltdf-sticky-header):not(.fixed) .eltdf-search-opener:hover,
|
||||
.eltdf-light-header .eltdf-top-bar .eltdf-search-opener:hover {
|
||||
color: rgba(255, 255, 255, 0.8) !important;
|
||||
}
|
||||
|
||||
.eltdf-dark-header .eltdf-page-header > div:not(.eltdf-sticky-header):not(.fixed) .eltdf-search-opener,
|
||||
.eltdf-dark-header .eltdf-top-bar .eltdf-search-opener {
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
.eltdf-dark-header .eltdf-page-header > div:not(.eltdf-sticky-header):not(.fixed) .eltdf-search-opener:hover,
|
||||
.eltdf-dark-header .eltdf-top-bar .eltdf-search-opener:hover {
|
||||
color: rgba(51, 51, 51, 0.8) !important;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
# Search opener - end
|
||||
========================================================================== */
|
||||
/* ==========================================================================
|
||||
# Search template style - begin
|
||||
========================================================================== */
|
||||
.eltdf-search-page-holder {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
vertical-align: middle;
|
||||
margin: 0 0 80px;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder .eltdf-search-page-form {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
vertical-align: middle;
|
||||
margin: 0 0 30px;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder .eltdf-search-page-form .eltdf-search-title {
|
||||
margin: 0 0 20px;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder .eltdf-search-page-form .eltdf-search-label {
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder .eltdf-search-page-form .eltdf-form-holder {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
vertical-align: middle;
|
||||
margin: 0 0 10px;
|
||||
clear: both;
|
||||
border-bottom: 1px solid #c9c9c9;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder .eltdf-search-page-form .eltdf-form-holder .eltdf-column-left {
|
||||
display: table-cell;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder .eltdf-search-page-form .eltdf-form-holder .eltdf-column-right {
|
||||
display: table-cell;
|
||||
width: 1%;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder .eltdf-search-page-form .eltdf-form-holder .eltdf-search-field {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
margin: 0;
|
||||
padding: 0 20px 0 3px;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
outline: 0;
|
||||
vertical-align: middle;
|
||||
-webkit-appearance: none;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder .eltdf-search-page-form .eltdf-form-holder .eltdf-search-field::-webkit-input-placeholder {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder .eltdf-search-page-form .eltdf-form-holder .eltdf-search-field:-moz-placeholder {
|
||||
color: inherit;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder .eltdf-search-page-form .eltdf-form-holder .eltdf-search-field::-moz-placeholder {
|
||||
color: inherit;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder .eltdf-search-page-form .eltdf-form-holder .eltdf-search-field:-ms-input-placeholder {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder .eltdf-search-page-form .eltdf-form-holder .eltdf-search-submit {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding: 0;
|
||||
font-size: 18px;
|
||||
color: #676767;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
-webkit-transition: color 0.2s ease-in-out;
|
||||
-moz-transition: color 0.2s ease-in-out;
|
||||
transition: color 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder .eltdf-search-page-form .eltdf-form-holder .eltdf-search-submit:hover {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder article {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
vertical-align: middle;
|
||||
padding: 30px 0;
|
||||
margin: 0;
|
||||
border-bottom: 1px solid #c9c9c9;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder article.sticky .eltdf-post-title a {
|
||||
color: #b97a56;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder article.page .eltdf-post-title-area .eltdf-post-info > div.eltdf-post-info-category {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder article .eltdf-post-content {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder article .eltdf-post-image {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder article .eltdf-post-image a, .eltdf-search-page-holder article .eltdf-post-image img {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder article .eltdf-post-title-area {
|
||||
min-height: 130px;
|
||||
padding: 0 0 0 150px;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder article .eltdf-post-title-area.eltdf-no-thumbnail {
|
||||
padding: 0;
|
||||
min-height: inherit;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder article .eltdf-post-title-area .eltdf-post-title-area-inner {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder article .eltdf-post-title-area .eltdf-post-title-area-inner .eltdf-post-title {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder article .eltdf-post-title-area .eltdf-post-title-area-inner .eltdf-post-excerpt {
|
||||
margin: 7px 0 0;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder article .eltdf-post-title-area .eltdf-post-title-area-inner .eltdf-post-read-more-button {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.eltdf-search-page-holder .eltdf-blog-pagination {
|
||||
margin: 50px 0 0;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
# Search template style - end
|
||||
========================================================================== */
|
||||
/* ==========================================================================
|
||||
# Search covers header - start
|
||||
========================================================================== */
|
||||
.eltdf-search-cover {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 67px;
|
||||
display: none;
|
||||
background-color: #FFF;
|
||||
border-top: 1px solid #e9e9e9;
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
z-index: 115;
|
||||
}
|
||||
|
||||
.eltdf-search-cover .eltdf-container,
|
||||
.eltdf-search-cover .eltdf-container-inner {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.eltdf-fixed-header-appear .eltdf-search-cover,
|
||||
.eltdf-sticky-header-appear .eltdf-search-cover,
|
||||
.eltdf-mobile-header.mobile-header-appear .eltdf-search-cover {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
.eltdf-fixed-header-appear.admin-bar .eltdf-search-cover,
|
||||
.eltdf-sticky-header-appear.admin-bar .eltdf-search-cover,
|
||||
.admin-bar .eltdf-mobile-header.mobile-header-appear .eltdf-search-cover {
|
||||
top: 32px;
|
||||
}
|
||||
|
||||
.eltdf-search-cover .eltdf-form-holder-outer {
|
||||
display: table;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.eltdf-search-cover .eltdf-form-holder {
|
||||
position: relative;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
padding: 5px 111px 0;
|
||||
}
|
||||
|
||||
.eltdf-search-cover .eltdf-form-holder-inner {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.eltdf-search-cover .eltdf-container-inner .eltdf-form-holder {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.eltdf-search-cover .eltdf-container-inner .eltdf-search-close {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.eltdf-search-cover input {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 90%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
float: left;
|
||||
font-family: "Crimson Text", cursive;
|
||||
color: #676767;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
box-shadow: none;
|
||||
outline: none;
|
||||
outline-offset: 0;
|
||||
border-radius: 0;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.eltdf-search-cover input:focus {
|
||||
color: #676767;
|
||||
}
|
||||
|
||||
.eltdf-search-cover input::-webkit-input-placeholder {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.eltdf-search-cover input:-moz-placeholder {
|
||||
color: inherit;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.eltdf-search-cover input::-moz-placeholder {
|
||||
color: inherit;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.eltdf-search-cover input:-ms-input-placeholder {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.eltdf-search-cover input[type="submit"] {
|
||||
border: 0 none;
|
||||
clip: rect(0px, 0px, 0px, 0px);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.eltdf-search-cover .eltdf-search-close {
|
||||
position: absolute;
|
||||
right: -6px;
|
||||
top: 50%;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
-webkit-transform: translateY(-50%);
|
||||
-moz-transform: translateY(-50%);
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.eltdf-search-cover .eltdf-search-close.eltdf-search-close-icon-pack {
|
||||
color: #676767;
|
||||
font-size: 25px;
|
||||
line-height: 1em;
|
||||
}
|
||||
|
||||
.eltdf-search-cover .eltdf-search-close.eltdf-search-close-icon-pack span {
|
||||
display: block;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.eltdf-search-cover .eltdf-search-close.eltdf-search-close-icon-pack span:before {
|
||||
display: block;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.eltdf-search-cover .eltdf-search-close.eltdf-search-close-icon-pack:hover {
|
||||
color: #b97a56;
|
||||
}
|
||||
|
||||
.eltdf-search-cover .eltdf-search-close.eltdf-search-close-svg-path > * {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.eltdf-search-cover .eltdf-search-close.eltdf-search-close-svg-path > *,
|
||||
.eltdf-search-cover .eltdf-search-close.eltdf-search-close-svg-path path {
|
||||
fill: currentColor;
|
||||
stroke: currentColor;
|
||||
}
|
||||
|
||||
.eltdf-search-cover.disabled input,
|
||||
.eltdf-search-cover.disabled input:focus {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.eltdf-fixed-on-scroll .eltdf-search-cover .eltdf-search-close {
|
||||
transform: none;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
# Search covers header - end
|
||||
========================================================================== */
|
||||
/* ==========================================================================
|
||||
# Fullscreen search - start
|
||||
========================================================================== */
|
||||
/* Fullscreen search general style - start
|
||||
========================================================================== */
|
||||
.eltdf-fullscreen-search-holder {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 105;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.eltdf-fullscreen-search-holder .eltdf-fullscreen-search-table {
|
||||
display: table;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.eltdf-fullscreen-search-holder .eltdf-fullscreen-search-cell {
|
||||
position: relative;
|
||||
display: table-cell;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.eltdf-fullscreen-search-holder .eltdf-form-holder-inner {
|
||||
position: relative;
|
||||
width: 40%;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.eltdf-fullscreen-search-holder .eltdf-form-holder-inner .eltdf-line {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: -2px;
|
||||
width: 0;
|
||||
border-bottom: 1px solid #c9c9c9;
|
||||
-webkit-transition: all 0.3s 0.2s;
|
||||
-moz-transition: all 0.3s 0.2s;
|
||||
transition: all 0.3s 0.2s;
|
||||
}
|
||||
|
||||
.eltdf-fullscreen-search-opened .eltdf-fullscreen-search-holder .eltdf-form-holder-inner .eltdf-line {
|
||||
width: 100%;
|
||||
-webkit-transition: width 0.5s ease 0.6s;
|
||||
-moz-transition: width 0.5s ease 0.6s;
|
||||
transition: width 0.5s ease 0.6s;
|
||||
}
|
||||
|
||||
.eltdf-fullscreen-search-holder .eltdf-field-holder {
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.eltdf-fullscreen-search-holder .eltdf-search-field {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
border: 0;
|
||||
padding: 0 20px 10px;
|
||||
margin-bottom: 0;
|
||||
background: transparent;
|
||||
outline: none;
|
||||
font-family: inherit;
|
||||
font-size: 25px;
|
||||
color: #333333;
|
||||
line-height: 2em;
|
||||
}
|
||||
|
||||
.eltdf-fullscreen-search-holder .eltdf-search-submit {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: -20px;
|
||||
width: auto;
|
||||
color: #333333;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
outline: none;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
-webkit-transition: all 0.3s 0.2s;
|
||||
-moz-transition: all 0.3s 0.2s;
|
||||
transition: all 0.3s 0.2s;
|
||||
}
|
||||
|
||||
.eltdf-fullscreen-search-holder .eltdf-search-submit.eltdf-search-submit-icon-pack {
|
||||
font-size: 18px;
|
||||
line-height: 1em;
|
||||
}
|
||||
|
||||
.eltdf-fullscreen-search-holder .eltdf-search-submit.eltdf-search-submit-svg-path > *,
|
||||
.eltdf-fullscreen-search-holder .eltdf-search-submit.eltdf-search-submit-svg-path path {
|
||||
fill: currentColor;
|
||||
stroke: currentColor;
|
||||
}
|
||||
|
||||
.eltdf-fullscreen-search-holder .eltdf-search-submit:hover {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.eltdf-fullscreen-search-opened .eltdf-fullscreen-search-holder .eltdf-search-submit {
|
||||
opacity: 1;
|
||||
bottom: 10px;
|
||||
-webkit-transition: color 0.2s ease, opacity 0.2s ease-out 1.1s, bottom 0.4s ease-out 0.9s;
|
||||
-moz-transition: color 0.2s ease, opacity 0.2s ease-out 1.1s, bottom 0.4s ease-out 0.9s;
|
||||
transition: color 0.2s ease, opacity 0.2s ease-out 1.1s, bottom 0.4s ease-out 0.9s;
|
||||
}
|
||||
|
||||
.eltdf-fullscreen-search-holder .eltdf-search-close {
|
||||
position: absolute;
|
||||
top: 33px;
|
||||
right: 70px;
|
||||
color: #676767;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.eltdf-fullscreen-search-holder .eltdf-search-close.eltdf-search-close-icon-pack {
|
||||
font-size: 25px;
|
||||
line-height: 1em;
|
||||
}
|
||||
|
||||
.eltdf-fullscreen-search-holder .eltdf-search-close.eltdf-search-close-icon-pack span {
|
||||
display: block;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.eltdf-fullscreen-search-holder .eltdf-search-close.eltdf-search-close-icon-pack span:before {
|
||||
display: block;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.eltdf-fullscreen-search-holder .eltdf-search-close.eltdf-search-close-svg-path > * {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.eltdf-fullscreen-search-holder .eltdf-search-close.eltdf-search-close-svg-path > *,
|
||||
.eltdf-fullscreen-search-holder .eltdf-search-close.eltdf-search-close-svg-path path {
|
||||
fill: currentColor;
|
||||
stroke: currentColor;
|
||||
}
|
||||
|
||||
.admin-bar .eltdf-fullscreen-search-holder .eltdf-search-close {
|
||||
top: 72px;
|
||||
}
|
||||
|
||||
.eltdf-fullscreen-search-holder .eltdf-search-close:hover {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
/* Fullscreen search general style - end
|
||||
========================================================================== */
|
||||
/* Fullscreen search fade style - start
|
||||
========================================================================== */
|
||||
.eltdf-search-fade .eltdf-fullscreen-search-holder {
|
||||
visibility: hidden;
|
||||
-webkit-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
opacity: 0;
|
||||
z-index: 112;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.eltdf-search-fade .eltdf-fullscreen-search-holder .eltdf-fullscreen-search-table {
|
||||
background-color: rgba(255, 255, 255, 0.98);
|
||||
}
|
||||
|
||||
.eltdf-search-fade-out.eltdf-search-fade .eltdf-fullscreen-search-holder {
|
||||
-webkit-animation: search_fade_out 0.2s ease-out both;
|
||||
-moz-animation: search_fade_out 0.2s ease-out both;
|
||||
animation: search_fade_out 0.2s ease-out both;
|
||||
}
|
||||
|
||||
.eltdf-search-fade-in.eltdf-search-fade .eltdf-fullscreen-search-holder.eltdf-animate {
|
||||
-webkit-animation: search_fade_in 0.3s ease both;
|
||||
-moz-animation: search_fade_in 0.3s ease both;
|
||||
animation: search_fade_in 0.3s ease both;
|
||||
}
|
||||
|
||||
.eltdf-search-fade .eltdf-fullscreen-search-holder.eltdf-animate .eltdf-search-close {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
@-webkit-keyframes search_fade_out {
|
||||
0% {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes search_fade_out {
|
||||
0% {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes search_fade_in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes search_fade_in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
|
||||
/* Fullscreen search fade style - end
|
||||
========================================================================== */
|
||||
/* ==========================================================================
|
||||
# Fullscreen search - end
|
||||
========================================================================== */
|
||||
/* ==========================================================================
|
||||
# Slide From Header Bottom search general style - start
|
||||
========================================================================== */
|
||||
.eltdf-slide-from-header-bottom-holder {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
right: 0;
|
||||
width: 300px;
|
||||
display: none;
|
||||
padding: 25px;
|
||||
margin: 0;
|
||||
background-color: #fff;
|
||||
border: 1px solid #c9c9c9;
|
||||
overflow: hidden;
|
||||
z-index: 9999;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.eltdf-fixed-header-appear .eltdf-slide-from-header-bottom-holder,
|
||||
.eltdf-sticky-header-appear .eltdf-slide-from-header-bottom-holder,
|
||||
.eltdf-mobile-header.mobile-header-appear .eltdf-slide-from-header-bottom-holder {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
.eltdf-slide-from-header-bottom-holder .eltdf-form-holder {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
vertical-align: middle;
|
||||
border: 1px solid #c9c9c9;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.eltdf-slide-from-header-bottom-holder .eltdf-form-holder .eltdf-search-field,
|
||||
.eltdf-slide-from-header-bottom-holder .eltdf-form-holder .eltdf-search-submit {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
float: left;
|
||||
margin: 0;
|
||||
height: 44px;
|
||||
line-height: 42px;
|
||||
color: #676767;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
outline: 0;
|
||||
-webkit-appearance: none;
|
||||
box-sizing: border-box;
|
||||
-webkit-transition: color 0.2s ease-out;
|
||||
-moz-transition: color 0.2s ease-out;
|
||||
transition: color 0.2s ease-out;
|
||||
}
|
||||
|
||||
.eltdf-slide-from-header-bottom-holder .eltdf-form-holder .eltdf-search-field {
|
||||
width: calc(100% - 40px);
|
||||
padding: 0 10px 0 20px;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
.eltdf-slide-from-header-bottom-holder .eltdf-form-holder .eltdf-search-field:focus {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.eltdf-slide-from-header-bottom-holder .eltdf-form-holder .eltdf-search-submit {
|
||||
width: 40px;
|
||||
padding: 0 12px 0 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.eltdf-slide-from-header-bottom-holder .eltdf-form-holder .eltdf-search-submit.eltdf-search-submit-icon-pack {
|
||||
font-size: 15px;
|
||||
line-height: 1em;
|
||||
}
|
||||
|
||||
.eltdf-slide-from-header-bottom-holder .eltdf-form-holder .eltdf-search-submit.eltdf-search-submit-icon-pack span {
|
||||
display: block;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.eltdf-slide-from-header-bottom-holder .eltdf-form-holder .eltdf-search-submit.eltdf-search-submit-icon-pack span:before {
|
||||
display: block;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.eltdf-slide-from-header-bottom-holder .eltdf-form-holder .eltdf-search-submit.eltdf-search-submit-svg-path > * {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.eltdf-slide-from-header-bottom-holder .eltdf-form-holder .eltdf-search-submit.eltdf-search-submit-svg-path > *,
|
||||
.eltdf-slide-from-header-bottom-holder .eltdf-form-holder .eltdf-search-submit.eltdf-search-submit-svg-path path {
|
||||
fill: currentColor;
|
||||
stroke: currentColor;
|
||||
}
|
||||
|
||||
.eltdf-slide-from-header-bottom-holder .eltdf-form-holder .eltdf-search-submit:hover {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
# Slide From Header Bottom search general style - end
|
||||
========================================================================== */
|
||||
/* ==========================================================================
|
||||
Search styles - end
|
||||
========================================================================== */
|
||||
|
||||
/*# sourceMappingURL=search-map.css.map */
|
||||
File diff suppressed because one or more lines are too long
177
wp-content/themes/calla/framework/modules/search/functions.php
Normal file
177
wp-content/themes/calla/framework/modules/search/functions.php
Normal file
@@ -0,0 +1,177 @@
|
||||
<?php
|
||||
|
||||
if ( ! function_exists( 'calla_elated_include_search_types_before_load' ) ) {
|
||||
/**
|
||||
* Load's all header types before load files by going through all folders that are placed directly in header types folder.
|
||||
* Functions from this files before-load are used to set all hooks and variables before global options map are init
|
||||
*/
|
||||
function calla_elated_include_search_types_before_load() {
|
||||
foreach ( glob( ELATED_FRAMEWORK_SEARCH_ROOT_DIR . '/types/*/before-load.php' ) as $module_load ) {
|
||||
include_once $module_load;
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'calla_elated_options_map', 'calla_elated_include_search_types_before_load', 1 ); // 1 is set to just be before header option map init
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'calla_elated_load_search' ) ) {
|
||||
function calla_elated_load_search() {
|
||||
$search_type_meta = calla_elated_options()->getOptionValue( 'search_type' );
|
||||
$search_type = ! empty( $search_type_meta ) ? $search_type_meta : 'fullscreen';
|
||||
|
||||
if ( calla_elated_active_widget( false, false, 'eltdf_search_opener' ) ) {
|
||||
include_once ELATED_FRAMEWORK_MODULES_ROOT_DIR . '/search/types/' . $search_type . '/' . $search_type . '.php';
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'init', 'calla_elated_load_search' );
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'calla_elated_get_holder_params_search' ) ) {
|
||||
/**
|
||||
* Function which return holder class and holder inner class for blog pages
|
||||
*/
|
||||
function calla_elated_get_holder_params_search() {
|
||||
$params_list = array();
|
||||
|
||||
$layout = calla_elated_options()->getOptionValue( 'search_page_layout' );
|
||||
if ( $layout == 'in-grid' ) {
|
||||
$params_list['holder'] = 'eltdf-container';
|
||||
$params_list['inner'] = 'eltdf-container-inner clearfix';
|
||||
} else {
|
||||
$params_list['holder'] = 'eltdf-full-width';
|
||||
$params_list['inner'] = 'eltdf-full-width-inner';
|
||||
}
|
||||
|
||||
/**
|
||||
* Available parameters for holder params
|
||||
* -holder
|
||||
* -inner
|
||||
*/
|
||||
return apply_filters( 'calla_elated_search_holder_params', $params_list );
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'calla_elated_get_search_page' ) ) {
|
||||
function calla_elated_get_search_page() {
|
||||
$sidebar_layout = calla_elated_sidebar_layout();
|
||||
|
||||
$params = array(
|
||||
'sidebar_layout' => $sidebar_layout
|
||||
);
|
||||
|
||||
calla_elated_get_module_template_part( 'templates/holder', 'search', '', $params );
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'calla_elated_get_search_page_layout' ) ) {
|
||||
/**
|
||||
* Function which create query for blog lists
|
||||
*/
|
||||
function calla_elated_get_search_page_layout() {
|
||||
global $wp_query;
|
||||
$path = apply_filters( 'calla_elated_search_page_path', 'templates/page' );
|
||||
$type = apply_filters( 'calla_elated_search_page_layout', 'default' );
|
||||
$module = apply_filters( 'calla_elated_search_page_module', 'search' );
|
||||
$plugin = apply_filters( 'calla_elated_search_page_plugin_override', false );
|
||||
|
||||
if ( get_query_var( 'paged' ) ) {
|
||||
$paged = get_query_var( 'paged' );
|
||||
} elseif ( get_query_var( 'page' ) ) {
|
||||
$paged = get_query_var( 'page' );
|
||||
} else {
|
||||
$paged = 1;
|
||||
}
|
||||
|
||||
$params = array(
|
||||
'type' => $type,
|
||||
'query' => $wp_query,
|
||||
'paged' => $paged,
|
||||
'max_num_pages' => calla_elated_get_max_number_of_pages(),
|
||||
);
|
||||
|
||||
$params = apply_filters( 'calla_elated_search_page_params', $params );
|
||||
|
||||
calla_elated_get_module_template_part( $path . '/' . $type, $module, '', $params, $plugin );
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'calla_elated_get_search_submit_icon_class' ) ) {
|
||||
/**
|
||||
* Loads search submit icon class
|
||||
*/
|
||||
function calla_elated_get_search_submit_icon_class() {
|
||||
|
||||
$search_icon_source = calla_elated_options()->getOptionValue( 'search_icon_source' );
|
||||
|
||||
$search_close_icon_class_array = array(
|
||||
'eltdf-search-submit'
|
||||
);
|
||||
|
||||
$search_close_icon_class_array[] = $search_icon_source == 'icon_pack' ? 'eltdf-search-submit-icon-pack' : 'eltdf-search-submit-svg-path';
|
||||
|
||||
return $search_close_icon_class_array;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'calla_elated_get_search_close_icon_class' ) ) {
|
||||
/**
|
||||
* Loads search close icon class
|
||||
*/
|
||||
function calla_elated_get_search_close_icon_class() {
|
||||
|
||||
$search_icon_source = calla_elated_options()->getOptionValue( 'search_icon_source' );
|
||||
|
||||
$search_close_icon_class_array = array(
|
||||
'eltdf-search-close'
|
||||
);
|
||||
|
||||
$search_close_icon_class_array[] = $search_icon_source == 'icon_pack' ? 'eltdf-search-close-icon-pack' : 'eltdf-search-close-svg-path';
|
||||
|
||||
return $search_close_icon_class_array;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'calla_elated_get_search_icon_html' ) ) {
|
||||
/**
|
||||
* Loads search close icon HTML
|
||||
*/
|
||||
function calla_elated_get_search_icon_html() {
|
||||
|
||||
$search_icon_source = calla_elated_options()->getOptionValue( 'search_icon_source' );
|
||||
$search_icon_pack = calla_elated_options()->getOptionValue( 'search_icon_pack' );
|
||||
$search_icon_svg_path = calla_elated_options()->getOptionValue( 'search_icon_svg_path' );
|
||||
|
||||
$search_icon_html = '';
|
||||
|
||||
if ( ( $search_icon_source == 'icon_pack' ) && isset( $search_icon_pack ) ) {
|
||||
$search_icon_html .= calla_elated_icon_collections()->getSearchIcon( $search_icon_pack, false );
|
||||
} else if ( isset( $search_icon_svg_path ) ) {
|
||||
$search_icon_html .= $search_icon_svg_path;
|
||||
}
|
||||
|
||||
return $search_icon_html;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'calla_elated_get_search_close_icon_html' ) ) {
|
||||
/**
|
||||
* Loads search close icon HTML
|
||||
*/
|
||||
function calla_elated_get_search_close_icon_html() {
|
||||
|
||||
$search_icon_source = calla_elated_options()->getOptionValue( 'search_icon_source' );
|
||||
$search_icon_pack = calla_elated_options()->getOptionValue( 'search_icon_pack' );
|
||||
$search_close_icon_svg_path = calla_elated_options()->getOptionValue( 'search_close_icon_svg_path' );
|
||||
|
||||
$search_close_icon_html = '';
|
||||
|
||||
if ( ( $search_icon_source == 'icon_pack' ) && isset( $search_icon_pack ) ) {
|
||||
$search_close_icon_html .= calla_elated_icon_collections()->getSearchClose( $search_icon_pack, false );
|
||||
} else if ( isset( $search_close_icon_svg_path ) ) {
|
||||
$search_close_icon_html .= $search_close_icon_svg_path;
|
||||
}
|
||||
|
||||
return $search_close_icon_html;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
include_once ELATED_FRAMEWORK_MODULES_ROOT_DIR . '/search/functions.php';
|
||||
|
||||
//load global search options
|
||||
include_once ELATED_FRAMEWORK_MODULES_ROOT_DIR . '/search/admin/options-map/search-map.php';
|
||||
|
||||
//load global search custom styles
|
||||
include_once ELATED_FRAMEWORK_MODULES_ROOT_DIR . '/search/admin/custom-styles/search-custom-styles.php';
|
||||
@@ -0,0 +1,13 @@
|
||||
<div class="eltdf-grid-row">
|
||||
<div <?php echo calla_elated_get_content_sidebar_class(); ?>>
|
||||
<div class="eltdf-search-page-holder">
|
||||
<?php calla_elated_get_search_page_layout(); ?>
|
||||
</div>
|
||||
<?php do_action( 'calla_elated_page_after_content' ); ?>
|
||||
</div>
|
||||
<?php if ( $sidebar_layout !== 'no-sidebar' ) { ?>
|
||||
<div <?php echo calla_elated_get_sidebar_holder_class(); ?>>
|
||||
<?php get_sidebar(); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php calla_elated_get_module_template_part( 'templates/parts/search-form', 'search', '', $params ); ?>
|
||||
<?php calla_elated_get_module_template_part( 'templates/parts/loop', 'search', '', $params ); ?>
|
||||
<?php calla_elated_get_module_template_part( 'templates/parts/pagination', 'search', '', $params ); ?>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?>
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<div class="eltdf-post-content">
|
||||
<?php if ( has_post_thumbnail() ) { ?>
|
||||
<div class="eltdf-post-image">
|
||||
<a itemprop="url" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
|
||||
<?php the_post_thumbnail( 'thumbnail' ); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="eltdf-post-title-area <?php if ( ! has_post_thumbnail() ) { echo esc_attr( 'eltdf-no-thumbnail' ); } ?>">
|
||||
<div class="eltdf-post-title-area-inner">
|
||||
<h5 itemprop="name" class="eltdf-post-title entry-title">
|
||||
<a itemprop="url" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
|
||||
</h5>
|
||||
<?php
|
||||
$eltdf_my_excerpt = get_the_excerpt();
|
||||
|
||||
if ( ! empty( $eltdf_my_excerpt ) ) { ?>
|
||||
<p itemprop="description" class="eltdf-post-excerpt"><?php echo wp_trim_words( esc_html( $eltdf_my_excerpt ), 30 ); ?></p>
|
||||
<?php } ?>
|
||||
<div class="eltdf-post-read-more-button">
|
||||
<a itemprop="url" href="<?php echo get_the_permalink(); ?>" target="_self" class="eltdf-btn eltdf-btn-medium eltdf-btn-simple eltdf-blog-list-button">
|
||||
<span class="eltdf-btn-text"><?php esc_html_e( 'Zobacz', 'calla' ); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<p class="eltdf-blog-no-posts"><?php esc_html_e( 'No posts were found.', 'calla' ); ?></p>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
calla_elated_get_module_template_part( 'templates/parts/pagination/standard', 'blog', '', $params );
|
||||
@@ -0,0 +1,11 @@
|
||||
<form action="<?php echo esc_url( home_url( '/' ) ); ?>" class="eltdf-search-page-form" method="get">
|
||||
<h3 class="eltdf-search-title"><?php esc_html_e( 'Nowe wyszukiwanie:', 'calla' ); ?></h3>
|
||||
<div class="eltdf-form-holder">
|
||||
<div class="eltdf-column-left">
|
||||
<input type="text" name="s" class="eltdf-search-field" autocomplete="off" value="" placeholder="<?php esc_attr_e( 'Wpisz tutaj...', 'calla' ); ?>"/>
|
||||
</div>
|
||||
<div class="eltdf-column-right">
|
||||
<button type="submit" class="eltdf-search-submit"><span class="icon_search"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,96 @@
|
||||
(function($) {
|
||||
"use strict";
|
||||
|
||||
var searchCoversHeader = {};
|
||||
eltdf.modules.searchCoversHeader = searchCoversHeader;
|
||||
|
||||
searchCoversHeader.eltdfOnDocumentReady = eltdfOnDocumentReady;
|
||||
|
||||
$(document).ready(eltdfOnDocumentReady);
|
||||
|
||||
/*
|
||||
All functions to be called on $(document).ready() should be in this function
|
||||
*/
|
||||
function eltdfOnDocumentReady() {
|
||||
eltdfSearchCoversHeader();
|
||||
}
|
||||
|
||||
/**
|
||||
* Init Search Types
|
||||
*/
|
||||
function eltdfSearchCoversHeader() {
|
||||
if ( eltdf.body.hasClass( 'eltdf-search-covers-header' ) ) {
|
||||
|
||||
var searchOpener = $('a.eltdf-search-opener');
|
||||
|
||||
if (searchOpener.length > 0) {
|
||||
searchOpener.on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var thisSearchOpener = $(this),
|
||||
searchFormHeight,
|
||||
searchFormHeaderHolder = $('.eltdf-page-header'),
|
||||
searchFormTopHeaderHolder = $('.eltdf-top-bar'),
|
||||
searchFormFixedHeaderHolder = searchFormHeaderHolder.find('.eltdf-fixed-wrapper.fixed'),
|
||||
searchFormMobileHeaderHolder = $('.eltdf-mobile-header'),
|
||||
searchForm = $('.eltdf-search-cover'),
|
||||
searchFormIsInTopHeader = !!thisSearchOpener.parents('.eltdf-top-bar').length,
|
||||
searchFormIsInCenteredHeader = !!thisSearchOpener.parents('.eltdf-menu-area').length && !!thisSearchOpener.parents('.eltdf-header-centered').length,
|
||||
searchFormIsInFixedHeader = !!thisSearchOpener.parents('.eltdf-fixed-wrapper.fixed').length,
|
||||
searchFormIsInStickyHeader = !!thisSearchOpener.parents('.eltdf-sticky-header').length,
|
||||
searchFormIsInMobileHeader = !!thisSearchOpener.parents('.eltdf-mobile-header').length;
|
||||
|
||||
searchForm.removeClass('eltdf-is-active');
|
||||
|
||||
//Find search form position in header and height
|
||||
if (searchFormIsInTopHeader) {
|
||||
searchFormHeight = eltdfGlobalVars.vars.eltdfTopBarHeight;
|
||||
searchFormTopHeaderHolder.find('.eltdf-search-cover').addClass('eltdf-is-active');
|
||||
|
||||
} else if (searchFormIsInCenteredHeader) {
|
||||
searchFormHeight = thisSearchOpener.parents('.eltdf-menu-area').outerHeight();
|
||||
searchFormHeaderHolder.children('.eltdf-search-cover').addClass('eltdf-is-active');
|
||||
} else if (searchFormIsInFixedHeader) {
|
||||
searchFormHeight = searchFormFixedHeaderHolder.outerHeight();
|
||||
searchFormHeaderHolder.children('.eltdf-search-cover').addClass('eltdf-is-active');
|
||||
|
||||
} else if (searchFormIsInStickyHeader) {
|
||||
searchFormHeight = searchFormHeaderHolder.find('.eltdf-sticky-header').outerHeight();
|
||||
searchFormHeaderHolder.children('.eltdf-search-cover').addClass('eltdf-is-active');
|
||||
|
||||
} else if (searchFormIsInMobileHeader) {
|
||||
if (searchFormMobileHeaderHolder.hasClass('mobile-header-appear')) {
|
||||
searchFormHeight = searchFormMobileHeaderHolder.children('.eltdf-mobile-header-inner').outerHeight();
|
||||
} else {
|
||||
searchFormHeight = searchFormMobileHeaderHolder.outerHeight();
|
||||
}
|
||||
|
||||
searchFormMobileHeaderHolder.find('.eltdf-search-cover').addClass('eltdf-is-active');
|
||||
|
||||
} else {
|
||||
searchFormHeight = searchFormHeaderHolder.outerHeight();
|
||||
searchFormHeaderHolder.children('.eltdf-search-cover').addClass('eltdf-is-active');
|
||||
}
|
||||
|
||||
if (searchForm.hasClass('eltdf-is-active')) {
|
||||
searchForm.height(searchFormHeight).stop(true).fadeIn(600).find('input[type="text"]').focus();
|
||||
}
|
||||
|
||||
searchForm.find('.eltdf-search-close').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
searchForm.stop(true).fadeOut(450);
|
||||
});
|
||||
|
||||
searchForm.blur(function () {
|
||||
searchForm.stop(true).fadeOut(450);
|
||||
});
|
||||
|
||||
$(window).scroll(function () {
|
||||
searchForm.stop(true).fadeOut(450);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
if ( ! function_exists( 'calla_elated_set_search_covers_header_global_option' ) ) {
|
||||
/**
|
||||
* This function set search type value for search options map
|
||||
*/
|
||||
function calla_elated_set_search_covers_header_global_option( $search_type_options ) {
|
||||
$search_type_options['covers-header'] = esc_html__( 'Covers Header', 'calla' );
|
||||
|
||||
return $search_type_options;
|
||||
}
|
||||
|
||||
add_filter( 'calla_elated_search_type_global_option', 'calla_elated_set_search_covers_header_global_option' );
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
if ( ! function_exists( 'calla_elated_search_body_class' ) ) {
|
||||
/**
|
||||
* Function that adds body classes for different search types
|
||||
*
|
||||
* @param $classes array original array of body classes
|
||||
*
|
||||
* @return array modified array of classes
|
||||
*/
|
||||
function calla_elated_search_body_class( $classes ) {
|
||||
$classes[] = 'eltdf-search-covers-header';
|
||||
|
||||
return $classes;
|
||||
}
|
||||
|
||||
add_filter( 'body_class', 'calla_elated_search_body_class' );
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'calla_elated_get_search' ) ) {
|
||||
/**
|
||||
* Loads search HTML based on search type option.
|
||||
*/
|
||||
function calla_elated_get_search() {
|
||||
calla_elated_load_search_template();
|
||||
}
|
||||
|
||||
add_action( 'calla_elated_before_page_header_html_close', 'calla_elated_get_search' );
|
||||
add_action( 'calla_elated_before_mobile_header_html_close', 'calla_elated_get_search' );
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'calla_elated_load_search_template' ) ) {
|
||||
/**
|
||||
* Loads search HTML based on search type option.
|
||||
*/
|
||||
function calla_elated_load_search_template() {
|
||||
|
||||
$search_in_grid = calla_elated_options()->getOptionValue( 'search_in_grid' ) == 'yes' ? true : false;
|
||||
|
||||
$parameters = array(
|
||||
'search_in_grid' => $search_in_grid,
|
||||
'search_close_icon_class' => calla_elated_get_search_close_icon_class()
|
||||
);
|
||||
|
||||
calla_elated_get_module_template_part( 'types/covers-header/templates/covers-header', 'search', '', $parameters );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<form action="<?php echo esc_url( home_url( '/' ) ); ?>" class="eltdf-search-cover" method="get">
|
||||
<?php if ( $search_in_grid ) { ?>
|
||||
<div class="eltdf-container">
|
||||
<div class="eltdf-container-inner clearfix">
|
||||
<?php } ?>
|
||||
<div class="eltdf-form-holder-outer">
|
||||
<div class="eltdf-form-holder">
|
||||
<div class="eltdf-form-holder-inner">
|
||||
<input type="text" placeholder="<?php esc_attr_e( 'Szukaj produktu', 'calla' ); ?>" name="s" class="eltdf_search_field" autocomplete="off" />
|
||||
<a <?php calla_elated_class_attribute( $search_close_icon_class ); ?> href="#">
|
||||
<?php echo calla_elated_get_search_close_icon_html(); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ( $search_in_grid ) { ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</form>
|
||||
@@ -0,0 +1,122 @@
|
||||
(function($) {
|
||||
"use strict";
|
||||
|
||||
var searchFullscreen = {};
|
||||
eltdf.modules.searchFullscreen = searchFullscreen;
|
||||
|
||||
searchFullscreen.eltdfOnDocumentReady = eltdfOnDocumentReady;
|
||||
|
||||
$(document).ready(eltdfOnDocumentReady);
|
||||
|
||||
/*
|
||||
All functions to be called on $(document).ready() should be in this function
|
||||
*/
|
||||
function eltdfOnDocumentReady() {
|
||||
eltdfSearchFullscreen();
|
||||
}
|
||||
|
||||
/**
|
||||
* Init Search Types
|
||||
*/
|
||||
function eltdfSearchFullscreen() {
|
||||
if ( eltdf.body.hasClass( 'eltdf-fullscreen-search' ) ) {
|
||||
|
||||
var searchOpener = $('a.eltdf-search-opener');
|
||||
|
||||
if (searchOpener.length > 0) {
|
||||
|
||||
var searchHolder = $('.eltdf-fullscreen-search-holder'),
|
||||
searchClose = $('.eltdf-search-close');
|
||||
|
||||
searchOpener.on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (searchHolder.hasClass('eltdf-animate')) {
|
||||
eltdf.body.removeClass('eltdf-fullscreen-search-opened eltdf-search-fade-out');
|
||||
eltdf.body.removeClass('eltdf-search-fade-in');
|
||||
searchHolder.removeClass('eltdf-animate');
|
||||
|
||||
setTimeout(function () {
|
||||
searchHolder.find('.eltdf-search-field').val('');
|
||||
searchHolder.find('.eltdf-search-field').blur();
|
||||
}, 300);
|
||||
|
||||
eltdf.modules.common.eltdfEnableScroll();
|
||||
} else {
|
||||
eltdf.body.addClass('eltdf-fullscreen-search-opened eltdf-search-fade-in');
|
||||
eltdf.body.removeClass('eltdf-search-fade-out');
|
||||
searchHolder.addClass('eltdf-animate');
|
||||
|
||||
setTimeout(function () {
|
||||
searchHolder.find('.eltdf-search-field').focus();
|
||||
}, 900);
|
||||
|
||||
eltdf.modules.common.eltdfDisableScroll();
|
||||
}
|
||||
|
||||
searchClose.on('click', function (e) {
|
||||
e.preventDefault();
|
||||
eltdf.body.removeClass('eltdf-fullscreen-search-opened eltdf-search-fade-in');
|
||||
eltdf.body.addClass('eltdf-search-fade-out');
|
||||
searchHolder.removeClass('eltdf-animate');
|
||||
|
||||
setTimeout(function () {
|
||||
searchHolder.find('.eltdf-search-field').val('');
|
||||
searchHolder.find('.eltdf-search-field').blur();
|
||||
}, 300);
|
||||
|
||||
eltdf.modules.common.eltdfEnableScroll();
|
||||
});
|
||||
|
||||
//Close on click away
|
||||
$(document).mouseup(function (e) {
|
||||
var container = $(".eltdf-form-holder-inner");
|
||||
|
||||
if (!container.is(e.target) && container.has(e.target).length === 0) {
|
||||
e.preventDefault();
|
||||
eltdf.body.removeClass('eltdf-fullscreen-search-opened eltdf-search-fade-in');
|
||||
eltdf.body.addClass('eltdf-search-fade-out');
|
||||
searchHolder.removeClass('eltdf-animate');
|
||||
|
||||
setTimeout(function () {
|
||||
searchHolder.find('.eltdf-search-field').val('');
|
||||
searchHolder.find('.eltdf-search-field').blur();
|
||||
}, 300);
|
||||
|
||||
eltdf.modules.common.eltdfEnableScroll();
|
||||
}
|
||||
});
|
||||
|
||||
//Close on escape
|
||||
$(document).keyup(function (e) {
|
||||
if (e.keyCode === 27) { //KeyCode for ESC button is 27
|
||||
eltdf.body.removeClass('eltdf-fullscreen-search-opened eltdf-search-fade-in');
|
||||
eltdf.body.addClass('eltdf-search-fade-out');
|
||||
searchHolder.removeClass('eltdf-animate');
|
||||
|
||||
setTimeout(function () {
|
||||
searchHolder.find('.eltdf-search-field').val('');
|
||||
searchHolder.find('.eltdf-search-field').blur();
|
||||
}, 300);
|
||||
|
||||
eltdf.modules.common.eltdfEnableScroll();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//Text input focus change
|
||||
var inputSearchField = $('.eltdf-fullscreen-search-holder .eltdf-search-field'),
|
||||
inputSearchLine = $('.eltdf-fullscreen-search-holder .eltdf-field-holder .eltdf-line');
|
||||
|
||||
inputSearchField.focus(function () {
|
||||
inputSearchLine.css('width', '100%');
|
||||
});
|
||||
|
||||
inputSearchField.blur(function () {
|
||||
inputSearchLine.css('width', '0');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
if ( ! function_exists( 'calla_elated_set_search_fullscreen_global_option' ) ) {
|
||||
/**
|
||||
* This function set search type value for search options map
|
||||
*/
|
||||
function calla_elated_set_search_fullscreen_global_option( $search_type_options ) {
|
||||
$search_type_options['fullscreen'] = esc_html__( 'Fullscreen', 'calla' );
|
||||
|
||||
return $search_type_options;
|
||||
}
|
||||
|
||||
add_filter( 'calla_elated_search_type_global_option', 'calla_elated_set_search_fullscreen_global_option' );
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
if ( ! function_exists( 'calla_elated_search_body_class' ) ) {
|
||||
/**
|
||||
* Function that adds body classes for different search types
|
||||
*
|
||||
* @param $classes array original array of body classes
|
||||
*
|
||||
* @return array modified array of classes
|
||||
*/
|
||||
function calla_elated_search_body_class( $classes ) {
|
||||
$classes[] = 'eltdf-fullscreen-search';
|
||||
$classes[] = 'eltdf-search-fade';
|
||||
|
||||
return $classes;
|
||||
}
|
||||
|
||||
add_filter( 'body_class', 'calla_elated_search_body_class' );
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'calla_elated_get_search' ) ) {
|
||||
/**
|
||||
* Loads search HTML based on search type option.
|
||||
*/
|
||||
function calla_elated_get_search() {
|
||||
calla_elated_load_search_template();
|
||||
}
|
||||
|
||||
add_action( 'calla_elated_before_page_header', 'calla_elated_get_search' );
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'calla_elated_load_search_template' ) ) {
|
||||
/**
|
||||
* Loads search HTML based on search type option.
|
||||
*/
|
||||
function calla_elated_load_search_template() {
|
||||
$parameters = array(
|
||||
'search_close_icon_class' => calla_elated_get_search_close_icon_class(),
|
||||
'search_submit_icon_class' => calla_elated_get_search_submit_icon_class()
|
||||
);
|
||||
|
||||
calla_elated_get_module_template_part( 'types/fullscreen/templates/fullscreen', 'search', '', $parameters );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<div class="eltdf-fullscreen-search-holder">
|
||||
<a <?php calla_elated_class_attribute( $search_close_icon_class ); ?> href="javascript:void(0)">
|
||||
<?php echo calla_elated_get_search_close_icon_html(); ?>
|
||||
</a>
|
||||
<div class="eltdf-fullscreen-search-table">
|
||||
<div class="eltdf-fullscreen-search-cell">
|
||||
<div class="eltdf-fullscreen-search-inner">
|
||||
<form action="<?php echo esc_url( home_url( '/' ) ); ?>" class="eltdf-fullscreen-search-form" method="get">
|
||||
<div class="eltdf-form-holder">
|
||||
<div class="eltdf-form-holder-inner">
|
||||
<div class="eltdf-field-holder">
|
||||
<input type="text" placeholder="<?php esc_attr_e( 'Szukaj produktu', 'calla' ); ?>" name="s" class="eltdf-search-field" autocomplete="off"/>
|
||||
</div>
|
||||
<button type="submit" <?php calla_elated_class_attribute( $search_submit_icon_class ); ?>>
|
||||
<?php echo calla_elated_get_search_icon_html(); ?>
|
||||
</button>
|
||||
<div class="eltdf-line"></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,95 @@
|
||||
(function($) {
|
||||
"use strict";
|
||||
|
||||
var searchSlideFromHB = {};
|
||||
eltdf.modules.searchSlideFromHB = searchSlideFromHB;
|
||||
|
||||
searchSlideFromHB.eltdfOnDocumentReady = eltdfOnDocumentReady;
|
||||
|
||||
$(document).ready(eltdfOnDocumentReady);
|
||||
|
||||
/*
|
||||
All functions to be called on $(document).ready() should be in this function
|
||||
*/
|
||||
function eltdfOnDocumentReady() {
|
||||
eltdfSearchSlideFromHB();
|
||||
}
|
||||
|
||||
/**
|
||||
* Init Search Types
|
||||
*/
|
||||
function eltdfSearchSlideFromHB() {
|
||||
if ( eltdf.body.hasClass( 'eltdf-slide-from-header-bottom' ) ) {
|
||||
|
||||
var searchOpener = $('a.eltdf-search-opener');
|
||||
|
||||
if (searchOpener.length > 0) {
|
||||
//Check for type of search
|
||||
searchOpener.on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var thisSearchOpener = $(this),
|
||||
searchIconPosition = parseInt(eltdf.windowWidth - thisSearchOpener.offset().left - thisSearchOpener.outerWidth());
|
||||
|
||||
if (eltdf.body.hasClass('eltdf-boxed') && eltdf.windowWidth > 1024) {
|
||||
searchIconPosition -= parseInt((eltdf.windowWidth - $('.eltdf-boxed .eltdf-wrapper .eltdf-wrapper-inner').outerWidth()) / 2);
|
||||
}
|
||||
|
||||
var searchFormHeaderHolder = $('.eltdf-page-header'),
|
||||
searchFormTopOffset = '100%',
|
||||
searchFormTopHeaderHolder = $('.eltdf-top-bar'),
|
||||
searchFormFixedHeaderHolder = searchFormHeaderHolder.find('.eltdf-fixed-wrapper.fixed'),
|
||||
searchFormMobileHeaderHolder = $('.eltdf-mobile-header'),
|
||||
searchForm = $('.eltdf-slide-from-header-bottom-holder'),
|
||||
searchFormIsInTopHeader = !!thisSearchOpener.parents('.eltdf-top-bar').length,
|
||||
searchFormIsInFixedHeader = !!thisSearchOpener.parents('.eltdf-fixed-wrapper.fixed').length,
|
||||
searchFormIsInStickyHeader = !!thisSearchOpener.parents('.eltdf-sticky-header').length,
|
||||
searchFormIsInMobileHeader = !!thisSearchOpener.parents('.eltdf-mobile-header').length;
|
||||
|
||||
searchForm.removeClass('eltdf-is-active');
|
||||
|
||||
//Find search form position in header and height
|
||||
if (searchFormIsInTopHeader) {
|
||||
searchFormTopHeaderHolder.find('.eltdf-slide-from-header-bottom-holder').addClass('eltdf-is-active');
|
||||
|
||||
} else if (searchFormIsInFixedHeader) {
|
||||
searchFormTopOffset = searchFormFixedHeaderHolder.outerHeight() + eltdfGlobalVars.vars.eltdfAddForAdminBar;
|
||||
searchFormHeaderHolder.children('.eltdf-slide-from-header-bottom-holder').addClass('eltdf-is-active');
|
||||
|
||||
} else if (searchFormIsInStickyHeader) {
|
||||
searchFormTopOffset = eltdfGlobalVars.vars.eltdfStickyHeaderHeight + eltdfGlobalVars.vars.eltdfAddForAdminBar;
|
||||
searchFormHeaderHolder.children('.eltdf-slide-from-header-bottom-holder').addClass('eltdf-is-active');
|
||||
|
||||
} else if (searchFormIsInMobileHeader) {
|
||||
if (searchFormMobileHeaderHolder.hasClass('mobile-header-appear')) {
|
||||
searchFormTopOffset = searchFormMobileHeaderHolder.children('.eltdf-mobile-header-inner').outerHeight() + eltdfGlobalVars.vars.eltdfAddForAdminBar;
|
||||
}
|
||||
searchFormMobileHeaderHolder.find('.eltdf-slide-from-header-bottom-holder').addClass('eltdf-is-active');
|
||||
|
||||
} else {
|
||||
searchFormHeaderHolder.children('.eltdf-slide-from-header-bottom-holder').addClass('eltdf-is-active');
|
||||
}
|
||||
|
||||
if (searchForm.hasClass('eltdf-is-active')) {
|
||||
searchForm.css({
|
||||
'right': searchIconPosition,
|
||||
'top': searchFormTopOffset
|
||||
}).stop(true).slideToggle(300, 'easeOutBack');
|
||||
}
|
||||
|
||||
//Close on escape
|
||||
$(document).keyup(function (e) {
|
||||
if (e.keyCode == 27) { //KeyCode for ESC button is 27
|
||||
searchForm.stop(true).fadeOut(0);
|
||||
}
|
||||
});
|
||||
|
||||
$(window).scroll(function () {
|
||||
searchForm.stop(true).fadeOut(0);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
if ( ! function_exists( 'calla_elated_set_search_slide_from_hb_global_option' ) ) {
|
||||
/**
|
||||
* This function set search type value for search options map
|
||||
*/
|
||||
function calla_elated_set_search_slide_from_hb_global_option( $search_type_options ) {
|
||||
$search_type_options['slide-from-header-bottom'] = esc_html__( 'Slide From Header Bottom', 'calla' );
|
||||
|
||||
return $search_type_options;
|
||||
}
|
||||
|
||||
add_filter( 'calla_elated_search_type_global_option', 'calla_elated_set_search_slide_from_hb_global_option' );
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
if ( ! function_exists( 'calla_elated_search_body_class' ) ) {
|
||||
/**
|
||||
* Function that adds body classes for different search types
|
||||
*
|
||||
* @param $classes array original array of body classes
|
||||
*
|
||||
* @return array modified array of classes
|
||||
*/
|
||||
function calla_elated_search_body_class( $classes ) {
|
||||
$classes[] = 'eltdf-slide-from-header-bottom';
|
||||
|
||||
return $classes;
|
||||
}
|
||||
|
||||
add_filter( 'body_class', 'calla_elated_search_body_class' );
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'calla_elated_get_search' ) ) {
|
||||
/**
|
||||
* Loads search HTML based on search type option.
|
||||
*/
|
||||
function calla_elated_get_search() {
|
||||
calla_elated_load_search_template();
|
||||
}
|
||||
|
||||
add_action( 'calla_elated_before_page_header_html_close', 'calla_elated_get_search' );
|
||||
add_action( 'calla_elated_before_mobile_header_html_close', 'calla_elated_get_search' );
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'calla_elated_load_search_template' ) ) {
|
||||
/**
|
||||
* Loads search HTML based on search type option.
|
||||
*/
|
||||
function calla_elated_load_search_template() {
|
||||
$parameters = array(
|
||||
'search_submit_icon_class' => calla_elated_get_search_submit_icon_class()
|
||||
);
|
||||
|
||||
calla_elated_get_module_template_part( 'types/slide-from-header-bottom/templates/slide-from-header-bottom', 'search', '', $parameters );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<div class="eltdf-slide-from-header-bottom-holder">
|
||||
<form action="<?php echo esc_url( home_url( '/' ) ); ?>" method="get">
|
||||
<div class="eltdf-form-holder">
|
||||
<input type="text" placeholder="<?php esc_attr_e( 'Szukaj produktu', 'calla' ); ?>" name="s" class="eltdf-search-field" autocomplete="off" />
|
||||
<button type="submit" <?php calla_elated_class_attribute( $search_submit_icon_class ); ?>>
|
||||
<?php echo calla_elated_get_search_icon_html(); ?>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
Reference in New Issue
Block a user