From f810b9dbda19c3a25970cc48ecba88de0ebe24ed Mon Sep 17 00:00:00 2001 From: kmfoysal06 Date: Sun, 13 Oct 2024 19:12:37 +0600 Subject: [PATCH] feat: Added Username to The Search Result by Loading Them With Ajax and Using Cache Data for Same User Information Loading --- .gitignore | 0 assets/.babelrc | 0 assets/build/css/main.css | 569 +++++++++++++++++- assets/build/css/main.css.map | 2 +- assets/build/css/search.css | 147 ++++- assets/build/css/search.css.map | 2 +- assets/build/img/simplecharm-header-image.jpg | Bin assets/build/js/customizer.js | 46 +- assets/build/js/customizer.js.map | 2 +- assets/build/js/main.js | 68 +++ assets/build/js/main.js.map | 0 assets/build/js/search.js | 474 ++++++++++++++- assets/build/js/search.js.map | 2 +- assets/package.json | 0 .../src/images/simplecharm-header-image.jpg | Bin assets/src/js/customizer.js | 0 assets/src/js/load_search.js | 74 ++- assets/src/js/main.js | 0 assets/src/js/multiselect.js | 0 assets/src/js/search.js | 0 assets/src/scss/components/_comments.scss | 0 assets/src/scss/components/_footer.scss | 0 assets/src/scss/components/_header.scss | 0 assets/src/scss/components/_nav.scss | 0 assets/src/scss/components/_pagination.scss | 0 assets/src/scss/components/_post.scss | 0 assets/src/scss/components/_profile.scss | 0 assets/src/scss/components/_responsive.scss | 0 assets/src/scss/components/_search.scss | 0 assets/src/scss/components/_sidebar.scss | 0 .../scss/components/_single-and-posts.scss | 0 assets/src/scss/components/_utilities.scss | 0 assets/src/scss/components/_wp_required.scss | 0 assets/src/scss/main.scss | 0 assets/src/scss/search_page.scss | 0 assets/webpack.config.js | 0 changelog.txt | 0 comments.php | 0 inc/classes/assets.php | 3 + inc/classes/customizer.php | 0 inc/classes/search.php | 0 inc/classes/sidebar.php | 0 inc/classes/simplecharm_theme.php | 1 + inc/classes/users.php | 42 ++ inc/helpers/autoload.php | 0 inc/helpers/template-tags.php | 0 inc/traits/singletone.php | 0 index.php | 0 readme.txt | 0 screenshot.png | Bin searchform.php | 0 sidebar-simplecharm_home_sidebar.php | 0 sidebar-simplecharm_post_sidebar.php | 0 .../components/multiselect-dropdown.php | 0 template-parts/search/search.php | 0 template-parts/search/search_default.php | 0 56 files changed, 1406 insertions(+), 26 deletions(-) mode change 100644 => 100755 .gitignore mode change 100644 => 100755 assets/.babelrc mode change 100644 => 100755 assets/build/css/main.css mode change 100644 => 100755 assets/build/css/main.css.map mode change 100644 => 100755 assets/build/css/search.css mode change 100644 => 100755 assets/build/css/search.css.map mode change 100644 => 100755 assets/build/img/simplecharm-header-image.jpg mode change 100644 => 100755 assets/build/js/customizer.js mode change 100644 => 100755 assets/build/js/customizer.js.map mode change 100644 => 100755 assets/build/js/main.js mode change 100644 => 100755 assets/build/js/main.js.map mode change 100644 => 100755 assets/build/js/search.js mode change 100644 => 100755 assets/build/js/search.js.map mode change 100644 => 100755 assets/package.json mode change 100644 => 100755 assets/src/images/simplecharm-header-image.jpg mode change 100644 => 100755 assets/src/js/customizer.js mode change 100644 => 100755 assets/src/js/load_search.js mode change 100644 => 100755 assets/src/js/main.js mode change 100644 => 100755 assets/src/js/multiselect.js mode change 100644 => 100755 assets/src/js/search.js mode change 100644 => 100755 assets/src/scss/components/_comments.scss mode change 100644 => 100755 assets/src/scss/components/_footer.scss mode change 100644 => 100755 assets/src/scss/components/_header.scss mode change 100644 => 100755 assets/src/scss/components/_nav.scss mode change 100644 => 100755 assets/src/scss/components/_pagination.scss mode change 100644 => 100755 assets/src/scss/components/_post.scss mode change 100644 => 100755 assets/src/scss/components/_profile.scss mode change 100644 => 100755 assets/src/scss/components/_responsive.scss mode change 100644 => 100755 assets/src/scss/components/_search.scss mode change 100644 => 100755 assets/src/scss/components/_sidebar.scss mode change 100644 => 100755 assets/src/scss/components/_single-and-posts.scss mode change 100644 => 100755 assets/src/scss/components/_utilities.scss mode change 100644 => 100755 assets/src/scss/components/_wp_required.scss mode change 100644 => 100755 assets/src/scss/main.scss mode change 100644 => 100755 assets/src/scss/search_page.scss mode change 100644 => 100755 assets/webpack.config.js mode change 100644 => 100755 changelog.txt mode change 100644 => 100755 comments.php mode change 100644 => 100755 inc/classes/assets.php mode change 100644 => 100755 inc/classes/customizer.php mode change 100644 => 100755 inc/classes/search.php mode change 100644 => 100755 inc/classes/sidebar.php mode change 100644 => 100755 inc/classes/simplecharm_theme.php create mode 100755 inc/classes/users.php mode change 100644 => 100755 inc/helpers/autoload.php mode change 100644 => 100755 inc/helpers/template-tags.php mode change 100644 => 100755 inc/traits/singletone.php mode change 100644 => 100755 index.php mode change 100644 => 100755 readme.txt mode change 100644 => 100755 screenshot.png mode change 100644 => 100755 searchform.php mode change 100644 => 100755 sidebar-simplecharm_home_sidebar.php mode change 100644 => 100755 sidebar-simplecharm_post_sidebar.php mode change 100644 => 100755 template-parts/components/multiselect-dropdown.php mode change 100644 => 100755 template-parts/search/search.php mode change 100644 => 100755 template-parts/search/search_default.php diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/assets/.babelrc b/assets/.babelrc old mode 100644 new mode 100755 diff --git a/assets/build/css/main.css b/assets/build/css/main.css old mode 100644 new mode 100755 index 33885fd..dbbd428 --- a/assets/build/css/main.css +++ b/assets/build/css/main.css @@ -1,3 +1,570 @@ -.wp-caption{max-width:100%;margin-bottom:1.5em;padding:0;background-color:#f5f5f5;border:1px solid #e3e3e3;box-shadow:0 1px 4px rgba(0,0,0,.1);-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 4px rgba(0,0,0,.1);box-shadow:0 1px 4px rgba(0,0,0,.1)}.wp-caption img{margin:0;padding:0;border:0 none;max-width:100%;height:auto}.wp-caption p.wp-caption-text{font-size:.875em;line-height:1.6;margin:0;padding:.5em;text-align:center}.sticky{background-color:#f5f5f5;border:1px solid #dd0101;border-left-width:5px}.sticky img{margin:0;padding:0;border:0 none;max-width:100%;height:auto}.sticky p.wp-caption-text{font-size:.875em;line-height:1.6;margin:0;padding:.5em;text-align:center}.sticky .wp-caption{max-width:100%;margin-bottom:1.5em;padding:0;background-color:#f5f5f5;border:1px solid #e3e3e3;box-shadow:0 1px 4px rgba(0,0,0,.1);-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 4px rgba(0,0,0,.1);box-shadow:0 1px 4px rgba(0,0,0,.1)}.sticky .wp-caption img{margin:0;padding:0;border:0 none;max-width:100%;height:auto}.sticky .wp-caption p.wp-caption-text{font-size:.875em;line-height:1.6;margin:0;padding:.5em;text-align:center}.gallery-caption{font-size:.875em;line-height:1.6;margin:0;padding:.5em;text-align:center}.alignleft{float:left;margin-right:1.5em}.alignright{float:right;margin-left:1.5em}.aligncenter{display:block;margin-left:auto;margin-right:auto}.wp-caption.alignleft{margin-right:1.5em}.wp-caption.alignright{margin-left:1.5em}.wp-caption.aligncenter{margin-right:auto;margin-left:auto}a img.alignleft{margin-right:1.5em}a img.alignright{margin-left:1.5em}a img.aligncenter{margin-right:auto;margin-left:auto}.wp-caption.alignnone,a img.alignnone{margin-right:0;margin-left:0}.wp-caption.alignnone{margin-bottom:1.5em}.wp-caption.alignnone img{margin:0;padding:0;border:0 none;max-width:100%;height:auto}.wp-caption.alignnone p.wp-caption-text{font-size:.875em;line-height:1.6;margin:0;padding:.5em;text-align:center}.screen-reader-text{clip:rect(1px, 1px, 1px, 1px);position:absolute !important;height:1px;width:1px;overflow:hidden}.screen-reader-text:focus{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto !important;color:#21759b;display:block;font-size:14px;font-size:.875rem;font-weight:bold;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}.post-meta a{color:#005882}#simplecharm-content[tabindex="-1"]:focus,#comments[tabindex="-1"]:focus{outline:0}pre{overflow-y:scroll}code{font-family:ui-sans-serif ui-serif sans-serif serif monospace}.simplecharm-text-center{text-align:center}.simplecharm-model-link a,.simplecharm-model-link{text-decoration:none}.block{display:block}.simplecharm-model-shadow{text-shadow:2px 1px 2px blue}.simplecharm-content{border:1px solid #333;padding:10px}.simplecharm-model-link a,.simplecharm-model-link,.simplecharm-content a,.simplecharm-main-navigation a,.simplecharm-edit-profile-btn a,.simplecharm-model-link p{color:#005e86}.simplecharm-content p{margin:10px 0;color:#070002}.simplecharm-content a:visited,.simplecharm-main-navigation a:visited,.simplecharm-edit-profile-btn a:visited{color:#005881}.simplecharm-content a,.simplecharm-main-navigation a,.simplecharm-edit-profile-btn a{color:#005e8b;text-decoration:none}.simplecharm-content a:hover,.simplecharm-content a:focus,.simplecharm-main-navigation a:hover,.simplecharm-main-navigation a:focus,.simplecharm-edit-profile-btn a:hover,.simplecharm-edit-profile-btn a:focus{text-decoration:underline}.simplecharm-content a:focus,.simplecharm-main-navigation a:focus,.simplecharm-edit-profile-btn a:focus,.simplecharm-content a:hover,.simplecharm-main-navigation a:hover,.simplecharm-edit-profile-btn a:hover{color:#005e86}.simplecharm-flex{display:flex}.simplecharm-m-auto{margin:auto}.simplecharm-justify-center{justify-content:center}.simplecharm-site-description{color:#75a42d;font-size:1.2em;letter-spacing:5px;padding:5px 10px;background-color:rgba(0,0,0,.5);margin:5px 0}nav.simplecharm-main-navigation ul{list-style:none;position:relative;background:hsla(0,0%,100%,.4);margin:0 0 5px 0;transition:all .4s;transition-delay:.2s}nav.simplecharm-main-navigation ul .sub-menu{display:flex;flex-direction:column;float:left;width:25%}nav.simplecharm-main-navigation ul li{display:inline-block;margin:10px}nav.simplecharm-main-navigation ul li a{padding:10px}nav.simplecharm-main-navigation ul .sub-menu{position:absolute;width:100%;left:0;z-index:12;display:flex;opacity:0;pointer-events:none}nav.simplecharm-main-navigation ul li:hover .sub-menu,nav.simplecharm-main-navigation ul li:focus-within .sub-menu{opacity:1;pointer-events:auto}nav.simplecharm-main-navigation ul li a:hover,nav.simplecharm-main-navigation ul li a:focus{text-decoration:underline}.simplecharm-home-post-title a{text-decoration:none}.simplecharm-post-category a{color:#005882}.simplecharm-post-category{display:block;text-align:left;text-transform:uppercase;font-weight:bold;color:#000}.simplecharm-single-container,.simplecharm-posts-container{display:grid;grid-template-columns:1fr 1fr 1fr;grid-gap:10px;margin:10px}.post-author{text-decoration:underline}.simplecharm-single-container div:nth-child(1),.simplecharm-post-container{grid-column:1/3}@media(max-width: 768px){.simplecharm-single-container div:nth-child(1),.simplecharm-post-container{grid-column:1/4}.simplecharm-single-container,.simplecharm-posts-container{grid-template-columns:1fr;grid-gap:0;margin:0}}#simplecharm-homepage-sidebar,#simplecharm-postpage-sidebar,.simplecharm-post,.simplecharm-post-container{border:1px solid #300f00;width:calc(100% - 15px);padding:2rem;position:relative;color:#32373c}#simplecharm-homepage-sidebar,#simplecharm-postpage-sidebar{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}#simplecharm-homepage-sidebar li{list-style:none}#simplecharm-homepage-sidebar a{color:currentcolor}#simplecharm-homepage-sidebar::before,#simplecharm-postpage-sidebar::before,.simplecharm-post::before,.simplecharm-post-container::before{content:"";position:absolute;height:20px;width:20px;background:#000;top:0;left:0}#simplecharm-homepage-sidebar::after,#simplecharm-postpage-sidebar::after,.simplecharm-post::after{content:"";position:absolute;height:20px;width:20px;background:#000;bottom:0;right:0}nav.navigation.pagination{text-align:center;margin:10px}nav.navigation.pagination a{border:1px solid #000;padding:5px;color:currentcolor}.simplecharm-main-navigation a{transition:all .3s}.simplecharm-main-navigation a:hover,.simplecharm-main-navigation a:focus{background:#000}.comment-body{border:1px solid #090909;padding:10px}.wp-block-post-comments-form input[type=submit]{padding:10px;background:#000;color:#fafafa;border:3px solid #4444a7}.wp-block-post-comments-form input[type=submit]:hover,.wp-block-post-comments-form input[type=submit]:focus{background:rgba(21,21,21,.9490196078);border-color:blue}.bypostauthor .comment-body{position:relative;margin:10px 0 0 0}.bypostauthor .comment-body::before{position:absolute;content:"author";top:0;right:0;background:red;padding:5px;border-radius:0px 0px 0px 10px;color:#fff;font-weight:bold}.reply a{text-decoration:none;color:currentColor;padding:5px;border:1px solid #000}.simplecharm-edit-profile-btn{display:block}.simplecharm-edit-profile-btn a{border:1px solid currentColor;padding:5px 10px;margin:auto}.simplecharm-edit-profile-btn a:hover,.simplecharm-edit-profile-btn a:focus{text-decoration:underline !important}.simplecharm-header-image img{max-width:100%;height:auto}.simplecharm-theme-footer{background:gray;padding:20px 0;text-align:center;color:#000}.simplecharm-theme-footer a{color:#021141}.posts-navigation .nav-links{display:flex;flex-direction:row-reverse;justify-content:space-between}.posts-navigation .nav-links a{color:currentColor}.search-form{display:flex;gap:10px;justify-content:center}.search-field,.search-submit{border:none;padding:10px;text-align:center}.search-field{height:50px}.search-submit{cursor:pointer;display:block}.search-field:focus{border:none;outline:none} +/*!*******************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/scss/main.scss ***! + \*******************************************************************************************************************************************************/ +/* Wordpress Default Styles*/ +.wp-caption { + max-width: 100%; + margin-bottom: 1.5em; + padding: 0; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); +} + +.wp-caption img { + margin: 0; + padding: 0; + border: 0 none; + max-width: 100%; + height: auto; +} + +.wp-caption p.wp-caption-text { + font-size: 0.875em; + line-height: 1.6; + margin: 0; + padding: 0.5em; + text-align: center; +} + +.sticky { + background-color: #f5f5f5; + border: 1px solid #dd0101; + border-left-width: 5px; +} + +.sticky img { + margin: 0; + padding: 0; + border: 0 none; + max-width: 100%; + height: auto; +} + +.sticky p.wp-caption-text { + font-size: 0.875em; + line-height: 1.6; + margin: 0; + padding: 0.5em; + text-align: center; +} + +.sticky .wp-caption { + max-width: 100%; + margin-bottom: 1.5em; + padding: 0; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); +} + +.sticky .wp-caption img { + margin: 0; + padding: 0; + border: 0 none; + max-width: 100%; + height: auto; +} + +.sticky .wp-caption p.wp-caption-text { + font-size: 0.875em; + line-height: 1.6; + margin: 0; + padding: 0.5em; + text-align: center; +} + +.gallery-caption { + font-size: 0.875em; + line-height: 1.6; + margin: 0; + padding: 0.5em; + text-align: center; +} + +.alignleft { + float: left; + margin-right: 1.5em; +} + +.alignright { + float: right; + margin-left: 1.5em; +} + +.aligncenter { + display: block; + margin-left: auto; + margin-right: auto; +} + +.wp-caption.alignleft { + margin-right: 1.5em; +} + +.wp-caption.alignright { + margin-left: 1.5em; +} + +.wp-caption.aligncenter { + margin-right: auto; + margin-left: auto; +} + +a img.alignleft { + margin-right: 1.5em; +} + +a img.alignright { + margin-left: 1.5em; +} + +a img.aligncenter { + margin-right: auto; + margin-left: auto; +} + +.wp-caption.alignnone, a img.alignnone { + margin-right: 0; + margin-left: 0; +} + +.wp-caption.alignnone { + margin-bottom: 1.5em; +} + +.wp-caption.alignnone img { + margin: 0; + padding: 0; + border: 0 none; + max-width: 100%; + height: auto; +} + +.wp-caption.alignnone p.wp-caption-text { + font-size: 0.875em; + line-height: 1.6; + margin: 0; + padding: 0.5em; + text-align: center; +} + +.screen-reader-text { + clip: rect(1px, 1px, 1px, 1px); + position: absolute !important; + height: 1px; + width: 1px; + overflow: hidden; +} + +.screen-reader-text:focus { + background-color: #f1f1f1; + border-radius: 3px; + box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); + clip: auto !important; + color: #21759b; + display: block; + font-size: 14px; + font-size: 0.875rem; + font-weight: bold; + height: auto; + left: 5px; + line-height: normal; + padding: 15px 23px 14px; + text-decoration: none; + top: 5px; + width: auto; + z-index: 100000; +} + +.post-meta a { + color: #005882; +} + +#simplecharm-content[tabindex="-1"]:focus, #comments[tabindex="-1"]:focus { + outline: 0; +} + +/* Style for posts*/ +pre { + overflow-y: scroll; +} + +code { + font-family: ui-sans-serif ui-serif sans-serif serif monospace; +} + +/* Utility Classes and Others */ +.simplecharm-text-center { + text-align: center; +} + +.simplecharm-model-link a, +.simplecharm-model-link { + text-decoration: none; +} + +.block { + display: block; +} + +.simplecharm-model-shadow { + text-shadow: 2px 1px 2px #00f; +} + +.simplecharm-content { + border: 1px solid #333; + padding: 10px; +} + +.simplecharm-model-link a, +.simplecharm-model-link, +.simplecharm-content a, +.simplecharm-main-navigation a, +.simplecharm-edit-profile-btn a, +.simplecharm-model-link p { + color: #005e86; +} + +.simplecharm-content p { + margin: 10px 0; + color: #070002; +} + +.simplecharm-content a:visited, +.simplecharm-main-navigation a:visited, +.simplecharm-edit-profile-btn a:visited { + color: #005881; +} + +.simplecharm-content a, +.simplecharm-main-navigation a, +.simplecharm-edit-profile-btn a { + color: #005e8b; + text-decoration: none; +} + +.simplecharm-content a:hover, +.simplecharm-content a:focus, +.simplecharm-main-navigation a:hover, +.simplecharm-main-navigation a:focus, +.simplecharm-edit-profile-btn a:hover, +.simplecharm-edit-profile-btn a:focus { + text-decoration: underline; +} + +.simplecharm-content a:focus, +.simplecharm-main-navigation a:focus, +.simplecharm-edit-profile-btn a:focus, +.simplecharm-content a:hover, +.simplecharm-main-navigation a:hover, +.simplecharm-edit-profile-btn a:hover { + color: #005e86; +} + +.simplecharm-flex { + display: flex; +} + +.simplecharm-m-auto { + margin: auto; +} + +.simplecharm-justify-center { + justify-content: center; +} + +/* styling header the nav menu */ +.simplecharm-site-description { + color: #75a42d; + font-size: 1.2em; + letter-spacing: 5px; + padding: 5px 10px; + background-color: rgba(0, 0, 0, 0.5); + margin: 5px 0; +} + +nav.simplecharm-main-navigation ul { + list-style: none; + position: relative; + background: rgba(255, 255, 255, 0.4); + margin: 0 0 5px 0; + transition: all 0.4s; + transition-delay: 0.2s; +} + +nav.simplecharm-main-navigation ul .sub-menu { + display: flex; + flex-direction: column; + float: left; + width: 25%; +} + +nav.simplecharm-main-navigation ul li { + display: inline-block; + margin: 10px; +} + +nav.simplecharm-main-navigation ul li a { + padding: 10px; +} + +nav.simplecharm-main-navigation ul .sub-menu { + position: absolute; + width: 100%; + left: 0; + z-index: 12; + display: flex; + opacity: 0; + pointer-events: none; +} + +nav.simplecharm-main-navigation ul li:hover .sub-menu, +nav.simplecharm-main-navigation ul li:focus-within .sub-menu { + opacity: 1; + pointer-events: auto; +} + +nav.simplecharm-main-navigation ul li a:hover, +nav.simplecharm-main-navigation ul li a:focus { + text-decoration: underline; +} + +/*styling single.php page and home page*/ +.simplecharm-home-post-title a { + text-decoration: none; +} + +.simplecharm-post-category a { + color: #005882; +} + +.simplecharm-post-category { + display: block; + text-align: left; + text-transform: uppercase; + font-weight: bold; + color: #000; +} + +.simplecharm-single-container, .simplecharm-posts-container { + display: grid; + grid-template-columns: 1fr 1fr 1fr; + grid-gap: 10px; + margin: 10px; +} + +.post-author { + text-decoration: underline; +} + +.simplecharm-single-container div:nth-child(1), .simplecharm-post-container { + grid-column: 1/3; +} + +/* hide sidebar for mobile deveices */ +@media (max-width: 768px) { + .simplecharm-single-container div:nth-child(1), .simplecharm-post-container { + grid-column: 1/4; + } + .simplecharm-single-container, .simplecharm-posts-container { + grid-template-columns: 1fr; + grid-gap: 0; + margin: 0; + } +} +/* styling the sidebar */ +#simplecharm-homepage-sidebar, #simplecharm-postpage-sidebar, +.simplecharm-post, +.simplecharm-post-container { + border: 1px solid #300f00; + width: calc(100% - 15px); + padding: 2rem; + position: relative; + color: #32373c; +} + +#simplecharm-homepage-sidebar, #simplecharm-postpage-sidebar { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + text-align: center; +} + +#simplecharm-homepage-sidebar li { + list-style: none; +} + +#simplecharm-homepage-sidebar a { + color: currentcolor; +} + +#simplecharm-homepage-sidebar::before, #simplecharm-postpage-sidebar::before, +.simplecharm-post::before, +.simplecharm-post-container::before { + content: ""; + position: absolute; + height: 20px; + width: 20px; + background: #000; + top: 0; + left: 0; +} + +#simplecharm-homepage-sidebar::after, #simplecharm-postpage-sidebar::after, +.simplecharm-post::after { + content: ""; + position: absolute; + height: 20px; + width: 20px; + background: #000; + bottom: 0; + right: 0; +} + +/* styling the pagination */ +nav.navigation.pagination { + text-align: center; + margin: 10px; +} + +nav.navigation.pagination a { + border: 1px solid #000; + padding: 5px; + color: currentcolor; +} + +.simplecharm-main-navigation a { + transition: all 0.3s; +} + +.simplecharm-main-navigation a:hover, +.simplecharm-main-navigation a:focus { + background: #000; +} + +/*styling comment box */ +.comment-body { + border: 1px solid #090909; + padding: 10px; +} + +.wp-block-post-comments-form input[type=submit] { + padding: 10px; + background: #000; + color: #fafafa; + border: 3px solid rgb(68, 68, 167); +} + +.wp-block-post-comments-form input[type=submit]:hover, +.wp-block-post-comments-form input[type=submit]:focus { + background: rgba(21, 21, 21, 0.9490196078); + border-color: #00f; +} + +.bypostauthor .comment-body { + position: relative; + margin: 10px 0 0 0; +} + +.bypostauthor .comment-body::before { + position: absolute; + content: "author"; + top: 0; + right: 0; + background: #f00; + padding: 5px; + border-radius: 0px 0px 0px 10px; + color: #fff; + font-weight: bold; +} + +.reply a { + text-decoration: none; + color: currentColor; + padding: 5px; + border: 1px solid #000; +} + +/*edit profile link / button*/ +.simplecharm-edit-profile-btn { + display: block; +} + +.simplecharm-edit-profile-btn a { + border: 1px solid currentColor; + padding: 5px 10px; + margin: auto; +} + +.simplecharm-edit-profile-btn a:hover, +.simplecharm-edit-profile-btn a:focus { + text-decoration: underline !important; +} + +/* style the header */ +.simplecharm-header-image img { + max-width: 100%; + height: auto; +} + +/* styling the footer */ +.simplecharm-theme-footer { + background: #808080; + padding: 20px 0; + text-align: center; + color: #000; +} + +.simplecharm-theme-footer a { + color: #021141; +} + +/*search page navigation*/ +.posts-navigation .nav-links { + display: flex; + flex-direction: row-reverse; + justify-content: space-between; +} + +.posts-navigation .nav-links a { + color: currentColor; +} + +/*styling the search bar*/ +.search-form { + display: flex; + gap: 10px; + justify-content: center; +} + +.search-field, .search-submit { + border: none; + padding: 10px; + text-align: center; +} + +.search-field { + height: 50px; +} + +.search-submit { + cursor: pointer; + display: block; +} + +.search-field:focus { + border: none; + outline: none; +} /*# sourceMappingURL=main.css.map*/ \ No newline at end of file diff --git a/assets/build/css/main.css.map b/assets/build/css/main.css.map old mode 100644 new mode 100755 index 6dfedd0..f79ff07 --- a/assets/build/css/main.css.map +++ b/assets/build/css/main.css.map @@ -1 +1 @@ -{"version":3,"file":"css/main.css","mappings":"AACA,YACI,eACA,oBACA,UACA,yBACA,yBACA,oCACA,0BACA,kBACA,4CACA,oCAEJ,gBACI,SACA,UACA,cACA,eACA,YAEJ,8BACI,iBACA,gBACA,SACA,aACA,kBAEJ,QACI,yBACA,yBACA,sBAEJ,YACI,SACA,UACA,cACA,eACA,YAEJ,0BACI,iBACA,gBACA,SACA,aACA,kBAEJ,oBACI,eACA,oBACA,UACA,yBACA,yBACA,oCACA,0BACA,kBACA,4CACA,oCAEJ,wBACI,SACA,UACA,cACA,eACA,YAEJ,sCACI,iBACA,gBACA,SACA,aACA,kBAEJ,iBACI,iBACA,gBACA,SACA,aACA,kBAEJ,WACI,WACA,mBAEJ,YACI,YACA,kBAEJ,aACI,cACA,iBACA,kBAEJ,sBACI,mBAEJ,uBACI,kBAEJ,wBACI,kBACA,iBAEJ,gBACI,mBAEJ,iBACI,kBAEJ,kBACI,kBACA,iBAEJ,sCACI,eACA,cAEJ,sBACI,oBAEJ,0BACI,SACA,UACA,cACA,eACA,YAEJ,wCACI,iBACA,gBACA,SACA,aACA,kBAEJ,oBACI,8BACA,6BACA,WACA,UACA,gBAEJ,0BACI,yBACA,kBACA,sCACA,qBACA,cACA,cACA,eACA,kBACA,iBACA,YACA,SACA,mBACA,uBACA,qBACA,QACA,WACA,eAEJ,aACC,cAED,yEACE,UClKF,IACC,kBAED,KACI,8DCJJ,yBACI,kBAEJ,kDAEI,qBAEJ,OACI,cAEJ,0BACC,6BAED,qBACI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["webpack://simplecharm-portfolio-plugin/./src/scss/components/_wp_required.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_post.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_utilities.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_nav.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_single-and-posts.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_responsive.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_sidebar.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_pagination.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_comments.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_profile.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_header.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_footer.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_search.scss"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"css/main.css","mappings":";;;AAAA;AACA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;ACCJ;;ADCA;EACI;EACA;EACA;EACA;EACA;ACEJ;;ADAA;EACI;EACA;EACA;EACA;EACA;ACGJ;;ADDA;EACI;EACA;EACA;ACIJ;;ADFA;EACI;EACA;EACA;EACA;EACA;ACKJ;;ADHA;EACI;EACA;EACA;EACA;EACA;ACMJ;;ADJA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;ACOJ;;ADLA;EACI;EACA;EACA;EACA;EACA;ACQJ;;ADNA;EACI;EACA;EACA;EACA;EACA;ACSJ;;ADPA;EACI;EACA;EACA;EACA;EACA;ACUJ;;ADRA;EACI;EACA;ACWJ;;ADTA;EACI;EACA;ACYJ;;ADVA;EACI;EACA;EACA;ACaJ;;ADXA;EACI;ACcJ;;ADZA;EACI;ACeJ;;ADbA;EACI;EACA;ACgBJ;;ADdA;EACI;ACiBJ;;ADfA;EACI;ACkBJ;;ADhBA;EACI;EACA;ACm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AACA;;;EAGI;EACA;EACA;EACA;EACA;AN6XJ;;AM3XA;EACI;EACA;EACA;EACA;EACA;AN8XJ;;AM5XA;EACI;AN+XJ;;AM7XA;EACI;ANgYJ;;AM7XA;;;EAGI;EACA;EACA;EACA;EACA;EACA;EACA;ANgYJ;;AM7XA;;EAEI;EACA;EACA;EACA;EACA;EACA;EACA;ANgYJ;;AO5aA;AACA;EACI;EACA;AP+aJ;;AO5aA;EACI;EACA;EACA;AP+aJ;;AO7aA;EACI;APgbJ;;AO9aA;;EAEI;APibJ;;AQjcA;AACA;EACI;EACA;ARocJ;;AQlcA;EACI;EACA;EACA;EACA;ARqcJ;;AQncA;;EAEC;EACG;ARscJ;;AQncA;EACI;EACA;ARscJ;;AQpcA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;ARucJ;;AQrcA;EACI;EACA;EACA;EACA;ARwcJ;;AS5eA;AACA;EACC;AT+eD;;AS7eA;EACC;EACA;EACA;ATgfD;;AS9eA;;EAEC;ATifD;;AU5fA;AACA;EACI;EACA;AV+fJ;;AWlgBA;AACA;EACI;EACA;EACA;EACA;AXqgBJ;;AWngBA;EACC;AXsgBD;;AY9gBA;AACA;EACI;EACA;EACA;AZihBJ;;AY/gBA;EACI;AZkhBJ;;AYhhBA;AACA;EACI;EACA;EACA;AZmhBJ;;AYjhBA;EACI;EACA;EACA;AZohBJ;;AYlhBA;EACI;AZqhBJ;;AYnhBA;EACC;EACG;AZshBJ;;AYphBA;EACC;EACA;AZuhBD,C","sources":["webpack://simplecharm-portfolio-plugin/./src/scss/components/_wp_required.scss","webpack://simplecharm-portfolio-plugin/./src/scss/main.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_post.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_utilities.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_nav.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_single-and-posts.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_responsive.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_sidebar.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_pagination.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_comments.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_profile.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_header.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_footer.scss","webpack://simplecharm-portfolio-plugin/./src/scss/components/_search.scss"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/assets/build/css/search.css b/assets/build/css/search.css old mode 100644 new mode 100755 index 7ba20e6..5f33d0d --- a/assets/build/css/search.css +++ b/assets/build/css/search.css @@ -1,3 +1,148 @@ -form.search-form{display:flex;justify-content:center;align-items:center}.simplecharm-multiselect-core-container{display:flex}.simplecharm-multiselect-dropdown{opacity:0;pointer-events:none}.simplecharm-select-form-container{position:relative;display:flex}.simplecharm-select-form-inner{align-self:center}.simplecharm-select-form{width:200px;cursor:pointer;overflow:hidden;margin-top:5px}.simplecharm-select-form p{text-align:center;position:relative;z-index:3;box-shadow:2px 2px 2px #000}.simplecharm-selectform-dropdown-icon{margin-left:10px;display:inline-block;transform:rotate(-90deg);transition:.5s}.simplecharm-selectform-dropdown-icon.multiselect-open{transform:rotate(0deg)}.simplecharm-select-options{width:50%;transition:300ms ease;position:absolute;padding:5px 10px;box-shadow:5px 5px 5px #000;font-size:1.2em;background:#fff;color:#000;width:100%}.simplecharm-select-options.multiselect-closed{height:0}.simplecharm-select-options li{list-style:none;padding:5px;display:block !important}.simplecharm-select-options li:hover{background:rgba(0,0,0,.6)}.multiselect-hide{opacity:0;pointer-events:none}#simplecharm-loading-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.5);justify-content:center;align-items:center;z-index:1000;display:none}#simplecharm-loading-overlay .loader{height:100px;width:100px;border:5px solid #000;border-top-color:#fff;border-radius:50%;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);animation:simplecharm-search-page-loader .5s linear infinite}@keyframes simplecharm-search-page-loader{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.simplecharm-searchpage-pagination{padding:20px;width:100%;text-align:center}.simplecharm-searchpage-pagination a{padding:10px;border:1px solid #000;margin:10px;text-decoration:none}.simplecharm-searchpage-pagination a:hover{background:rgba(0,0,0,.3)}.simplecharm-searchpage-pagination a.active{background:#000;color:#fff}.simplecharm-searchpage-pagination a.active:hover{opacity:.8;pointer-events:none} +/*!**************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/scss/search_page.scss ***! + \**************************************************************************************************************************************************************/ +/*Multiselect Dropdown*/ +form.search-form { + display: flex; + justify-content: center; + align-items: center; +} + +.simplecharm-multiselect-core-container { + display: flex; +} + +.simplecharm-multiselect-dropdown { + opacity: 0; + pointer-events: none; +} + +.simplecharm-select-form-container { + position: relative; + display: flex; +} + +.simplecharm-select-form-inner { + align-self: center; +} + +.simplecharm-select-form { + width: 200px; + cursor: pointer; + overflow: hidden; + margin-top: 5px; +} + +.simplecharm-select-form p { + text-align: center; + position: relative; + z-index: 3; + box-shadow: 2px 2px 2px #000; +} + +.simplecharm-selectform-dropdown-icon { + margin-left: 10px; + display: inline-block; + transform: rotate(-90deg); + transition: 0.5s; +} + +.simplecharm-selectform-dropdown-icon.multiselect-open { + transform: rotate(0deg); +} + +.simplecharm-select-options { + width: 50%; + transition: 300ms ease; + position: absolute; + padding: 5px 10px; + box-shadow: 5px 5px 5px #000; + font-size: 1.2em; + background: #fff; + color: #000; + width: 100%; +} + +.simplecharm-select-options.multiselect-closed { + height: 0; +} + +.simplecharm-select-options li { + list-style: none; + padding: 5px; + display: block !important; +} + +.simplecharm-select-options li:hover { + background: rgba(0, 0, 0, 0.6); +} + +.multiselect-hide { + opacity: 0; + pointer-events: none; +} + +/*Other Styles*/ +#simplecharm-loading-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.5); + justify-content: center; + align-items: center; + z-index: 1000; + display: none; +} + +#simplecharm-loading-overlay .loader { + height: 100px; + width: 100px; + border: 5px solid #000; + border-top-color: #fff; + border-radius: 50%; + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + animation: simplecharm-search-page-loader 0.5s linear infinite; +} + +@keyframes simplecharm-search-page-loader { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +/*Pagination Style*/ +.simplecharm-searchpage-pagination { + padding: 20px; + width: 100%; + text-align: center; +} + +.simplecharm-searchpage-pagination a { + padding: 10px; + border: 1px solid #000; + margin: 10px; + text-decoration: none; +} + +.simplecharm-searchpage-pagination a:hover { + background: rgba(0, 0, 0, 0.3); +} + +.simplecharm-searchpage-pagination a.active { + background: #000; + color: #fff; +} + +.simplecharm-searchpage-pagination a.active:hover { + opacity: 0.8; + pointer-events: none; +} /*# sourceMappingURL=search.css.map*/ \ No newline at end of file diff --git a/assets/build/css/search.css.map b/assets/build/css/search.css.map old mode 100644 new mode 100755 index c798c4c..7350d43 --- a/assets/build/css/search.css.map +++ b/assets/build/css/search.css.map @@ -1 +1 @@ -{"version":3,"file":"css/search.css","mappings":"AACA,iBACI,aACA,uBACA,mBAEJ,wCACI,aAEJ,kCACE,UACA,oBAEF,mCACI,kBACA,aAEJ,+BACE,kBAEF,yBACE,YACA,eACA,gBACA,eAEF,2BACE,kBACA,kBACA,UACA,4BAEF,sCACE,iBACA,qBACA,yBACA,eAEF,uDACE,uBAEF,4BACI,UACA,sBACA,kBACA,iBACA,4BACA,gBACA,gBACA,WACA,WAEJ,+CACE,SAEF,+BACE,gBACA,YACA,yBAEF,qCACE,0BAEF,kBACE,UACA,oBAIF,6BACE,eACA,MACA,OACA,WACA,YACA,0BACA,uBACA,mBACA,aACA,aAGF,qCACI,aACA,YACA,sBACA,sBACA,kBACA,eACA,QACA,SACA,gCACA,6DAEJ,0CACI,GACI,uBACH,KACG,0BAKR,mCACI,aACA,WACA,kBAEJ,qCACI,aACA,sBACA,YACA,qBAEJ,2CACI,0BAEJ,4CACI,gBACA,WAEJ,kDACI,WACA,oB","sources":["webpack://simplecharm-portfolio-plugin/./src/scss/search_page.scss"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"css/search.css","mappings":";;;AAAA;AACA;EACI;EACA;EACA;AACJ;;AACA;EACI;AAEJ;;AAAA;EACE;EACA;AAGF;;AADA;EACI;EACA;AAIJ;;AAFA;EACE;AAKF;;AAHA;EACE;EACA;EACA;EACA;AAMF;;AAJA;EACE;EACA;EACA;EACA;AAOF;;AALA;EACE;EACA;EACA;EACA;AAQF;;AANA;EACE;AASF;;AAPA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAUJ;;AARA;EACE;AAWF;;AATA;EACE;EACA;EACA;AAYF;;AAVA;EACE;AAaF;;AAXA;EACE;EACA;AAcF;;AAXA;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAcF;;AAXA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAcJ;;AAZA;EACI;IACI;EAeN;EAdG;IACG;EAgBN;AACF;AAbA;AACA;EACI;EACA;EACA;AAeJ;;AAbA;EACI;EACA;EACA;EACA;AAgBJ;;AAdA;EACI;AAiBJ;;AAfA;EACI;EACA;AAkBJ;;AAhBA;EACI;EACA;AAmBJ,C","sources":["webpack://simplecharm-portfolio-plugin/./src/scss/search_page.scss"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/assets/build/img/simplecharm-header-image.jpg b/assets/build/img/simplecharm-header-image.jpg old mode 100644 new mode 100755 diff --git a/assets/build/js/customizer.js b/assets/build/js/customizer.js old mode 100644 new mode 100755 index cd7da91..89e01f6 --- a/assets/build/js/customizer.js +++ b/assets/build/js/customizer.js @@ -1,2 +1,46 @@ -!function(){var e;e=jQuery,wp.customize("simplecharm_setting",(function(a){a.bind((function(a){a?function(e){try{return new URL(e),!0}catch(e){return!1}}(simplecharm_header_info.simplecharm_header_image)&&(e("header").css("background-image","url(".concat(simplecharm_header_info.simplecharm_header_image,")")),e("header").css("background-repeat","no-repeat"),e("header").css("background-size","cover"),e("header").css("padding","20px"),e("header").css("background-position","center"),e(".simplecharm-header-image").css("display","none")):(e("header").css("background-image","unset"),e("header").css("background-repeat","unset"),e("header").css("background-size","unset"),e("header").css("padding","unset"),e("header").css("background-position","unset"),e(".simplecharm-header-image").css("display","unset"))}))}))}(); +/******/ (function() { // webpackBootstrap +/*!******************************!*\ + !*** ./src/js/customizer.js ***! + \******************************/ +/** + * This file adds some LIVE to the Theme Customizer live preview. To leverage + * this, set your custom settings to 'postMessage' and then add your handling + * here. Your javascript should grab settings from customizer controls, and + * then make any necessary changes to the page using jQuery. + * @package SimpleCharm + * @since 1.0 + */ +(function ($) { + function simplecharm_isValidURL(url) { + try { + new URL(url); + return true; + } catch (error) { + return false; + } + } + wp.customize('simplecharm_setting', function (value) { + value.bind(function (newval) { + if (newval) { + if (simplecharm_isValidURL(simplecharm_header_info.simplecharm_header_image)) { + $("header").css("background-image", "url(".concat(simplecharm_header_info["simplecharm_header_image"], ")")); + $("header").css("background-repeat", "no-repeat"); + $("header").css("background-size", "cover"); + $("header").css("padding", "20px"); + $("header").css("background-position", "center"); + $(".simplecharm-header-image").css("display", "none"); + } + } else { + $("header").css("background-image", "unset"); + $("header").css("background-repeat", "unset"); + $("header").css("background-size", "unset"); + $("header").css("padding", "unset"); + $("header").css("background-position", "unset"); + $(".simplecharm-header-image").css("display", "unset"); + } + }); + }); +})(jQuery); +/******/ })() +; //# sourceMappingURL=customizer.js.map \ No newline at end of file diff --git a/assets/build/js/customizer.js.map b/assets/build/js/customizer.js.map old mode 100644 new mode 100755 index 05c3fb2..594a319 --- a/assets/build/js/customizer.js.map +++ b/assets/build/js/customizer.js.map @@ -1 +1 @@ -{"version":3,"file":"js/customizer.js","mappings":"YAQA,IAAYA,IA+BPC,OAtBJC,GAAGC,UAAW,uBAAuB,SAAUC,GAC9CA,EAAMC,MAAM,SAAUC,GACnBA,EAVH,SAAgCC,GAC/B,IAEC,OADA,IAAIC,IAAID,IACD,CACR,CAAE,MAAOE,GACR,OAAO,CACR,CACD,CAIIC,CAAuBC,wBAAwBC,4BACjDZ,EAAE,UAAUa,IAAI,mBAAkB,OAAAC,OAAQH,wBAAkD,yBAAC,MAC7FX,EAAE,UAAUa,IAAI,oBAAoB,aACpCb,EAAE,UAAUa,IAAI,kBAAkB,SAClCb,EAAE,UAAUa,IAAI,UAAU,QAC1Bb,EAAE,UAAUa,IAAI,sBAAsB,UACtCb,EAAE,6BAA6Ba,IAAI,UAAU,UAG9Cb,EAAE,UAAUa,IAAI,mBAAmB,SACnCb,EAAE,UAAUa,IAAI,oBAAoB,SACpCb,EAAE,UAAUa,IAAI,kBAAkB,SAClCb,EAAE,UAAUa,IAAI,UAAU,SAC1Bb,EAAE,UAAUa,IAAI,sBAAsB,SACtCb,EAAE,6BAA6Ba,IAAI,UAAU,SAE9C,GACD,G","sources":["webpack://simplecharm-portfolio-plugin/./src/js/customizer.js"],"sourcesContent":["/**\n * This file adds some LIVE to the Theme Customizer live preview. To leverage\n * this, set your custom settings to 'postMessage' and then add your handling\n * here. Your javascript should grab settings from customizer controls, and \n * then make any necessary changes to the page using jQuery.\n * @package SimpleCharm\n * @since 1.0\n */\n( function( $ ) {\n\t\tfunction simplecharm_isValidURL(url) {\n\t\t\ttry {\n\t\t\t\tnew URL(url);\n\t\t\t\treturn true;\n\t\t\t} catch (error) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\twp.customize( 'simplecharm_setting', function( value ) {\n\t\tvalue.bind( function( newval ) {\n\t\tif(newval){\n\t\t\tif(simplecharm_isValidURL(simplecharm_header_info.simplecharm_header_image)){\n\t\t\t\t$(\"header\").css(\"background-image\",`url(${simplecharm_header_info[\"simplecharm_header_image\"]})`);\n\t\t\t\t$(\"header\").css(\"background-repeat\",\"no-repeat\");\n\t\t\t\t$(\"header\").css(\"background-size\",\"cover\");\n\t\t\t\t$(\"header\").css(\"padding\",\"20px\");\n\t\t\t\t$(\"header\").css(\"background-position\",\"center\");\n\t\t\t\t$(\".simplecharm-header-image\").css(\"display\",\"none\");\n\t\t\t}\n\t\t}else{\n\t\t\t$(\"header\").css(\"background-image\",\"unset\");\n\t\t\t$(\"header\").css(\"background-repeat\",\"unset\");\n\t\t\t$(\"header\").css(\"background-size\",\"unset\");\n\t\t\t$(\"header\").css(\"padding\",\"unset\");\n\t\t\t$(\"header\").css(\"background-position\",\"unset\");\n\t\t\t$(\".simplecharm-header-image\").css(\"display\",\"unset\");\n\t\t\t}\n\t\t} );\n\t} );\n\t\n} )( jQuery );\n"],"names":["$","jQuery","wp","customize","value","bind","newval","url","URL","error","simplecharm_isValidURL","simplecharm_header_info","simplecharm_header_image","css","concat"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"js/customizer.js","mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAE,UAAUA,CAAC,EAAG;EACd,SAASC,sBAAsBA,CAACC,GAAG,EAAE;IACpC,IAAI;MACH,IAAIC,GAAG,CAACD,GAAG,CAAC;MACZ,OAAO,IAAI;IACZ,CAAC,CAAC,OAAOE,KAAK,EAAE;MACf,OAAO,KAAK;IACb;EACD;EACDC,EAAE,CAACC,SAAS,CAAE,qBAAqB,EAAE,UAAUC,KAAK,EAAG;IACtDA,KAAK,CAACC,IAAI,CAAE,UAAUC,MAAM,EAAG;MAC/B,IAAGA,MAAM,EAAC;QACT,IAAGR,sBAAsB,CAACS,uBAAuB,CAACC,wBAAwB,CAAC,EAAC;UAC3EX,CAAC,CAAC,QAAQ,CAAC,CAACY,GAAG,CAAC,kBAAkB,SAAAC,MAAA,CAAQH,uBAAuB,CAAC,0BAA0B,CAAC,MAAG,CAAC;UACjGV,CAAC,CAAC,QAAQ,CAAC,CAACY,GAAG,CAAC,mBAAmB,EAAC,WAAW,CAAC;UAChDZ,CAAC,CAAC,QAAQ,CAAC,CAACY,GAAG,CAAC,iBAAiB,EAAC,OAAO,CAAC;UAC1CZ,CAAC,CAAC,QAAQ,CAAC,CAACY,GAAG,CAAC,SAAS,EAAC,MAAM,CAAC;UACjCZ,CAAC,CAAC,QAAQ,CAAC,CAACY,GAAG,CAAC,qBAAqB,EAAC,QAAQ,CAAC;UAC/CZ,CAAC,CAAC,2BAA2B,CAAC,CAACY,GAAG,CAAC,SAAS,EAAC,MAAM,CAAC;QACrD;MACD,CAAC,MAAI;QACJZ,CAAC,CAAC,QAAQ,CAAC,CAACY,GAAG,CAAC,kBAAkB,EAAC,OAAO,CAAC;QAC3CZ,CAAC,CAAC,QAAQ,CAAC,CAACY,GAAG,CAAC,mBAAmB,EAAC,OAAO,CAAC;QAC5CZ,CAAC,CAAC,QAAQ,CAAC,CAACY,GAAG,CAAC,iBAAiB,EAAC,OAAO,CAAC;QAC1CZ,CAAC,CAAC,QAAQ,CAAC,CAACY,GAAG,CAAC,SAAS,EAAC,OAAO,CAAC;QAClCZ,CAAC,CAAC,QAAQ,CAAC,CAACY,GAAG,CAAC,qBAAqB,EAAC,OAAO,CAAC;QAC9CZ,CAAC,CAAC,2BAA2B,CAAC,CAACY,GAAG,CAAC,SAAS,EAAC,OAAO,CAAC;MACrD;IACD,CAAE,CAAC;EACJ,CAAE,CAAC;AAEJ,CAAC,EAAIE,MAAO,CAAC,C","sources":["webpack://simplecharm-portfolio-plugin/./src/js/customizer.js"],"sourcesContent":["/**\n * This file adds some LIVE to the Theme Customizer live preview. To leverage\n * this, set your custom settings to 'postMessage' and then add your handling\n * here. Your javascript should grab settings from customizer controls, and \n * then make any necessary changes to the page using jQuery.\n * @package SimpleCharm\n * @since 1.0\n */\n( function( $ ) {\n\t\tfunction simplecharm_isValidURL(url) {\n\t\t\ttry {\n\t\t\t\tnew URL(url);\n\t\t\t\treturn true;\n\t\t\t} catch (error) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\twp.customize( 'simplecharm_setting', function( value ) {\n\t\tvalue.bind( function( newval ) {\n\t\tif(newval){\n\t\t\tif(simplecharm_isValidURL(simplecharm_header_info.simplecharm_header_image)){\n\t\t\t\t$(\"header\").css(\"background-image\",`url(${simplecharm_header_info[\"simplecharm_header_image\"]})`);\n\t\t\t\t$(\"header\").css(\"background-repeat\",\"no-repeat\");\n\t\t\t\t$(\"header\").css(\"background-size\",\"cover\");\n\t\t\t\t$(\"header\").css(\"padding\",\"20px\");\n\t\t\t\t$(\"header\").css(\"background-position\",\"center\");\n\t\t\t\t$(\".simplecharm-header-image\").css(\"display\",\"none\");\n\t\t\t}\n\t\t}else{\n\t\t\t$(\"header\").css(\"background-image\",\"unset\");\n\t\t\t$(\"header\").css(\"background-repeat\",\"unset\");\n\t\t\t$(\"header\").css(\"background-size\",\"unset\");\n\t\t\t$(\"header\").css(\"padding\",\"unset\");\n\t\t\t$(\"header\").css(\"background-position\",\"unset\");\n\t\t\t$(\".simplecharm-header-image\").css(\"display\",\"unset\");\n\t\t\t}\n\t\t} );\n\t} );\n\t\n} )( jQuery );\n"],"names":["$","simplecharm_isValidURL","url","URL","error","wp","customize","value","bind","newval","simplecharm_header_info","simplecharm_header_image","css","concat","jQuery"],"sourceRoot":""} \ No newline at end of file diff --git a/assets/build/js/main.js b/assets/build/js/main.js old mode 100644 new mode 100755 index e69de29..88ebcf2 --- a/assets/build/js/main.js +++ b/assets/build/js/main.js @@ -0,0 +1,68 @@ +/******/ (function() { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ "./src/scss/main.scss": +/*!****************************!*\ + !*** ./src/scss/main.scss ***! + \****************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/make namespace object */ +/******/ !function() { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ }(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. +!function() { +/*!************************!*\ + !*** ./src/js/main.js ***! + \************************/ +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _scss_main_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scss/main.scss */ "./src/scss/main.scss"); + +}(); +/******/ })() +; +//# sourceMappingURL=main.js.map \ No newline at end of file diff --git a/assets/build/js/main.js.map b/assets/build/js/main.js.map old mode 100644 new mode 100755 diff --git a/assets/build/js/search.js b/assets/build/js/search.js old mode 100644 new mode 100755 index 144d944..8acbc61 --- a/assets/build/js/search.js +++ b/assets/build/js/search.js @@ -1,2 +1,474 @@ -!function(){var e={684:function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var r=0;r0&&s.append("categories",n.join(",")),o&&s.append("page",o),r("#simplecharm-loading-overlay").show(),fetch(c+"?"+s.toString()).then((function(e){return i=e.headers.get("X-WP-TotalPages"),e.json()})).then((function(e){var c=r("#simplecharm-search-page");if(c.html(""),e.length>0)if(e.forEach((function(e){var t=new Date(e.date);e.date=t.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});var n=e.date;e.title.rendered.length<=0&&(n='').concat(e.date,""));var r=document.createElement("div");r.classList.add("post-".concat(e.id),"simplecharm-text-center","simplecharm-content"),r.innerHTML='\n

\n ').concat(e.title.rendered,'\n

\n \n
\n ').concat(e.excerpt.rendered,"\n
"),c.append(r)})),i>1){var s=r(".simplecharm-searchpage-pagination");s.html("");for(var l=function(){var e=document.createElement("a");e.classList.add(u),e.classList.add(o==u?"active":"inactive"),e.innerText=u,s.append(e),e.addEventListener("click",(function(r){a.page=e.classList[0]?e.classList[0]:1,a.requestPosts(r,t,n,a.page)}))},u=1;u<=i;u++)l()}else r(".simplecharm-searchpage-pagination").html("");else c.innerHTML='

No search results found for "'.concat(t,'"

');r("#simplecharm-loading-overlay").hide()})).catch((function(e){console.error("Error fetching posts:",e),document.getElementById("simplecharm-search-page").innerHTML="

Error fetching posts.

",r("#simplecharm-loading-overlay").hide()}))}}],n&&t(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}())},488:function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var r=0;r= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } +function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } +function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } +function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } +function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } +function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +(function ($) { + var LoadSearch = /*#__PURE__*/function () { + function LoadSearch() { + _classCallCheck(this, LoadSearch); + this.init(); + this.page = 1; + this.allUsers = []; + } + return _createClass(LoadSearch, [{ + key: "init", + value: function init() { + this.load_posts(); + } + }, { + key: "load_categories", + value: function load_categories() { + var selectedOptions = document.getElementById('categories').selectedOptions; + var selectedNames = []; + for (var i = 0; i < selectedOptions.length; i++) { + var nameValue = selectedOptions[i].getAttribute('name'); + selectedNames.push(nameValue); + } + return selectedNames; + } + }, { + key: "load_posts", + value: function load_posts() { + var _this = this; + $('#simplecharm-advanced-search-form').on('submit', function (e) { + e.preventDefault(); + var search_term = $('.search-field').val(); + var categories = _this.load_categories(); + _this.requestPosts(e, search_term, categories, _this.page); + }); + } + }, { + key: "requestPosts", + value: function () { + var _requestPosts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(e, search_term, categories, page) { + var _this2 = this; + var pagination, totalPage, apiUrl, params, response, posts, resultsContainer, _iterator, _step, post, date, options, postdate, _userdata, postElement, _pagination, _loop, i, _pagination2; + return _regeneratorRuntime().wrap(function _callee$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + pagination = $('.simplecharm-searchpage-pagination'); + pagination.html(''); + totalPage = 1; + apiUrl = new URL('/wp-json/wp/v2/posts', window.location.origin); + params = new URLSearchParams(); + if (search_term) { + params.append('search', search_term); + } + if (categories.length > 0) { + params.append('categories', categories.join(',')); + } + if (page) { + params.append('page', page); + } + $('#simplecharm-loading-overlay').show(); + _context2.prev = 9; + _context2.next = 12; + return fetch(apiUrl + '?' + params.toString()); + case 12: + response = _context2.sent; + _context2.next = 15; + return response.json(); + case 15: + posts = _context2.sent; + resultsContainer = $('#simplecharm-search-page'); + resultsContainer.html(''); // Clear previous results + // .then(response => { + // totalPage = response.headers.get('X-WP-TotalPages'); + // return response.json() + // }) + // Check if there are posts + if (!(posts.length > 0)) { + _context2.next = 62; + break; + } + _iterator = _createForOfIteratorHelper(posts); + _context2.prev = 20; + _iterator.s(); + case 22: + if ((_step = _iterator.n()).done) { + _context2.next = 38; + break; + } + post = _step.value; + date = new Date(post.date); + options = { + year: 'numeric', + month: 'long', + day: 'numeric' + }; + post.date = date.toLocaleDateString('en-US', options); + postdate = post.date; + if (post.title.rendered.length <= 0) { + postdate = "").concat(post.date, ""); + } + _context2.next = 31; + return this.get_user(post.author); + case 31: + _userdata = _context2.sent; + postElement = document.createElement('div'); + postElement.classList.add("post-".concat(post.id), 'simplecharm-text-center', 'simplecharm-content'); + postElement.innerHTML = "\n

\n ").concat(post.title.rendered, "\n

\n
\n \n ").concat(postdate, "\n \n \n ").concat(_userdata.username, "\n \n
\n
\n ").concat(post.excerpt.rendered, "\n
"); + resultsContainer.append(postElement); + case 36: + _context2.next = 22; + break; + case 38: + _context2.next = 43; + break; + case 40: + _context2.prev = 40; + _context2.t0 = _context2["catch"](20); + _iterator.e(_context2.t0); + case 43: + _context2.prev = 43; + _iterator.f(); + return _context2.finish(43); + case 46: + if (!(totalPage > 1)) { + _context2.next = 58; + break; + } + _pagination = $('.simplecharm-searchpage-pagination'); + _pagination.html(''); + _loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop() { + var pageBtn; + return _regeneratorRuntime().wrap(function _loop$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + pageBtn = document.createElement('a'); + pageBtn.classList.add(i); + pageBtn.classList.add(page == i ? 'active' : 'inactive'); + pageBtn.innerText = i; + _pagination.append(pageBtn); + pageBtn.addEventListener("click", function (e) { + _this2.page = !pageBtn.classList[0] ? 1 : pageBtn.classList[0]; + _this2.requestPosts(e, search_term, categories, _this2.page); + }); + case 6: + case "end": + return _context.stop(); + } + }, _loop); + }); + i = 1; + case 51: + if (!(i <= totalPage)) { + _context2.next = 56; + break; + } + return _context2.delegateYield(_loop(), "t1", 53); + case 53: + i++; + _context2.next = 51; + break; + case 56: + _context2.next = 60; + break; + case 58: + _pagination2 = $('.simplecharm-searchpage-pagination'); + _pagination2.html(''); + case 60: + _context2.next = 63; + break; + case 62: + resultsContainer.innerHTML = "

No search results found for \"".concat(search_term, "\"

"); + case 63: + $('#simplecharm-loading-overlay').hide(); + _context2.next = 71; + break; + case 66: + _context2.prev = 66; + _context2.t2 = _context2["catch"](9); + console.error('Error fetching posts:', _context2.t2); + document.getElementById('simplecharm-search-page').innerHTML = '

Error fetching posts.

'; + $('#simplecharm-loading-overlay').hide(); + case 71: + ; + case 72: + case "end": + return _context2.stop(); + } + }, _callee, this, [[9, 66], [20, 40, 43, 46]]); + })); + function requestPosts(_x, _x2, _x3, _x4) { + return _requestPosts.apply(this, arguments); + } + return requestPosts; + }() + }, { + key: "get_user", + value: function () { + var _get_user = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(id) { + var userDetails; + return _regeneratorRuntime().wrap(function _callee2$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + if (id in this.allUsers) { + _context3.next = 8; + break; + } + _context3.next = 3; + return this.load_user(id); + case 3: + userDetails = _context3.sent; + this.allUsers[id] = userDetails; + return _context3.abrupt("return", userDetails); + case 8: + return _context3.abrupt("return", this.allUsers[id]); + case 9: + case "end": + return _context3.stop(); + } + }, _callee2, this); + })); + function get_user(_x5) { + return _get_user.apply(this, arguments); + } + return get_user; + }() + }, { + key: "load_user", + value: function () { + var _load_user = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(id) { + var data, response, result; + return _regeneratorRuntime().wrap(function _callee3$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + data = new FormData(); + data.append('action', 'simplecharm_get_user_info'); + data.append('user_id', id); + _context4.prev = 3; + _context4.next = 6; + return fetch(admin_data.ajax_url, { + method: 'POST', + body: data + }); + case 6: + response = _context4.sent; + _context4.next = 9; + return response.json(); + case 9: + result = _context4.sent; + if (result.error) { + _context4.next = 12; + break; + } + return _context4.abrupt("return", result); + case 12: + _context4.next = 17; + break; + case 14: + _context4.prev = 14; + _context4.t0 = _context4["catch"](3); + throw _context4.t0; + case 17: + return _context4.abrupt("return", userdata); + case 18: + case "end": + return _context4.stop(); + } + }, _callee3, null, [[3, 14]]); + })); + function load_user(_x6) { + return _load_user.apply(this, arguments); + } + return load_user; + }() + }]); + }(); + new LoadSearch(); +})(jQuery); + +/***/ }), + +/***/ "./src/js/multiselect.js": +/*!*******************************!*\ + !*** ./src/js/multiselect.js ***! + \*******************************/ +/***/ (function() { + +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +(function ($) { + var Multiselect = /*#__PURE__*/function () { + function Multiselect() { + _classCallCheck(this, Multiselect); + this.init(); + } + return _createClass(Multiselect, [{ + key: "init", + value: function init() { + this.load_multiselect(); + this.control_multiselect(); + } + }, { + key: "load_multiselect", + value: function load_multiselect() { + var list = $('.simplecharm-select-options li'); + list.each(function () { + var _this = this; + $(this).on('click', function (e) { + e.preventDefault(); + var checked = $(_this).find('input')[0]; // Get the input element in the clicked li + checked.checked = !checked.checked; // Toggle checked state + + if (checked.checked) { + $(checked).addClass("selected"); + } else { + $(checked).removeClass("selected"); + } + var option = $("#".concat(_this.className)); // Get the option corresponding to the clicked li + option.prop('selected', checked.checked); // Set selected property correctly + + $("#".concat(_this.className)).selected = checked.checked; + var selectedStatus = $(".simplecharm-select-form p b"); + var selectedCount = $(".selected"); + if (selectedCount.length) { + selectedStatus.text("".concat(selectedCount.length, " Category Selected")); + } else { + selectedStatus.text("Select Categories"); + } + }); + }); + } + }, { + key: "control_multiselect", + value: function control_multiselect() { + var selectTitle = $(".simplecharm-select-form p"); + var selectOptions = $(".simplecharm-select-options"); + var selectDropdownIcon = $(".simplecharm-selectform-dropdown-icon"); + selectTitle.on("click", function (e) { + selectOptions.toggleClass("multiselect-closed"); + selectDropdownIcon.toggleClass("multiselect-open"); + selectOptions.toggleClass("multiselect-hide"); + }); + } + }]); + }(); + new Multiselect(); +})(jQuery); + +/***/ }), + +/***/ "./src/scss/search_page.scss": +/*!***********************************!*\ + !*** ./src/scss/search_page.scss ***! + \***********************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ !function() { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function() { return module['default']; } : +/******/ function() { return module; }; +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ !function() { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = function(exports, definition) { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ !function() { +/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } +/******/ }(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ !function() { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ }(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be in strict mode. +!function() { +"use strict"; +/*!**************************!*\ + !*** ./src/js/search.js ***! + \**************************/ +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _scss_search_page_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scss/search_page.scss */ "./src/scss/search_page.scss"); +/* harmony import */ var _multiselect_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./multiselect.js */ "./src/js/multiselect.js"); +/* harmony import */ var _multiselect_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_multiselect_js__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _load_search_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./load_search.js */ "./src/js/load_search.js"); +/* harmony import */ var _load_search_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_load_search_js__WEBPACK_IMPORTED_MODULE_2__); + + + +}(); +/******/ })() +; //# sourceMappingURL=search.js.map \ No newline at end of file diff --git a/assets/build/js/search.js.map b/assets/build/js/search.js.map old mode 100644 new mode 100755 index f2f5e40..6cb30e9 --- a/assets/build/js/search.js.map +++ b/assets/build/js/search.js.map @@ -1 +1 @@ -{"version":3,"file":"js/search.js","mappings":"osBAAA,IAAUA,IA4HPC,OAFC,IAzHgB,WAIX,O,EAHD,SAAAC,K,4FAAaC,CAAA,KAAAD,GACTE,KAAKC,OACLD,KAAKE,KAAO,CAChB,E,EAAC,EAAAC,IAAA,OAAAC,MACD,WACIJ,KAAKK,YACT,GAAC,CAAAF,IAAA,kBAAAC,MAED,WAII,IAHA,IAAIE,EAAkBC,SAASC,eAAe,cAAcF,gBACxDG,EAAgB,GAEXC,EAAI,EAAGA,EAAIJ,EAAgBK,OAAQD,IAAK,CAC7C,IAAIE,EAAYN,EAAgBI,GAAGG,aAAa,QAChDJ,EAAcK,KAAKF,EACvB,CAEA,OAAOH,CACX,GAAC,CAAAN,IAAA,aAAAC,MAGD,WAAY,IAAAW,EAAA,KACRnB,EAAE,qCAAqCoB,GAAG,UAAU,SAACC,GACrDA,EAAEC,iBACF,IAAIC,EAAcvB,EAAE,iBAAiBwB,MACjCC,EAAaN,EAAKO,kBACtBP,EAAKQ,aAAaN,EAAEE,EAAYE,EAAWN,EAAKb,KACpD,GACA,GAAC,CAAAC,IAAA,eAAAC,MACD,SAAaa,EAAEE,EAAYE,EAAWnB,GAAM,IAAAsB,EAAA,KACvB5B,EAAE,sCACJ6B,KAAK,IAEpB,IAAIC,EAAY,EAEZC,EAAS,IAAIC,IAAI,uBAAwBC,OAAOC,SAASC,QACzDC,EAAS,IAAIC,gBAEbd,GACAa,EAAOE,OAAO,SAAUf,GAGxBE,EAAWV,OAAS,GACpBqB,EAAOE,OAAO,aAAcb,EAAWc,KAAK,M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B+F,EAAqB/F,EAAE,yCAE7B6F,EAAYzE,GAAG,SAAS,SAASC,GAC/ByE,EAAcE,YAAY,sBAC1BD,EAAmBC,YAAY,oBAC/BF,EAAcE,YAAY,mBAC5B,GACF,I,gFAAC,CApDc,G,GCAfC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaE,QAGrB,IAAIC,EAASN,EAAyBE,GAAY,CAGjDG,QAAS,CAAC,GAOX,OAHAE,EAAoBL,GAAUI,EAAQA,EAAOD,QAASJ,GAG/CK,EAAOD,OACf,CCrBAJ,EAAoBO,EAAI,SAASF,GAChC,IAAIG,EAASH,GAAUA,EAAOI,WAC7B,WAAa,OAAOJ,EAAgB,OAAG,EACvC,WAAa,OAAOA,CAAQ,EAE7B,OADAL,EAAoBU,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CACR,ECNAR,EAAoBU,EAAI,SAASN,EAASQ,GACzC,IAAI,IAAIvG,KAAOuG,EACXZ,EAAoBa,EAAED,EAAYvG,KAAS2F,EAAoBa,EAAET,EAAS/F,IAC5EyG,OAAOC,eAAeX,EAAS/F,EAAK,CAAE2G,YAAY,EAAMpE,IAAKgE,EAAWvG,IAG3E,ECPA2F,EAAoBa,EAAI,SAASI,EAAK3B,GAAQ,OAAOwB,OAAOI,UAAUC,eAAeC,KAAKH,EAAK3B,EAAO,E","sources":["webpack://simplecharm-portfolio-plugin/./src/js/load_search.js","webpack://simplecharm-portfolio-plugin/./src/js/multiselect.js","webpack://simplecharm-portfolio-plugin/webpack/bootstrap","webpack://simplecharm-portfolio-plugin/webpack/runtime/compat get default export","webpack://simplecharm-portfolio-plugin/webpack/runtime/define property getters","webpack://simplecharm-portfolio-plugin/webpack/runtime/hasOwnProperty shorthand"],"sourcesContent":["(function($){\n class LoadSearch{\n constructor(){\n this.init();\n this.page = 1;\n }\n init(){\n this.load_posts();\n }\n\n load_categories(){\n let selectedOptions = document.getElementById('categories').selectedOptions;\n let selectedNames = [];\n\n for (let i = 0; i < selectedOptions.length; i++) {\n let nameValue = selectedOptions[i].getAttribute('name');\n selectedNames.push(nameValue);\n }\n\n return selectedNames;\n }\n\n\n load_posts(){\n $('#simplecharm-advanced-search-form').on('submit', (e) => {\n e.preventDefault();\n let search_term = $('.search-field').val();\n let categories = this.load_categories();\n this.requestPosts(e,search_term,categories,this.page);\n });\n }\n requestPosts(e,search_term,categories,page) {\n let pagination = $('.simplecharm-searchpage-pagination');\n pagination.html('');\n\n let totalPage = 1;\n\n let apiUrl = new URL('/wp-json/wp/v2/posts', window.location.origin);\n let params = new URLSearchParams();\n\n if (search_term) {\n params.append('search', search_term);\n }\n\n if (categories.length > 0) {\n params.append('categories', categories.join(',')); \n }\n\n if(page){\n params.append('page',page);\n }\n\n $('#simplecharm-loading-overlay').show();\n\n fetch(apiUrl + '?' + params.toString())\n .then(response => {\n totalPage = response.headers.get('X-WP-TotalPages');\n return response.json()\n })\n .then(posts => {\n let resultsContainer = $('#simplecharm-search-page');\n resultsContainer.html(''); // Clear previous results\n\n // Check if there are posts\n if (posts.length > 0) {\n posts.forEach(post => {\n let date = new Date(post.date);\n let options = { year: 'numeric', month: 'long', day: 'numeric' };\n post.date = date.toLocaleDateString('en-US', options);\n let postdate = post.date;\n if((post.title.rendered.length) <= 0){\n postdate = `${post.date}`;\n }\n\n let postElement = document.createElement('div');\n postElement.classList.add(`post-${post.id}`,'simplecharm-text-center', 'simplecharm-content');\n postElement.innerHTML = `\n

\n ${post.title.rendered}\n

\n
\n \n ${postdate}\n \n
\n
\n ${post.excerpt.rendered}\n
`;\n resultsContainer.append(postElement);\n });\n if(totalPage > 1){\n let pagination = $('.simplecharm-searchpage-pagination');\n pagination.html('');\n for(let i = 1;i <= totalPage;i++){\n let pageBtn = document.createElement('a');\n pageBtn.classList.add(i);\n pageBtn.classList.add(page == i ? 'active' : 'inactive');\n pageBtn.innerText = i;\n pagination.append(pageBtn);\n pageBtn.addEventListener(\"click\",(e) => {\n this.page = !(pageBtn.classList[0]) ? 1 : pageBtn.classList[0];\n this.requestPosts(e,search_term,categories,this.page);\n });\n }\n }else{\n let pagination = $('.simplecharm-searchpage-pagination');\n pagination.html('');\n }\n } else {\n resultsContainer.innerHTML = `

No search results found for \"${search_term}\"

`;\n }\n $('#simplecharm-loading-overlay').hide();\n })\n .catch(error => {\n console.error('Error fetching posts:', error);\n document.getElementById('simplecharm-search-page').innerHTML = '

Error fetching posts.

';\n \n $('#simplecharm-loading-overlay').hide();\n });\n }\n }\n\n new LoadSearch;\n\n})(jQuery)","(function($){\n class Multiselect{\n constructor(){\n this.init();\n }\n\n init(){\n this.load_multiselect();\n this.control_multiselect();\n }\n\n load_multiselect(){\n const list = $('.simplecharm-select-options li');\n\n list.each(function(){\n $(this).on( 'click', (e) => {\n e.preventDefault();\n let checked = $(this).find('input')[0]; // Get the input element in the clicked li\n checked.checked = !checked.checked; // Toggle checked state\n\n if (checked.checked) {\n $(checked).addClass(\"selected\");\n } else {\n $(checked).removeClass(\"selected\");\n }\n \n const option = $(`#${this.className}`); // Get the option corresponding to the clicked li\n option.prop('selected', checked.checked); // Set selected property correctly\n\n\n $(`#${this.className}`).selected = checked.checked;\n const selectedStatus = $(\".simplecharm-select-form p b\");\n const selectedCount = $(\".selected\");\n\n if(selectedCount.length){\n selectedStatus.text(`${selectedCount.length} Category Selected`);\n }else{\n selectedStatus.text(`Select Categories`); \n }\n });\n })\n }\n\n control_multiselect(){\n const selectTitle = $(\".simplecharm-select-form p\");\n const selectOptions = $(\".simplecharm-select-options\");\n const selectDropdownIcon = $(\".simplecharm-selectform-dropdown-icon\");\n\n selectTitle.on(\"click\", function(e){\n selectOptions.toggleClass(\"multiselect-closed\");\n selectDropdownIcon.toggleClass(\"multiselect-open\");\n selectOptions.toggleClass(\"multiselect-hide\");\n })\n }\n\n }\n\n new Multiselect;\n})(jQuery)","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }"],"names":["$","jQuery","LoadSearch","_classCallCheck","this","init","page","key","value","load_posts","selectedOptions","document","getElementById","selectedNames","i","length","nameValue","getAttribute","push","_this","on","e","preventDefault","search_term","val","categories","load_categories","requestPosts","_this2","html","totalPage","apiUrl","URL","window","location","origin","params","URLSearchParams","append","join","show","fetch","toString","then","response","headers","get","json","posts","resultsContainer","forEach","post","date","Date","toLocaleDateString","year","month","day","postdate","title","rendered","concat","link","postElement","createElement","classList","add","id","innerHTML","excerpt","pagination","_loop","pageBtn","innerText","addEventListener","hide","catch","error","console","Multiselect","load_multiselect","control_multiselect","each","checked","find","addClass","removeClass","className","prop","selected","selectedStatus","selectedCount","text","selectTitle","selectOptions","selectDropdownIcon","toggleClass","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","n","getter","__esModule","d","a","definition","o","Object","define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;AC1DV;;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,eAAe,4BAA4B;WAC3C,eAAe;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;ACNiC;AACR","sources":["webpack://simplecharm-portfolio-plugin/./src/js/load_search.js","webpack://simplecharm-portfolio-plugin/./src/js/multiselect.js","webpack://simplecharm-portfolio-plugin/./src/scss/search_page.scss","webpack://simplecharm-portfolio-plugin/webpack/bootstrap","webpack://simplecharm-portfolio-plugin/webpack/runtime/compat get default export","webpack://simplecharm-portfolio-plugin/webpack/runtime/define property getters","webpack://simplecharm-portfolio-plugin/webpack/runtime/hasOwnProperty shorthand","webpack://simplecharm-portfolio-plugin/webpack/runtime/make namespace object","webpack://simplecharm-portfolio-plugin/./src/js/search.js"],"sourcesContent":["(function($){\n class LoadSearch{\n constructor(){\n this.init();\n this.page = 1;\n this.allUsers = [];\n }\n init(){\n this.load_posts();\n }\n\n load_categories(){\n let selectedOptions = document.getElementById('categories').selectedOptions;\n let selectedNames = [];\n\n for (let i = 0; i < selectedOptions.length; i++) {\n let nameValue = selectedOptions[i].getAttribute('name');\n selectedNames.push(nameValue);\n }\n\n return selectedNames;\n }\n\n\n load_posts(){\n $('#simplecharm-advanced-search-form').on('submit', (e) => {\n e.preventDefault();\n let search_term = $('.search-field').val();\n let categories = this.load_categories();\n this.requestPosts(e,search_term,categories,this.page);\n });\n }\n async requestPosts(e,search_term,categories,page) {\n let pagination = $('.simplecharm-searchpage-pagination');\n pagination.html('');\n\n let totalPage = 1;\n\n let apiUrl = new URL('/wp-json/wp/v2/posts', window.location.origin);\n let params = new URLSearchParams();\n\n if (search_term) {\n params.append('search', search_term);\n }\n\n if (categories.length > 0) {\n params.append('categories', categories.join(',')); \n }\n\n if(page){\n params.append('page',page);\n }\n\n $('#simplecharm-loading-overlay').show();\n\n try{\n let response = await fetch(apiUrl + '?' + params.toString());\n let posts = await response.json();\n let resultsContainer = $('#simplecharm-search-page');\n resultsContainer.html(''); // Clear previous results\n // .then(response => {\n // totalPage = response.headers.get('X-WP-TotalPages');\n // return response.json()\n // })\n // Check if there are posts\n if (posts.length > 0) {\n for(let post of posts) {\n let date = new Date(post.date);\n let options = { year: 'numeric', month: 'long', day: 'numeric' };\n post.date = date.toLocaleDateString('en-US', options);\n let postdate = post.date;\n if((post.title.rendered.length) <= 0){\n postdate = `${post.date}`;\n }\n const userdata = await this.get_user(post.author);\n\n let postElement = document.createElement('div');\n postElement.classList.add(`post-${post.id}`,'simplecharm-text-center', 'simplecharm-content');\n postElement.innerHTML = `\n

\n ${post.title.rendered}\n

\n
\n \n ${postdate}\n \n \n ${userdata.username}\n \n
\n
\n ${post.excerpt.rendered}\n
`;\n resultsContainer.append(postElement);\n \n }\n if(totalPage > 1){\n let pagination = $('.simplecharm-searchpage-pagination');\n pagination.html('');\n for(let i = 1;i <= totalPage;i++){\n let pageBtn = document.createElement('a');\n pageBtn.classList.add(i);\n pageBtn.classList.add(page == i ? 'active' : 'inactive');\n pageBtn.innerText = i;\n pagination.append(pageBtn);\n pageBtn.addEventListener(\"click\",(e) => {\n this.page = !(pageBtn.classList[0]) ? 1 : pageBtn.classList[0];\n this.requestPosts(e,search_term,categories,this.page);\n });\n }\n }else{\n let pagination = $('.simplecharm-searchpage-pagination');\n pagination.html('');\n }\n } else {\n resultsContainer.innerHTML = `

No search results found for \"${search_term}\"

`;\n }\n $('#simplecharm-loading-overlay').hide();\n }catch(error){\n console.error('Error fetching posts:', error);\n document.getElementById('simplecharm-search-page').innerHTML = '

Error fetching posts.

';\n $('#simplecharm-loading-overlay').hide();\n };\n }\n async get_user(id){\n /**\n * Limiting The Ajax Search for Same User\n */\n\n if(!(id in this.allUsers)){\n let userDetails = await this.load_user(id);\n this.allUsers[id] = userDetails;\n return userDetails;\n }else{\n return this.allUsers[id];\n }\n }\n async load_user(id){\n const data = new FormData();\n data.append('action', 'simplecharm_get_user_info');\n data.append('user_id', id);\n\n try{\n const response = await fetch(admin_data.ajax_url, {\n method: 'POST',\n body: data\n });\n const result = await response.json();\n\n if(!result.error){\n return result\n }\n }catch(error){\n throw error;\n }\n\n return userdata;\n }\n }\n\n new LoadSearch;\n\n})(jQuery)","(function($){\n class Multiselect{\n constructor(){\n this.init();\n }\n\n init(){\n this.load_multiselect();\n this.control_multiselect();\n }\n\n load_multiselect(){\n const list = $('.simplecharm-select-options li');\n\n list.each(function(){\n $(this).on( 'click', (e) => {\n e.preventDefault();\n let checked = $(this).find('input')[0]; // Get the input element in the clicked li\n checked.checked = !checked.checked; // Toggle checked state\n\n if (checked.checked) {\n $(checked).addClass(\"selected\");\n } else {\n $(checked).removeClass(\"selected\");\n }\n \n const option = $(`#${this.className}`); // Get the option corresponding to the clicked li\n option.prop('selected', checked.checked); // Set selected property correctly\n\n\n $(`#${this.className}`).selected = checked.checked;\n const selectedStatus = $(\".simplecharm-select-form p b\");\n const selectedCount = $(\".selected\");\n\n if(selectedCount.length){\n selectedStatus.text(`${selectedCount.length} Category Selected`);\n }else{\n selectedStatus.text(`Select Categories`); \n }\n });\n })\n }\n\n control_multiselect(){\n const selectTitle = $(\".simplecharm-select-form p\");\n const selectOptions = $(\".simplecharm-select-options\");\n const selectDropdownIcon = $(\".simplecharm-selectform-dropdown-icon\");\n\n selectTitle.on(\"click\", function(e){\n selectOptions.toggleClass(\"multiselect-closed\");\n selectDropdownIcon.toggleClass(\"multiselect-open\");\n selectOptions.toggleClass(\"multiselect-hide\");\n })\n }\n\n }\n\n new Multiselect;\n})(jQuery)","// extracted by mini-css-extract-plugin\nexport {};","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import \"../scss/search_page.scss\"\nimport \"./multiselect.js\"\nimport \"./load_search.js\""],"names":["_regeneratorRuntime","e","t","r","Object","prototype","n","hasOwnProperty","o","defineProperty","value","i","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","call","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","Error","done","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","return","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","isNaN","length","displayName","isGeneratorFunction","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","keys","reverse","pop","prev","charAt","slice","stop","rval","handle","complete","finish","catch","_catch","delegateYield","_createForOfIteratorHelper","Array","isArray","_unsupportedIterableToArray","_n","F","_arrayLikeToArray","toString","from","test","asyncGeneratorStep","_asyncToGenerator","arguments","apply","_next","_throw","_classCallCheck","_defineProperties","_toPropertyKey","key","_createClass","_toPrimitive","toPrimitive","String","Number","$","LoadSearch","init","page","allUsers","load_posts","load_categories","selectedOptions","document","getElementById","selectedNames","nameValue","getAttribute","_this","on","preventDefault","search_term","val","categories","requestPosts","_requestPosts","_callee","_this2","pagination","totalPage","apiUrl","params","response","posts","resultsContainer","_iterator","_step","post","date","options","postdate","_userdata","postElement","_pagination","_loop","_pagination2","_callee$","_context2","html","URL","window","location","origin","URLSearchParams","append","join","show","fetch","json","Date","year","month","day","toLocaleDateString","title","rendered","concat","link","get_user","author","userdata","createElement","classList","add","id","innerHTML","username","excerpt","t0","pageBtn","_loop$","_context","innerText","addEventListener","hide","t2","console","error","_x","_x2","_x3","_x4","_get_user","_callee2","userDetails","_callee2$","_context3","load_user","_x5","_load_user","_callee3","data","result","_callee3$","_context4","FormData","admin_data","ajax_url","body","_x6","jQuery","Multiselect","load_multiselect","control_multiselect","list","each","checked","find","addClass","removeClass","option","className","prop","selected","selectedStatus","selectedCount","text","selectTitle","selectOptions","selectDropdownIcon","toggleClass"],"sourceRoot":""} \ No newline at end of file diff --git a/assets/package.json b/assets/package.json old mode 100644 new mode 100755 diff --git a/assets/src/images/simplecharm-header-image.jpg b/assets/src/images/simplecharm-header-image.jpg old mode 100644 new mode 100755 diff --git a/assets/src/js/customizer.js b/assets/src/js/customizer.js old mode 100644 new mode 100755 diff --git a/assets/src/js/load_search.js b/assets/src/js/load_search.js old mode 100644 new mode 100755 index f319fa7..2077e1c --- a/assets/src/js/load_search.js +++ b/assets/src/js/load_search.js @@ -3,6 +3,7 @@ constructor(){ this.init(); this.page = 1; + this.allUsers = []; } init(){ this.load_posts(); @@ -29,7 +30,7 @@ this.requestPosts(e,search_term,categories,this.page); }); } - requestPosts(e,search_term,categories,page) { + async requestPosts(e,search_term,categories,page) { let pagination = $('.simplecharm-searchpage-pagination'); pagination.html(''); @@ -52,18 +53,18 @@ $('#simplecharm-loading-overlay').show(); - fetch(apiUrl + '?' + params.toString()) - .then(response => { - totalPage = response.headers.get('X-WP-TotalPages'); - return response.json() - }) - .then(posts => { - let resultsContainer = $('#simplecharm-search-page'); - resultsContainer.html(''); // Clear previous results - + try{ + let response = await fetch(apiUrl + '?' + params.toString()); + let posts = await response.json(); + let resultsContainer = $('#simplecharm-search-page'); + resultsContainer.html(''); // Clear previous results + // .then(response => { + // totalPage = response.headers.get('X-WP-TotalPages'); + // return response.json() + // }) // Check if there are posts if (posts.length > 0) { - posts.forEach(post => { + for(let post of posts) { let date = new Date(post.date); let options = { year: 'numeric', month: 'long', day: 'numeric' }; post.date = date.toLocaleDateString('en-US', options); @@ -71,6 +72,7 @@ if((post.title.rendered.length) <= 0){ postdate = `${post.date}`; } + const userdata = await this.get_user(post.author); let postElement = document.createElement('div'); postElement.classList.add(`post-${post.id}`,'simplecharm-text-center', 'simplecharm-content'); @@ -80,14 +82,18 @@
${post.excerpt.rendered}
`; resultsContainer.append(postElement); - }); + + } if(totalPage > 1){ let pagination = $('.simplecharm-searchpage-pagination'); pagination.html(''); @@ -100,7 +106,7 @@ pageBtn.addEventListener("click",(e) => { this.page = !(pageBtn.classList[0]) ? 1 : pageBtn.classList[0]; this.requestPosts(e,search_term,categories,this.page); - }); + }); } }else{ let pagination = $('.simplecharm-searchpage-pagination'); @@ -110,13 +116,45 @@ resultsContainer.innerHTML = `

No search results found for "${search_term}"

`; } $('#simplecharm-loading-overlay').hide(); - }) - .catch(error => { + }catch(error){ console.error('Error fetching posts:', error); document.getElementById('simplecharm-search-page').innerHTML = '

Error fetching posts.

'; - $('#simplecharm-loading-overlay').hide(); - }); + }; + } + async get_user(id){ + /** + * Limiting The Ajax Search for Same User + */ + + if(!(id in this.allUsers)){ + let userDetails = await this.load_user(id); + this.allUsers[id] = userDetails; + return userDetails; + }else{ + return this.allUsers[id]; + } + } + async load_user(id){ + const data = new FormData(); + data.append('action', 'simplecharm_get_user_info'); + data.append('user_id', id); + + try{ + const response = await fetch(admin_data.ajax_url, { + method: 'POST', + body: data + }); + const result = await response.json(); + + if(!result.error){ + return result + } + }catch(error){ + throw error; + } + + return userdata; } } diff --git a/assets/src/js/main.js b/assets/src/js/main.js old mode 100644 new mode 100755 diff --git a/assets/src/js/multiselect.js b/assets/src/js/multiselect.js old mode 100644 new mode 100755 diff --git a/assets/src/js/search.js b/assets/src/js/search.js old mode 100644 new mode 100755 diff --git a/assets/src/scss/components/_comments.scss b/assets/src/scss/components/_comments.scss old mode 100644 new mode 100755 diff --git a/assets/src/scss/components/_footer.scss b/assets/src/scss/components/_footer.scss old mode 100644 new mode 100755 diff --git a/assets/src/scss/components/_header.scss b/assets/src/scss/components/_header.scss old mode 100644 new mode 100755 diff --git a/assets/src/scss/components/_nav.scss b/assets/src/scss/components/_nav.scss old mode 100644 new mode 100755 diff --git a/assets/src/scss/components/_pagination.scss b/assets/src/scss/components/_pagination.scss old mode 100644 new mode 100755 diff --git a/assets/src/scss/components/_post.scss b/assets/src/scss/components/_post.scss old mode 100644 new mode 100755 diff --git a/assets/src/scss/components/_profile.scss b/assets/src/scss/components/_profile.scss old mode 100644 new mode 100755 diff --git a/assets/src/scss/components/_responsive.scss b/assets/src/scss/components/_responsive.scss old mode 100644 new mode 100755 diff --git a/assets/src/scss/components/_search.scss b/assets/src/scss/components/_search.scss old mode 100644 new mode 100755 diff --git a/assets/src/scss/components/_sidebar.scss b/assets/src/scss/components/_sidebar.scss old mode 100644 new mode 100755 diff --git a/assets/src/scss/components/_single-and-posts.scss b/assets/src/scss/components/_single-and-posts.scss old mode 100644 new mode 100755 diff --git a/assets/src/scss/components/_utilities.scss b/assets/src/scss/components/_utilities.scss old mode 100644 new mode 100755 diff --git a/assets/src/scss/components/_wp_required.scss b/assets/src/scss/components/_wp_required.scss old mode 100644 new mode 100755 diff --git a/assets/src/scss/main.scss b/assets/src/scss/main.scss old mode 100644 new mode 100755 diff --git a/assets/src/scss/search_page.scss b/assets/src/scss/search_page.scss old mode 100644 new mode 100755 diff --git a/assets/webpack.config.js b/assets/webpack.config.js old mode 100644 new mode 100755 diff --git a/changelog.txt b/changelog.txt old mode 100644 new mode 100755 diff --git a/comments.php b/comments.php old mode 100644 new mode 100755 diff --git a/inc/classes/assets.php b/inc/classes/assets.php old mode 100644 new mode 100755 index 91c94d0..c0aa9b5 --- a/inc/classes/assets.php +++ b/inc/classes/assets.php @@ -47,6 +47,9 @@ public function register_scripts(){ */ if(is_search()){ wp_enqueue_script('simplecharm-search-functionalities'); + wp_localize_script('simplecharm-search-functionalities', 'admin_data', array( + 'ajax_url' => admin_url('admin-ajax.php') + )); } diff --git a/inc/classes/customizer.php b/inc/classes/customizer.php old mode 100644 new mode 100755 diff --git a/inc/classes/search.php b/inc/classes/search.php old mode 100644 new mode 100755 diff --git a/inc/classes/sidebar.php b/inc/classes/sidebar.php old mode 100644 new mode 100755 diff --git a/inc/classes/simplecharm_theme.php b/inc/classes/simplecharm_theme.php old mode 100644 new mode 100755 index 10b95c4..3bf24d7 --- a/inc/classes/simplecharm_theme.php +++ b/inc/classes/simplecharm_theme.php @@ -17,6 +17,7 @@ public function __construct(){ Sidebar::get_instance(); Customizer::get_instance(); Search::get_instance(); + Users::get_instance(); $this->setup_hooks(); } diff --git a/inc/classes/users.php b/inc/classes/users.php new file mode 100755 index 0000000..ee8ffe8 --- /dev/null +++ b/inc/classes/users.php @@ -0,0 +1,42 @@ +setup_hooks(); + } + + public function setup_hooks(){ + add_action('wp_ajax_simplecharm_get_user_info', [$this, 'list_users']); + add_action('wp_ajax_nopriv_simplecharm_get_user_info', [$this, 'list_users']); + } + + public function list_users(){ + if (isset($_POST['user_id'])) { + $user_id = intval($_POST['user_id']); + + $user_info = get_userdata($user_id); + + if ($user_info) { + $response = array( + 'username' => $user_info->display_name, + 'link' => get_author_posts_url($user_id), + ); + } else { + $response = array('error' => 'User not found.'); + } + } else { + $response = array('error' => 'User ID not provided.'); + } + + // Return JSON response + echo json_encode($response); + wp_die(); + } +} \ No newline at end of file diff --git a/inc/helpers/autoload.php b/inc/helpers/autoload.php old mode 100644 new mode 100755 diff --git a/inc/helpers/template-tags.php b/inc/helpers/template-tags.php old mode 100644 new mode 100755 diff --git a/inc/traits/singletone.php b/inc/traits/singletone.php old mode 100644 new mode 100755 diff --git a/index.php b/index.php old mode 100644 new mode 100755 diff --git a/readme.txt b/readme.txt old mode 100644 new mode 100755 diff --git a/screenshot.png b/screenshot.png old mode 100644 new mode 100755 diff --git a/searchform.php b/searchform.php old mode 100644 new mode 100755 diff --git a/sidebar-simplecharm_home_sidebar.php b/sidebar-simplecharm_home_sidebar.php old mode 100644 new mode 100755 diff --git a/sidebar-simplecharm_post_sidebar.php b/sidebar-simplecharm_post_sidebar.php old mode 100644 new mode 100755 diff --git a/template-parts/components/multiselect-dropdown.php b/template-parts/components/multiselect-dropdown.php old mode 100644 new mode 100755 diff --git a/template-parts/search/search.php b/template-parts/search/search.php old mode 100644 new mode 100755 diff --git a/template-parts/search/search_default.php b/template-parts/search/search_default.php old mode 100644 new mode 100755