some cleanup
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,37 +0,0 @@
|
||||
.woosw-list table.woosw-items tr td {
|
||||
padding: 20px;
|
||||
}
|
||||
.woosw-list table.woosw-items .woosw-item .woosw-item--name a {
|
||||
font-size: 20px;
|
||||
color: var(--title-color);
|
||||
}
|
||||
.woosw-list table.woosw-items .woosw-item .woosw-item--name a {
|
||||
font-size: 20px;
|
||||
}
|
||||
.woosw-list table.woosw-items tr .woosw-item--actions {
|
||||
width: 88px;
|
||||
}
|
||||
.woosw-list table.woosw-items .woosw-item .woosw-item--name a:hover {
|
||||
color: var(--theme-color);
|
||||
}
|
||||
|
||||
|
||||
.woosw-list table.woosw-items .woosw-item .woosw-item--atc .add_to_cart_inline .cart-button.icon-btn.added {
|
||||
display: none;
|
||||
}
|
||||
.woosw-list table.woosw-items tr .woosw-item--actions {
|
||||
width: 170px;
|
||||
}
|
||||
.woosw-list table.woosw-items .woosw-item .woosw-item--atc p, .woosw-list table.woosw-items .woosw-item .woosw-item--atc .add_to_cart_inline {
|
||||
text-align: center;
|
||||
}
|
||||
.woosw-list table.woosw-items .woosw-item .woosw-item--atc .add_to_cart_inline .added_to_cart.wc-forward {
|
||||
height: 50px;
|
||||
display: block;
|
||||
line-height: 50px;
|
||||
text-align: center;
|
||||
padding: 0 20px;
|
||||
background-color: var(--icon-bg, #f7f7f7);
|
||||
border: 1px solid var(--th-border-color);
|
||||
color: var(--title-color);
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
.woosw-list table.woosw-items tr td {
|
||||
padding: 20px;
|
||||
}
|
||||
.woosw-list table.woosw-items .woosw-item .woosw-item--name a {
|
||||
font-size: 20px;
|
||||
color: var(--title-color);
|
||||
}
|
||||
.woosw-list table.woosw-items .woosw-item .woosw-item--name a {
|
||||
font-size: 20px;
|
||||
}
|
||||
.woosw-list table.woosw-items tr .woosw-item--actions {
|
||||
width: 88px;
|
||||
}
|
||||
.woosw-list table.woosw-items .woosw-item .woosw-item--name a:hover {
|
||||
color: var(--theme-color);
|
||||
}
|
||||
|
||||
|
||||
.woosw-list table.woosw-items .woosw-item .woosw-item--atc .add_to_cart_inline .cart-button.icon-btn.added {
|
||||
display: none;
|
||||
}
|
||||
.woosw-list table.woosw-items tr .woosw-item--actions {
|
||||
width: 170px;
|
||||
}
|
||||
.woosw-list table.woosw-items .woosw-item .woosw-item--atc p, .woosw-list table.woosw-items .woosw-item .woosw-item--atc .add_to_cart_inline {
|
||||
text-align: center;
|
||||
}
|
||||
.woosw-list table.woosw-items .woosw-item .woosw-item--atc .add_to_cart_inline .added_to_cart.wc-forward {
|
||||
height: 50px;
|
||||
display: block;
|
||||
line-height: 50px;
|
||||
text-align: center;
|
||||
padding: 0 20px;
|
||||
background-color: var(--icon-bg, #f7f7f7);
|
||||
border: 1px solid var(--th-border-color);
|
||||
color: var(--title-color);
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 9.3 KiB |
@@ -546,26 +546,6 @@ function rakar_content_load_scripts() {
|
||||
});
|
||||
});
|
||||
|
||||
$(".masonary-active, .woocommerce-Reviews .comment-list").imagesLoaded(function () {
|
||||
var $filter = ".masonary-active, .woocommerce-Reviews .comment-list",
|
||||
$filterItem = ".filter-item, .woocommerce-Reviews .comment-list li";
|
||||
|
||||
if ($($filter).length > 0) {
|
||||
$($filter).isotope({
|
||||
itemSelector: $filterItem,
|
||||
filter: "*",
|
||||
masonry: {
|
||||
// use outer width of grid-sizer for columnWidth
|
||||
columnWidth: 1,
|
||||
},
|
||||
});
|
||||
}
|
||||
$('[data-bs-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||
$($filter).isotope({
|
||||
filter: "*",
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
/*----------- 14. Counter Up ----------*/
|
||||
$(".counter-number").counterUp({
|
||||
@@ -606,77 +586,8 @@ function rakar_content_load_scripts() {
|
||||
$('.shape-mockup').shapeMockup();
|
||||
}
|
||||
|
||||
/*----------- 17. Progress Bar Animation ----------*/
|
||||
$('.progress-bar').waypoint(function() {
|
||||
$('.progress-bar').css({
|
||||
animation: "animate-positive 1.8s",
|
||||
opacity: "1"
|
||||
});
|
||||
}, { offset: '75%' });
|
||||
|
||||
/*----------- 18. Countdown ----------*/
|
||||
$.fn.countdown = function () {
|
||||
$(this).each(function () {
|
||||
var $counter = $(this),
|
||||
countDownDate = new Date($counter.data("offer-date")).getTime(), // Set the date we're counting down toz
|
||||
exprireCls = "expired";
|
||||
|
||||
// Finding Function
|
||||
function s$(element) {
|
||||
return $counter.find(element);
|
||||
}
|
||||
|
||||
// Update the count down every 1 second
|
||||
var counter = setInterval(function () {
|
||||
// Get today's date and time
|
||||
var now = new Date().getTime();
|
||||
|
||||
// Find the distance between now and the count down date
|
||||
var distance = countDownDate - now;
|
||||
|
||||
// Time calculations for days, hours, minutes and seconds
|
||||
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
|
||||
var hours = Math.floor(
|
||||
(distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)
|
||||
);
|
||||
var minutes = Math.floor(
|
||||
(distance % (1000 * 60 * 60)) / (1000 * 60)
|
||||
);
|
||||
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
|
||||
|
||||
// Check If value is lower than ten, so add zero before number
|
||||
days < 10 ? (days = "0" + days) : null;
|
||||
hours < 10 ? (hours = "0" + hours) : null;
|
||||
minutes < 10 ? (minutes = "0" + minutes) : null;
|
||||
seconds < 10 ? (seconds = "0" + seconds) : null;
|
||||
|
||||
// If the count down is over, write some text
|
||||
if (distance < 0) {
|
||||
clearInterval(counter);
|
||||
$counter.addClass(exprireCls);
|
||||
$counter.find(".message").css("display", "block");
|
||||
} else {
|
||||
// Output the result in elements
|
||||
s$(".day").html(days);
|
||||
s$(".hour").html(hours);
|
||||
s$(".minute").html(minutes);
|
||||
s$(".seconds").html(seconds);
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
};
|
||||
|
||||
if ($(".counter-list").length) {
|
||||
$(".counter-list").countdown();
|
||||
}
|
||||
|
||||
/*---------- 19. Hero 2 Animation ----------*/
|
||||
if ($('.hero-2').length > 0) {
|
||||
window.addEventListener('scroll', function() {
|
||||
let value = window.scrollY;
|
||||
$('.line').css('width', "calc(" + 'var(--size)' + " - " + value * 0.1 + 'px' + ")");
|
||||
})
|
||||
};
|
||||
|
||||
/*----------- 21. Overlay Direction ----------*/
|
||||
if ($('.overlay-direction').length > 0) {
|
||||
@@ -784,94 +695,8 @@ function rakar_content_load_scripts() {
|
||||
$('.slider-button').css('left', `calc(${sliderPos}% - 32px)`)
|
||||
});
|
||||
|
||||
/*----------- 00. Color Scheme ----------*/
|
||||
$('.color-switch-btns button').each(function () {
|
||||
// Get color for button
|
||||
const button = $(this);
|
||||
const color = button.data('color');
|
||||
button.css('--theme-color', color);
|
||||
|
||||
// Change theme color on click
|
||||
button.on('click', function () {
|
||||
const clickedColor = $(this).data('color');
|
||||
$(':root').css('--theme-color', clickedColor);
|
||||
});
|
||||
});
|
||||
|
||||
// Handle color picker change event
|
||||
$('#thcolorpicker').on('input', function () {
|
||||
const pickedColor = $(this).val();
|
||||
updateThemeColor(pickedColor);
|
||||
});
|
||||
|
||||
function updateThemeColor(color) {
|
||||
$(':root').css('--theme-color', color);
|
||||
}
|
||||
|
||||
$(document).on('click','.switchIcon',function() {
|
||||
$('.color-scheme').toggleClass('active');
|
||||
});
|
||||
|
||||
|
||||
/*----------- 00. Woocommerce Toggle ----------*/
|
||||
// Ship To Different Address
|
||||
$("#ship-to-different-address-checkbox").on("change", function () {
|
||||
if ($(this).is(":checked")) {
|
||||
$("#ship-to-different-address")
|
||||
.next(".shipping_address")
|
||||
.slideDown();
|
||||
} else {
|
||||
$("#ship-to-different-address").next(".shipping_address").slideUp();
|
||||
}
|
||||
});
|
||||
|
||||
// Woocommerce Payment Toggle
|
||||
$('.wc_payment_methods input[type="radio"]:checked')
|
||||
.siblings(".payment_box")
|
||||
.show();
|
||||
$('.wc_payment_methods input[type="radio"]').each(function () {
|
||||
$(this).on("change", function () {
|
||||
$(".payment_box").slideUp();
|
||||
$(this).siblings(".payment_box").slideDown();
|
||||
});
|
||||
});
|
||||
|
||||
// Woocommerce Rating Toggle
|
||||
$(".rating-select .stars a").each(function () {
|
||||
$(this).on("click", function (e) {
|
||||
e.preventDefault();
|
||||
$(this).siblings().removeClass("active");
|
||||
$(this).parent().parent().addClass("selected");
|
||||
$(this).addClass("active");
|
||||
});
|
||||
});
|
||||
|
||||
// Quantity Plus Minus ---------------------------
|
||||
$(document).on('click', '.quantity-plus, .quantity-minus', function (e) {
|
||||
e.preventDefault();
|
||||
// Get current quantity values
|
||||
var qty = $(this).closest('.quantity, .product-quantity').find('.qty-input');
|
||||
var val = parseFloat(qty.val());
|
||||
var max = parseFloat(qty.attr('max'));
|
||||
var min = parseFloat(qty.attr('min'));
|
||||
var step = parseFloat(qty.attr('step'));
|
||||
|
||||
// Change the value if plus or minus
|
||||
if ($(this).is('.quantity-plus')) {
|
||||
if (max && (max <= val)) {
|
||||
qty.val(max);
|
||||
} else {
|
||||
qty.val(val + step);
|
||||
}
|
||||
} else {
|
||||
if (min && (min >= val)) {
|
||||
qty.val(min);
|
||||
} else if (val > 0) {
|
||||
qty.val(val - step);
|
||||
}
|
||||
}
|
||||
$('.cart_table button[name="update_cart"]').prop('disabled', false);
|
||||
});
|
||||
|
||||
/*----------- Search Masonary ----------*/
|
||||
$('.search-active').imagesLoaded(function () {
|
||||
@@ -953,74 +778,8 @@ function rakar_content_load_scripts() {
|
||||
// Window Load
|
||||
$(window).on('load', function () {
|
||||
rakar_content_load_scripts();
|
||||
/*---------- 18. Image to SVG Code ----------*/
|
||||
const cache = {};
|
||||
|
||||
$.fn.inlineSvg = function fnInlineSvg() {
|
||||
this.each(imgToSvg);
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
function imgToSvg() {
|
||||
const $img = $(this);
|
||||
const src = $img.attr("src");
|
||||
|
||||
// fill cache by src with promise
|
||||
if (!cache[src]) {
|
||||
const d = $.Deferred();
|
||||
$.get(src, (data) => {
|
||||
d.resolve($(data).find("svg"));
|
||||
});
|
||||
cache[src] = d.promise();
|
||||
}
|
||||
|
||||
// replace img with svg when cached promise resolves
|
||||
cache[src].then((svg) => {
|
||||
const $svg = $(svg).clone();
|
||||
|
||||
if ($img.attr("id")) $svg.attr("id", $img.attr("id"));
|
||||
if ($img.attr("class")) $svg.attr("class", $img.attr("class"));
|
||||
if ($img.attr("style")) $svg.attr("style", $img.attr("style"));
|
||||
|
||||
if ($img.attr("width")) {
|
||||
$svg.attr("width", $img.attr("width"));
|
||||
if (!$img.attr("height")) $svg.removeAttr("height");
|
||||
}
|
||||
if ($img.attr("height")) {
|
||||
$svg.attr("height", $img.attr("height"));
|
||||
if (!$img.attr("width")) $svg.removeAttr("width");
|
||||
}
|
||||
|
||||
$svg.insertAfter($img);
|
||||
$img.trigger("svgInlined", $svg[0]);
|
||||
$img.remove();
|
||||
});
|
||||
}
|
||||
|
||||
$(".svg-img").inlineSvg();
|
||||
});
|
||||
|
||||
// Cart count with ajax
|
||||
jQuery(function ($) {
|
||||
$(document).on('click', '.add_to_cart_button', function (e) {
|
||||
e.preventDefault();
|
||||
var $button = $(this);
|
||||
var product_id = $button.data('product_id');
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: wc_add_to_cart_params.ajax_url,
|
||||
data: {
|
||||
'action': 'update_cart_count',
|
||||
'product_id': product_id
|
||||
},
|
||||
success: function (response) {
|
||||
$('.cart_badge').text(response);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
})(jQuery);
|
||||
1026
public/wp-content/themes/rakar/assets/js/main.js.bak
Normal file
1026
public/wp-content/themes/rakar/assets/js/main.js.bak
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
Theme Name: Rakar
|
||||
Theme URI: https://wordpress.themeholy.com/rakar
|
||||
Author: Themeholy
|
||||
Author URI: https://themeforest.net/user/themeholy
|
||||
Description: Rakar - Handyman Multipurpose Repairing Services WordPress Theme
|
||||
Version: 1.0.0
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: LICENSE
|
||||
Text Domain: rakar
|
||||
Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, rtl-language-support, sticky-post, threaded-comments, translation-ready
|
||||
Requires at least: 5.0
|
||||
Tested up to: 5.8
|
||||
Requires PHP: 7.4
|
||||
|
||||
This theme, like WordPress, is licensed under the GPL.
|
||||
Use it to make something cool, have fun, and share what you've learned with others.
|
||||
|
||||
*/
|
||||
|
||||
/* Header sub-menu icon */
|
||||
.hide-icon.main-menu ul.sub-menu li a:before {
|
||||
display: none;
|
||||
}
|
||||
.hide-icon.main-menu ul.sub-menu li a:hover {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.widget.no-banner-widget {
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
margin-bottom: 0px;
|
||||
position: relative;
|
||||
border-radius: 0px;
|
||||
border: 0px solid transparent;
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
Theme Name: Rakar
|
||||
Theme URI: https://wordpress.themeholy.com/rakar
|
||||
Author: Themeholy
|
||||
Author URI: https://themeforest.net/user/themeholy
|
||||
Description: Rakar - Handyman Multipurpose Repairing Services WordPress Theme
|
||||
Version: 1.0.0
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: LICENSE
|
||||
Text Domain: rakar
|
||||
Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, rtl-language-support, sticky-post, threaded-comments, translation-ready
|
||||
Requires at least: 5.0
|
||||
Tested up to: 5.8
|
||||
Requires PHP: 7.4
|
||||
|
||||
This theme, like WordPress, is licensed under the GPL.
|
||||
Use it to make something cool, have fun, and share what you've learned with others.
|
||||
|
||||
*/
|
||||
|
||||
/* Header sub-menu icon */
|
||||
.hide-icon.main-menu ul.sub-menu li a:before {
|
||||
display: none;
|
||||
}
|
||||
.hide-icon.main-menu ul.sub-menu li a:hover {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.widget.no-banner-widget {
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
margin-bottom: 0px;
|
||||
position: relative;
|
||||
border-radius: 0px;
|
||||
border: 0px solid transparent;
|
||||
}
|
||||
Reference in New Issue
Block a user