new search
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
15 changed files
with
347 additions
and
14 deletions
| ... | @@ -17656,6 +17656,35 @@ select { | ... | @@ -17656,6 +17656,35 @@ select { |
| 17656 | } | 17656 | } |
| 17657 | } | 17657 | } |
| 17658 | 17658 | ||
| 17659 | input[type=radio] { | ||
| 17660 | display: inline-flex; | ||
| 17661 | place-content: center; | ||
| 17662 | width: 28px; | ||
| 17663 | height: 28px; | ||
| 17664 | position: relative; | ||
| 17665 | border: 3px solid #fff !important; | ||
| 17666 | border-radius: 50%; | ||
| 17667 | accent-color: #999999; | ||
| 17668 | background: #F0F0F0; | ||
| 17669 | } | ||
| 17670 | |||
| 17671 | input[type=radio]::before { | ||
| 17672 | content: ""; | ||
| 17673 | width: 18px; | ||
| 17674 | height: 18px; | ||
| 17675 | border-radius: 50%; | ||
| 17676 | transform: scale(0); | ||
| 17677 | transition: 120ms transform ease-in-out; | ||
| 17678 | top: 5px; | ||
| 17679 | position: absolute; | ||
| 17680 | box-shadow: inset 1em 1em #EE0000; | ||
| 17681 | outline: 3px solid #fff; | ||
| 17682 | } | ||
| 17683 | |||
| 17684 | input[type=radio]:checked::before { | ||
| 17685 | transform: scale(1); | ||
| 17686 | } | ||
| 17687 | |||
| 17659 | body { | 17688 | body { |
| 17660 | font-family: "PT Sans", sans-serif; | 17689 | font-family: "PT Sans", sans-serif; |
| 17661 | } | 17690 | } |
| ... | @@ -18267,7 +18296,7 @@ table:not(.ui-datepicker-calendar):not(#relevant-resources) thead th:first-child | ... | @@ -18267,7 +18296,7 @@ table:not(.ui-datepicker-calendar):not(#relevant-resources) thead th:first-child |
| 18267 | #search-wrapper .sf-field-reset h4, | 18296 | #search-wrapper .sf-field-reset h4, |
| 18268 | #search-wrapper .sf-field-reset .h4 { | 18297 | #search-wrapper .sf-field-reset .h4 { |
| 18269 | width: 6.875rem; | 18298 | width: 6.875rem; |
| 18270 | font-size: 1.5rem !important; | 18299 | font-size: 22px !important; |
| 18271 | display: inline-block; | 18300 | display: inline-block; |
| 18272 | color: #000 !important; | 18301 | color: #000 !important; |
| 18273 | font-weight: 700 !important; | 18302 | font-weight: 700 !important; |
| ... | @@ -21585,6 +21614,65 @@ ul.sf_date_field .sf-datepicker { | ... | @@ -21585,6 +21614,65 @@ ul.sf_date_field .sf-datepicker { |
| 21585 | height: 100%; | 21614 | height: 100%; |
| 21586 | } | 21615 | } |
| 21587 | } | 21616 | } |
| 21617 | .news-search h1, .news-search .h1 { | ||
| 21618 | font-size: 40px; | ||
| 21619 | line-height: 45px; | ||
| 21620 | font-weight: bold !important; | ||
| 21621 | margin-bottom: 50px; | ||
| 21622 | } | ||
| 21623 | .news-search .breadcrumb { | ||
| 21624 | font-size: 0.75rem; | ||
| 21625 | margin-bottom: 0.25rem; | ||
| 21626 | } | ||
| 21627 | .news-search .breadcrumb a { | ||
| 21628 | text-decoration: none; | ||
| 21629 | text-transform: capitalize; | ||
| 21630 | } | ||
| 21631 | .news-search .breadcrumb span { | ||
| 21632 | margin: 0rem 0.625rem; | ||
| 21633 | } | ||
| 21634 | .news-search li[data-sf-field-name=_sft_category] { | ||
| 21635 | display: flex; | ||
| 21636 | flex-direction: column; | ||
| 21637 | } | ||
| 21638 | .news-search li[data-sf-field-name=_sft_category] h4, .news-search li[data-sf-field-name=_sft_category] .h4 { | ||
| 21639 | font-size: 22px !important; | ||
| 21640 | line-height: 28px !important; | ||
| 21641 | font-weight: bold !important; | ||
| 21642 | padding-top: 0px; | ||
| 21643 | margin-top: 0px; | ||
| 21644 | display: block; | ||
| 21645 | } | ||
| 21646 | .news-search li[data-sf-field-name=_sft_category] label { | ||
| 21647 | font-size: 16px !important; | ||
| 21648 | list-style: 24px !important; | ||
| 21649 | font-weight: 400 !important; | ||
| 21650 | text-transform: uppercase !important; | ||
| 21651 | padding-left: 10px; | ||
| 21652 | top: -8px; | ||
| 21653 | position: relative; | ||
| 21654 | } | ||
| 21655 | .news-search li[data-sf-field-name=_sft_category] ul { | ||
| 21656 | list-style: none; | ||
| 21657 | padding-left: 0; | ||
| 21658 | margin-left: 0; | ||
| 21659 | display: inline-flex; | ||
| 21660 | flex-wrap: wrap; | ||
| 21661 | flex-direction: row-reverse; | ||
| 21662 | justify-content: flex-end; | ||
| 21663 | } | ||
| 21664 | .news-search li[data-sf-field-name=_sft_category] ul li { | ||
| 21665 | margin-right: 20px; | ||
| 21666 | } | ||
| 21667 | .news-search h4, .news-search .h4 { | ||
| 21668 | font-size: 22px !important; | ||
| 21669 | line-height: 28px !important; | ||
| 21670 | font-weight: bold !important; | ||
| 21671 | padding-top: 0px; | ||
| 21672 | margin-top: 0px; | ||
| 21673 | display: block; | ||
| 21674 | } | ||
| 21675 | |||
| 21588 | .has-blue-color, | 21676 | .has-blue-color, |
| 21589 | .has-blue-color:visited { | 21677 | .has-blue-color:visited { |
| 21590 | color: #0d6efd; | 21678 | color: #0d6efd; | ... | ... |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
| ... | @@ -20666,6 +20666,12 @@ | ... | @@ -20666,6 +20666,12 @@ |
| 20666 | // Search Filter | 20666 | // Search Filter |
| 20667 | var Search = function ($) { | 20667 | var Search = function ($) { |
| 20668 | function init() { | 20668 | function init() { |
| 20669 | setTimeout(() => { | ||
| 20670 | |||
| 20671 | //$('.sf-label-radio:contains("All Categories")').parent('li').remove(); | ||
| 20672 | //$('.sf-label-radio:contains("Uncategorized")').parent('li').remove(); | ||
| 20673 | //$('.sf-label-radio:contains("News")').click(); | ||
| 20674 | }, "100"); | ||
| 20669 | $('.search-box').css('margin-right', $('#main-nav .container').css('margin-right')); | 20675 | $('.search-box').css('margin-right', $('#main-nav .container').css('margin-right')); |
| 20670 | $('.search-box').css('opacity', '1'); | 20676 | $('.search-box').css('opacity', '1'); |
| 20671 | $('.badge').css('margin-right', $('#main-nav .container').css('margin-right')); | 20677 | $('.badge').css('margin-right', $('#main-nav .container').css('margin-right')); |
| ... | @@ -20703,6 +20709,15 @@ | ... | @@ -20703,6 +20709,15 @@ |
| 20703 | $('#search-sidebar [name="_sf_submit"]').click(); | 20709 | $('#search-sidebar [name="_sf_submit"]').click(); |
| 20704 | return false; | 20710 | return false; |
| 20705 | }); | 20711 | }); |
| 20712 | $(document).on("change", ' #top-news-select input[type="radio"][name="_sft_category[]"]', function (e) { | ||
| 20713 | if (this.value == 'news') { | ||
| 20714 | $('form input[type="radio"][name="_sft_category[]"][value="news"]').attr('checked', 'checked').trigger('change'); | ||
| 20715 | $('form input[type="radio"][name="_sft_category[]"][value="events"]').removeAttr('checked'); | ||
| 20716 | } else if (this.value == 'events') { | ||
| 20717 | $('form input[type="radio"][name="_sft_category[]"][value="events"]').attr('checked', 'checked').trigger('change'); | ||
| 20718 | $('form input[type="radio"][name="_sft_category[]"][value="news"]').removeAttr('checked'); | ||
| 20719 | } | ||
| 20720 | }); | ||
| 20706 | $(document).on("keydown", "#top-search", function (e) { | 20721 | $(document).on("keydown", "#top-search", function (e) { |
| 20707 | if (e.keyCode == 13) { | 20722 | if (e.keyCode == 13) { |
| 20708 | e.preventDefault(); | 20723 | e.preventDefault(); |
| ... | @@ -20726,11 +20741,13 @@ | ... | @@ -20726,11 +20741,13 @@ |
| 20726 | $('.badge').hide(); | 20741 | $('.badge').hide(); |
| 20727 | }); | 20742 | }); |
| 20728 | var myModal = document.getElementById('advance-search-modal'); | 20743 | var myModal = document.getElementById('advance-search-modal'); |
| 20729 | myModal.addEventListener('hidden.bs.modal', function () { | 20744 | if (myModal) { |
| 20730 | $('#search-box-content').removeClass('show'); | 20745 | myModal.addEventListener('hidden.bs.modal', function () { |
| 20731 | $('.search-box').removeClass('show'); | 20746 | $('#search-box-content').removeClass('show'); |
| 20732 | $('.badge').show(); | 20747 | $('.search-box').removeClass('show'); |
| 20733 | }); | 20748 | $('.badge').show(); |
| 20749 | }); | ||
| 20750 | } | ||
| 20734 | } | 20751 | } |
| 20735 | return { | 20752 | return { |
| 20736 | init: init | 20753 | init: init | ... | ... |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
wp-content/themes/msf-child/search-news.php
0 → 100644
| 1 | <?php | ||
| 2 | /** | ||
| 3 | * The template for displaying search results pages | ||
| 4 | * | ||
| 5 | * @package Understrap | ||
| 6 | */ | ||
| 7 | |||
| 8 | // Exit if accessed directly. | ||
| 9 | defined( 'ABSPATH' ) || exit; | ||
| 10 | |||
| 11 | get_header(); | ||
| 12 | |||
| 13 | ?> | ||
| 14 | <style> | ||
| 15 | .news-search form li[data-sf-field-name="_sft_category"]{ display: none !important;} | ||
| 16 | </style> | ||
| 17 | |||
| 18 | <div class="wrapper news-search" id="search-wrapper"> | ||
| 19 | |||
| 20 | <div class="<?php echo esc_attr( $container ); ?> container search-content" id="content" tabindex="-1"> | ||
| 21 | <div class="breadcrumb"><?php get_breadcrumb(); ?><?php _e("News and Events", 'msf'); ?></div> | ||
| 22 | <h1 class=""><?php _e("News and Events", 'msf'); ?></h1> | ||
| 23 | <?php //get_search_form() ?> | ||
| 24 | |||
| 25 | <button class="btn btn-primary filter" data-bs-toggle="collapse" data-bs-target="#search-sidebar" role="button" aria-expanded="false" aria-controls="search-sidebar" > | ||
| 26 | <?php _e("SORT AND FILTER", 'msf'); ?> | ||
| 27 | </button> | ||
| 28 | <div class="search-wrapper row"> | ||
| 29 | |||
| 30 | <div class="col-sm-12 col-md-12 col-lg-3 widget-area collapse" id="search-sidebar"> | ||
| 31 | <div id="top-news-select"> | ||
| 32 | <li class="sf-field-category" data-sf-field-name="_sft_category" data-sf-field-type="category" data-sf-field-input-type="radio"><h4>SHOW:</h4> | ||
| 33 | <ul class=""> | ||
| 34 | <li class="sf-level-0 sf-item-340" data-sf-count="0" data-sf-depth="0"><input class="sf-input-radio" type="radio" value="events" <?php if($_GET['_sft_category'] == 'events'){ echo 'checked="checked"'; }; ?> name="_sft_category[]" id="sf-input-96986b74c4834549a28504865a382064"><label class="sf-label-radio" for="sf-input-96986b74c4834549a28504865a382064">Events</label></li> | ||
| 35 | <li class="sf-level-0 sf-item-341 sf-option-active" data-sf-count="4" data-sf-depth="0"><input class="sf-input-radio" type="radio" value="news" name="_sft_category[]" <?php if($_GET['_sft_category'] == 'news'){ echo 'checked="checked"';}; ?> id="sf-input-6606415ce37dedc088bf1e3935d3a087"><label class="sf-label-radio" for="sf-input-6606415ce37dedc088bf1e3935d3a087">News</label></li></ul> | ||
| 36 | </li> | ||
| 37 | </div> | ||
| 38 | <?php echo do_shortcode('[searchandfilter slug="news-search"]'); ?> | ||
| 39 | <button class="btn btn-primary filter apply-filters" data-bs-toggle="collapse" data-bs-target="#search-sidebar" role="button" aria-expanded="false" aria-controls="search-sidebar" > | ||
| 40 | <?php _e("APPLY FILTERS", 'msf'); ?> | ||
| 41 | </button> | ||
| 42 | </div> | ||
| 43 | <main class="col-sm-12 col-md-9 content-area site-main search-result" id="main"> | ||
| 44 | |||
| 45 | <?php //echo do_shortcode('[searchandfilter slug="112" action="filter_next_query"]'); ?> | ||
| 46 | <?php if ( have_posts() ) : | ||
| 47 | global $wp_query; | ||
| 48 | |||
| 49 | |||
| 50 | ?> | ||
| 51 | |||
| 52 | <header class="page-header"> | ||
| 53 | |||
| 54 | <h3 class="page-title"> | ||
| 55 | <?php | ||
| 56 | printf( | ||
| 57 | /* translators: %s: query term */ | ||
| 58 | esc_html__( 'SHOWING: %s', 'understrap' ), | ||
| 59 | '<span>' .$wp_query->found_posts. '</span>' | ||
| 60 | ); | ||
| 61 | ?> | ||
| 62 | </h3> | ||
| 63 | |||
| 64 | </header><!-- .page-header --> | ||
| 65 | |||
| 66 | <?php /* Start the Loop */ ?> | ||
| 67 | <?php | ||
| 68 | while ( have_posts() ) : | ||
| 69 | the_post(); | ||
| 70 | |||
| 71 | /* | ||
| 72 | * Run the loop for the search to output the results. | ||
| 73 | * If you want to overload this in a child theme then include a file | ||
| 74 | * called content-search.php and that will be used instead. | ||
| 75 | */ | ||
| 76 | get_template_part( 'loop-templates/content', 'search' ); | ||
| 77 | endwhile; | ||
| 78 | ?> | ||
| 79 | |||
| 80 | <?php else : ?> | ||
| 81 | |||
| 82 | <?php get_template_part( 'loop-templates/content', 'none' ); ?> | ||
| 83 | |||
| 84 | <?php endif; ?> | ||
| 85 | <?php understrap_pagination(); ?> | ||
| 86 | </main><!-- #main --> | ||
| 87 | |||
| 88 | <!-- The pagination component --> | ||
| 89 | |||
| 90 | </div> | ||
| 91 | |||
| 92 | <!-- The pagination component --> | ||
| 93 | |||
| 94 | |||
| 95 | |||
| 96 | |||
| 97 | </div><!-- #content --> | ||
| 98 | |||
| 99 | </div><!-- #search-wrapper --> | ||
| 100 | |||
| 101 | <?php | ||
| 102 | get_footer(); |
| ... | @@ -7,6 +7,14 @@ var Search = (function($) { | ... | @@ -7,6 +7,14 @@ var Search = (function($) { |
| 7 | 7 | ||
| 8 | function init() { | 8 | function init() { |
| 9 | 9 | ||
| 10 | setTimeout(() => { | ||
| 11 | |||
| 12 | //$('.sf-label-radio:contains("All Categories")').parent('li').remove(); | ||
| 13 | //$('.sf-label-radio:contains("Uncategorized")').parent('li').remove(); | ||
| 14 | //$('.sf-label-radio:contains("News")').click(); | ||
| 15 | |||
| 16 | }, "100"); | ||
| 17 | |||
| 10 | $('.search-box').css('margin-right', $('#main-nav .container').css('margin-right')); | 18 | $('.search-box').css('margin-right', $('#main-nav .container').css('margin-right')); |
| 11 | $('.search-box').css('opacity', '1'); | 19 | $('.search-box').css('opacity', '1'); |
| 12 | 20 | ||
| ... | @@ -52,6 +60,18 @@ var Search = (function($) { | ... | @@ -52,6 +60,18 @@ var Search = (function($) { |
| 52 | return false; | 60 | return false; |
| 53 | }); | 61 | }); |
| 54 | 62 | ||
| 63 | $(document).on("change",' #top-news-select input[type="radio"][name="_sft_category[]"]', function(e){ | ||
| 64 | if (this.value == 'news') { | ||
| 65 | $('form input[type="radio"][name="_sft_category[]"][value="news"]').attr('checked', 'checked').trigger('change'); | ||
| 66 | $('form input[type="radio"][name="_sft_category[]"][value="events"]').removeAttr('checked'); | ||
| 67 | } | ||
| 68 | else if (this.value == 'events') { | ||
| 69 | $('form input[type="radio"][name="_sft_category[]"][value="events"]').attr('checked', 'checked').trigger('change'); | ||
| 70 | $('form input[type="radio"][name="_sft_category[]"][value="news"]').removeAttr('checked'); | ||
| 71 | } | ||
| 72 | }); | ||
| 73 | |||
| 74 | |||
| 55 | $(document).on("keydown", "#top-search", function(e){ | 75 | $(document).on("keydown", "#top-search", function(e){ |
| 56 | if(e.keyCode == 13) { | 76 | if(e.keyCode == 13) { |
| 57 | e.preventDefault(); | 77 | e.preventDefault(); |
| ... | @@ -81,12 +101,14 @@ var Search = (function($) { | ... | @@ -81,12 +101,14 @@ var Search = (function($) { |
| 81 | }); | 101 | }); |
| 82 | 102 | ||
| 83 | var myModal = document.getElementById('advance-search-modal'); | 103 | var myModal = document.getElementById('advance-search-modal'); |
| 84 | 104 | ||
| 85 | myModal.addEventListener('hidden.bs.modal', function () { | 105 | if(myModal){ |
| 86 | $('#search-box-content').removeClass('show'); | 106 | myModal.addEventListener('hidden.bs.modal', function () { |
| 87 | $('.search-box').removeClass('show'); | 107 | $('#search-box-content').removeClass('show'); |
| 88 | $('.badge').show(); | 108 | $('.search-box').removeClass('show'); |
| 89 | }) | 109 | $('.badge').show(); |
| 110 | }) | ||
| 111 | } | ||
| 90 | 112 | ||
| 91 | 113 | ||
| 92 | } | 114 | } | ... | ... |
| ... | @@ -698,4 +698,33 @@ select { | ... | @@ -698,4 +698,33 @@ select { |
| 698 | @media(max-width: 48rem) { | 698 | @media(max-width: 48rem) { |
| 699 | height: 400px; | 699 | height: 400px; |
| 700 | } | 700 | } |
| 701 | } | ||
| 702 | |||
| 703 | input[type="radio"] { | ||
| 704 | display: inline-flex; | ||
| 705 | place-content: center; | ||
| 706 | width: 28px; | ||
| 707 | height: 28px; | ||
| 708 | position: relative; | ||
| 709 | border: 3px solid #fff !important; | ||
| 710 | border-radius: 50%; | ||
| 711 | accent-color: #999999; | ||
| 712 | background: #F0F0F0; | ||
| 713 | } | ||
| 714 | |||
| 715 | input[type="radio"]::before { | ||
| 716 | content: ""; | ||
| 717 | width: 18px; | ||
| 718 | height: 18px; | ||
| 719 | border-radius: 50%; | ||
| 720 | transform: scale(0); | ||
| 721 | transition: 120ms transform ease-in-out; | ||
| 722 | top:5px; | ||
| 723 | position: absolute; | ||
| 724 | box-shadow: inset 1em 1em #EE0000; | ||
| 725 | outline: 3px solid #fff; | ||
| 726 | } | ||
| 727 | |||
| 728 | input[type="radio"]:checked::before { | ||
| 729 | transform: scale(1); | ||
| 701 | } | 730 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -284,7 +284,7 @@ | ... | @@ -284,7 +284,7 @@ |
| 284 | .sf-field-sort_order h4, | 284 | .sf-field-sort_order h4, |
| 285 | .sf-field-reset h4 { | 285 | .sf-field-reset h4 { |
| 286 | width: 6.875rem; | 286 | width: 6.875rem; |
| 287 | font-size: 1.5rem !important; | 287 | font-size: 22px !important; |
| 288 | display: inline-block; | 288 | display: inline-block; |
| 289 | color: #000 !important; | 289 | color: #000 !important; |
| 290 | font-weight: 700 !important; | 290 | font-weight: 700 !important; | ... | ... |
| 1 | .news-search{ | ||
| 2 | |||
| 3 | |||
| 4 | |||
| 5 | h1{ | ||
| 6 | font-size: 40px; | ||
| 7 | line-height: 45px; | ||
| 8 | font-weight: bold !important; | ||
| 9 | margin-bottom: 50px; | ||
| 10 | } | ||
| 11 | |||
| 12 | .breadcrumb{ | ||
| 13 | font-size: 0.75rem; | ||
| 14 | margin-bottom: 0.25rem; | ||
| 15 | a{ | ||
| 16 | text-decoration: none; | ||
| 17 | text-transform: capitalize; | ||
| 18 | } | ||
| 19 | span{ | ||
| 20 | margin: 0rem 0.625rem; | ||
| 21 | } | ||
| 22 | } | ||
| 23 | li[data-sf-field-name="_sft_category"] { | ||
| 24 | display:flex; | ||
| 25 | flex-direction: column; | ||
| 26 | |||
| 27 | |||
| 28 | h4{ | ||
| 29 | font-size: 22px !important; | ||
| 30 | line-height: 28px !important; | ||
| 31 | font-weight: bold !important; | ||
| 32 | padding-top: 0px; | ||
| 33 | margin-top: 0px; | ||
| 34 | display: block; | ||
| 35 | |||
| 36 | } | ||
| 37 | label{ | ||
| 38 | font-size: 16px !important; | ||
| 39 | list-style: 24px !important; | ||
| 40 | font-weight: 400 !important; | ||
| 41 | text-transform: uppercase !important; | ||
| 42 | padding-left: 10px; | ||
| 43 | top: -8px; | ||
| 44 | position: relative; | ||
| 45 | |||
| 46 | } | ||
| 47 | ul{ | ||
| 48 | list-style: none; | ||
| 49 | padding-left: 0; | ||
| 50 | margin-left: 0; | ||
| 51 | display: inline-flex; | ||
| 52 | flex-wrap: wrap; | ||
| 53 | flex-direction: row-reverse; | ||
| 54 | justify-content: flex-end; | ||
| 55 | |||
| 56 | li{ | ||
| 57 | margin-right: 20px; | ||
| 58 | } | ||
| 59 | |||
| 60 | } | ||
| 61 | |||
| 62 | } | ||
| 63 | |||
| 64 | h4{ | ||
| 65 | font-size: 22px !important; | ||
| 66 | line-height: 28px !important; | ||
| 67 | font-weight: bold !important; | ||
| 68 | padding-top: 0px; | ||
| 69 | margin-top: 0px; | ||
| 70 | display: block; | ||
| 71 | |||
| 72 | } | ||
| 73 | |||
| 74 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -2,5 +2,5 @@ | ... | @@ -2,5 +2,5 @@ |
| 2 | Theme Name: MSF CA Child | 2 | Theme Name: MSF CA Child |
| 3 | Author: Tenzing Communications | 3 | Author: Tenzing Communications |
| 4 | Template: msf-ca | 4 | Template: msf-ca |
| 5 | Version: 1.0.524 | 5 | Version: 1.0.525 |
| 6 | */ | 6 | */ |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment