-------------------------------------------------------------------------------- /gutenberg/core/trUpdateField.js: -------------------------------------------------------------------------------- 1 | const trUpdateField = (fieldData, newValue) => { 2 | const { 3 | meta, 4 | setAttributes, 5 | repeater_object = false, 6 | repeater_name = false, 7 | repeater_index = false, 8 | repeater_parent_object = false, 9 | repeater_parent_name = false, 10 | repeater_parent_index = false, 11 | } = fieldData; 12 | 13 | if (repeater_name || repeater_parent_name) { 14 | if (repeater_name && !repeater_parent_name) { 15 | // IN REPEATER LEVEL 1 --- 16 | const updatedRepeater = [...repeater_object]; 17 | updatedRepeater[repeater_index][meta.field_name] = { 18 | ...newValue, 19 | }; 20 | setAttributes({ [repeater_name]: updatedRepeater }); 21 | } else if (repeater_parent_name) { 22 | // IN REPEATER LEVEL 2 --- 23 | const updatedOuterRepeater = [...repeater_parent_object]; 24 | updatedOuterRepeater[repeater_parent_index][repeater_name][ 25 | repeater_index 26 | ] = { 27 | ...updatedOuterRepeater[repeater_parent_index][repeater_name][ 28 | repeater_index 29 | ], 30 | [meta.field_name]: { 31 | ...newValue, 32 | }, 33 | }; 34 | 35 | setAttributes({ [repeater_parent_name]: updatedOuterRepeater }); 36 | } 37 | } else { 38 | // ROOT ELEMENT------------- 39 | setAttributes({ [meta.field_name]: newValue }); 40 | } 41 | }; 42 | 43 | export default trUpdateField; 44 | -------------------------------------------------------------------------------- /src/scss/theme/ui-elements/_tabs.scss: -------------------------------------------------------------------------------- 1 | .tabs { 2 | &__nav { 3 | display: flex; 4 | align-items: center; 5 | margin: 0 0 30px; 6 | padding: 0; 7 | 8 | button { 9 | position: relative; 10 | display: inline-flex; 11 | white-space: nowrap; 12 | cursor: pointer; 13 | font-weight: 500; 14 | font-size: 12px; 15 | line-height: 1; 16 | text-align: center; 17 | letter-spacing: 1px; 18 | text-transform: uppercase; 19 | color: var(--c-brand); 20 | margin: 0px 10px 0 0; 21 | padding: 10px 18px 8px; 22 | border-radius: 8px; 23 | background: transparent; 24 | border: 2px solid transparent; 25 | outline: none !important; 26 | transition: all 0.2s ease-in-out; 27 | &:hover, 28 | &:focus { 29 | color: var(--c-brand); 30 | } 31 | &.activeTab { 32 | background: var(--c-brand); 33 | border-color: var(--c-brand); 34 | color: #fff; 35 | } 36 | } 37 | } 38 | 39 | &__content { 40 | position: relative; 41 | overflow: hidden; 42 | transition: all 0.2s ease-in-out; 43 | } 44 | 45 | .tab-panel { 46 | max-height: 0; 47 | opacity: 0; 48 | pointer-events: none; 49 | 50 | &.activeTab { 51 | order: -1; 52 | transition: opacity 0.8s ease-in-out; 53 | max-height: 100%; 54 | opacity: 1; 55 | pointer-events: all; 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /views/parts/video.latte: -------------------------------------------------------------------------------- 1 | {if $video_type['video_type'] === "youtube"} 2 |
3 |
4 | 13 |
14 |
15 | {/if} 16 | 17 | {if $video_type['video_type'] === "vimeo"} 18 |
19 |
20 | 29 |
30 |
31 | {/if} 32 | 33 | {if $video_type['video_type'] !== "vimeo" && $video_type['video_type'] !== "youtube"} 34 |
35 |
36 | 37 |
38 |
39 | {/if} 40 | 41 | -------------------------------------------------------------------------------- /gutenberg/scss/_toastify.scss: -------------------------------------------------------------------------------- 1 | .toastify { 2 | padding: 12px 20px; 3 | color: #fff; 4 | display: inline-block; 5 | box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.12), 6 | 0 10px 36px -4px rgba(77, 96, 232, 0.3); 7 | background: -webkit-linear-gradient(315deg, #73a5ff, #5477f5); 8 | background: linear-gradient(135deg, #73a5ff, #5477f5); 9 | position: fixed; 10 | opacity: 0; 11 | transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1); 12 | border-radius: 2px; 13 | cursor: pointer; 14 | text-decoration: none; 15 | max-width: calc(50% - 20px); 16 | z-index: 2147483647; 17 | } 18 | .toastify.on { 19 | opacity: 1; 20 | } 21 | .toast-close { 22 | opacity: 0.4; 23 | padding: 0 5px; 24 | } 25 | .toastify-right { 26 | right: 15px; 27 | } 28 | .toastify-left { 29 | left: 15px; 30 | } 31 | .toastify-top { 32 | top: -150px; 33 | } 34 | .toastify-bottom { 35 | bottom: -150px; 36 | } 37 | .toastify-rounded { 38 | border-radius: 25px; 39 | } 40 | .toastify-avatar { 41 | width: 1.5em; 42 | height: 1.5em; 43 | margin: -7px 5px; 44 | border-radius: 2px; 45 | } 46 | .toastify-center { 47 | margin-left: auto; 48 | margin-right: auto; 49 | left: 0; 50 | right: 0; 51 | max-width: fit-content; 52 | max-width: -moz-fit-content; 53 | } 54 | @media only screen and (max-width: 360px) { 55 | .toastify-left, 56 | .toastify-right { 57 | margin-left: auto; 58 | margin-right: auto; 59 | left: 0; 60 | right: 0; 61 | max-width: fit-content; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /php-inc/sidebars.php: -------------------------------------------------------------------------------- 1 | esc_html__( 'Footer Top Left', 'tr' ), 8 | 'id' => 'footer-left-widget', 9 | 'description' => esc_html__( 'Footer Top Left widget area (Address)', 'tr' ), 10 | 'before_widget' => '
', 11 | 'after_widget' => '
' 12 | ) 13 | ); 14 | 15 | register_sidebar( 16 | array( 17 | 'name' => esc_html__( 'Footer Top Right', 'tr' ), 18 | 'id' => 'footer-right-widget', 19 | 'description' => esc_html__( 'Footer Top Right widget area (above form title and text)', 'tr' ), 20 | 'before_widget' => '
', 21 | 'after_widget' => '
' 22 | ) 23 | ); 24 | 25 | register_sidebar( 26 | array( 27 | 'name' => esc_html__( 'Footer Mid - Info', 'tr' ), 28 | 'id' => 'footer-mid-widget', 29 | 'description' => esc_html__( 'Footer Mid - Info (Text that goes below main links)', 'tr' ), 30 | 'before_widget' => '', 31 | 'after_widget' => '' 32 | ) 33 | ); 34 | 35 | register_sidebar( 36 | array( 37 | 'name' => esc_html__( 'Blog index', 'tr' ), 38 | 'id' => 'blog-index-widget', 39 | 'description' => esc_html__( 'Blog index (Categories, Tag cloud in sidebar)', 'tr' ), 40 | 'before_widget' => '
', 41 | 'after_widget' => '
' 42 | ) 43 | ); 44 | } 45 | add_action( 'tr_widgets_init', 'tr_tr_widgets_init' ); 46 | 47 | */ -------------------------------------------------------------------------------- /gutenberg/components/block-elements/TrFreeform.js: -------------------------------------------------------------------------------- 1 | const { BlockEdit } = wp.blockEditor 2 | const { useState } = wp.element 3 | const { Card, CardHeader, CardBody } = wp.components 4 | const { __ } = wp.i18n 5 | 6 | import { v4 as uuidv4 } from 'uuid' 7 | import trUpdateField from '../../core/trUpdateField' 8 | import TrTooltip from '../TrTooltip' 9 | 10 | const TrFreeform = ({ fieldData }) => { 11 | const { field_object, meta } = fieldData 12 | 13 | const [trUniqueID] = useState(uuidv4()) 14 | 15 | const handleChange = (fieldNewValue) => { 16 | const newValue = { ...field_object } 17 | newValue.text = fieldNewValue 18 | trUpdateField(fieldData, newValue) 19 | } 20 | 21 | return ( 22 | 26 | 27 | {__(meta.label)} 28 | {meta?.help && } 29 | 30 | 31 | { 39 | return state.content !== undefined 40 | ? handleChange(state.content) 41 | : null 42 | }} 43 | /> 44 | 45 | 46 | ) 47 | } 48 | 49 | export default TrFreeform 50 | -------------------------------------------------------------------------------- /functions.php: -------------------------------------------------------------------------------- 1 | { 29 | e.preventDefault() 30 | // if href="#something" not only href="#" 31 | if (anchorTarget.length > 1 && scrollTargetSec) { 32 | this.scrollTo(anchor) 33 | } 34 | }) 35 | } 36 | } 37 | } 38 | 39 | const scrollToWithoutTrigger = toElement => { 40 | const yOffset = -300 41 | const y = toElement.getBoundingClientRect().top + window.pageYOffset + yOffset 42 | scrollTo(window, { behavior: 'smooth', top: y, left: 0 }) 43 | } 44 | 45 | export { SmoothScroll, scrollToWithoutTrigger } 46 | -------------------------------------------------------------------------------- /gutenberg/blocks.js: -------------------------------------------------------------------------------- 1 | import register_block from './register_block' 2 | import setupBlockPreviewImage from './core/setupBlockPreviewImage' 3 | 4 | import blocks_array from './core/blocks_array' 5 | 6 | const BLOCK_NAME_PREFIX = require('../theme_redone_global_config.json') 7 | .BLOCK_NAME_PREFIX 8 | 9 | // START:REMOVE REDUNDANT OPTIONS FROM RICHTEXT TOOLBAR AND ADD UNDERLINE 10 | ;(function(wp) { 11 | var TextUnderlineButton = function(props) { 12 | return wp.element.createElement(wp.blockEditor.RichTextToolbarButton, { 13 | icon: 'admin-customizer', 14 | title: 'Text Underline', 15 | onClick: function() { 16 | props.onChange( 17 | wp.richText.toggleFormat(props.value, { 18 | type: `${BLOCK_NAME_PREFIX}/text-underline` 19 | }) 20 | ) 21 | } 22 | }) 23 | } 24 | 25 | // wp.richText.unregisterFormatType('core/code') 26 | // wp.richText.unregisterFormatType('core/strikethrough') 27 | // wp.richText.unregisterFormatType("core/text-color"); 28 | // wp.richText.unregisterFormatType('core/keyboard') 29 | wp.richText.registerFormatType(`${BLOCK_NAME_PREFIX}/text-underline`, { 30 | title: 'Text Underline', 31 | tagName: 'u', 32 | className: 'txt-underline', 33 | edit: TextUnderlineButton 34 | }) 35 | })(window.wp) 36 | // END:REMOVE REDUNDANT OPTIONS FROM RICHTEXT TOOLBAR AND ADD UNDERLINE 37 | setupBlockPreviewImage() 38 | // Register custom blocks 39 | blocks_array.forEach(block_folder_name => { 40 | register_block({ block_folder_name }) 41 | }) 42 | -------------------------------------------------------------------------------- /gutenberg/components/dynamic/PostsDropdownControl.js: -------------------------------------------------------------------------------- 1 | const compose = wp.compose; 2 | const { withSelect } = wp.data; 3 | const { SelectControl } = wp.components; 4 | 5 | const PostsDropdownControl = compose.compose( 6 | // withSelect allows to get posts for SelectControl and also to get the post meta value 7 | withSelect(function(select, props) { 8 | return { 9 | posts: select("core").getEntityRecords("postType", "members", { 10 | per_page: -1 11 | }) 12 | }; 13 | }) 14 | )(function(props) { 15 | // options for SelectControl 16 | var options = []; 17 | 18 | // if posts found 19 | if (props.posts) { 20 | options.push({ value: 0, label: "Select something" }); 21 | props.posts.forEach(post => { 22 | const jsonMemberOBJ = JSON.stringify({ 23 | id: post.id, 24 | img: post.acf.image, 25 | name: post.acf.name, 26 | position: post.acf.position 27 | }); 28 | 29 | options.push({ 30 | value: jsonMemberOBJ, 31 | label: post.title.rendered 32 | }); 33 | }); 34 | } else { 35 | options.push({ value: 0, label: "Loading..." }); 36 | } 37 | 38 | return ( 39 | { 43 | const jsonDecodedMemberOBJ = JSON.parse(memberObj); 44 | props.onChange(jsonDecodedMemberOBJ); 45 | }} 46 | value={props.valueIfSaved || props.metaValue} 47 | /> 48 | ); 49 | }); 50 | 51 | export default PostsDropdownControl; 52 | -------------------------------------------------------------------------------- /views/temp/blocks-hero-view.latte--914b01a849.php: -------------------------------------------------------------------------------- 1 | params); 12 | if ($title['text']) /* line 1 */ { 13 | echo '
16 |
17 | '; 18 | ob_start(function () {}); 19 | try { 20 | echo '

'; 21 | ob_start(); 22 | try { 23 | echo LR\Filters::escapeHtmlText($title['text']) /* line 6 */; 24 | } finally { 25 | $ʟ_ifc[1] = rtrim(ob_get_flush()) === ''; 26 | } 27 | echo '

28 | '; 29 | } finally { 30 | if ($ʟ_ifc[1] ?? null) { 31 | ob_end_clean(); 32 | } else { 33 | echo ob_get_clean(); 34 | } 35 | } 36 | ob_start(function () {}); 37 | try { 38 | echo '

'; 39 | ob_start(); 40 | try { 41 | echo LR\Filters::escapeHtmlText($text['text']) /* line 7 */; 42 | } finally { 43 | $ʟ_ifc[2] = rtrim(ob_get_flush()) === ''; 44 | } 45 | echo '

46 | '; 47 | } finally { 48 | if ($ʟ_ifc[2] ?? null) { 49 | ob_end_clean(); 50 | } else { 51 | echo ob_get_clean(); 52 | } 53 | } 54 | echo ' '; 55 | echo LR\Filters::escapeHtmlText(tr_a($cta, "btn btn--brand")) /* line 8 */; 56 | echo ' 57 |
58 |
59 | '; 60 | } 61 | return get_defined_vars(); 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /views/temp/blocks-hero-view.latte--3ccb1dbf05.php: -------------------------------------------------------------------------------- 1 | 18 |
19 | '; 20 | ob_start(fn() => ''); 21 | try { 22 | echo '

'; 23 | ob_start(); 24 | try { 25 | echo LR\Filters::escapeHtmlText($title['text']) /* line 6 */; 26 | 27 | } finally { 28 | $ʟ_ifc[0] = rtrim(ob_get_flush()) === ''; 29 | } 30 | echo '

31 | '; 32 | 33 | } finally { 34 | if ($ʟ_ifc[0] ?? null) { 35 | ob_end_clean(); 36 | } else { 37 | echo ob_get_clean(); 38 | } 39 | } 40 | ob_start(fn() => ''); 41 | try { 42 | echo '

'; 43 | ob_start(); 44 | try { 45 | echo LR\Filters::escapeHtmlText($text['text']) /* line 7 */; 46 | 47 | } finally { 48 | $ʟ_ifc[1] = rtrim(ob_get_flush()) === ''; 49 | } 50 | echo '

51 | '; 52 | 53 | } finally { 54 | if ($ʟ_ifc[1] ?? null) { 55 | ob_end_clean(); 56 | } else { 57 | echo ob_get_clean(); 58 | } 59 | } 60 | echo ' '; 61 | echo LR\Filters::escapeHtmlText(tr_a($cta, 'btn btn--brand')) /* line 8 */; 62 | echo ' 63 |
64 | 65 | '; 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/js/classes/global/UI/Header.js: -------------------------------------------------------------------------------- 1 | import { tr_get_scrolled_pos_y } from '../../../helpers/helpers' 2 | 3 | class Header { 4 | /** 5 | * @param {boolean} hasScroll - if true, header will replace classes depending on it's scroll position 6 | * @returns {void} Header related logic for mobile devices 7 | */ 8 | constructor(hasScroll) { 9 | this.header = document.querySelector('.header') 10 | this.navToggle = this.header.querySelector('.navbar-toggler') 11 | this.backdrop = document.querySelector('.backdrop') 12 | this.hasScroll = hasScroll 13 | this.scrollTop 14 | this.offsetTop = 60 15 | this.headerScroll = this.headerScroll.bind(this) 16 | this.init() 17 | } 18 | 19 | headerScroll() { 20 | this.scrollTop = tr_get_scrolled_pos_y() 21 | 22 | if (this.scrollTop >= this.offsetTop) { 23 | document.body.classList.add('jsOnScroll-header') 24 | } else { 25 | document.body.classList.remove('jsOnScroll-header') 26 | } 27 | } 28 | 29 | headerNavToggle() { 30 | this.navToggle.addEventListener('click', () => { 31 | document.body.classList.toggle('js-mob-menu-open') 32 | }) 33 | 34 | this.backdrop.addEventListener('click', () => { 35 | if (document.body.classList.contains('js-mob-menu-open')) { 36 | document.body.classList.remove('js-mob-menu-open') 37 | } 38 | }) 39 | } 40 | 41 | init() { 42 | this.headerNavToggle() 43 | if (this.hasScroll) { 44 | this.headerScroll() 45 | window.addEventListener('scroll', this.headerScroll) 46 | } 47 | } 48 | } 49 | 50 | export { Header } 51 | -------------------------------------------------------------------------------- /views/parts/_tabs.latte: -------------------------------------------------------------------------------- 1 | {varType string $class} {* optional class to pass to the tabs element *} 2 | {varType array $tabs} {* $tabs array. Required. *} 3 | 4 | 5 | {* tabs ids - required for a11y purposes *} 6 | {var $tabs_ids = []} 7 | {var $random_string = uniqid()} 8 | {foreach $tabs as $tab_index => $tab_content} 9 | {var $index = $tab_index + 1} 10 | {var $tabs_ids[] = "{$random_string}_{$index}"} 11 | {/foreach} 12 | 13 |
17 | 18 |
22 | 23 | 35 | 36 |
{* nav *} 37 | 38 |
39 | 40 |
49 |
50 | {block tab_panel}{/block} 51 |
{* panel-content *} 52 |
{* panel *} 53 | 54 |
{* content *} 55 | 56 |
{* tabs *} -------------------------------------------------------------------------------- /src/js/lazily-loaded/InitSliders.js: -------------------------------------------------------------------------------- 1 | import { Slider } from '../classes/global/UI/Slider' 2 | 3 | class InitSliders { 4 | constructor() { 5 | this.init() 6 | } 7 | 8 | init() { 9 | new Slider('.slider--test', { 10 | arrowsDisplay: false, 11 | dotsDisplay: false, 12 | wrapSlides: true, 13 | slideWidth: `${100 / 3}%`, 14 | draggable: false, 15 | gap: 'clamp(20px, 5.21vw, 100px)', 16 | marginBottom: 'clamp(20px, 5.21vw, 100px)', 17 | responsive: { 18 | 999: { 19 | slidesToScroll: 2, 20 | dotsDisplay: true, 21 | arrowsDisplay: true, 22 | wrapSlides: false, 23 | draggable: true, 24 | marginBottom: 0, 25 | slideWidth: '50%', 26 | speed: 3 27 | }, 28 | 767: { 29 | slidesToScroll: 1, 30 | slideWidth: '80%' 31 | } 32 | } 33 | }) 34 | 35 | new Slider('.slider--test2', { 36 | slideWidth: '30%', 37 | autoPlayInterval: 2000, 38 | gap: '50px', 39 | dragFree: true, 40 | dotsDisplay: false, 41 | arrowsDisplay: false, 42 | loop: true, 43 | autoplay: true, 44 | responsive: { 45 | 999: { 46 | gap: '10px', 47 | slideWidth: '50%', 48 | autoPlayInterval: 5000, 49 | dotsDisplay: false, 50 | arrowsDisplay: true, 51 | speed: 3 52 | }, 53 | 700: { 54 | gap: '20px', 55 | slideWidth: '100%', 56 | autoPlayInterval: 1000, 57 | marginBottom: 30 58 | } 59 | } 60 | }) 61 | } 62 | } 63 | 64 | new InitSliders() 65 | -------------------------------------------------------------------------------- /gutenberg/blocks/image/model.json: -------------------------------------------------------------------------------- 1 | { 2 | "block_meta": { 3 | "BLOCK_REGISTER_NAME": "image", 4 | "BLOCK_TITLE": "Image", 5 | "keywords": ["image", "photo", "figure"], 6 | "hasSidebar": false, 7 | "hasExample": true, 8 | "deps": { 9 | "css": ["shared-css-1", "shared-css-2"], 10 | "js": ["shared-js-1", "shared-js-2"] 11 | } 12 | }, 13 | "attributes": { 14 | "image": { 15 | "type": "object", 16 | "field_meta": { 17 | "type": "image", 18 | "label": "image" 19 | }, 20 | "default": { 21 | "src": "", 22 | "alt": "", 23 | "subtype": "", 24 | "id": null 25 | } 26 | }, 27 | "caption": { 28 | "type": "object", 29 | "field_meta": { 30 | "type": "text", 31 | "variation": "short", 32 | "label": "Caption (optional)", 33 | "max_chars": 200 34 | }, 35 | "default": { 36 | "text": "" 37 | } 38 | }, 39 | "link": { 40 | "type": "object", 41 | "field_meta": { 42 | "type": "cta", 43 | "label": "Link", 44 | "help": "Optional" 45 | }, 46 | "default": { 47 | "url": "", 48 | "target": false 49 | } 50 | }, 51 | 52 | "inspector_bg_is_dark": { 53 | "type": "boolean", 54 | "default": false 55 | }, 56 | "inspector_section_padding": { 57 | "type": "string", 58 | "default": "sec-pad-md" 59 | }, 60 | "inspector_section_padding_top": { 61 | "type": "boolean", 62 | "default": false 63 | }, 64 | "inspector_section_padding_btm": { 65 | "type": "boolean", 66 | "default": false 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/js/lazily-loaded/Tabs.js: -------------------------------------------------------------------------------- 1 | class Tabs { 2 | constructor() { 3 | this.allTabs = null 4 | 5 | if ((this.allTabs = document.querySelectorAll('.tabs'))) { 6 | this.init() 7 | } 8 | } 9 | 10 | removeAllActiveTabs(activeTabs) { 11 | for (let i = 0; i < activeTabs.length; i++) { 12 | const prevActiveTab = activeTabs[i] 13 | if (prevActiveTab.classList.contains('tab-anchor')) { 14 | prevActiveTab.setAttribute('aria-selected', 'false') 15 | } else { 16 | prevActiveTab.setAttribute('aria-hidden', 'true') 17 | } 18 | prevActiveTab.classList.remove('activeTab') 19 | } 20 | } 21 | 22 | onTabClick(_, anchor, parent) { 23 | let activeTabs = parent.querySelectorAll( 24 | ':scope > .tabs__nav > .activeTab, :scope > .tabs__content > .activeTab' 25 | ) 26 | 27 | // remove previous active classes 28 | this.removeAllActiveTabs(activeTabs) 29 | 30 | anchor.classList.add('activeTab') 31 | anchor.setAttribute('aria-selected', 'true') 32 | 33 | const panelID = anchor.dataset.href 34 | const panel = parent.querySelector( 35 | `:scope > .tabs__content > [data-id="${panelID}"]` 36 | ) 37 | panel.classList.add('activeTab') 38 | panel.setAttribute('aria-hidden', 'false') 39 | } 40 | 41 | init() { 42 | this.allTabs.forEach(tabs => { 43 | const allAnchors = [ 44 | ...tabs.querySelectorAll(':scope > .tabs__nav > .tab-anchor') 45 | ] 46 | allAnchors.forEach(anchor => { 47 | anchor.addEventListener('click', e => { 48 | e.preventDefault() 49 | this.onTabClick(e, anchor, tabs) 50 | }) 51 | }) 52 | }) 53 | } 54 | } 55 | 56 | new Tabs() 57 | -------------------------------------------------------------------------------- /views/temp/layout-main-menu.latte--8256872286.php: -------------------------------------------------------------------------------- 1 | 12 |
13 | 43 |
44 | 45 | '; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /views/temp/blocks-video-view.latte--487efda0b5.php: -------------------------------------------------------------------------------- 1 | params); 12 | $video_src = "" /* line 1 */; 13 | if ($inspector_is_self_hosted['checked']) /* line 2 */ { 14 | if ($self_hosted_video['src']) /* line 3 */ { 15 | $video_src = $self_hosted_video['src'] /* line 4 */; 16 | } 17 | echo "\n"; 18 | } else /* line 7 */ { 19 | if ($yt_or_vimeo_url['text']) /* line 8 */ { 20 | $video_src = $yt_or_vimeo_url['text'] /* line 9 */; 21 | } 22 | } 23 | echo ' 24 | 25 | 26 | '; 27 | if ($video_src) /* line 15 */ { 28 | echo '
31 | '; 32 | $this->createTemplate(tr_part('video'), ['video_src' => $video_src, 33 | 'video_type' => tr_get_video_type_and_id($video_src)] + $this->params, 'include')->renderToContentType('html') /* line 19 */; 34 | echo ' 35 | 36 | '; 37 | ob_start(function () {}); 38 | try { 39 | echo '
40 | '; 41 | ob_start(); 42 | try { 43 | echo ' '; 44 | echo $optional_caption['text'] /* line 25 */; 45 | echo "\n"; 46 | } finally { 47 | $ʟ_ifc[1] = rtrim(ob_get_flush()) === ''; 48 | } 49 | echo '
50 | '; 51 | } finally { 52 | if ($ʟ_ifc[1] ?? null) { 53 | ob_end_clean(); 54 | } else { 55 | echo ob_get_clean(); 56 | } 57 | } 58 | echo '
59 | '; 60 | } 61 | return get_defined_vars(); 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/scss/theme/ui-elements/_dropdown.scss: -------------------------------------------------------------------------------- 1 | .dropdown { 2 | display: inline-block; 3 | position: relative; 4 | z-index: 1; 5 | 6 | &-toggle { 7 | cursor: pointer; 8 | 9 | span { 10 | pointer-events: none; 11 | } 12 | } 13 | 14 | &-item-wrap { 15 | transition: none; 16 | transform: translateX(-4px); 17 | opacity: 0; 18 | } 19 | 20 | &-item { 21 | 22 | &.active { 23 | background-color: blue; 24 | color: #fff; 25 | } 26 | } 27 | 28 | &-menu { 29 | position: absolute; 30 | //top toggle height 31 | top: 100%; 32 | left: 0; 33 | min-height: 0; 34 | max-height: 0; 35 | width: 100%; 36 | opacity: 0; 37 | pointer-events: none; 38 | 39 | &.show { 40 | opacity: 1; 41 | pointer-events: all; 42 | min-height: auto; 43 | max-height: none; 44 | } 45 | } 46 | 47 | &-close { 48 | cursor: pointer; 49 | } 50 | 51 | &[data-menu-relative="true"] { 52 | position: relative; 53 | 54 | .dropdown-menu { 55 | position: relative; 56 | top: auto; 57 | left: auto; 58 | } 59 | } 60 | 61 | .dropdown-label { 62 | position: absolute; 63 | top: 50%; 64 | left: 0; 65 | width: 100%; 66 | height: 100%; 67 | font-size: 12px; 68 | transform: translateY(-50%); 69 | pointer-events: none; 70 | opacity: 0; 71 | transition: all 0.3s ease-in-out; 72 | } 73 | 74 | &.label-triggered { 75 | 76 | .dropdown-label { 77 | transform: translateY(-35px); 78 | opacity: 1; 79 | } 80 | } 81 | 82 | &.show { 83 | z-index: 2; 84 | 85 | .dropdown-item-wrap { 86 | transition: all 0.3s ease-in-out; 87 | transform: translateY(0); 88 | opacity: 1; 89 | } 90 | } 91 | } -------------------------------------------------------------------------------- /gutenberg/components/block-elements/TrNumber.js: -------------------------------------------------------------------------------- 1 | const { TextControl, Card, CardHeader, CardBody } = wp.components 2 | const { __ } = wp.i18n 3 | 4 | import trUpdateField from '../../core/trUpdateField' 5 | import TrTooltip from '../TrTooltip' 6 | 7 | const TrNumber = ({ fieldData }) => { 8 | const { field_object, meta } = fieldData 9 | 10 | let number_type_attrs = {} 11 | if (meta.hasOwnProperty('min')) number_type_attrs.min = meta.min 12 | if (meta.hasOwnProperty('max')) number_type_attrs.max = meta.max 13 | if (meta.hasOwnProperty('step')) number_type_attrs.step = meta.step 14 | 15 | let Component = TextControl 16 | 17 | const updateField = (fieldNewValue) => { 18 | const newValue = { ...field_object } 19 | newValue.value = +fieldNewValue 20 | 21 | if ( 22 | number_type_attrs.hasOwnProperty('min') && 23 | newValue.value < number_type_attrs.min 24 | ) { 25 | newValue.value = number_type_attrs.min 26 | } 27 | 28 | if ( 29 | number_type_attrs.hasOwnProperty('max') && 30 | newValue.value > number_type_attrs.max 31 | ) { 32 | newValue.value = number_type_attrs.max 33 | } 34 | 35 | trUpdateField(fieldData, newValue) 36 | } 37 | 38 | return ( 39 | 43 | 44 | {__(meta.label)} 45 | {meta.help && } 46 | 47 | 48 | 54 | 55 | 56 | ) 57 | } 58 | 59 | export default TrNumber 60 | -------------------------------------------------------------------------------- /src/js/classes/global/UI/Modals.js: -------------------------------------------------------------------------------- 1 | import { tr_closest } from '../../../helpers/helpers' 2 | 3 | class Modals { 4 | constructor() { 5 | this.parent = document.querySelector('.modal--custom') 6 | this.allParents = document.querySelectorAll('.modal--custom') 7 | this.closeTriggers = document.querySelectorAll('.modal-close') 8 | this.modalTriggers = document.querySelectorAll('.modalTrigger') 9 | if (this.allParents.length) { 10 | this.init() 11 | } 12 | } 13 | 14 | openModal(modalId, $trigger) { 15 | const $modal = document.querySelector(modalId) 16 | // if video modal 17 | if ($modal.classList.contains('modal--video')) { 18 | const videoURL = 19 | $trigger.dataset.videoUrl.replace('watch?v=', 'embed/') + 20 | '?autoplay=true' 21 | document.querySelector('iframe', $modal).src = videoURL 22 | } // end if video modal 23 | 24 | $modal.classList.add('modal-is-open') 25 | document.body.classList.add('modal-is-open') 26 | } 27 | 28 | closeModal() { 29 | this.closeTriggers.forEach(($closeTrigger, i) => { 30 | $closeTrigger.addEventListener('click', () => { 31 | if (tr_closest($closeTrigger, '.modal--video')) { 32 | document.querySelector('iframe', this.parent).src = '' 33 | } 34 | document.body.classList.remove('modal-is-open') 35 | this.parent.classList.remove('modal-is-open') 36 | }) 37 | }) 38 | } 39 | 40 | triggersLoop() { 41 | this.modalTriggers.forEach($modalTrigger => { 42 | $modalTrigger.addEventListener('click', e => { 43 | e.preventDefault() 44 | this.openModal(e.target.getAttribute('href'), e.target) 45 | }) 46 | }) 47 | } 48 | 49 | init() { 50 | this.triggersLoop() 51 | this.closeModal() 52 | } 53 | } 54 | 55 | export { Modals } 56 | -------------------------------------------------------------------------------- /gutenberg/components/TrEditBlockWrap.js: -------------------------------------------------------------------------------- 1 | const { useState } = wp.element 2 | const { Dashicon } = wp.components 3 | 4 | import { 5 | trBlockImagePreviewShow, 6 | trBlockImagePreviewHide 7 | } from '../helpers/trBlockImagePreview' 8 | import TrTooltip from './TrTooltip' 9 | // const { useEffect } = wp.element; 10 | 11 | const TrEditBlockWrap = ({ 12 | blockTitle, 13 | className, 14 | exampleSrc, 15 | help, 16 | children: editBlockCode 17 | }) => { 18 | const [isUncollapsed, setIsUncollapsed] = useState(false) 19 | 20 | return ( 21 |
26 |
29 | setIsUncollapsed(prevIsUncollapsed => !prevIsUncollapsed) 30 | } 31 | > 32 |

{blockTitle}

33 |
34 | {help && ( 35 | 36 | 37 | 38 | )} 39 | 40 | {exampleSrc && ( 41 |
trBlockImagePreviewShow(e.target.dataset.src)} 45 | onMouseLeave={trBlockImagePreviewHide} 46 | > 47 | 48 |
49 | )} 50 | 53 |
54 |
55 |
{editBlockCode}
56 |
57 | ) 58 | } 59 | 60 | export default TrEditBlockWrap 61 | -------------------------------------------------------------------------------- /views/temp/blocks-video-view.latte--b1ed077162.php: -------------------------------------------------------------------------------- 1 | 22 | '; 23 | $this->createTemplate(tr_part('video'), ['video_src' => $video_src, 'video_type' => tr_get_video_type_and_id($video_src)] + $this->params, 'include')->renderToContentType('html') /* line 19 */; 24 | echo "\n"; 25 | ob_start(fn() => ''); 26 | try { 27 | echo '
'; 28 | ob_start(); 29 | try { 30 | echo ' 31 | '; 32 | echo $optional_caption['text'] /* line 25 */; 33 | echo ' 34 | '; 35 | 36 | } finally { 37 | $ʟ_ifc[0] = rtrim(ob_get_flush()) === ''; 38 | } 39 | echo '
40 | '; 41 | 42 | } finally { 43 | if ($ʟ_ifc[0] ?? null) { 44 | ob_end_clean(); 45 | } else { 46 | echo ob_get_clean(); 47 | } 48 | } 49 | echo ' 50 | '; 51 | } 52 | } 53 | 54 | 55 | public function prepare(): array 56 | { 57 | extract($this->params); 58 | 59 | $video_src = '' /* line 1 */; 60 | if ($inspector_is_self_hosted['checked']) /* line 2 */ { 61 | if ($self_hosted_video['src']) /* line 3 */ { 62 | $video_src = $self_hosted_video['src'] /* line 4 */; 63 | } 64 | } else /* line 7 */ { 65 | if ($yt_or_vimeo_url['text']) /* line 8 */ { 66 | $video_src = $yt_or_vimeo_url['text'] /* line 9 */; 67 | } 68 | } 69 | return get_defined_vars(); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /gutenberg/components/sidebar-components/TrAsideBgPaddControls.js: -------------------------------------------------------------------------------- 1 | import { getFieldData } from "../../helpers/getFieldData"; 2 | import TrField from "../block-elements/TrField"; 3 | 4 | const { Fragment } = wp.element; 5 | const { __ } = wp.i18n; 6 | const { PanelBody, PanelRow } = wp.components; 7 | 8 | const TrAsideBgPaddControls = (props) => { 9 | const { attributes, trRawAttrs, setAttributes } = props; 10 | 11 | return ( 12 | 13 | {attributes.hasOwnProperty("inspector_background_ctrls") ? ( 14 | 15 | 16 | 26 | 27 | 28 | ) : null} 29 | 30 | 31 | 32 | 42 | 43 | 44 | 54 | 55 | 56 | 57 | ); 58 | }; 59 | 60 | export default TrAsideBgPaddControls; 61 | -------------------------------------------------------------------------------- /views/parts/_collapsible.latte: -------------------------------------------------------------------------------- 1 | {varType string $class} {* optional class to pass to the collapsible element *} 2 | {varType string $aria_label} {* optional aria label*} 3 | {varType string $duration} {* optional duration - default is 300 *} 4 | {varType bool $close_outside} {* if trigger mode is set to click (default), enabling this will make it close on click outside *} 5 | {varType bool $is_absolute} {* by default, .collapsible__content is relative. This makes it absolute if set to true *} 6 | {varType bool $on_hover} {* default trigger mode is on click. If this is set to true, hover will be used instead (on devices that supports hover, others will fallback to click) *} 7 | {varType array $custom_keyframes} {* by default only height is animated. This makes it possible to animate more properties *} 8 | {varType string $easing} {* default easing is 'ease-in-out'. This can be used to overwrite it *} 9 | 10 |
26 | 27 | 35 | 36 |
37 |
38 | {block collapsible_content}{/block} 39 |
{* inner *} 40 |
{* content *} 41 | 42 |
{* collapsible *} -------------------------------------------------------------------------------- /src/scss/critical/_global.scss: -------------------------------------------------------------------------------- 1 | ::selection { 2 | background-color: #222; 3 | color: #fff; 4 | } 5 | 6 | body { 7 | font: 400 16px/1.5 var(--font-def); 8 | text-size-adjust: 100%; 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | font-feature-settings: 'liga', 'dlig'; 12 | display: flex !important; 13 | flex-direction: column; 14 | min-height: 100vh; 15 | max-width: 100vw; 16 | overflow-x: hidden; 17 | overflow-anchor: none; 18 | background: var(--c-silver); 19 | padding-top: 73.1px; 20 | } 21 | 22 | .main-content { 23 | flex: 1 1 auto; 24 | } 25 | 26 | .backdrop { 27 | position: fixed; 28 | top: 0; 29 | left: 0; 30 | width: 100vw; 31 | height: var(--vh100); 32 | background-color: rgba(#000, 0.8); 33 | opacity: 0; 34 | pointer-events: none; 35 | transition: opacity 0.3s ease-in-out; 36 | z-index: 2; 37 | } 38 | 39 | .page--inner__content { 40 | padding-top: 0; 41 | padding-bottom: 80px; 42 | } 43 | 44 | .container { 45 | padding-left: 15px !important; 46 | padding-right: 15px !important; 47 | margin: 0 auto; 48 | } 49 | 50 | section { 51 | padding: 80px 0; 52 | } 53 | 54 | // not found section 55 | section.no-results { 56 | padding: 160px 0 80px; 57 | } 58 | 59 | img { 60 | max-width: 100%; 61 | } 62 | 63 | // define max container width here 64 | @media (min-width: 1788px) { 65 | .container { 66 | width: 1170px; 67 | max-width: none; 68 | 69 | &--blog { 70 | width: 1600px; 71 | } 72 | } 73 | } 74 | 75 | @media (max-width: 991px) { 76 | section { 77 | padding: 70px 0; 78 | } 79 | 80 | .page--inner__content { 81 | padding-bottom: 70px; 82 | } 83 | } 84 | 85 | @media (max-width: 767px) { 86 | .container { 87 | max-width: 100%; 88 | } 89 | 90 | section { 91 | padding: 60px 0; 92 | } 93 | 94 | .page--inner__content { 95 | padding-bottom: 60px; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /views/temp/layout-main-menu.latte--1ddea12db7.php: -------------------------------------------------------------------------------- 1 | params); 12 | echo '
13 |
14 | 55 |
56 |
57 | '; 58 | return get_defined_vars(); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /views/temp/layout-main-menu.latte--59b6f8dc9d.php: -------------------------------------------------------------------------------- 1 | params); 12 | echo '
13 |
14 | 55 |
56 |
57 | '; 58 | return get_defined_vars(); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /src/scss/critical/_buttons.scss: -------------------------------------------------------------------------------- 1 | .btn { 2 | padding: 17px 34px; 3 | display: inline-flex; 4 | justify-content: center; 5 | align-items: center; 6 | font-size: 16px; 7 | line-height: 1; 8 | font-weight: 300; 9 | border-radius: 3px; 10 | border: 1px solid transparent; 11 | letter-spacing: 0.8px; 12 | text-transform: capitalize; 13 | text-decoration: none !important; 14 | cursor: pointer; 15 | transition: all 0.2s ease-in-out; 16 | } 17 | 18 | .btn--brand { 19 | background: var(--c-brand); 20 | border-color: var(--c-brand); 21 | color: #fff !important; 22 | 23 | &:hover { 24 | background: rgba(var(--c-brand--rgb), 0.8); 25 | border-color: rgba(var(--c-brand--rgb), 0.8); 26 | } 27 | } 28 | 29 | .btn--brand-outline { 30 | background: #fff; 31 | border-color: var(--c-brand); 32 | color: var(--c-brand); 33 | 34 | &:hover { 35 | background: var(--c-brand); 36 | color: #fff !important; 37 | } 38 | } 39 | 40 | .btn--sec { 41 | background: var(--c-sec); 42 | border-color: var(--c-sec); 43 | color: #fff !important; 44 | 45 | &:hover { 46 | background: rgba(var(--c-sec--rgb), 0.8); 47 | border-color: rgba(var(--c-sec--rgb), 0.8); 48 | } 49 | } 50 | 51 | .btn--sec-outline { 52 | background: #fff; 53 | border-color: var(--c-sec); 54 | color: var(--c-sec); 55 | 56 | &:hover { 57 | background: var(--c-sec); 58 | color: #fff !important; 59 | } 60 | } 61 | 62 | .btn--ghost { 63 | color: var(--c-txt); 64 | 65 | &:hover { 66 | background-color: #fff; 67 | color: var(--c-brand); 68 | } 69 | 70 | &--brand { 71 | color: var(--c-brand); 72 | 73 | &:hover { 74 | background-color: var(--c-brand); 75 | border-color: var(--c-brand); 76 | color: #fff; 77 | } 78 | } 79 | 80 | &--sec { 81 | color: var(--c-sec); 82 | 83 | &:hover { 84 | background-color: var(--c-sec); 85 | border-color: var(--c-sec); 86 | color: #fff; 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /views/temp/blocks-breadcrumbs-view.latte--12dbd9a71d.php: -------------------------------------------------------------------------------- 1 | 19 | '; 20 | foreach ($iterator = $ʟ_it = new Latte\Essential\CachingIterator($breadcrumbs, $ʟ_it ?? null) as $breadcrumb) /* line 6 */ { 21 | echo '
  • 26 | 32 | 33 | '; 34 | echo $breadcrumb['link']['title'] /* line 17 */; 35 | echo ' 36 | 37 | 38 | 41 |
  • 42 | 43 | '; 44 | if (!$iterator->last) /* line 24 */ { 45 | echo '
  • /
  • 48 | '; 49 | } 50 | 51 | } 52 | $iterator = $ʟ_it = $ʟ_it->getParent(); 53 | 54 | echo ''; 55 | } 56 | } 57 | 58 | 59 | public function prepare(): array 60 | { 61 | extract($this->params); 62 | 63 | if (!$this->getReferringTemplate() || $this->getReferenceType() === 'extends') { 64 | foreach (array_intersect_key(['breadcrumb' => '6'], $this->params) as $ʟ_v => $ʟ_l) { 65 | trigger_error("Variable \$$ʟ_v overwritten in foreach on line $ʟ_l"); 66 | } 67 | } 68 | return get_defined_vars(); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /views/temp/blocks-breadcrumbs-view.latte--e28199728b.php: -------------------------------------------------------------------------------- 1 | params); 12 | if (!empty($breadcrumbs)) /* line 1 */ { 13 | echo ''; 54 | } 55 | return get_defined_vars(); 56 | } 57 | 58 | 59 | public function prepare(): void 60 | { 61 | extract($this->params); 62 | if (!$this->getReferringTemplate() || $this->getReferenceType() === "extends") { 63 | foreach (array_intersect_key(['breadcrumb' => '6'], $this->params) as $ʟ_v => $ʟ_l) { 64 | trigger_error("Variable \$$ʟ_v overwritten in foreach on line $ʟ_l"); 65 | } 66 | } 67 | 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /src/scss/theme/ui-elements/_lazy-images.scss: -------------------------------------------------------------------------------- 1 | // XXX: Do not remove. "Loader: for lazy loaded imgs and divs 2 | // .js-img-lazy.jsLoading, 3 | // .js-async-svg { 4 | // background-color: #cecece !important; 5 | // background-repeat: no-repeat; 6 | // background-position: center; 7 | // font-size: 0; 8 | // background-image: url('../assets/img/lazy-loading-loader.png') !important; 9 | // } 10 | 11 | // XXX: Do not remove. "Loader: for lazy loaded imgs and divs 12 | 13 | // Prevents page jumping by implicitly definingthe size that we get from the image 14 | .tr-img-wrap-outer { 15 | position: relative; 16 | width: calc(var(--size-w-original) * 1px); 17 | 18 | &.jsLoading { 19 | background-color: #cecece; 20 | overflow: hidden; 21 | &:before, 22 | &:after { 23 | position: absolute; 24 | content: ''; 25 | width: 100%; 26 | height: 100%; 27 | transform: translateX(-200%) skewX(35deg); 28 | background: #d1f3ff; 29 | background: linear-gradient( 30 | 90deg, 31 | transparent 0%, 32 | #fff 50%, 33 | transparent 100%, 34 | #ffff 100% 35 | ); 36 | animation: image-preloader 2s ease-in-out infinite forwards; 37 | } 38 | 39 | &:after { 40 | animation-delay: 0.4s; 41 | } 42 | } 43 | } 44 | .tr-img-wrap { 45 | --image-ratio: calc(var(--size-h-original) / var(--size-w-original)); 46 | position: relative; 47 | width: 100%; 48 | height: 0; 49 | padding-bottom: calc(var(--image-ratio) * 100%); 50 | 51 | img { 52 | position: absolute; 53 | top: 0; 54 | left: 0; 55 | width: 100%; 56 | height: 100%; 57 | } 58 | } 59 | 60 | @keyframes image-preloader { 61 | 0% { 62 | opacity: 1; 63 | } 64 | 50% { 65 | transform: translateX(200%) skewX(35deg); 66 | } 67 | 51%, 68 | 100% { 69 | opacity: 0; 70 | } 71 | } 72 | 73 | .js-async-svg { 74 | width: 30px !important; 75 | height: 30px !important; 76 | background-size: 15px 15px !important; 77 | } 78 | -------------------------------------------------------------------------------- /src/js/classes/global/core/LazyScriptsImporter.js: -------------------------------------------------------------------------------- 1 | class LazyScriptsImporter { 2 | constructor() { 3 | this.themeScriptEl = document.getElementById('tr-js-main-js') 4 | 5 | this.scripts = [ 6 | { 7 | targetClassName: 'collapsible', 8 | matchingScriptName: 'Collapsible', 9 | scriptTagId: 'collapsible', 10 | loaded: false, 11 | bodyClass: 'js--collapsible-loaded' 12 | }, 13 | { 14 | targetClassName: 'tabs', 15 | matchingScriptName: 'Tabs', 16 | scriptTagId: 'tabs', 17 | loaded: false 18 | }, 19 | { 20 | targetClassName: 'embla', 21 | matchingScriptName: 'InitSliders', 22 | scriptTagId: 'init-sliders', 23 | loaded: false 24 | } 25 | ] 26 | 27 | this.tryImport() 28 | } 29 | 30 | tryImport() { 31 | // if any of the of the scripts is not already imported, 32 | // and targetClassName exists, import the script 33 | const classesToLookFor = this.scripts.map( 34 | script => `.${script.targetClassName}` 35 | ) 36 | 37 | const allSelectorElements = [ 38 | ...document.querySelectorAll(classesToLookFor.join(', ')) 39 | ] 40 | if (!allSelectorElements) return 41 | 42 | for (let script of this.scripts) { 43 | if (script.loaded) continue 44 | 45 | if ( 46 | !allSelectorElements.some(el => 47 | el.classList.contains(script.targetClassName) 48 | ) 49 | ) { 50 | continue 51 | } 52 | 53 | script.loaded = true 54 | 55 | const scriptEL = document.createElement('script') 56 | scriptEL.id = `tr-js-ll--${script.scriptTagId}` 57 | scriptEL.src = `${window.tr_theme_url}/prod/lazily-loaded/${script.matchingScriptName}.min.js` 58 | 59 | this.themeScriptEl.after(scriptEL) 60 | 61 | if (script.hasOwnProperty('bodyClass')) { 62 | document.body.classList.add(script.bodyClass) 63 | } 64 | } 65 | } 66 | } 67 | 68 | export { LazyScriptsImporter } 69 | -------------------------------------------------------------------------------- /views/parts/_slider.latte: -------------------------------------------------------------------------------- 1 | {varType string $class} {* optional class to pass to the slider wrap element *} 2 | {varType array|WP_Query $slides} {* $slides array or instance of WP_Query. Required. *} 3 | 4 | {var $mode = 'array'} {* array or query *} 5 | {if gettype($slides) === 'object' && $slides instanceof WP_Query} 6 | {var $mode = 'query'} 7 | {/if} 8 | 9 | 10 | {if 11 | !empty($class) 12 | && 13 | ( 14 | ( $mode === 'array' && !empty($slides) ) 15 | || 16 | ( $mode === 'query' && $slides->have_posts() ) 17 | ) 18 | } 19 |
    20 | 21 |
    22 |
    23 | 24 | {if $mode === 'query'} 25 | {while $slides->have_posts()} 26 | {$slides->the_post()} 27 |
    30 |
    31 | {block slide_q}{/block} 32 |
    {* slinner *} 33 |
    {* slide *} 34 | {/while} 35 | {else} 36 |
    40 |
    41 | {block slide}{/block} 42 |
    {* slinner *} 43 |
    {* slide *} 44 | {/if} 45 | 46 |
    {* cont *} 47 |
    {* embla *} 48 | 49 |
    50 | 55 |
    56 | 61 |
    {* embla__buttons *} 62 | 63 | {block after_loop}{/block} 64 | 65 | {if $mode === 'query'} 66 | {wp_reset_postdata()} 67 | {/if} 68 |
    {* wrap *} 69 | {/if} 70 | -------------------------------------------------------------------------------- /src/scss/theme/ui-elements/_pagination.scss: -------------------------------------------------------------------------------- 1 | // Default style for WP-PageNavi plugin 2 | .wp-pagenavi { 3 | clear: both; 4 | } 5 | .wp-pagenavi a, 6 | .wp-pagenavi span { 7 | text-decoration: none; 8 | border: 1px solid #bfbfbf; 9 | padding: 3px 5px; 10 | margin: 2px; 11 | } 12 | .wp-pagenavi a:hover, 13 | .wp-pagenavi span.current { 14 | border-color: #000; 15 | } 16 | .wp-pagenavi span.current { 17 | font-weight: bold; 18 | } 19 | // end of default styles that are dequeued 20 | 21 | .pagination-wrap { 22 | display: flex; 23 | justify-content: center; 24 | 25 | .wp-pagenavi { 26 | margin-top: 40px; 27 | display: flex; 28 | align-items: center; 29 | } 30 | 31 | .pages, 32 | .last, 33 | .first { 34 | display: none; 35 | } 36 | 37 | .page, 38 | span { 39 | border: 0; 40 | display: inline-flex; 41 | align-items: center; 42 | color: #afbfc9; 43 | text-decoration: none; 44 | transition: all 0.2s ease-in-out; 45 | } 46 | 47 | .page:hover, 48 | .current { 49 | color: #434f58; 50 | } 51 | 52 | .previouspostslink, 53 | .nextpostslink { 54 | position: relative; 55 | display: inline-flex; 56 | @extend %bgncc; 57 | width: 24px; 58 | height: 24px; 59 | font-size: 0; 60 | background-size: 8px; 61 | backface-visibility: hidden; 62 | background-image: url("data:image/svg+xml,%3Csvg width='8px' height='12px' viewBox='0 0 8 12' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cpolygon fill='%23071c26' transform='translate(4.000000, 6.000000) rotate(-90.000000) translate(-4.000000, -6.000000) ' points='0.437894737 2 4 5.84561404 7.56210526 2 9.14285714 4.45614035 4 10 -1.14285714 4.45614035'%3E%3C/polygon%3E%3C/svg%3E"); 63 | opacity: 0.3; 64 | transition: all 0.2s ease-in-out; 65 | 66 | &:hover { 67 | opacity: 1; 68 | } 69 | } 70 | 71 | .previouspostslink { 72 | transform: scaleX(-1); 73 | } 74 | } 75 | 76 | @media (max-width: 991px) { 77 | .pagination-wrap .wp-pagenavi { 78 | margin-top: 24px; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /gutenberg/components/block-elements/TrCta.js: -------------------------------------------------------------------------------- 1 | const { URLInput } = wp.blockEditor 2 | const { TextControl, ToggleControl, Card, CardHeader, CardBody } = wp.components 3 | const { __ } = wp.i18n 4 | 5 | import trUpdateField from '../../core/trUpdateField' 6 | import TrTooltip from '../TrTooltip' 7 | 8 | const TrCta = ({ fieldData }) => { 9 | const { field_object, meta } = fieldData 10 | 11 | const hasProp = (propName) => field_object.hasOwnProperty(propName) 12 | 13 | const handleUpdate = (subFieldName, subFieldNewValue = null) => { 14 | const newValue = { ...field_object } 15 | if (subFieldName === 'target') { 16 | newValue['target'] = !field_object['target'] 17 | } else { 18 | newValue[subFieldName] = subFieldNewValue 19 | } 20 | 21 | trUpdateField(fieldData, newValue) 22 | } 23 | 24 | return ( 25 | 29 | 30 | {__(meta.label)} 31 | {meta.help && } 32 | 33 | 34 | {hasProp('title') && ( 35 |
    36 | handleUpdate('title', newValue)} 40 | /> 41 |
    42 | )} 43 | 44 |
    45 | handleUpdate('url', newValue)} 49 | /> 50 |
    51 | 52 | {hasProp('target') && ( 53 |
    54 | handleUpdate('target')} 58 | /> 59 |
    60 | )} 61 |
    62 |
    63 | ) 64 | } 65 | 66 | export default TrCta 67 | -------------------------------------------------------------------------------- /views/temp/views-parts-video.latte--4b5c401424.php: -------------------------------------------------------------------------------- 1 | params); 12 | if ($video_type['video_type'] === "youtube") /* line 1 */ { 13 | echo '
    14 |
    15 | 26 |
    27 |
    28 | '; 29 | } 30 | echo "\n"; 31 | if ($video_type['video_type'] === "vimeo") /* line 17 */ { 32 | echo '
    33 |
    34 | 45 |
    46 |
    47 | '; 48 | } 49 | echo "\n"; 50 | if ($video_type['video_type'] !== "vimeo" && $video_type['video_type'] !== "youtube") /* line 33 */ { 51 | echo '
    52 |
    53 | 56 |
    57 |
    58 | '; 59 | } 60 | echo "\n"; 61 | return get_defined_vars(); 62 | } 63 | 64 | } 65 | --------------------------------------------------------------------------------