__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
import {
watchOptionsWithPrefix,
getOptionFor,
getPrefixFor,
applyPrefixFor,
} from './helpers'
import { handleBackgroundOptionFor } from './variables/background'
const getPrefix = () => {
if (document.body.classList.contains('single')) {
return 'post'
}
if (
document.body.classList.contains('page') ||
document.body.classList.contains('blog') ||
document.body.classList.contains('post-type-archive-product')
) {
return 'page'
}
return false
}
export const renderComments = ({ prefix }) => {
let container = document.querySelector('.ct-comments-container > div')
if (!container) {
return
}
container.classList.remove('ct-container', 'ct-container-narrow')
container.classList.add(
getOptionFor('comments_structure', prefix) === 'narrow'
? 'ct-container-narrow'
: 'ct-container'
)
if (window.DISQUS) {
window.DISQUS.host._loadEmbed()
}
}
watchOptionsWithPrefix({
getPrefix,
getOptionsForPrefix: ({ prefix }) => [`${prefix}_comments_structure`],
render: renderComments,
})
export const getCommentsVariables = () => {
const prefix = getPrefixFor()
return {
[`${prefix}_comments_narrow_width`]: {
variable: 'theme-narrow-container-max-width',
selector: applyPrefixFor('.ct-comments-container', prefix),
unit: 'px',
},
[`${prefix}_comments_author_name_font_color`]: [
{
selector: applyPrefixFor('.ct-comments .ct-comment-author', prefix),
variable: 'theme-heading-color',
type: 'color:default',
},
{
selector: applyPrefixFor('.ct-comments .ct-comment-author', prefix),
variable: 'theme-link-hover-color',
type: 'color:hover',
},
],
[`${prefix}_comments_font_color`]: [
{
selector: applyPrefixFor('.ct-comments', prefix),
variable: 'theme-text-color',
type: 'color:default',
},
{
selector: applyPrefixFor('.ct-comments', prefix),
variable: 'theme-link-hover-color',
type: 'color:hover',
},
],
...handleBackgroundOptionFor({
id: `${prefix}_comments_background`,
selector: applyPrefixFor('.ct-comments-container', prefix),
}),
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| helpers | Folder | 0750 |
|
|
| single | Folder | 0750 |
|
|
| template-parts | Folder | 0750 |
|
|
| variables | Folder | 0750 |
|
|
| woocommerce | Folder | 0750 |
|
|
| archive.js | File | 1.28 KB | 0640 |
|
| back-to-top-link.js | File | 629 B | 0640 |
|
| builder.js | File | 12.19 KB | 0640 |
|
| comments.js | File | 2.04 KB | 0640 |
|
| featured_image.js | File | 1.32 KB | 0640 |
|
| general.js | File | 469 B | 0640 |
|
| helpers.js | File | 7.86 KB | 0640 |
|
| hero-section.js | File | 13.49 KB | 0640 |
|
| location.js | File | 445 B | 0640 |
|
| misc.js | File | 273 B | 0640 |
|
| pagination.js | File | 3.27 KB | 0640 |
|
| sidebar.js | File | 1.43 KB | 0640 |
|
| single.js | File | 4.6 KB | 0640 |
|
| variables.js | File | 11.33 KB | 0640 |
|