2bb97bee by Jeff Balicki

new search

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent 80226a44
......@@ -17656,6 +17656,35 @@ select {
}
}
input[type=radio] {
display: inline-flex;
place-content: center;
width: 28px;
height: 28px;
position: relative;
border: 3px solid #fff !important;
border-radius: 50%;
accent-color: #999999;
background: #F0F0F0;
}
input[type=radio]::before {
content: "";
width: 18px;
height: 18px;
border-radius: 50%;
transform: scale(0);
transition: 120ms transform ease-in-out;
top: 5px;
position: absolute;
box-shadow: inset 1em 1em #EE0000;
outline: 3px solid #fff;
}
input[type=radio]:checked::before {
transform: scale(1);
}
body {
font-family: "PT Sans", sans-serif;
}
......@@ -18267,7 +18296,7 @@ table:not(.ui-datepicker-calendar):not(#relevant-resources) thead th:first-child
#search-wrapper .sf-field-reset h4,
#search-wrapper .sf-field-reset .h4 {
width: 6.875rem;
font-size: 1.5rem !important;
font-size: 22px !important;
display: inline-block;
color: #000 !important;
font-weight: 700 !important;
......@@ -21585,6 +21614,65 @@ ul.sf_date_field .sf-datepicker {
height: 100%;
}
}
.news-search h1, .news-search .h1 {
font-size: 40px;
line-height: 45px;
font-weight: bold !important;
margin-bottom: 50px;
}
.news-search .breadcrumb {
font-size: 0.75rem;
margin-bottom: 0.25rem;
}
.news-search .breadcrumb a {
text-decoration: none;
text-transform: capitalize;
}
.news-search .breadcrumb span {
margin: 0rem 0.625rem;
}
.news-search li[data-sf-field-name=_sft_category] {
display: flex;
flex-direction: column;
}
.news-search li[data-sf-field-name=_sft_category] h4, .news-search li[data-sf-field-name=_sft_category] .h4 {
font-size: 22px !important;
line-height: 28px !important;
font-weight: bold !important;
padding-top: 0px;
margin-top: 0px;
display: block;
}
.news-search li[data-sf-field-name=_sft_category] label {
font-size: 16px !important;
list-style: 24px !important;
font-weight: 400 !important;
text-transform: uppercase !important;
padding-left: 10px;
top: -8px;
position: relative;
}
.news-search li[data-sf-field-name=_sft_category] ul {
list-style: none;
padding-left: 0;
margin-left: 0;
display: inline-flex;
flex-wrap: wrap;
flex-direction: row-reverse;
justify-content: flex-end;
}
.news-search li[data-sf-field-name=_sft_category] ul li {
margin-right: 20px;
}
.news-search h4, .news-search .h4 {
font-size: 22px !important;
line-height: 28px !important;
font-weight: bold !important;
padding-top: 0px;
margin-top: 0px;
display: block;
}
.has-blue-color,
.has-blue-color:visited {
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 @@
// Search Filter
var Search = function ($) {
function init() {
setTimeout(() => {
//$('.sf-label-radio:contains("All Categories")').parent('li').remove();
//$('.sf-label-radio:contains("Uncategorized")').parent('li').remove();
//$('.sf-label-radio:contains("News")').click();
}, "100");
$('.search-box').css('margin-right', $('#main-nav .container').css('margin-right'));
$('.search-box').css('opacity', '1');
$('.badge').css('margin-right', $('#main-nav .container').css('margin-right'));
......@@ -20703,6 +20709,15 @@
$('#search-sidebar [name="_sf_submit"]').click();
return false;
});
$(document).on("change", ' #top-news-select input[type="radio"][name="_sft_category[]"]', function (e) {
if (this.value == 'news') {
$('form input[type="radio"][name="_sft_category[]"][value="news"]').attr('checked', 'checked').trigger('change');
$('form input[type="radio"][name="_sft_category[]"][value="events"]').removeAttr('checked');
} else if (this.value == 'events') {
$('form input[type="radio"][name="_sft_category[]"][value="events"]').attr('checked', 'checked').trigger('change');
$('form input[type="radio"][name="_sft_category[]"][value="news"]').removeAttr('checked');
}
});
$(document).on("keydown", "#top-search", function (e) {
if (e.keyCode == 13) {
e.preventDefault();
......@@ -20726,11 +20741,13 @@
$('.badge').hide();
});
var myModal = document.getElementById('advance-search-modal');
myModal.addEventListener('hidden.bs.modal', function () {
$('#search-box-content').removeClass('show');
$('.search-box').removeClass('show');
$('.badge').show();
});
if (myModal) {
myModal.addEventListener('hidden.bs.modal', function () {
$('#search-box-content').removeClass('show');
$('.search-box').removeClass('show');
$('.badge').show();
});
}
}
return {
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.
<?php
/**
* The template for displaying search results pages
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
get_header();
?>
<style>
.news-search form li[data-sf-field-name="_sft_category"]{ display: none !important;}
</style>
<div class="wrapper news-search" id="search-wrapper">
<div class="<?php echo esc_attr( $container ); ?> container search-content" id="content" tabindex="-1">
<div class="breadcrumb"><?php get_breadcrumb(); ?><?php _e("News and Events", 'msf'); ?></div>
<h1 class=""><?php _e("News and Events", 'msf'); ?></h1>
<?php //get_search_form() ?>
<button class="btn btn-primary filter" data-bs-toggle="collapse" data-bs-target="#search-sidebar" role="button" aria-expanded="false" aria-controls="search-sidebar" >
<?php _e("SORT AND FILTER", 'msf'); ?>
</button>
<div class="search-wrapper row">
<div class="col-sm-12 col-md-12 col-lg-3 widget-area collapse" id="search-sidebar">
<div id="top-news-select">
<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>
<ul class="">
<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>
<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>
</li>
</div>
<?php echo do_shortcode('[searchandfilter slug="news-search"]'); ?>
<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" >
<?php _e("APPLY FILTERS", 'msf'); ?>
</button>
</div>
<main class="col-sm-12 col-md-9 content-area site-main search-result" id="main">
<?php //echo do_shortcode('[searchandfilter slug="112" action="filter_next_query"]'); ?>
<?php if ( have_posts() ) :
global $wp_query;
?>
<header class="page-header">
<h3 class="page-title">
<?php
printf(
/* translators: %s: query term */
esc_html__( 'SHOWING: %s', 'understrap' ),
'<span>' .$wp_query->found_posts. '</span>'
);
?>
</h3>
</header><!-- .page-header -->
<?php /* Start the Loop */ ?>
<?php
while ( have_posts() ) :
the_post();
/*
* Run the loop for the search to output the results.
* If you want to overload this in a child theme then include a file
* called content-search.php and that will be used instead.
*/
get_template_part( 'loop-templates/content', 'search' );
endwhile;
?>
<?php else : ?>
<?php get_template_part( 'loop-templates/content', 'none' ); ?>
<?php endif; ?>
<?php understrap_pagination(); ?>
</main><!-- #main -->
<!-- The pagination component -->
</div>
<!-- The pagination component -->
</div><!-- #content -->
</div><!-- #search-wrapper -->
<?php
get_footer();
......@@ -7,6 +7,14 @@ var Search = (function($) {
function init() {
setTimeout(() => {
//$('.sf-label-radio:contains("All Categories")').parent('li').remove();
//$('.sf-label-radio:contains("Uncategorized")').parent('li').remove();
//$('.sf-label-radio:contains("News")').click();
}, "100");
$('.search-box').css('margin-right', $('#main-nav .container').css('margin-right'));
$('.search-box').css('opacity', '1');
......@@ -52,6 +60,18 @@ var Search = (function($) {
return false;
});
$(document).on("change",' #top-news-select input[type="radio"][name="_sft_category[]"]', function(e){
if (this.value == 'news') {
$('form input[type="radio"][name="_sft_category[]"][value="news"]').attr('checked', 'checked').trigger('change');
$('form input[type="radio"][name="_sft_category[]"][value="events"]').removeAttr('checked');
}
else if (this.value == 'events') {
$('form input[type="radio"][name="_sft_category[]"][value="events"]').attr('checked', 'checked').trigger('change');
$('form input[type="radio"][name="_sft_category[]"][value="news"]').removeAttr('checked');
}
});
$(document).on("keydown", "#top-search", function(e){
if(e.keyCode == 13) {
e.preventDefault();
......@@ -81,12 +101,14 @@ var Search = (function($) {
});
var myModal = document.getElementById('advance-search-modal');
myModal.addEventListener('hidden.bs.modal', function () {
$('#search-box-content').removeClass('show');
$('.search-box').removeClass('show');
$('.badge').show();
})
if(myModal){
myModal.addEventListener('hidden.bs.modal', function () {
$('#search-box-content').removeClass('show');
$('.search-box').removeClass('show');
$('.badge').show();
})
}
}
......
......@@ -32,4 +32,5 @@ body{
@import "text_size_increased";
@import "relevant_resources";
@import "post_list_load_more";
@import "search_news";
......
......@@ -698,4 +698,33 @@ select {
@media(max-width: 48rem) {
height: 400px;
}
}
input[type="radio"] {
display: inline-flex;
place-content: center;
width: 28px;
height: 28px;
position: relative;
border: 3px solid #fff !important;
border-radius: 50%;
accent-color: #999999;
background: #F0F0F0;
}
input[type="radio"]::before {
content: "";
width: 18px;
height: 18px;
border-radius: 50%;
transform: scale(0);
transition: 120ms transform ease-in-out;
top:5px;
position: absolute;
box-shadow: inset 1em 1em #EE0000;
outline: 3px solid #fff;
}
input[type="radio"]:checked::before {
transform: scale(1);
}
\ No newline at end of file
......
......@@ -284,7 +284,7 @@
.sf-field-sort_order h4,
.sf-field-reset h4 {
width: 6.875rem;
font-size: 1.5rem !important;
font-size: 22px !important;
display: inline-block;
color: #000 !important;
font-weight: 700 !important;
......
.news-search{
h1{
font-size: 40px;
line-height: 45px;
font-weight: bold !important;
margin-bottom: 50px;
}
.breadcrumb{
font-size: 0.75rem;
margin-bottom: 0.25rem;
a{
text-decoration: none;
text-transform: capitalize;
}
span{
margin: 0rem 0.625rem;
}
}
li[data-sf-field-name="_sft_category"] {
display:flex;
flex-direction: column;
h4{
font-size: 22px !important;
line-height: 28px !important;
font-weight: bold !important;
padding-top: 0px;
margin-top: 0px;
display: block;
}
label{
font-size: 16px !important;
list-style: 24px !important;
font-weight: 400 !important;
text-transform: uppercase !important;
padding-left: 10px;
top: -8px;
position: relative;
}
ul{
list-style: none;
padding-left: 0;
margin-left: 0;
display: inline-flex;
flex-wrap: wrap;
flex-direction: row-reverse;
justify-content: flex-end;
li{
margin-right: 20px;
}
}
}
h4{
font-size: 22px !important;
line-height: 28px !important;
font-weight: bold !important;
padding-top: 0px;
margin-top: 0px;
display: block;
}
}
\ No newline at end of file
......@@ -2,5 +2,5 @@
Theme Name: MSF CA Child
Author: Tenzing Communications
Template: msf-ca
Version: 1.0.524
Version: 1.0.525
*/
\ No newline at end of file
......