Plugin Tabs noticias
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-server-side-render'), 'version' => 'd61dca07b0dff9938fac6c13e42a7c97');
|
||||
@@ -0,0 +1,90 @@
|
||||
jQuery(document).ready(function($){
|
||||
function change_background_size()
|
||||
{
|
||||
$( '.areoi-lightspeed-block > .areoi-background' ).each( function() {
|
||||
var parent = $( this ).parents( '.areoi-lightspeed-block' ),
|
||||
new_height = parent.outerHeight();
|
||||
|
||||
$( this ).css( 'height', new_height + 'px' );
|
||||
});
|
||||
}
|
||||
|
||||
addEventListener('resize, load', (event) => {
|
||||
change_background_size();
|
||||
});
|
||||
|
||||
function resize_drag_containers()
|
||||
{
|
||||
$( '.areoi-drag-container' ).each( function( i ) {
|
||||
var item_count = $( this ).find( 'ul:first-of-type > li' ).length;
|
||||
var item_width = $( this ).find( 'ul:first-of-type > li' ).css( 'flex-basis' );
|
||||
if ( item_width ) {
|
||||
item_width = item_width.replace( 'px', '' );
|
||||
var new_width = item_width * item_count;
|
||||
$( this ).find( 'ul:first-of-type' ).css( 'width', new_width + 'px' );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if ( $( '.areoi-drag-container' ).length ) {
|
||||
|
||||
resize_drag_containers();
|
||||
|
||||
let sliders = [];
|
||||
let next_url;
|
||||
|
||||
$( document ).on( 'mousedown', '.areoi-drag-container a', function(e) {
|
||||
e.preventDefault();
|
||||
next_url = $( this ).attr( 'href' );
|
||||
} );
|
||||
$( document ).on( 'click', '.areoi-drag-container a', function(e) {
|
||||
e.preventDefault();
|
||||
} );
|
||||
|
||||
$( '.areoi-drag-container' ).each( function( i ) {
|
||||
sliders[i] = $( this );
|
||||
let is_down = false;
|
||||
let start_x;
|
||||
let end_x;
|
||||
let scroll_left;
|
||||
|
||||
sliders[i].on('mousedown', (e) => {
|
||||
is_down = true;
|
||||
sliders[i].addClass('active');
|
||||
start_x = e.pageX - sliders[i].offset().left;
|
||||
scroll_left = sliders[i].scrollLeft();
|
||||
sliders[i].css( 'cursor', 'grabbing' );
|
||||
});
|
||||
sliders[i].on('mouseleave', () => {
|
||||
is_down = false;
|
||||
sliders[i].removeClass('active');
|
||||
});
|
||||
sliders[i].on('mouseup', (e) => {
|
||||
is_down = false;
|
||||
sliders[i].removeClass('active');
|
||||
sliders[i].css( 'cursor', 'grab' );
|
||||
end_x = e.pageX - sliders[i].offset().left;
|
||||
if ( start_x == end_x && next_url ) {
|
||||
window.location = next_url
|
||||
}
|
||||
});
|
||||
sliders[i].on('mousemove', (e) => {
|
||||
if(!is_down) return;
|
||||
e.preventDefault();
|
||||
const x = e.pageX - sliders[i].offset().left;
|
||||
const walk = (x - start_x) * 1;
|
||||
sliders[i].scrollLeft( scroll_left - walk );
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if ( $( 'body' ).hasClass( 'wp-admin' ) ) {
|
||||
if ( typeof wp.data != 'undefined' ) {
|
||||
wp.data.subscribe( () => {
|
||||
setTimeout( () => {
|
||||
resize_drag_containers();
|
||||
}, 2000 );
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,50 @@
|
||||
$( document ).on( 'click', '.areoi-lightspeed-block img:not(.areoi-footer img, .areoi-header-container img, a img), .areoi-lightspeed-block video:not(.areoi-footer video, .areoi-header-container video, a video), .areoi-open-gallery', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var drag = $( this ).parents( '.areoi-drag-container' );
|
||||
|
||||
if ( drag.length && drag.hasClass( 'moving' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var gallery = $( '#areoi-gallery' ),
|
||||
carousel = $( '#areoi-gallery-carousel' ),
|
||||
container = $( this ).parents( '.areoi-lightspeed-block' ),
|
||||
medias = container.find( 'img, video' ),
|
||||
src = $( this ).attr( 'src' ),
|
||||
inner = '',
|
||||
media_count = medias.length;
|
||||
|
||||
if ( !src ) {
|
||||
src = $( this ).find( 'source' ).attr( 'src' );
|
||||
}
|
||||
|
||||
medias.each( function() {
|
||||
|
||||
var item_src = $( this ).attr( 'src' );
|
||||
if ( !item_src ) {
|
||||
item_src = $( this ).find( 'source' ).attr( 'src' );
|
||||
}
|
||||
var item_index = $( this ).index( medias );
|
||||
|
||||
inner += '<div class="carousel-item h-100 ' + ( src == item_src ? 'active' : '' ) + '">';
|
||||
inner += '<div class="h-100 d-flex align-items-center justify-content-center">';
|
||||
if ( $( this ).prop( 'nodeName' ) == 'VIDEO' ) {
|
||||
inner += '<video src="' + item_src + '" controls></video>';
|
||||
} else {
|
||||
inner += '<img src="' + item_src + '" />';
|
||||
}
|
||||
inner += '</div>';
|
||||
inner += '</div>';
|
||||
});
|
||||
|
||||
carousel.find( '.carousel-inner' ).html( inner );
|
||||
|
||||
if ( media_count > 1 ) {
|
||||
carousel.find( '.carousel-control-next, .carousel-control-prev' ).show();
|
||||
} else {
|
||||
carousel.find( '.carousel-control-next, .carousel-control-prev' ).hide();
|
||||
}
|
||||
|
||||
gallery.modal( 'show' );
|
||||
} );
|
||||
@@ -0,0 +1,3 @@
|
||||
import * as custom from './custom';
|
||||
|
||||
custom.register_custom_blocks();
|
||||
@@ -0,0 +1,36 @@
|
||||
function is_scrolled_into_view( elem )
|
||||
{
|
||||
var docViewTop = $( window ).scrollTop();
|
||||
var docViewBottom = docViewTop + $( window ).height();
|
||||
var elemTop = $( elem ).offset().top;
|
||||
var elemBottom = elemTop + $( elem ).height();
|
||||
var elemHeight = $( elem ).height();
|
||||
|
||||
var sensitivity = 1;
|
||||
|
||||
var sensitivity_factor = $( window ).height() * sensitivity;
|
||||
|
||||
var bounding = elem[0].getBoundingClientRect();
|
||||
|
||||
return bounding.top <= $( window ).height() + ( $( window ).height() * 0.2 );
|
||||
}
|
||||
|
||||
function check_resources()
|
||||
{
|
||||
let items = [];
|
||||
|
||||
$( '.areoi-lazy:not(.areoi-lazy-loaded)' ).each( function( key, item ) {
|
||||
var item = $( this );
|
||||
if ( is_scrolled_into_view( item ) ) {
|
||||
var src = item.data( 'src' );
|
||||
item.addClass( 'areoi-lazy-loaded' );
|
||||
item.attr( 'src', src );
|
||||
item.css( 'opacity', 1 );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$( window ).on( 'scroll', function() {
|
||||
check_resources();
|
||||
});
|
||||
check_resources();
|
||||
@@ -0,0 +1,139 @@
|
||||
let parallax_components = [
|
||||
'.accordion',
|
||||
'.alert',
|
||||
'.card',
|
||||
'.list-group',
|
||||
'.areoi-content-grid-item',
|
||||
'.nf-form-cont',
|
||||
'.carousel:not(.areoi-lightspeed-header .carousel)',
|
||||
'.areoi-content-item'
|
||||
];
|
||||
|
||||
let parallax_exclude_elements_in_components = [
|
||||
'.accordion',
|
||||
'.alert',
|
||||
'.card',
|
||||
'.list-group'
|
||||
];
|
||||
|
||||
let parallax_parents = [
|
||||
'.areoi-lightspeed-block'
|
||||
];
|
||||
|
||||
let p_block_container = $( '.wp-site-blocks' );
|
||||
|
||||
let device_width = (window.innerWidth > 0) ? window.innerWidth : screen.width;
|
||||
|
||||
function add_parallax_classes( items, slug )
|
||||
{
|
||||
items.forEach( (row) => {
|
||||
p_block_container.find( row ).each( function() {
|
||||
if ( !$( this ).parents( '.areoi-parallax-none' ).length ) {
|
||||
var position = $( this ).css( 'position' );
|
||||
$( this ).addClass( 'areoi-parallax-' + slug );
|
||||
|
||||
if ( ![ 'fixed', 'relative', 'absolute', 'sticky' ].includes( position ) ) {
|
||||
$( this ).css( 'position', 'relative' );
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
add_parallax_classes( parallax_components, 'component' );
|
||||
|
||||
function change_parallax_components( elem )
|
||||
{
|
||||
if ( !$(elem).parents( parallax_parents.join( ', ' ) ).length ) {
|
||||
return;
|
||||
}
|
||||
var scale = -0.35;
|
||||
var parent = $(elem).parents( parallax_parents.join( ', ' ) );
|
||||
var window_top = $(window).scrollTop(),
|
||||
parent_top = parent.offset().top,
|
||||
parent_height = parent.outerHeight(),
|
||||
elem_height = elem.height(),
|
||||
view_height = window.innerHeight * 0.5 - parent_height * 0.5,
|
||||
scrolled = window_top - parent_top + view_height + (elem_height/2),
|
||||
scaled = device_width >= 992 ? scrolled * scale : 0;
|
||||
|
||||
elem.css({
|
||||
'transform': 'translate3d( 0, ' + scaled + 'px, 0 )'
|
||||
});
|
||||
}
|
||||
|
||||
function change_parallax_background( elem )
|
||||
{
|
||||
var scale = -0.15;
|
||||
var parent = $(elem).parent();
|
||||
var window_top = $(window).scrollTop(),
|
||||
parent_top = parent.offset().top,
|
||||
parent_height = parent.outerHeight(),
|
||||
elem_height = elem.height(),
|
||||
view_height = window.innerHeight * 0.5 - parent_height * 0.5,
|
||||
scrolled = window_top - parent_top + view_height,
|
||||
scaled = scrolled * scale;
|
||||
|
||||
elem.css({
|
||||
'transform': 'translate3d( 0, ' + scaled + 'px, 0 )'
|
||||
});
|
||||
}
|
||||
|
||||
function change_parallax_pattern( elem )
|
||||
{
|
||||
if ( !$(elem).parents( parallax_parents.join( ', ' ) ).length ) {
|
||||
return;
|
||||
}
|
||||
var scale = 0.25;
|
||||
var parent = $(elem).parents( parallax_parents.join( ', ' ) );
|
||||
var window_top = $(window).scrollTop(),
|
||||
parent_top = parent.offset().top,
|
||||
parent_height = parent.outerHeight(),
|
||||
elem_height = elem.height(),
|
||||
view_height = window.innerHeight * 0.5 - parent_height * 0.5,
|
||||
scrolled = window_top - parent_top + view_height + (elem_height/2),
|
||||
scaled = scrolled * scale;
|
||||
|
||||
elem.css({
|
||||
'transform': 'translate3d( 0, ' + scaled + 'px, 0 )'
|
||||
});
|
||||
}
|
||||
|
||||
function check_parallax()
|
||||
{
|
||||
device_width = (window.innerWidth > 0) ? window.innerWidth : screen.width;
|
||||
|
||||
if ( $( 'body' ).hasClass( 'has-areoi-parallax-components' ) ) {
|
||||
$( '.areoi-parallax-component' ).each( function( key, item ) {
|
||||
var item = $( this );
|
||||
change_parallax_components( item );
|
||||
});
|
||||
}
|
||||
|
||||
if ( $( 'body' ).hasClass( 'has-areoi-parallax-elements' ) ) {
|
||||
$( '.areoi-parallax-element' ).each( function( key, item ) {
|
||||
var item = $( this );
|
||||
change_parallax_elements( item );
|
||||
});
|
||||
}
|
||||
|
||||
if ( $( 'body' ).hasClass( 'has-areoi-parallax-background' ) ) {
|
||||
p_block_container.find('.areoi-background:not(.areoi-parallax-none .areoi-background)' ).each(function(index, element) {
|
||||
var item = $( this );
|
||||
change_parallax_background( item );
|
||||
});
|
||||
}
|
||||
|
||||
if ( $( 'body' ).hasClass( 'has-areoi-parallax-patterns' ) ) {
|
||||
p_block_container.find('.areoi-background-pattern:not(.areoi-background-pattern-media)' ).each(function(index, element) {
|
||||
var item = $( this );
|
||||
change_parallax_pattern( item );
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
check_parallax();
|
||||
|
||||
|
||||
$( window ).on( 'scroll', function() {
|
||||
check_parallax();
|
||||
});
|
||||
@@ -0,0 +1,126 @@
|
||||
function change_content_height()
|
||||
{
|
||||
if ( $( '.areoi-resize-container' ).length ) {
|
||||
$( '.areoi-resize-container' ).each( function() {
|
||||
var container = $( this ).parents( '.areoi-lightspeed-block' ),
|
||||
media = container.find( '.areoi-resize-media' ),
|
||||
content = container.find( '.areoi-resize-content' ),
|
||||
padding_top = parseInt( container.css( 'padding-top' ).replace( 'px', '' ) ),
|
||||
padding_bottom = parseInt( container.css( 'padding-bottom' ).replace( 'px', '' ) ),
|
||||
body_width = $( 'body' ).width(),
|
||||
percentage_width = ( media.width() / body_width ) * 100;
|
||||
|
||||
media.css( 'height', '' );
|
||||
|
||||
if ( media.height() < content.height() && percentage_width < 70 ) {
|
||||
media.css( 'height', ( content.height() + padding_top + padding_bottom ) + 'px' );
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
$( window ).on( 'load', function() {
|
||||
change_content_height();
|
||||
});
|
||||
$( window ).on( 'resize', function(){
|
||||
change_content_height();
|
||||
});
|
||||
|
||||
function header_scroll()
|
||||
{
|
||||
if ( $( '.areoi-lightspeed-header' ).length ) {
|
||||
|
||||
var scroll = $(window).scrollTop();
|
||||
|
||||
if ( scroll > 50 ) {
|
||||
$( '.areoi-lightspeed-header' ).addClass( 'scrolled' );
|
||||
} else {
|
||||
$( '.areoi-lightspeed-header' ).removeClass( 'scrolled' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$( window ).on( 'scroll', function(){
|
||||
|
||||
header_scroll();
|
||||
});
|
||||
|
||||
header_scroll();
|
||||
|
||||
function delay( callback, ms )
|
||||
{
|
||||
var timer = 0;
|
||||
return function() {
|
||||
var context = this, args = arguments;
|
||||
clearTimeout(timer);
|
||||
timer = setTimeout(function () {
|
||||
callback.apply(context, args);
|
||||
}, ms || 0);
|
||||
};
|
||||
}
|
||||
|
||||
function resize_drag_containers()
|
||||
{
|
||||
$( '.areoi-drag-container' ).each( function( i ) {
|
||||
var item_count = $( this ).find( 'ul:first-of-type > li' ).length;
|
||||
var item_width = $( this ).find( 'ul:first-of-type > li' ).css( 'flex-basis' );
|
||||
if ( item_width ) {
|
||||
item_width = item_width.replace( 'px', '' );
|
||||
var new_width = item_width * item_count;
|
||||
$( this ).find( 'ul:first-of-type' ).css( 'width', new_width + 'px' );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if ( $( '.areoi-drag-container' ).length ) {
|
||||
|
||||
resize_drag_containers();
|
||||
|
||||
let sliders = [];
|
||||
let next_url;
|
||||
|
||||
$( document ).on( 'mousedown', '.areoi-drag-container a', function(e) {
|
||||
e.preventDefault();
|
||||
next_url = $( this ).attr( 'href' );
|
||||
} );
|
||||
$( document ).on( 'click', '.areoi-drag-container a', function(e) {
|
||||
e.preventDefault();
|
||||
} );
|
||||
|
||||
$( '.areoi-drag-container' ).each( function( i ) {
|
||||
sliders[i] = $( this );
|
||||
let is_down = false;
|
||||
let start_x;
|
||||
let end_x;
|
||||
let scroll_left;
|
||||
|
||||
sliders[i].on('mousedown', (e) => {
|
||||
is_down = true;
|
||||
sliders[i].addClass('active');
|
||||
sliders[i].removeClass('moving');
|
||||
start_x = e.pageX - sliders[i].offset().left;
|
||||
scroll_left = sliders[i].scrollLeft();
|
||||
sliders[i].css( 'cursor', 'grabbing' );
|
||||
});
|
||||
sliders[i].on('mouseleave', () => {
|
||||
is_down = false;
|
||||
sliders[i].removeClass('active');
|
||||
});
|
||||
sliders[i].on('mouseup', (e) => {
|
||||
is_down = false;
|
||||
sliders[i].removeClass('active');
|
||||
sliders[i].css( 'cursor', 'grab' );
|
||||
end_x = e.pageX - sliders[i].offset().left;
|
||||
if ( start_x == end_x && next_url ) {
|
||||
window.location = next_url
|
||||
}
|
||||
});
|
||||
sliders[i].on('mousemove', (e) => {
|
||||
if(!is_down) return;
|
||||
e.preventDefault();
|
||||
const x = e.pageX - sliders[i].offset().left;
|
||||
const walk = (x - start_x) * 1;
|
||||
sliders[i].scrollLeft( scroll_left - walk );
|
||||
sliders[i].addClass('moving');
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
let text_elems = [];
|
||||
|
||||
function is_background_in_view( elem )
|
||||
{
|
||||
var docViewTop = $( window ).scrollTop();
|
||||
var docViewBottom = docViewTop + $( window ).height();
|
||||
var elemTop = $( elem ).offset().top;
|
||||
var elemBottom = elemTop + $( elem ).height();
|
||||
var elemHeight = $( elem ).height();
|
||||
var elemType = $( elem ).prop( 'nodeName' );
|
||||
|
||||
var bounding = elem[0].getBoundingClientRect();
|
||||
|
||||
return bounding.top <= $( window ).height() - ($( window ).height() * 0.5);
|
||||
}
|
||||
|
||||
let bg_checked = false;
|
||||
|
||||
function add_data_attribute()
|
||||
{
|
||||
let items = [];
|
||||
|
||||
$( '.areoi-background' ).each( function( key, item ) {
|
||||
var container = $( this ).parents( '.areoi-lightspeed-block' );
|
||||
var texts = container.find( '[class^="text-"],[class*=" text-"],[class^="btn-"],[class*=" btn-"]' );
|
||||
|
||||
var text_color = null;
|
||||
var allowed_classes = [
|
||||
'text-primary',
|
||||
'text-secondary',
|
||||
'text-success',
|
||||
'text-warning',
|
||||
'text-danger',
|
||||
'text-info',
|
||||
'text-light',
|
||||
'text-dark',
|
||||
'text-body',
|
||||
'btn-primary',
|
||||
'btn-secondary',
|
||||
'btn-success',
|
||||
'btn-warning',
|
||||
'btn-danger',
|
||||
'btn-info',
|
||||
'btn-light',
|
||||
'btn-dark',
|
||||
'btn-body',
|
||||
];
|
||||
texts.each( function() {
|
||||
var is_item_with_background = $( this ).parents( '.areoi-item-has-background' ).length;
|
||||
|
||||
if ( !is_item_with_background ) {
|
||||
var elem = $( this );
|
||||
var class_list = $( this ).attr( 'class' );
|
||||
var class_arr = class_list.split(/\s+/);
|
||||
$.each( class_arr, function( index, value ) {
|
||||
if ( allowed_classes.includes( value ) ) {
|
||||
|
||||
var color = value.replace( 'text-', '' );
|
||||
color = color.replace( 'btn-', '' );
|
||||
|
||||
text_elems.push( { class: value, elem: elem } );
|
||||
if ( !text_color ) {
|
||||
text_color = color;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
var item = $( this );
|
||||
|
||||
var background_color = item.css('background-color');
|
||||
if ( item.find( '.areoi-background__color' ).length ) {
|
||||
background_color = item.find( '.areoi-background__color' ).css('background-color');
|
||||
}
|
||||
|
||||
item.data( 'background', background_color );
|
||||
item.data( 'text', text_color );
|
||||
});
|
||||
|
||||
bg_checked = true;
|
||||
}
|
||||
add_data_attribute();
|
||||
|
||||
function check_backgrounds()
|
||||
{
|
||||
let items = [];
|
||||
|
||||
$( '.areoi-lightspeed-block .areoi-background' ).each( function( key, item ) {
|
||||
|
||||
var item = $( this );
|
||||
if ( is_background_in_view( item ) ) {
|
||||
|
||||
var background_color = item.data( 'background' );
|
||||
var text_color = item.data( 'text' );
|
||||
|
||||
if ( !text_color ) {
|
||||
if ( $( this ).hasClass( 'bg-body' ) || $( this ).hasClass( 'bg-light' ) ) {
|
||||
text_color = 'dark';
|
||||
} else {
|
||||
text_color = 'light';
|
||||
}
|
||||
}
|
||||
|
||||
if ( text_elems.length ) {
|
||||
$.each( text_elems, function( index, elem ) {
|
||||
|
||||
var new_class = '';
|
||||
if ( elem.class.includes( 'btn-' ) ) {
|
||||
new_class = 'btn-' + text_color;
|
||||
} else {
|
||||
new_class = 'text-' + text_color;
|
||||
}
|
||||
|
||||
elem.elem.removeClass( elem.class ).addClass( new_class );
|
||||
|
||||
text_elems[index].class = new_class;
|
||||
});
|
||||
}
|
||||
|
||||
$( '.areoi-lightspeed-block .areoi-background, .areoi-background__color' ).attr('style', 'background-color: ' + background_color + ' !important;' );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$( window ).on( 'scroll', function() {
|
||||
if ( bg_checked ) {
|
||||
check_backgrounds();
|
||||
}
|
||||
});
|
||||
check_backgrounds();
|
||||
@@ -0,0 +1,67 @@
|
||||
const is_external_link = (url) => {
|
||||
const tmp = document.createElement('a');
|
||||
tmp.href = url;
|
||||
return tmp.host !== window.location.host;
|
||||
};
|
||||
|
||||
const is_new_page = (url) => {
|
||||
var next_url = new URL( url, document.baseURI );
|
||||
var next_url_no_hash = next_url.href.replace( next_url.hash, '' );
|
||||
|
||||
var current_url = new URL( window.location, document.baseURI );
|
||||
var current_url_no_hash = current_url.href.replace( current_url.hash, '' );
|
||||
|
||||
if ( next_url_no_hash != current_url_no_hash ) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
const open_url = (url) => {
|
||||
|
||||
$( 'body' ).addClass( 'areoi-page-transition-unloaded' );
|
||||
$( '.areoi-transition' ).addClass( 'areoi-transition-invisible' );
|
||||
|
||||
setTimeout( function() {
|
||||
window.location = url;
|
||||
}, 500);
|
||||
};
|
||||
|
||||
$( document ).on( 'click', 'a:not(.areoi-feature-menu a)', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if ( e.ctrlKey ) {
|
||||
return;
|
||||
}
|
||||
switch ( e.which ) {
|
||||
case 1:
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
var url = $( this ).attr( 'href' );
|
||||
var drag = $( this ).parents( '.areoi-drag-container' );
|
||||
|
||||
if ( url.indexOf('#') < 0 && ( !drag.length || !drag.hasClass( 'moving' ) ) ) {
|
||||
|
||||
if ( typeof url !== 'undefined' && !is_external_link( url ) && $( this ).attr( 'target' ) !== '_blank' && is_new_page( url ) ) {
|
||||
open_url( url );
|
||||
} else if ( $( this ).attr( 'target' ) === '_blank' ) {
|
||||
window.open( url, '_blank' ).focus();
|
||||
} else if ( is_external_link( url ) ) {
|
||||
window.location = url;
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
function add_loaded_classes()
|
||||
{
|
||||
$( 'body' ).addClass( 'areoi-page-transition-loaded' ).removeClass( 'areoi-page-transition-unloaded' );
|
||||
$( '.areoi-transition' ).removeClass( 'areoi-transition-invisible' );
|
||||
}
|
||||
|
||||
$( window ).on( 'pageshow', function() {
|
||||
add_loaded_classes();
|
||||
});
|
||||
|
||||
add_loaded_classes();
|
||||
@@ -0,0 +1,84 @@
|
||||
let elements = [
|
||||
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'li', 'img:not(.areoi-background img, .carousel img)', 'video:not(.areoi-background video, .carousel video)',
|
||||
'.btn', '.btn-simple', '.alert', '.accordion-item', '.card', '.list-group-item', '.nav-link',
|
||||
'.areoi-content-item',
|
||||
'.nf-form-cont', '.carousel',
|
||||
'.areoi-heading-divider', '.areoi-heading-icon', '.areoi-lightspeed-item-icon'
|
||||
];
|
||||
|
||||
let block_container = $( 'main' );
|
||||
|
||||
function add_transition_classes()
|
||||
{
|
||||
elements.forEach( (row) => {
|
||||
block_container.find( row ).each( function() {
|
||||
if ( !$( this ).parents( '.areoi-transition-none' ).length ) {
|
||||
var position = $( this ).css( 'position' );
|
||||
var parent_parralax = $( this ).parents( '.areoi-parallax-component' );
|
||||
if ( !$( this ).hasClass( 'areoi-parallax-component' ) && !parent_parralax.length ) {
|
||||
$( this ).addClass( 'areoi-transition' );
|
||||
}
|
||||
|
||||
if ( ![ 'fixed', 'relative', 'absolute', 'sticky' ].includes( position ) ) {
|
||||
$( this ).css( 'position', 'relative' );
|
||||
$( this ).addClass( 'areoi-transition-move' );
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
check_transitions();
|
||||
}
|
||||
add_transition_classes();
|
||||
|
||||
function is_scrolled_into_view( elem )
|
||||
{
|
||||
var docViewTop = $( window ).scrollTop();
|
||||
var docViewBottom = docViewTop + $( window ).height();
|
||||
var elemTop = $( elem ).offset().top;
|
||||
var elemBottom = elemTop + $( elem ).height();
|
||||
var elemHeight = $( elem ).height();
|
||||
var elemType = $( elem ).prop( 'nodeName' );
|
||||
|
||||
var sensitivity = 1;
|
||||
|
||||
var sensitivity_factor = $( window ).height() * sensitivity;
|
||||
|
||||
var bounding = elem[0].getBoundingClientRect();
|
||||
|
||||
return bounding.top <= $( window ).height() - (elemHeight * 0.2);
|
||||
}
|
||||
|
||||
function check_transitions()
|
||||
{
|
||||
let items = [];
|
||||
|
||||
$( '.areoi-transition' ).each( function( key, item ) {
|
||||
var item = $( this );
|
||||
if ( is_scrolled_into_view( item ) ) {
|
||||
if ( !item.hasClass( 'areoi-transition-loading' ) ) {
|
||||
items.push( item );
|
||||
item.addClass( 'areoi-transition-loading' );
|
||||
}
|
||||
}
|
||||
});
|
||||
animate_in( 0, items )
|
||||
}
|
||||
|
||||
function animate_in( index, items )
|
||||
{
|
||||
if ( items.length && items[index] ) {
|
||||
let item = items[index];
|
||||
|
||||
item.addClass( 'areoi-transition-visible' ).removeClass( 'areoi-transition-loading' );
|
||||
|
||||
setTimeout( function() {
|
||||
animate_in( ( index + 1 ), items )
|
||||
}, 50);
|
||||
}
|
||||
}
|
||||
|
||||
$( window ).on( 'scroll', function() {
|
||||
check_transitions();
|
||||
});
|
||||
check_transitions();
|
||||
@@ -0,0 +1,65 @@
|
||||
jQuery( document ).ready( function( $ ) {
|
||||
|
||||
var add_validation_classes = Marionette.Object.extend( {
|
||||
initialize: function() {
|
||||
var channel = Backbone.Radio.channel( 'form' );
|
||||
this.listenTo( channel, 'render:view', this.add_listener );
|
||||
|
||||
var channel = Backbone.Radio.channel( 'submit' );
|
||||
this.listenTo( channel, 'validate:field', this.add_field_classes );
|
||||
|
||||
var channel = Backbone.Radio.channel( 'fields' );
|
||||
this.listenTo( channel, 'change:modelValue', this.add_field_classes );
|
||||
},
|
||||
|
||||
add_listener: function( model )
|
||||
{
|
||||
var model = model;
|
||||
|
||||
var interval = setInterval( function() {
|
||||
var form = $( model.el );
|
||||
|
||||
if ( form.length ) {
|
||||
clearInterval( interval );
|
||||
|
||||
var errors = form.find( 'nf-errors' );
|
||||
|
||||
var target = errors[0];
|
||||
|
||||
var observer = new MutationObserver(function(mutations) {
|
||||
var error = target.innerText.replace( ' ', '' );
|
||||
|
||||
if ( error ) {
|
||||
form.addClass( 'areoi-nf-has-errors' );
|
||||
} else {
|
||||
form.removeClass( 'areoi-nf-has-errors' );
|
||||
}
|
||||
});
|
||||
|
||||
observer.observe(target, {
|
||||
attributes: true,
|
||||
childList: true,
|
||||
characterData: true
|
||||
});
|
||||
}
|
||||
}, 500);
|
||||
},
|
||||
|
||||
add_field_classes: function( model )
|
||||
{
|
||||
var form = $( '#nf-form-' + model.get( 'formID' ) + '-cont' ),
|
||||
field = form.find( '#nf-field-' + model.get( 'id' ) + '-container' );
|
||||
|
||||
setTimeout( function() {
|
||||
if ( model.get('errors') && model.get('errors').length ) {
|
||||
field.find( '.nf-element:not([type="checkbox"], [type="radio"])' ).addClass( 'is-invalid' ).removeClass( 'is-valid' );
|
||||
} else {
|
||||
field.find( '.nf-element:not([type="checkbox"], [type="radio"])' ).addClass( 'is-valid' ).removeClass( 'is-invalid' );
|
||||
}
|
||||
}, 250);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
new add_validation_classes();
|
||||
});
|
||||
@@ -0,0 +1,5 @@
|
||||
<script id="tmpl-nf-after-fields" type="text/template">
|
||||
{{{ data.afterFields }}}
|
||||
<div id="nf-form-errors-{{{ data.id }}}" class="nf-form-errors alert alert-danger" role="alert"></div>
|
||||
<div class="nf-form-hp"></div>
|
||||
</script>
|
||||
@@ -0,0 +1,12 @@
|
||||
<script id="tmpl-nf-field-checkbox" type="text/template">
|
||||
<input id="nf-field-{{{ data.id }}}"
|
||||
name="nf-field-{{{ data.id }}}"
|
||||
aria-describedby="nf-error-{{{ data.id }}}"
|
||||
class="{{{ data.renderClasses() }}} nf-element"
|
||||
type="checkbox"
|
||||
value="1" {{{ data.maybeDisabled() }}}{{{ data.maybeChecked() }}}
|
||||
aria-labelledby="nf-label-field-{{{ data.id }}}"
|
||||
|
||||
{{{ data.maybeRequired() }}}
|
||||
>
|
||||
</script>
|
||||
@@ -0,0 +1,3 @@
|
||||
<script id="tmpl-nf-field-error" type="text/template">
|
||||
<div class="nf-error-msg nf-error-{{{ data.id }}} invalid-feedback">{{{ data.msg }}}</div>
|
||||
</script>
|
||||
@@ -0,0 +1,5 @@
|
||||
<script id="tmpl-nf-field-label" type="text/template">
|
||||
<div class="nf-field-label form-label"><label for="nf-field-{{{ data.id }}}"
|
||||
id="nf-label-field-{{{ data.id }}}"
|
||||
class="{{{ data.renderLabelClasses() }}}">{{{ _.escape( data.label ) }}} {{{ ( 'undefined' != typeof data.required && 1 == data.required ) ? '<span class="ninja-forms-req-symbol">*</span>' : '' }}} {{{ data.maybeRenderHelp() }}}</label></div>
|
||||
</script>
|
||||
@@ -0,0 +1,40 @@
|
||||
<script id="tmpl-nf-field-listcheckbox" type="text/template">
|
||||
<ul aria-describedby="nf-error-{{{ data.id }}}">
|
||||
{{{ data.renderOptions() }}}
|
||||
</ul>
|
||||
</script>
|
||||
|
||||
<script id='tmpl-nf-field-listcheckbox-option' type='text/template'>
|
||||
<# if ( ! data.visible ) { return '' } #>
|
||||
<li>
|
||||
<input type="checkbox" id="nf-field-{{{ data.fieldID }}}-{{{ data.index }}}" name="nf-field-{{{ data.fieldID }}}" class="{{{ data.classes }}} nf-element form-check-input {{{ ( data.isSelected ) ? ' nf-checked' : '' }}}" value="{{{ data.value }}}" {{{ ( data.isSelected ) ? 'checked="checked"' : '' }}}
|
||||
aria-labelledby="nf-label-field-{{{ data.fieldID }}}-{{{ data.index }}}"
|
||||
<# if( data.required ) { #>
|
||||
required
|
||||
<# } #>
|
||||
>
|
||||
<label for="nf-field-{{{ data.fieldID }}}-{{{ data.index }}}"
|
||||
id="nf-label-field-{{{ data.fieldID }}}-{{{ data.index }}}"
|
||||
class="{{{ ( data.isSelected ) ? 'nf-checked-label' : '' }}} form-check-label">{{{ data.label }}}</label>
|
||||
</li>
|
||||
</script>
|
||||
|
||||
<script id='tmpl-nf-field-listcheckbox-other' type='text/template'>
|
||||
<li {{{ ( ! data.visible ) ? 'style="display:none"' : '' }}}>
|
||||
<input type="checkbox"
|
||||
id="nf-field-{{{ data.fieldID }}}-other"
|
||||
name="nf-field-{{{ data.fieldID }}}" class="{{{ data.classes }}} nf-element form-check-input" value="nf-other" {{{ ( ! data.valueFound ) ? 'checked="checked"' : '' }}}
|
||||
aria-labelledby="nf-label-field-{{{ data.fieldID }}}-other"
|
||||
<# if( data.required ) { #>
|
||||
required
|
||||
<# } #>
|
||||
>
|
||||
<label id="nf-label-field-{{{ data.fieldID }}}-other" class="form-check-label">Other
|
||||
{{{ data.renderOtherText() }}}
|
||||
</label>
|
||||
</li>
|
||||
</script>
|
||||
|
||||
<script id='tmpl-nf-field-listcheckbox-other-text' type='text/template'>
|
||||
<input type="text" name="nf-field-{{{ data.fieldID }}}" class="nf-element" value="{{{ data.currentValue }}}">
|
||||
</script>
|
||||
@@ -0,0 +1,34 @@
|
||||
<script id="tmpl-nf-field-listradio" type="text/template">
|
||||
<ul aria-describedby="nf-error-{{{ data.id }}}">
|
||||
{{{ data.renderOptions() }}}
|
||||
</ul>
|
||||
</script>
|
||||
|
||||
<script id='tmpl-nf-field-listradio-option' type='text/template'>
|
||||
<# if ( ! data.visible ) { return '' } #>
|
||||
<li>
|
||||
<input type="radio"
|
||||
id="nf-field-{{{ data.fieldID }}}-{{{ data.index }}}"
|
||||
name="nf-field-{{{ data.fieldID }}}"
|
||||
class="{{{ data.classes }}} nf-element {{{ ( data.value == data.currentValue || 1 == data.selected ) ? 'nf-checked' : '' }}} form-check-input" value="{{{ data.value }}}" {{{ ( data.value == data.currentValue || 1 == data.selected ) ? 'checked="checked"' : '' }}}
|
||||
aria-labelledby="nf-label-class-field-{{{ data.fieldID }}}-{{{ data.index }}}"
|
||||
<# if( data.required ) { #>
|
||||
required
|
||||
<# } #>
|
||||
>
|
||||
<label for="nf-field-{{{ data.fieldID }}}-{{{ data.index }}}"
|
||||
id="nf-label-class-field-{{{ data.fieldID }}}-{{{ data.index }}}" class="{{{ ( data.value == data.currentValue || 1
|
||||
==
|
||||
data.selected ) ? 'nf-checked-label' : '' }}} form-check-label">{{{ data.label }}}</label>
|
||||
</li>
|
||||
</script>
|
||||
|
||||
<script id='tmpl-nf-field-listradio-other' type='text/template'>
|
||||
<li>
|
||||
<input type="radio" name="nf-field-{{{ data.fieldID }}}" class="{{{ data.classes }}} nf-element" value="nf-other" {{{ ( ! data.valueFound ) ? 'checked="checked"' : '' }}}> <label>Other {{{ data.renderOtherText() }}}</label>
|
||||
</li>
|
||||
</script>
|
||||
|
||||
<script id='tmpl-nf-field-listradio-other-text' type='text/template'>
|
||||
<input type="text" name="nf-field-{{{ data.fieldID }}}" class="nf-element" value="{{{ data.currentValue }}}">
|
||||
</script>
|
||||
@@ -0,0 +1,907 @@
|
||||
body,
|
||||
.editor-styles-wrapper {
|
||||
|
||||
.areoi-header-container {
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.areoi-lightspeed-item-icon {
|
||||
margin: 0;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
|
||||
i {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
transform: translate( 0, -50% );
|
||||
|
||||
&:before {
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
}
|
||||
.text-center {
|
||||
.areoi-lightspeed-item-icon {
|
||||
justify-content: center;
|
||||
|
||||
i {
|
||||
left: 50%;
|
||||
transform: translate( -50%, -50% );
|
||||
}
|
||||
}
|
||||
}
|
||||
.text-end {
|
||||
.areoi-lightspeed-item-icon {
|
||||
justify-content: flex-end;
|
||||
|
||||
i {
|
||||
left: auto;
|
||||
right: 0;
|
||||
transform: translate( 0%, -50% );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.areoi-form-placeholder {
|
||||
position: relative;
|
||||
|
||||
p {
|
||||
width: 80%;
|
||||
max-width: 400px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate( -50%, -50% );
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.areoi-lightspeed-block {
|
||||
.carousel-control-prev-icon,
|
||||
.carousel-control-next-icon {
|
||||
background-color: rgba( 0, 0, 0, 0.6 );
|
||||
background-size: 1.5rem 1.5rem;
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.carousel-indicators {
|
||||
button {
|
||||
background-color: none;
|
||||
height: 5px;
|
||||
|
||||
&:after {
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
background-color: #fff;
|
||||
border: 1px solid rgba( 0, 0, 0, 0.6 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.areoi-has-mask {
|
||||
mask-position: top left;
|
||||
mask-size: cover;
|
||||
mask-repeat: no-repeat;
|
||||
-webkit-mask-position: top left;
|
||||
-webkit-mask-size: cover;
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.justify-content-lg-end {
|
||||
.areoi-has-mask {
|
||||
mask-position: top right;
|
||||
-webkit-mask-position: top right;
|
||||
}
|
||||
}
|
||||
|
||||
.areoi-divider {
|
||||
mask-position: top;
|
||||
mask-size: cover;
|
||||
-webkit-mask-position: top;
|
||||
-webkit-mask-size: cover;
|
||||
}
|
||||
|
||||
.areoi-divider-styled:not(.areoi-is-first-strip) {
|
||||
margin-top: -42.5px;
|
||||
|
||||
@media only screen and (min-width: 992px) {
|
||||
margin-top: -85px;
|
||||
}
|
||||
}
|
||||
|
||||
.areoi-background-pattern {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
&.has-areoi-parallax {
|
||||
.areoi-background:not(.areoi-parallax-none .areoi-background) {
|
||||
height: 150%;
|
||||
top: -25%;
|
||||
}
|
||||
.areoi-background-pattern:not(.areoi-parallax-none .areoi-background-pattern) {
|
||||
height: 120%;
|
||||
top: -15%;
|
||||
}
|
||||
}
|
||||
|
||||
&.has-areoi-page-transition {
|
||||
opacity: 0;
|
||||
transition: all 0.5s ease-in-out;
|
||||
|
||||
&.areoi-page-transition-loaded {
|
||||
opacity: 1;
|
||||
}
|
||||
&.areoi-page-transition-unloaded {
|
||||
opacity: 0;
|
||||
transition: all 0.5s ease-in-out 0.5s;
|
||||
}
|
||||
}
|
||||
&.has-areoi-transition {
|
||||
overflow-x: hidden;
|
||||
|
||||
main {
|
||||
h1, h2, h3, h4, h5, h6, p, li, img:not(.areoi-background img, .carousel img), video:not(.areoi-background video, .carousel video),
|
||||
.btn, .btn-simple, .alert, .accordion-item, .card, .list-group-item, .nav-link,
|
||||
.areoi-content-item, .areoi-heading-icon, .areoi-heading-divider,
|
||||
.nf-form-cont {
|
||||
&:not(.areoi-parallax-component) {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
.areoi-parallax-component {
|
||||
h1, h2, h3, h4, h5, h6, p, li, img:not(.areoi-background img, .carousel img), video:not(.areoi-background video, .carousel video),
|
||||
.btn, .btn-simple, .alert, .accordion-item, .card, .list-group-item, .nav-link,
|
||||
.areoi-content-item, .areoi-heading-icon, .areoi-heading-divider,
|
||||
.nf-form-cont {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.areoi-transition {
|
||||
opacity: 0;
|
||||
}
|
||||
.areoi-transition-visible,
|
||||
.areoi-transition-invisible {
|
||||
opacity: 1 !important;
|
||||
transition: all 0.5s ease-in-out;
|
||||
}
|
||||
.areoi-transition-invisible {
|
||||
opacity: 0 !important;
|
||||
}
|
||||
.areoi-transition-none,
|
||||
.nf-form-cont {
|
||||
h1, h2, h3, h4, h5, h6, p, li, img:not(.areoi-background img, .carousel img), video:not(.areoi-background video, .carousel video),
|
||||
.btn, .alert, .accordion-item, .card, .list-group-item, .nav-link,
|
||||
.areoi-content-item, .areoi-heading-icon, .areoi-heading-divider,
|
||||
.nf-form-cont {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.areoi-transition {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
.areoi-more-menu .areoi-more-menu-main li a,
|
||||
.areoi-more-menu .areoi-more-menu-main li button,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body > ul > li > a,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body > ul > li > button,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body .areoi-offcanvas-back {
|
||||
opacity: 0;
|
||||
}
|
||||
.areoi-more-menu.show .areoi-more-menu-main li a,
|
||||
.areoi-more-menu.show .areoi-more-menu-main li button,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body.active > ul > li > a,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body.active > ul > li > button,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body.active .areoi-offcanvas-back {
|
||||
opacity: 1;
|
||||
}
|
||||
&.areoi-transition-up {
|
||||
.areoi-transition-move {
|
||||
top: 20px;
|
||||
|
||||
&.areoi-transition-visible {
|
||||
top: 0;
|
||||
}
|
||||
&.areoi-transition-invisible {
|
||||
top: 20px;
|
||||
}
|
||||
}
|
||||
.areoi-more-menu .areoi-more-menu-main li a,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body > ul > li > a,
|
||||
.areoi-more-menu .areoi-more-menu-main li button,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body > ul > li > button {
|
||||
top: 20px;
|
||||
}
|
||||
.areoi-more-menu.show .areoi-more-menu-main li a,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body.active > ul > li > a,
|
||||
.areoi-more-menu.show .areoi-more-menu-main li button,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body.active > ul > li > button,
|
||||
.areoi-more-menu.show .areoi-more-menu-main li button,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body.active > ul > li > button {
|
||||
top: 0px;
|
||||
}
|
||||
}
|
||||
&.areoi-transition-down {
|
||||
.areoi-transition-move {
|
||||
top: -20px;
|
||||
|
||||
&.areoi-transition-visible {
|
||||
top: 0;
|
||||
}
|
||||
&.areoi-transition-invisible {
|
||||
top: -20px;
|
||||
}
|
||||
}
|
||||
.areoi-more-menu .areoi-more-menu-main li a,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body > ul > li > a,
|
||||
.areoi-more-menu .areoi-more-menu-main li button,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body > ul > li > button {
|
||||
top: -20px;
|
||||
}
|
||||
.areoi-more-menu.show .areoi-more-menu-main li a,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body.active > ul > li > a,
|
||||
.areoi-more-menu.show .areoi-more-menu-main li button,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body.active > ul > li > button {
|
||||
top: 0px;
|
||||
}
|
||||
}
|
||||
&.areoi-transition-left {
|
||||
.areoi-transition-move {
|
||||
left: -20px;
|
||||
|
||||
&.areoi-transition-visible {
|
||||
left: 0;
|
||||
}
|
||||
&.areoi-transition-invisible {
|
||||
left: -20px;
|
||||
}
|
||||
}
|
||||
.areoi-more-menu .areoi-more-menu-main li a,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body > ul > li > a,
|
||||
.areoi-more-menu .areoi-more-menu-main li button,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body > ul > li > button {
|
||||
left: -20px;
|
||||
}
|
||||
.areoi-more-menu.show .areoi-more-menu-main li a,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body.active > ul > li > a,
|
||||
.areoi-more-menu.show .areoi-more-menu-main li button,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body.active > ul > li > button {
|
||||
left: 0px;
|
||||
}
|
||||
}
|
||||
&.areoi-transition-right {
|
||||
.areoi-transition-move {
|
||||
left: 20px;
|
||||
|
||||
&.areoi-transition-visible {
|
||||
left: 0;
|
||||
}
|
||||
&.areoi-transition-invisible {
|
||||
left: 20px;
|
||||
}
|
||||
}
|
||||
.areoi-more-menu .areoi-more-menu-main li a,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body > ul > li > a,
|
||||
.areoi-more-menu .areoi-more-menu-main li button,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body > ul > li > button {
|
||||
left: 20px;
|
||||
}
|
||||
.areoi-more-menu.show .areoi-more-menu-main li a,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body.active > ul > li > a,
|
||||
.areoi-more-menu.show .areoi-more-menu-main li button,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body.active > ul > li > button {
|
||||
left: 0px;
|
||||
}
|
||||
}
|
||||
&.areoi-transition-shrink {
|
||||
.areoi-transition-move {
|
||||
transform: scale(2);
|
||||
|
||||
&.areoi-transition-visible {
|
||||
transform: scale(1);
|
||||
}
|
||||
&.areoi-transition-invisible {
|
||||
transform: scale(2);
|
||||
}
|
||||
}
|
||||
.areoi-more-menu .areoi-more-menu-main li a,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body > ul > li > a,
|
||||
.areoi-more-menu .areoi-more-menu-main li button,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body > ul > li > button {
|
||||
transform: scale(2);
|
||||
}
|
||||
.areoi-more-menu.show .areoi-more-menu-main li a,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body.active > ul > li > a,
|
||||
.areoi-more-menu.show .areoi-more-menu-main li button,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body.active > ul > li > button {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
&.areoi-transition-grow {
|
||||
.areoi-transition-move {
|
||||
transform: scale(0);
|
||||
|
||||
&.areoi-transition-visible {
|
||||
transform: scale(1);
|
||||
}
|
||||
&.areoi-transition-invisible {
|
||||
transform: scale(0);
|
||||
}
|
||||
}
|
||||
.areoi-more-menu .areoi-more-menu-main li a,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body > ul > li > a,
|
||||
.areoi-more-menu .areoi-more-menu-main li button,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body > ul > li > button {
|
||||
transform: scale(0);
|
||||
}
|
||||
.areoi-more-menu.show .areoi-more-menu-main li a,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body.active > ul > li > a,
|
||||
.areoi-more-menu.show .areoi-more-menu-main li button,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body.active > ul > li > button {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
&.areoi-transition-blur {
|
||||
.areoi-transition {
|
||||
filter: blur(10px);
|
||||
|
||||
&.areoi-transition-visible {
|
||||
filter: blur(0px);
|
||||
}
|
||||
&.areoi-transition-invisible {
|
||||
filter: blur(10px);
|
||||
}
|
||||
}
|
||||
.areoi-more-menu .areoi-more-menu-main li a,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body > ul > li > a,
|
||||
.areoi-more-menu .areoi-more-menu-main li button,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body > ul > li > button {
|
||||
filter: blur(10px);
|
||||
}
|
||||
.areoi-more-menu.show .areoi-more-menu-main li a,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body.active > ul > li > a,
|
||||
.areoi-more-menu.show .areoi-more-menu-main li button,
|
||||
.areoi-more-menu .areoi-more-menu-main ul .offcanvas-body.active > ul > li > button {
|
||||
filter: blur(0px);
|
||||
}
|
||||
}
|
||||
main {
|
||||
.areoi-transition.areoi-background {
|
||||
opacity: 0;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
&.areoi-transition-visible {
|
||||
opacity: 1;
|
||||
}
|
||||
&.areoi-transition-invisible {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.areoi-more-menu.show .areoi-more-menu-main li a,
|
||||
.areoi-more-menu.show .areoi-more-menu-main li button {
|
||||
transition: all 0.5s ease-in-out 0.3s;
|
||||
}
|
||||
@for $i from 2 through 30 {
|
||||
.areoi-more-menu.show .areoi-more-menu-main ul > li:nth-of-type(#{$i}) > button,
|
||||
.areoi-more-menu.show .areoi-more-menu-main ul > li:nth-of-type(#{$i}) > a {
|
||||
transition-delay: (0.3s + ( $i * 0.15s ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.has-areoi-hover-transition {
|
||||
main,
|
||||
.areoi-feature-menu {
|
||||
.areoi-has-url {
|
||||
transition: all 0.5s ease-in-out;
|
||||
position: relative;
|
||||
|
||||
&.btn {
|
||||
i {
|
||||
position: relative;
|
||||
left: 0;
|
||||
transition: all 0.25s ease-in-out;
|
||||
}
|
||||
}
|
||||
&:hover {
|
||||
transition: all 0.25s ease-in-out;
|
||||
|
||||
&.btn {
|
||||
i {
|
||||
left: 2.5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
&.areoi-hover-transition-up {
|
||||
main,
|
||||
.areoi-feature-menu {
|
||||
.areoi-has-url {
|
||||
top: 0;
|
||||
|
||||
&:hover {
|
||||
top: -10px;
|
||||
|
||||
&.areoi-has-url-small {
|
||||
top: -2.5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&.areoi-hover-transition-down {
|
||||
main,
|
||||
.areoi-feature-menu {
|
||||
.areoi-has-url {
|
||||
top: 0;
|
||||
|
||||
&:hover {
|
||||
top: 10px;
|
||||
|
||||
&.areoi-has-url-small {
|
||||
top: 2.5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&.areoi-hover-transition-left {
|
||||
main,
|
||||
.areoi-feature-menu {
|
||||
.areoi-has-url {
|
||||
left: 0;
|
||||
|
||||
&:hover {
|
||||
left: 10px;
|
||||
|
||||
&.areoi-has-url-small {
|
||||
left: 2.5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&.areoi-hover-transition-right {
|
||||
main,
|
||||
.areoi-feature-menu {
|
||||
.areoi-has-url {
|
||||
right: 0;
|
||||
|
||||
&:hover {
|
||||
right: 10px;
|
||||
|
||||
&.areoi-has-url-small {
|
||||
right: -2.5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&.areoi-hover-transition-grow {
|
||||
main,
|
||||
.areoi-feature-menu {
|
||||
.areoi-has-url {
|
||||
transform: scale( 1 );
|
||||
|
||||
&:hover {
|
||||
transform: scale( 1.05 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&.areoi-hover-transition-shrink {
|
||||
main,
|
||||
.areoi-feature-menu {
|
||||
.areoi-has-url {
|
||||
transform: scale( 1 );
|
||||
|
||||
&:hover {
|
||||
transform: scale( 0.95 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.areoi-parallax-component.areoi-transition-visible {
|
||||
transition: all 0.5s ease-in-out, transform 0s !important;
|
||||
}
|
||||
|
||||
&.has-areoi-frame {
|
||||
.areoi-frame {
|
||||
width: 20px;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 100;
|
||||
|
||||
svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
display: none;
|
||||
|
||||
&.areoi-frame-corner-right {
|
||||
left: auto;
|
||||
right: 20px;
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
.areoi-frame-right {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
.areoi-frame-top,
|
||||
.areoi-frame-bottom {
|
||||
width: 100%;
|
||||
height: 20px;
|
||||
|
||||
&.areoi-frame-bottom {
|
||||
top: auto;
|
||||
bottom: 0;
|
||||
|
||||
svg {
|
||||
top: auto;
|
||||
bottom: 20px;
|
||||
transform: rotate(-90deg);
|
||||
|
||||
&.areoi-frame-corner-right {
|
||||
left: auto;
|
||||
top: auto;
|
||||
right: 20px;
|
||||
bottom: 20px;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.offcanvas {
|
||||
height: calc(100vh - 40px);
|
||||
top: 20px;
|
||||
|
||||
.areoi-feature-menu {
|
||||
width: calc(100vw - 540px);
|
||||
}
|
||||
}
|
||||
.offcanvas.show {
|
||||
transform: translate( -20px, 0 );
|
||||
}
|
||||
|
||||
&.areoi-frame-square,
|
||||
&.areoi-frame-rounded,
|
||||
&.areoi-frame-square-lg,
|
||||
&.areoi-frame-rounded-lg,
|
||||
&.areoi-frame-sides-lg {
|
||||
padding: 20px;
|
||||
|
||||
.areoi-header-positioned {
|
||||
width: calc( 100% - 40px ) !important;
|
||||
top: 20px !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 992px) {
|
||||
&.areoi-frame-square-lg,
|
||||
&.areoi-frame-rounded-lg,
|
||||
&.areoi-frame-sides-lg {
|
||||
padding: 40px;
|
||||
|
||||
.areoi-frame {
|
||||
width: 40px;
|
||||
|
||||
svg {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
top: 40px;
|
||||
left: 40px;
|
||||
|
||||
&.areoi-frame-corner-right {
|
||||
left: auto;
|
||||
right: 40px;
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
.areoi-frame-top,
|
||||
.areoi-frame-bottom {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
|
||||
&.areoi-frame-bottom {
|
||||
top: auto;
|
||||
bottom: 0;
|
||||
|
||||
svg {
|
||||
top: auto;
|
||||
bottom: 40px;
|
||||
transform: rotate(-90deg);
|
||||
|
||||
&.areoi-frame-corner-right {
|
||||
left: auto;
|
||||
top: auto;
|
||||
right: 40px;
|
||||
bottom: 40px;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.areoi-header-positioned {
|
||||
width: calc( 100% - 80px ) !important;
|
||||
top: 40px !important;
|
||||
}
|
||||
.offcanvas {
|
||||
height: calc(100vh - 80px);
|
||||
top: 40px;
|
||||
|
||||
.areoi-feature-menu {
|
||||
width: calc(100vw - 580px);
|
||||
}
|
||||
}
|
||||
.offcanvas.show {
|
||||
transform: translate( -40px, 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
&.areoi-frame-rounded,
|
||||
&.areoi-frame-rounded-lg,
|
||||
&.areoi-frame-sides-lg {
|
||||
.areoi-frame {
|
||||
svg {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.areoi-frame-sides,
|
||||
&.areoi-frame-sides-lg {
|
||||
.areoi-frame-top,
|
||||
.areoi-frame-bottom {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
&.areoi-frame-sides {
|
||||
padding: 0 20px;
|
||||
|
||||
@media only screen and (min-width: 992px) {
|
||||
padding: 0 20px;
|
||||
}
|
||||
.areoi-header-positioned {
|
||||
width: calc( 100% - 40px ) !important;
|
||||
top: 0px !important;
|
||||
|
||||
@media only screen and (min-width: 992px) {
|
||||
width: calc( 100% - 40px ) !important;
|
||||
top: 0px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.areoi-frame-sides-lg {
|
||||
padding: 0 20px;
|
||||
|
||||
@media only screen and (min-width: 992px) {
|
||||
padding: 0 40px;
|
||||
}
|
||||
.areoi-header-positioned {
|
||||
width: calc( 100% - 40px ) !important;
|
||||
top: 0px !important;
|
||||
|
||||
@media only screen and (min-width: 992px) {
|
||||
width: calc( 100% - 80px ) !important;
|
||||
top: 0px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.areoi-drag-container {
|
||||
overflow: auto;
|
||||
cursor: grab;
|
||||
padding: 1rem 0 1rem 1rem;
|
||||
}
|
||||
.areoi-drag-container ul {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
cursor: grab;
|
||||
list-style: none;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
align-items: center;
|
||||
}
|
||||
.areoi-drag-container ul li {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
flex-basis: 400px;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.areoi-lightspeed-block {
|
||||
* {
|
||||
scrollbar-width: auto;
|
||||
scrollbar-color: rgba( #000, 0.2 ) rgba( #fff, 0.1 );
|
||||
}
|
||||
*::-webkit-scrollbar {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
}
|
||||
*::-webkit-scrollbar-track {
|
||||
background: rgba( #fff, 0.1 );
|
||||
}
|
||||
*::-webkit-scrollbar-thumb {
|
||||
background-color: rgba( #000, 0.2 );
|
||||
border-radius: 10px;
|
||||
border: 1px solid rgba( #fff, 0.1 );
|
||||
}
|
||||
}
|
||||
|
||||
.areoi-square-spacer {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
}
|
||||
.areoi-media-col {
|
||||
|
||||
.areoi-media-col-content {
|
||||
position: relative;
|
||||
}
|
||||
img,
|
||||
video {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
object-fit: cover;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
&.areoi-media-col-contain {
|
||||
img,
|
||||
video {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
object-fit: contain;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.areoi-lightspeed-content-with-items {
|
||||
.areoi-media-col {
|
||||
&.areoi-media-col-contain {
|
||||
|
||||
svg {
|
||||
display: none;
|
||||
}
|
||||
img,
|
||||
video {
|
||||
object-fit: unset;
|
||||
max-width: 100%;
|
||||
width: auto !important;
|
||||
height: 60px !important;
|
||||
max-height: 70px;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.text-center {
|
||||
.areoi-media-col-contain {
|
||||
img,
|
||||
video {
|
||||
top: 0;
|
||||
left: 50%;
|
||||
transform: translate( -50%, 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
.text-end {
|
||||
.areoi-media-col-contain {
|
||||
img,
|
||||
video {
|
||||
top: 0;
|
||||
left: auto;
|
||||
right: 0;
|
||||
transform: translate( 0, 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
.areoi-content-item-with-background {
|
||||
min-height: 400px;
|
||||
padding: var(--bs-gutter-x, 1.5rem);
|
||||
padding-top: 8rem;
|
||||
|
||||
.areoi-media-col {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
opacity: 0.3;
|
||||
}
|
||||
}
|
||||
|
||||
.areoi-heading-icon {
|
||||
img, svg {
|
||||
max-height: 35px;
|
||||
width: auto;
|
||||
display: inline-block !important;
|
||||
}
|
||||
}
|
||||
.areoi-heading-divider-basic,
|
||||
.areoi-heading-divider-basic-top {
|
||||
width: 75px;
|
||||
height: 1px;
|
||||
display: inline-block;
|
||||
border-top: 2px solid #fff;
|
||||
}
|
||||
.areoi-heading-divider-wide,
|
||||
.areoi-heading-divider-wide-top {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
display: inline-block;
|
||||
border-top: 1px solid #fff;
|
||||
}
|
||||
.areoi-heading-divider-dotted,
|
||||
.areoi-heading-divider-dotted-top {
|
||||
width: 50px;
|
||||
height: 1px;
|
||||
display: inline-block;
|
||||
border-top: 5px dotted #fff;
|
||||
}
|
||||
|
||||
&.has-areoi-background-transition {
|
||||
.areoi-background,
|
||||
.areoi-background__color {
|
||||
transition: background-color 0.25s ease-in-out;
|
||||
}
|
||||
}
|
||||
&.has-areoi-gallery {
|
||||
.areoi-lightspeed-block {
|
||||
img,
|
||||
video {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
#areoi-gallery {
|
||||
img,
|
||||
video {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
width: auto;
|
||||
height: auto;
|
||||
display: block;;
|
||||
}
|
||||
.carousel {
|
||||
padding: 0 calc( 1rem + 52px );
|
||||
}
|
||||
.carousel-control-prev,
|
||||
.carousel-control-next {
|
||||
background-color: rgba( 255, 255, 255, 0.1 );
|
||||
width: 52px;
|
||||
transition: all 0.25s ease-in-out;
|
||||
|
||||
&:hover {
|
||||
background-color: rgba( 255, 255, 255, 1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"apiVersion": 2,
|
||||
"name": "areoi-lightspeed/call-to-action",
|
||||
"title": "Call to Action",
|
||||
"parent": null,
|
||||
"category": "areoi-lightspeed",
|
||||
"description": "",
|
||||
"textdomain": "default",
|
||||
"keywords": [ "areoi", "lightspeed" ],
|
||||
"example": {},
|
||||
"attributes": {},
|
||||
"supports": {
|
||||
"anchor": true,
|
||||
"align": false,
|
||||
"html": false,
|
||||
"lightspeed_background": true,
|
||||
"lightspeed_content": true
|
||||
},
|
||||
"editorScript": "",
|
||||
"editorStyle": "",
|
||||
"style": ""
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$styles = '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center">
|
||||
<div class="col">
|
||||
|
||||
<div class="row justify-content-<?php echo lightspeed_get_attribute( 'alignment', 'center' ) ?>">
|
||||
<div class="col-md-10 col-lg-8 col-xl-6">
|
||||
|
||||
<?php lightspeed_content( 2, 'center', 'col' ) ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"apiVersion": 2,
|
||||
"name": "areoi-lightspeed/contact",
|
||||
"title": "Contact",
|
||||
"parent": null,
|
||||
"category": "areoi-lightspeed",
|
||||
"description": "",
|
||||
"textdomain": "default",
|
||||
"keywords": [ "areoi", "lightspeed" ],
|
||||
"example": {},
|
||||
"attributes": {
|
||||
"form_id": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"company_address": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"company_phone": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"company_email": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
|
||||
"social_facebook": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"social_twitter": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"social_instagram": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"social_youtube": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"social_linkedin": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"social_tiktok": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"social_pinterest": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
"anchor": true,
|
||||
"align": false,
|
||||
"html": false,
|
||||
"lightspeed_background": true,
|
||||
"lightspeed_content": true
|
||||
},
|
||||
"editorScript": "",
|
||||
"editorStyle": "",
|
||||
"style": ""
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
$styles = '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center justify-content-between">
|
||||
|
||||
<div class="col-lg-6 col-xxl-5 <?php echo lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'order-lg-1' : '' ?>">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col' ) ?>
|
||||
|
||||
<?php lightspeed_contact( lightspeed_get_attribute( 'introduction_color', lightspeed_get_default_color( 'text' ) ), 'mb-2' ) ?>
|
||||
|
||||
<?php lightspeed_social( lightspeed_get_attribute( 'introduction_color', lightspeed_get_default_color( 'text' ) ) ) ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 areoi-hero-media areoi-form <?php lightspeed_attribute( 'heading_color', lightspeed_get_default_color( 'text' ) ) ?>">
|
||||
<?php if ( lightspeed_get_attribute( 'form_id', null ) && function_exists('Ninja_Forms' ) ) : ?>
|
||||
<div class="h1 d-lg-none"></div>
|
||||
<?php if ( !empty( $_GET['context'] ) && $_GET['context'] == 'edit' ) : ?>
|
||||
<div class="areoi-form-placeholder <?php echo lightspeed_get_default_color( 'bg' ) ?>">
|
||||
<?php lightspeed_square_spacer() ?>
|
||||
<p class="<?php echo lightspeed_get_default_color( 'text', lightspeed_get_default_color( 'bg' ) ) ?>">Your form will be displayed here.<br>
|
||||
Preview your page to view the live form.</p>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<?php Ninja_Forms()->display( absint( lightspeed_get_attribute( 'form_id', null ) ), true ); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"apiVersion": 2,
|
||||
"name": "areoi-lightspeed/content-with-items",
|
||||
"title": "Content with Items",
|
||||
"parent": null,
|
||||
"category": "areoi-lightspeed",
|
||||
"description": "",
|
||||
"textdomain": "default",
|
||||
"keywords": [ "areoi", "lightspeed" ],
|
||||
"example": {},
|
||||
"attributes": {
|
||||
"media_shape": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"media_fit": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
"anchor": true,
|
||||
"align": false,
|
||||
"html": false,
|
||||
"lightspeed_background": true,
|
||||
"lightspeed_content": true,
|
||||
"lightspeed_items": true
|
||||
},
|
||||
"editorScript": "",
|
||||
"editorStyle": "",
|
||||
"style": ""
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
$styles = '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="row justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'content_alignment' ) ?>">
|
||||
<div class="col">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col-lg-6 col-xl-5' ) ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row row-cols-1 row-cols-md-2 justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'content_alignment' ) ?> <?php echo 'text-' . lightspeed_get_attribute( 'content_alignment', 'start' ) ?>">
|
||||
|
||||
<?php foreach ( lightspeed_get_attribute( 'items', array() ) as $item_key => $item ) : ?>
|
||||
<div class="col mb-4 position-relative">
|
||||
<?php lightspeed_item( $item, false, false, true ) ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
$styles = '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="row justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'content_alignment' ) ?>">
|
||||
<div class="col">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col-lg-6 col-xl-5' ) ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row row-cols-1 row-cols-md-2 justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'content_alignment' ) ?> <?php echo 'text-' . lightspeed_get_attribute( 'content_alignment', 'start' ) ?>">
|
||||
|
||||
<?php foreach ( lightspeed_get_attribute( 'items', array() ) as $item_key => $item ) : ?>
|
||||
<div class="col mb-4 position-relative">
|
||||
<?php lightspeed_item( $item ) ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
$styles = '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="row justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'content_alignment' ) ?>">
|
||||
<div class="col">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col-lg-6 col-xl-5' ) ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'content_alignment' ) ?> <?php echo 'text-' . lightspeed_get_attribute( 'content_alignment', 'start' ) ?>">
|
||||
|
||||
<?php foreach ( lightspeed_get_attribute( 'items', array() ) as $item_key => $item ) : ?>
|
||||
<div class="col mb-4 position-relative">
|
||||
<?php lightspeed_item( $item, false, false, true ) ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
$styles = '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="row justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'content_alignment' ) ?>">
|
||||
<div class="col">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col-lg-6 col-xl-5' ) ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'content_alignment' ) ?> <?php echo 'text-' . lightspeed_get_attribute( 'content_alignment', 'start' ) ?>">
|
||||
|
||||
<?php foreach ( lightspeed_get_attribute( 'items', array() ) as $item_key => $item ) : ?>
|
||||
<div class="col mb-4 position-relative">
|
||||
<?php lightspeed_item( $item ) ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .accordion-item {
|
||||
background: none;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .accordion-button {
|
||||
background: none;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .accordion-button:not(.collapsed,:focus) {
|
||||
box-shadow: none;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 1px;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .accordion-body :last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .accordion-button:after {
|
||||
display: none;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .accordion-button .bi-chevron-down {
|
||||
flex-shrink: 0;
|
||||
font-size: 22px;
|
||||
margin-left: auto !important;
|
||||
transition: transform 0.2s ease-in-out;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .accordion-button:not(.collapsed) .bi-chevron-down {
|
||||
transform: rotate( 180deg );
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center <?php echo lightspeed_has_content() ? 'justify-content-between' : 'justify-content-center' ?>">
|
||||
|
||||
<?php if ( lightspeed_has_content() ) : ?>
|
||||
<div class="col-lg-6 col-xl-5 <?php echo lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'order-lg-1' : '' ?>">
|
||||
<?php echo $attributes['content_alignment'] ?>
|
||||
<?php lightspeed_content( 2, 'start', 'col' ) ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( lightspeed_get_attribute( 'items', array() ) ) : ?>
|
||||
<div class="col-lg-6">
|
||||
|
||||
<?php lightspeed_accordion( lightspeed_get_attribute( 'items', array() ) ) ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
$styles = '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="row justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'content_alignment' ) ?>">
|
||||
<div class="col">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col-lg-6 col-xl-5' ) ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-4 justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'content_alignment' ) ?> <?php echo 'text-' . lightspeed_get_attribute( 'content_alignment', 'start' ) ?>">
|
||||
|
||||
<?php foreach ( lightspeed_get_attribute( 'items', array() ) as $item_key => $item ) : ?>
|
||||
<div class="col mb-4 position-relative">
|
||||
|
||||
<?php lightspeed_item( $item, false, false, true ) ?>
|
||||
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
$styles = '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="row justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'content_alignment' ) ?>">
|
||||
<div class="col">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col-lg-6 col-xl-5' ) ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-4 justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'content_alignment' ) ?> <?php echo 'text-' . lightspeed_get_attribute( 'content_alignment', 'start' ) ?>">
|
||||
|
||||
<?php foreach ( lightspeed_get_attribute( 'items', array() ) as $item_key => $item ) : ?>
|
||||
<div class="col mb-4 position-relative">
|
||||
|
||||
<?php lightspeed_item( $item ) ?>
|
||||
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
$styles = '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center">
|
||||
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<?php if ( lightspeed_has_content() ) : ?>
|
||||
<div class="align-self-start col-lg-6 col-xl-5 areoi-col-content <?php echo lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'offset-xxl-1 order-lg-1' : '' ?> position-sticky" style="top: 100px;">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col' ) ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="<?php echo lightspeed_has_content() ? 'col-lg-6' : 'col' ?> <?php echo lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? '' : 'offset-xl-1' ?>">
|
||||
<div class="row row-cols-1 row-cols-md-2 <?php echo lightspeed_has_content() ? '' : 'row-cols-lg-4' ?> areoi-parallax-component">
|
||||
<?php foreach ( lightspeed_get_attribute( 'items', array() ) as $item_key => $item ) : ?>
|
||||
<div class="col mb-4 position-relative">
|
||||
<?php lightspeed_item( $item ) ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media {
|
||||
position: relative;
|
||||
}
|
||||
@media only screen and (min-width: ' . areoi2_get_option( 'areoi-layout-grid-grid-breakpoint-lg', '992px' ) . ') {
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media {
|
||||
position: absolute;
|
||||
' . (lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'left' : 'right') . ': 0
|
||||
}
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100">
|
||||
<div class="row h-100 align-items-center">
|
||||
|
||||
<div class="col-lg-6 col-xl-5 position-relative <?php echo lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'offset-lg-6 offset-xxl-7' : '' ?>">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col' ) ?>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-lg-6 p-0 areoi-hero-media <?php echo lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? '' : 'offset-xxl-1' ?>">
|
||||
<div class="areoi-drag-container">
|
||||
<ul>
|
||||
<?php foreach ( lightspeed_get_attribute( 'items', array() ) as $item_key => $item ) : ?>
|
||||
<li class=" position-relative">
|
||||
<?php if ( !empty( lightspeed_get_attribute( 'media_position', null ) ) && lightspeed_get_attribute( 'media_position', null ) == 'background' ) : ?>
|
||||
<?php lightspeed_item_with_background( $item ) ?>
|
||||
<?php else : ?>
|
||||
<?php lightspeed_item( $item ) ?>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .nav-link.active {
|
||||
border-bottom-color: ' . lightspeed_get_theme_color( lightspeed_get_attribute( 'background_utility', null ) ) . ' !important;
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'content_alignment' ) ?>">
|
||||
|
||||
<div class="col-lg-6 col-xl-5 <?php echo lightspeed_get_attribute( 'alignment', 'center' ) == 'center' ? 'text-center' : '' ?>">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col' ) ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if ( lightspeed_get_attribute( 'items', array() ) ) : ?>
|
||||
<div class="col-12">
|
||||
|
||||
<?php lightspeed_tabs( lightspeed_get_attribute( 'items', array() ), 'square', 'full' ) ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .nav-link.active {
|
||||
text-decoration: underline;
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'content_alignment' ) ?>">
|
||||
|
||||
<div class="<?php echo lightspeed_get_attribute( 'alignment', 'center' ) == 'center' ? 'text-center' : '' ?>">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col-lg-6 col-xl-5' ) ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if ( lightspeed_get_attribute( 'items', array() ) ) : ?>
|
||||
<div class="col-12">
|
||||
|
||||
<?php lightspeed_tabs_vertical( lightspeed_get_attribute( 'items', array() ) ) ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .nav-link.active {
|
||||
border-bottom-color: ' . lightspeed_get_theme_color( lightspeed_get_attribute( 'background_utility', null ) ) . ' !important;
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center justify-content-between">
|
||||
|
||||
<div class="col-lg-6 col-xl-5 <?php echo lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'order-lg-1' : '' ?>">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col' ) ?>
|
||||
</div>
|
||||
|
||||
<?php if ( lightspeed_get_attribute( 'items', array() ) ) : ?>
|
||||
<div class="col-lg-6">
|
||||
|
||||
<?php lightspeed_tabs( lightspeed_get_attribute( 'items', array() ) ) ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-timeline {
|
||||
position: relative;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-timeline:before {
|
||||
content: "";
|
||||
background: ' . lightspeed_get_default_color( 'hex' ) . ';
|
||||
width: 3px;
|
||||
border-radius: 50px;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
transform: translate( -50%, 0 );
|
||||
opacity: 0.1;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-timeline-row {
|
||||
position: relative;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-timeline-row:before {
|
||||
content: "";
|
||||
background: ' . lightspeed_get_theme_color( lightspeed_get_attribute( 'heading_color', lightspeed_get_default_color( 'hex' ) ) ) . ';
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate( -50%, -50% );
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="row justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'content_alignment' ) ?>">
|
||||
<div class="col-lg-6 col-xl-5">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col' ) ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="areoi-timeline">
|
||||
<?php foreach ( lightspeed_get_attribute( 'items', array() ) as $item_key => $item ) : ?>
|
||||
<div class="areoi-timeline-row row row-cols-1 align-items-center position-relative">
|
||||
|
||||
<div class="col col-md-4 <?php echo $item_key % 2 == 0 ? 'order-md-1 offset-md-2' : 'text-md-end offset-md-1' ?>">
|
||||
<?php lightspeed_heading( 3, $item ) ?>
|
||||
|
||||
<?php lightspeed_introduction( $item ) ?>
|
||||
|
||||
<?php lightspeed_cta( $item ) ?>
|
||||
</div>
|
||||
|
||||
<div class="col col-md-5 <?php echo $item_key % 2 == 0 ? '' : 'offset-md-2' ?>">
|
||||
<div class="<?php lightspeed_media_col_class() ?> rounded overflow-hidden">
|
||||
<div class="areoi-media-col-content">
|
||||
<?php lightspeed_square_spacer() ?>
|
||||
<?php echo lightspeed_get_media( $item ) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"apiVersion": 2,
|
||||
"name": "areoi-lightspeed/content-with-media",
|
||||
"title": "Content with Media",
|
||||
"parent": null,
|
||||
"category": "areoi-lightspeed",
|
||||
"description": "",
|
||||
"textdomain": "default",
|
||||
"keywords": [ "areoi", "lightspeed" ],
|
||||
"example": {},
|
||||
"attributes": {
|
||||
"media_shape": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"media_fit": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
"anchor": true,
|
||||
"align": false,
|
||||
"html": false,
|
||||
"lightspeed_background": true,
|
||||
"lightspeed_content": true,
|
||||
"lightspeed_gallery": true
|
||||
},
|
||||
"editorScript": "",
|
||||
"editorStyle": "",
|
||||
"style": ""
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
$styles = '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
|
||||
<div class="row h-100 align-items-center justify-content-between">
|
||||
|
||||
<div class="col-lg-6 col-xl-5 <?php echo lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'order-lg-1' : '' ?>">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col' ) ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 areoi-hero-media">
|
||||
|
||||
<div id="<?php lightspeed_block_id() ?>-media-carousel" class="carousel slide" data-bs-ride="carousel">
|
||||
|
||||
<?php if ( count( lightspeed_get_attribute( 'gallery', array() ) ) > 1 ) : ?>
|
||||
<div class="carousel-indicators">
|
||||
<?php foreach ( lightspeed_get_attribute( 'gallery', array() ) as $gallery_key => $media ) : ?>
|
||||
<button
|
||||
type="button"
|
||||
data-bs-target="#<?php lightspeed_block_id() ?>-media-carousel"
|
||||
data-bs-slide-to="<?php echo $gallery_key ?>"
|
||||
class="<?php echo $gallery_key == 0 ? 'active' : '' ?>"
|
||||
aria-current="true"
|
||||
aria-label="Slide <?php echo $gallery_key + 1 ?>"
|
||||
></button>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="carousel-inner <?php echo lightspeed_get_attribute( 'media_fit', 'cover' ) != 'contain' ? 'areoi-has-mask' : '' ?> rounded overflow-hidden">
|
||||
<?php foreach ( lightspeed_get_attribute( 'gallery', array() ) as $gallery_key => $media ) : ?>
|
||||
<div class="carousel-item <?php echo $gallery_key == 0 ? 'active' : '' ?>">
|
||||
<div class="<?php lightspeed_media_col_class() ?>">
|
||||
<div class="areoi-media-col-content">
|
||||
<?php lightspeed_spacer( lightspeed_get_attribute( 'media_shape', 'square' ) ) ?>
|
||||
<?php if ( $media['type'] == 'image' ) : ?>
|
||||
<img src="<?php echo $media['url'] ?>" class="d-block img-fluid" alt="<?php echo $media['alt'] ?>" width="<?php echo $media['width'] ?>" height="<?php echo $media['height'] ?>">
|
||||
<?php else : ?>
|
||||
<video src="<?php echo $media['url'] ?>" muted playsinline autoplay loop class="img-fluid"></video>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<?php if ( count( lightspeed_get_attribute( 'gallery', array() ) ) > 1 ) : ?>
|
||||
<button class="carousel-control-prev" type="button" data-bs-target="#<?php lightspeed_block_id() ?>-media-carousel" data-bs-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Previous</span>
|
||||
</button>
|
||||
<button class="carousel-control-next" type="button" data-bs-target="#<?php lightspeed_block_id() ?>-media-carousel" data-bs-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Next</span>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media {
|
||||
position: relative;
|
||||
}
|
||||
@media only screen and (min-width: ' . areoi2_get_option( 'areoi-layout-grid-grid-breakpoint-lg', '992px' ) . ') {
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media {
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
' . (lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'left' : 'right') . ': 0;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .carousel {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate( -50%, -50% );
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .carousel-inner,
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .carousel-item,
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .areoi-media-col,
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .areoi-media-col-content,
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .areoi-media-col svg {
|
||||
height: 100%;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .carousel-item img,
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .carousel-item video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .carousel-indicators {
|
||||
bottom: 75px;
|
||||
}
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100">
|
||||
<div class="row h-100 align-items-center justify-content-between <?php echo lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'justify-content-lg-end' : '' ?>">
|
||||
|
||||
<div class="col-lg-6 col-xl-5 text-center text-lg-start <?php echo lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'order-lg-1' : '' ?> position-relative">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col' ) ?>
|
||||
</div>
|
||||
|
||||
<?php if ( !empty( lightspeed_get_attribute( 'gallery', array() ) ) ) : ?>
|
||||
<div class="col-lg-6 areoi-hero-media areoi-parallax-none areoi-transition-none">
|
||||
<div class="h1 d-lg-none"></div>
|
||||
|
||||
<?php lightspeed_media_carousel( lightspeed_get_attribute( 'gallery', array() ), 'square', false ) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media {
|
||||
position: relative;
|
||||
}
|
||||
@media only screen and (min-width: ' . areoi2_get_option( 'areoi-layout-grid-grid-breakpoint-lg', '992px' ) . ') {
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media {
|
||||
position: absolute;
|
||||
' . (lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'left' : 'right') . ': 0;
|
||||
}
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100">
|
||||
<div class="row h-100 align-items-center justify-content-between <?php echo lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'justify-content-lg-end' : '' ?>">
|
||||
|
||||
<div class="col-lg-6 col-xl-5 text-center text-lg-start position-relative">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col' ) ?>
|
||||
|
||||
<?php if ( lightspeed_get_attribute( 'include_cta', false ) ) : ?>
|
||||
<div class="h1"></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ( !empty( lightspeed_get_attribute( 'gallery', array() ) ) ) : ?>
|
||||
<div class="col-lg-6 areoi-hero-media p-0">
|
||||
<div class="h1 d-lg-none"></div>
|
||||
|
||||
<div class="areoi-drag-container">
|
||||
<ul>
|
||||
<?php foreach ( lightspeed_get_attribute( 'gallery', array() ) as $media_key => $media ) : ?>
|
||||
<li>
|
||||
<div class="<?php lightspeed_media_col_class() ?> rounded overflow-hidden">
|
||||
<div class="areoi-media-col-content">
|
||||
<?php lightspeed_square_spacer() ?>
|
||||
<?php if ( $media['type'] == 'image' ) : ?>
|
||||
<img src="<?php echo $media['url'] ?>" class="d-block img-fluid" alt="<?php echo $media['alt'] ?>" width="<?php echo $media['width'] ?>" height="<?php echo $media['height'] ?>">
|
||||
<?php else : ?>
|
||||
<video src="<?php echo $media['url'] ?>" muted playsinline autoplay loop class="img-fluid"></video>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php //lightspeed_stretched_link() ?>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media {
|
||||
position: relative;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media img,
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media video {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-container-content > .row {
|
||||
height: auto;
|
||||
min-height: unset !important;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media {
|
||||
margin: 0 0 -100px 0;
|
||||
}
|
||||
@media only screen and (min-width: ' . areoi2_get_option( 'areoi-layout-grid-grid-breakpoint-lg', '992px' ) . ') {
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media {
|
||||
margin: -' . $padding . 'px 0;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-col-content {
|
||||
position: sticky;
|
||||
top: 100px;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-container-content {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translate( -50%, 0 );
|
||||
z-index: 1;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-container-content > .row {
|
||||
height: calc( 100% - ' . $padding * 2 . 'px );
|
||||
}
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 areoi-container-content areoi-resize-container">
|
||||
<div class="row <?php echo lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'justify-content-end' : 'justify-content-start' ?> align-items-start ">
|
||||
|
||||
<div class="col-lg-6 col-xl-5 text-center text-lg-start areoi-col-content areoi-resize-content">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col' ) ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid h-100 position-relative">
|
||||
<div class="row h-100 <?php echo lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'justify-content-start' : 'justify-content-end' ?> align-items-start">
|
||||
|
||||
<?php if ( !empty( lightspeed_get_attribute( 'gallery', array() ) ) ) : ?>
|
||||
<div class="col-lg-6 areoi-hero-media p-0 areoi-resize-media">
|
||||
|
||||
<div class="rounded overflow-hidden">
|
||||
<?php foreach ( lightspeed_get_attribute( 'gallery', array() ) as $gallery_key => $media ) : ?>
|
||||
<div class="">
|
||||
<div>
|
||||
<div class="areoi-media-col-content">
|
||||
<?php if ( $media['type'] == 'image' ) : ?>
|
||||
<img src="<?php echo $media['url'] ?>" class="d-block img-fluid" alt="<?php echo $media['alt'] ?>" width="<?php echo $media['width'] ?>" height="<?php echo $media['height'] ?>">
|
||||
<?php else : ?>
|
||||
<video src="<?php echo $media['url'] ?>" muted playsinline autoplay loop class="img-fluid"></video>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media {
|
||||
position: relative;
|
||||
}
|
||||
@media only screen and (min-width: ' . areoi2_get_option( 'areoi-layout-grid-grid-breakpoint-lg', '992px' ) . ') {
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-col-content {
|
||||
position: sticky;
|
||||
top: 100px;
|
||||
}
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 justify-content-between align-items-start">
|
||||
|
||||
<div class="col-lg-6 col-xl-5 <?php echo lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'order-lg-1' : '' ?> text-center text-lg-start areoi-col-content">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col' ) ?>
|
||||
|
||||
<?php if ( lightspeed_get_attribute( 'include_cta', false ) ) : ?>
|
||||
<div class="h1"></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ( !empty( lightspeed_get_attribute( 'gallery', array() ) ) ) : ?>
|
||||
<div class="col-lg-6 areoi-hero-media">
|
||||
<div class="h1 d-lg-none"></div>
|
||||
|
||||
<div class="rounded overflow-hidden">
|
||||
<?php foreach ( lightspeed_get_attribute( 'gallery', array() ) as $gallery_key => $media ) : ?>
|
||||
<div class="">
|
||||
<div>
|
||||
<div class="areoi-media-col-content">
|
||||
<?php if ( $media['type'] == 'image' ) : ?>
|
||||
<img src="<?php echo $media['url'] ?>" class="d-block img-fluid" alt="<?php echo $media['alt'] ?>" width="<?php echo $media['width'] ?>" height="<?php echo $media['height'] ?>">
|
||||
<?php else : ?>
|
||||
<video src="<?php echo $media['url'] ?>" muted playsinline autoplay loop class="img-fluid"></video>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php //lightspeed_stretched_link() ?>
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"apiVersion": 2,
|
||||
"name": "areoi-lightspeed/footer",
|
||||
"title": "Footer",
|
||||
"parent": null,
|
||||
"category": "areoi-lightspeed",
|
||||
"description": "",
|
||||
"textdomain": "default",
|
||||
"keywords": [ "areoi", "lightspeed" ],
|
||||
"example": {},
|
||||
"attributes": {},
|
||||
"supports": {
|
||||
"anchor": true,
|
||||
"align": false,
|
||||
"html": false,
|
||||
"lightspeed_footer": true
|
||||
},
|
||||
"editorScript": "",
|
||||
"editorStyle": "",
|
||||
"style": ""
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
<?php
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-footer .areoi-footer-container {
|
||||
padding-top: ' . $first_padding . 'px;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-footer .dropdown-menu {
|
||||
background: ' . lightspeed_get_theme_color( 'bg-light' ) . ';
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-footer .dropdown-menu a {
|
||||
color: ' . lightspeed_get_theme_color( 'bg-dark' ) . ';
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-footer .dropdown button {
|
||||
transition: all 0.25s ease-in-out;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-footer .dropdown button.show {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-footer .areoi-top-bar,
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-footer .areoi-bottom-bar {
|
||||
padding: ' . $padding . 'px 0;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-footer .areoi-menu-bar {
|
||||
padding: ' . ( $padding * 2 ) . 'px 0;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-footer ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-footer ul:not(.sub-menu, .dropdown-menu) {
|
||||
display: flex;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-footer ul:not(.sub-menu, .dropdown-menu) li {
|
||||
padding: 0 15px 5px 0;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-footer button {
|
||||
background: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-footer .areoi-top-bar img,
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-footer .areoi-top-bar svg {
|
||||
max-height: ' . lightspeed_get_attribute( 'logo_height', '50' ) . 'px;
|
||||
max-width: 180px;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-footer,
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-footer a:not(.dropdown-menu a),
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-footer button {
|
||||
color: ' . lightspeed_get_theme_color( lightspeed_get_attribute( 'main_text', lightspeed_get_default_color( 'bg', lightspeed_get_attribute( 'main_background', 'bg-body' ) ) ) ) . ';
|
||||
}
|
||||
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-footer .areoi-menu-bar ul li:not(.sub-menu li) {
|
||||
margin-bottom: 20px;
|
||||
padding: 0;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-footer .areoi-menu-bar ul a:not(.sub-menu a) {
|
||||
font-size: 1.4em;
|
||||
}
|
||||
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-footer .areoi-bottom-bar ul li:not(.dropdown-menu li) {
|
||||
padding: 0 10px;
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="areoi-footer-container <?php lightspeed_attribute( 'main_background' ) ?>">
|
||||
<?php if ( !lightspeed_get_attribute( 'exclude_top_bar', false ) ) : ?>
|
||||
<div class="areoi-top-bar">
|
||||
<div class="<?php lightspeed_attribute( 'container', 'container' ) ?>">
|
||||
<div class="row row-cols-1 row-cols-md-2 text-center text-md-start align-items-center justify-content-center justify-content-md-between">
|
||||
<div class="col">
|
||||
<a class="h-100" href="<?php echo home_url() ?>" title="<?php echo get_bloginfo( 'name' ) ?>">
|
||||
<?php lightspeed_logo( lightspeed_get_default_color( 'logo', lightspeed_get_attribute( 'main_background' ) ) ) ?>
|
||||
|
||||
<?php if ( !lightspeed_get_attribute( 'exclude_social', false ) ) : ?>
|
||||
<div class="h1 d-block d-md-none"></div>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php if ( !lightspeed_get_attribute( 'exclude_social', false ) ) : ?>
|
||||
<div class="col d-flex justify-content-center justify-content-md-end">
|
||||
<?php lightspeed_social( null, 'end' ) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="areoi-menu-bar">
|
||||
<div class="<?php lightspeed_attribute( 'container', 'container' ) ?>">
|
||||
<div class="row row-cols-1 row-cols-md-2">
|
||||
<?php if ( has_nav_menu( 'footer-menu' ) ) : ?>
|
||||
<div class="col flex-grow-1">
|
||||
<?php wp_nav_menu( array( 'theme_location' => 'footer-menu', 'menu_class' => 'row row-cols-1 text-center row-cols-md-2 text-md-start row-cols-lg-3' ) ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( !lightspeed_get_attribute( 'exclude_company', false ) && lightspeed_has_contact() ) : ?>
|
||||
<div class="col text-center <?php echo has_nav_menu( 'footer-menu' ) ? 'text-md-end col-lg-3' : 'text-md-start' ?>">
|
||||
<div class="h1 d-block d-md-none"></div>
|
||||
<p class="h3 mb-2"><?php _e( 'Contact Details' ) ?></p>
|
||||
<?php lightspeed_contact( '', 'mb-2', true, ( has_nav_menu( 'footer-menu' ) ? true : false ), true ) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="areoi-bottom-bar">
|
||||
<div class="<?php lightspeed_attribute( 'container', 'container' ) ?>">
|
||||
<div class="row row-cols-1 row-cols-md-2 align-items-center justify-content-center justify-content-md-between small">
|
||||
<div class="col text-center text-md-start">
|
||||
<p class="mb-2 mb-md-0">
|
||||
<?php _e( 'Copyright ' ) ?>© <?php echo date( 'Y' ) ?> <?php echo areoi2_get_option( 'areoi-lightspeed-company-name', get_bloginfo( 'name' ) ) ?>
|
||||
|
||||
<?php if ( areoi2_get_option( 'areoi-lightspeed-company-number', null ) ) : ?>
|
||||
<br>Company No. <?php echo areoi2_get_option( 'areoi-lightspeed-company-number', null ) ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( areoi2_get_option( 'areoi-lightspeed-company-vat-number', null ) ) : ?>
|
||||
<br>VAT No. <?php echo areoi2_get_option( 'areoi-lightspeed-company-vat-number', null ) ?>
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col text-center text-md-end">
|
||||
<?php if ( has_nav_menu( 'bottom-menu' ) ) : ?>
|
||||
<?php wp_nav_menu( array( 'theme_location' => 'bottom-menu', 'walker' => new AREOI_HAF_Walker_Nav_Menu_Primary, 'menu_class' => 'justify-content-center justify-content-md-end' ) ); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"apiVersion": 2,
|
||||
"name": "areoi-lightspeed/header",
|
||||
"title": "Header",
|
||||
"parent": null,
|
||||
"category": "areoi-lightspeed",
|
||||
"description": "",
|
||||
"textdomain": "default",
|
||||
"keywords": [ "areoi", "lightspeed" ],
|
||||
"example": {},
|
||||
"attributes": {},
|
||||
"supports": {
|
||||
"anchor": true,
|
||||
"align": false,
|
||||
"html": false,
|
||||
"lightspeed_header": true
|
||||
},
|
||||
"editorScript": "",
|
||||
"editorStyle": "",
|
||||
"style": ""
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
$styles = '';
|
||||
$scripts = '';
|
||||
|
||||
include( AREOI__PLUGIN_LIGHTSPEED_DIR . 'partials/header.php' );
|
||||
|
||||
$styles .= '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="areoi-header-container <?php lightspeed_attribute( 'position' ) ?> top-0 w-100">
|
||||
|
||||
<?php lightspeed_header_top_bar() ?>
|
||||
|
||||
<div class="areoi-menu-bar <?php lightspeed_attribute( 'main_background' ) ?> <?php lightspeed_attribute( 'main_border' ) ?>">
|
||||
<div class="<?php lightspeed_attribute( 'container', 'container' ) ?>">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
|
||||
<div class="col">
|
||||
<?php if ( has_nav_menu( 'primary-menu' ) || has_nav_menu( 'more-menu' ) ) : ?>
|
||||
<button data-bs-target="#modal-menu-<?php echo lightspeed_get_block_id() ?>" data-bs-toggle="modal" aria-label="<?php _e( 'Open Full Menu' ) ?>">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>
|
||||
<span class="d-none d-sm-inline"><?php _e( 'Menu' ) ?></span>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="col text-center justify-self-center">
|
||||
<a class="h-100 d-block position-relative" href="<?php echo home_url() ?>" title="<?php echo get_bloginfo( 'name' ) ?>">
|
||||
<span class="areoi-menu-logo-default w-100 h-100 d-block"><?php lightspeed_logo( lightspeed_get_default_color( 'logo', lightspeed_get_attribute( 'main_background' ) ) ) ?></span>
|
||||
<span class="areoi-menu-logo-dark position-absolute top-0 start-0 w-100 h-100 d-block">
|
||||
<?php echo lightspeed_get_logo( lightspeed_get_attribute( 'logo', null ), 'dark' ) ?>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col text-end">
|
||||
<?php if ( !lightspeed_get_attribute( 'exclude_search', false ) ) : ?>
|
||||
<button data-bs-target="#modal-search-<?php echo lightspeed_get_block_id() ?>" data-bs-toggle="modal" aria-label="<?php _e( 'Open Search' ) ?>">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>
|
||||
<span class="d-none d-sm-inline"><?php _e( 'Search' ) ?></span>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php lightspeed_header_basic_modal( 'menu' ); ?>
|
||||
|
||||
<?php if ( !lightspeed_get_attribute( 'exclude_search', false ) ) : ?>
|
||||
<?php lightspeed_header_basic_modal( 'search' ); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $scripts ) : ?>
|
||||
<script><?php echo areoi_minify_js( $scripts ) ?></script>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
$styles = '';
|
||||
$scripts = '';
|
||||
|
||||
include( AREOI__PLUGIN_LIGHTSPEED_DIR . 'partials/header.php' );
|
||||
|
||||
$styles .= '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="areoi-header-container <?php lightspeed_attribute( 'position' ) ?> top-0 w-100">
|
||||
|
||||
<?php lightspeed_header_top_bar() ?>
|
||||
|
||||
<div class="areoi-menu-bar <?php lightspeed_attribute( 'main_background' ) ?> <?php lightspeed_attribute( 'main_border' ) ?>">
|
||||
<div class="<?php lightspeed_attribute( 'container', 'container' ) ?>">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
|
||||
<div class="col">
|
||||
<a class="h-100 d-block position-relative" href="<?php echo home_url() ?>" title="<?php echo get_bloginfo( 'name' ) ?>">
|
||||
<span class="areoi-menu-logo-default w-100 h-100 d-block"><?php lightspeed_logo( lightspeed_get_default_color( 'logo', lightspeed_get_attribute( 'main_background' ) ) ) ?></span>
|
||||
<span class="areoi-menu-logo-dark position-absolute top-0 start-0 w-100 h-100 d-block">
|
||||
<?php echo lightspeed_get_logo( lightspeed_get_attribute( 'logo', null ), 'dark' ) ?>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="d-none d-md-block col justify-self-center flex-grow-1">
|
||||
<?php wp_nav_menu( array(
|
||||
'theme_location' => 'primary-menu',
|
||||
'walker' => new AREOI_HAF_Walker_Nav_Menu_Primary,
|
||||
'menu_class' => 'areoi-more-menu'
|
||||
) ); ?>
|
||||
</div>
|
||||
|
||||
<div class="col text-end">
|
||||
|
||||
<?php if ( !lightspeed_get_attribute( 'exclude_search', false ) ) : ?>
|
||||
<button data-bs-target="#modal-search-<?php echo lightspeed_get_block_id() ?>" data-bs-toggle="modal" aria-label="<?php _e( 'Open Search' ) ?>">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>
|
||||
<span class="d-none d-sm-inline"></span>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( has_nav_menu( 'primary-menu' ) || has_nav_menu( 'more-menu' ) ) : ?>
|
||||
<button class="ms-2" data-bs-target="#modal-menu-<?php echo lightspeed_get_block_id() ?>" data-bs-toggle="modal" aria-label="<?php _e( 'Open Full Menu' ) ?>">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>
|
||||
<span class="d-none d-sm-inline"></span>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php lightspeed_header_basic_modal( 'menu' ); ?>
|
||||
|
||||
<?php if ( !lightspeed_get_attribute( 'exclude_search', false ) ) : ?>
|
||||
<?php lightspeed_header_basic_modal( 'search' ); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $scripts ) : ?>
|
||||
<script><?php echo areoi_minify_js( $scripts ) ?></script>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
$styles = '';
|
||||
$scripts = '';
|
||||
|
||||
include( AREOI__PLUGIN_LIGHTSPEED_DIR . 'partials/header.php' );
|
||||
|
||||
$styles .= '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="areoi-header-container <?php lightspeed_attribute( 'position' ) ?> top-0 w-100">
|
||||
|
||||
<?php lightspeed_header_top_bar() ?>
|
||||
|
||||
<div class="areoi-menu-bar <?php lightspeed_attribute( 'main_background' ) ?> <?php lightspeed_attribute( 'main_border' ) ?>">
|
||||
<div class="<?php lightspeed_attribute( 'container', 'container' ) ?>">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
|
||||
<div class="col">
|
||||
<a class="h-100 d-block position-relative" href="<?php echo home_url() ?>" title="<?php echo get_bloginfo( 'name' ) ?>">
|
||||
<span class="areoi-menu-logo-default w-100 h-100 d-block"><?php lightspeed_logo( lightspeed_get_default_color( 'logo', lightspeed_get_attribute( 'main_background' ) ) ) ?></span>
|
||||
<span class="areoi-menu-logo-dark position-absolute top-0 start-0 w-100 h-100 d-block">
|
||||
<?php echo lightspeed_get_logo( lightspeed_get_attribute( 'logo', null ), 'dark' ) ?>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col text-end">
|
||||
|
||||
<?php if ( !lightspeed_get_attribute( 'exclude_search', false ) ) : ?>
|
||||
<button data-bs-target="#modal-search-<?php echo lightspeed_get_block_id() ?>" data-bs-toggle="modal" aria-label="<?php _e( 'Open Search' ) ?>">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>
|
||||
<span class="d-none d-sm-inline"></span>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( has_nav_menu( 'primary-menu' ) || has_nav_menu( 'more-menu' ) ) : ?>
|
||||
<button class="ms-2" data-bs-target="#modal-menu-<?php echo lightspeed_get_block_id() ?>" data-bs-toggle="modal" aria-label="<?php _e( 'Open Full Menu' ) ?>">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>
|
||||
<span class="d-none d-sm-inline"></span>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php lightspeed_header_basic_modal( 'menu' ); ?>
|
||||
|
||||
<?php if ( !lightspeed_get_attribute( 'exclude_search', false ) ) : ?>
|
||||
<?php lightspeed_header_basic_modal( 'search' ); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $scripts ) : ?>
|
||||
<script><?php echo areoi_minify_js( $scripts ) ?></script>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"apiVersion": 2,
|
||||
"name": "areoi-lightspeed/hero",
|
||||
"title": "Hero",
|
||||
"parent": null,
|
||||
"category": "areoi-lightspeed",
|
||||
"description": "",
|
||||
"textdomain": "default",
|
||||
"keywords": [ "areoi", "lightspeed" ],
|
||||
"example": {},
|
||||
"attributes": {},
|
||||
"supports": {
|
||||
"anchor": true,
|
||||
"align": false,
|
||||
"html": false,
|
||||
"lightspeed_background": true,
|
||||
"lightspeed_content": true,
|
||||
"lightspeed_media": true
|
||||
},
|
||||
"editorScript": "",
|
||||
"editorStyle": "",
|
||||
"style": ""
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media {
|
||||
position: relative;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media {
|
||||
margin-bottom: -' . $mobile_padding . 'px;
|
||||
}
|
||||
@media only screen and (min-width: ' . areoi2_get_option( 'areoi-layout-grid-grid-breakpoint-lg', '992px' ) . ') {
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media {
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
' . (lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'left' : 'right') . ': 0;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .areoi-media-col,
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .areoi-media-col-content,
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .areoi-media-col svg {
|
||||
height: 100%;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media img,
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media video {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
object-fit: cover;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate( -50%, -50% );
|
||||
}
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100">
|
||||
<div class="row h-100 align-items-center justify-content-between <?php echo lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'justify-content-lg-end' : '' ?>">
|
||||
|
||||
<div class="col-lg-6 col-xl-5 text-center text-lg-start position-relative">
|
||||
|
||||
<?php lightspeed_content( 1, 'start', 'col' ) ?>
|
||||
</div>
|
||||
|
||||
<?php if ( lightspeed_get_attribute( 'video', null ) || lightspeed_get_attribute( 'image', null ) || ( lightspeed_get_attribute( 'is_post_image', null ) && get_post_thumbnail_id() ) ) : ?>
|
||||
<div class="col-lg-6 areoi-hero-media p-0 rounded overflow-hidden">
|
||||
<div class="h1 d-lg-none"></div>
|
||||
<div class="<?php lightspeed_media_col_class() ?>">
|
||||
<div class="areoi-media-col-content">
|
||||
<?php lightspeed_spacer( 'square' ) ?>
|
||||
<?php lightspeed_media() ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$primary = lightspeed_get_theme_color( 'primary' );
|
||||
$rgb = lightspeed_hex_to_rgb( $primary );
|
||||
$contrast = lightspeed_get_default_color( 'bg' );
|
||||
|
||||
$attributes['background_display'] = true;
|
||||
$attributes['background_utility'] = !empty( $attributes['background_utility'] ) ? $attributes['background_utility'] : $contrast;
|
||||
$attributes['background_image'] = lightspeed_get_attribute( 'image', null );
|
||||
$attributes['background_video'] = lightspeed_get_attribute( 'video', null );
|
||||
|
||||
$attributes['background_overlay'] = ( !empty( $attributes['background_overlay'] ) && $attributes['background_display_overlay'] ) ? $attributes['background_overlay'] : array('rgb' => array( 'r'=> $rgb['r'], 'g'=> $rgb['g'], 'b'=> $rgb['b'], 'a'=> '0.4' ) );
|
||||
$attributes['background_display_overlay'] = true;
|
||||
$attributes['exclude_pattern'] = true;
|
||||
|
||||
lightspeed_set_attribute( 'background_display', $attributes['background_display'] );
|
||||
lightspeed_set_attribute( 'background_utility', $attributes['background_utility'] );
|
||||
lightspeed_set_attribute( 'background_image', $attributes['background_image'] );
|
||||
lightspeed_set_attribute( 'background_video', $attributes['background_video'] );
|
||||
lightspeed_set_attribute( 'background_display_overlay', $attributes['background_display_overlay'] );
|
||||
lightspeed_set_attribute( 'background_overlay', $attributes['background_overlay'] );
|
||||
echo include( AREOI__PLUGIN_DIR . '/blocks/_partials/background.php' );
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php //lightspeed_stretched_link() ?>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media {
|
||||
margin-bottom: -' . $mobile_padding . 'px;
|
||||
}
|
||||
@media only screen and (min-width: ' . areoi2_get_option( 'areoi-layout-grid-grid-breakpoint-lg', '992px' ) . ') {
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center justify-content-between">
|
||||
|
||||
<div class="col-lg-6 col-xl-5 text-center text-lg-start <?php echo lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'order-lg-1' : '' ?>">
|
||||
|
||||
<?php lightspeed_content( 1, 'start', 'col' ) ?>
|
||||
</div>
|
||||
|
||||
<?php if ( lightspeed_get_attribute( 'video', null ) || lightspeed_get_attribute( 'image', null ) || ( lightspeed_get_attribute( 'is_post_image', null ) && get_post_thumbnail_id() ) ) : ?>
|
||||
<div class="col-lg-6 areoi-hero-media">
|
||||
<div class="h1 d-lg-none"></div>
|
||||
<div class="<?php lightspeed_media_col_class() ?> areoi-has-mask rounded overflow-hidden">
|
||||
<div class="areoi-media-col-content">
|
||||
<?php lightspeed_spacer( 'square' ) ?>
|
||||
<?php lightspeed_media() ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php //lightspeed_stretched_link() ?>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block ul {
|
||||
display: inline-block;
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
|
||||
$primary = lightspeed_get_theme_color( 'primary' );
|
||||
$rgb = lightspeed_hex_to_rgb( $primary );
|
||||
$contrast = lightspeed_get_default_color( 'bg' );
|
||||
|
||||
$attributes['background_display'] = true;
|
||||
$attributes['background_utility'] = !empty( $attributes['background_utility'] ) ? $attributes['background_utility'] : $contrast;
|
||||
$attributes['background_image'] = lightspeed_get_attribute( 'image', null );
|
||||
$attributes['background_video'] = lightspeed_get_attribute( 'video', null );
|
||||
|
||||
$attributes['background_overlay'] = ( !empty( $attributes['background_overlay'] ) && $attributes['background_display_overlay'] ) ? $attributes['background_overlay'] : array('rgb' => array( 'r'=> $rgb['r'], 'g'=> $rgb['g'], 'b'=> $rgb['b'], 'a'=> '0.8' ) );
|
||||
$attributes['background_display_overlay'] = true;
|
||||
|
||||
lightspeed_set_attribute( 'background_display', $attributes['background_display'] );
|
||||
lightspeed_set_attribute( 'background_utility', $attributes['background_utility'] );
|
||||
lightspeed_set_attribute( 'background_image', $attributes['background_image'] );
|
||||
lightspeed_set_attribute( 'background_video', $attributes['background_video'] );
|
||||
lightspeed_set_attribute( 'background_display_overlay', $attributes['background_display_overlay'] );
|
||||
lightspeed_set_attribute( 'background_overlay', $attributes['background_overlay'] );
|
||||
|
||||
echo include( AREOI__PLUGIN_DIR . '/blocks/_partials/background.php' );
|
||||
?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center">
|
||||
<div class="col">
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-lg-8 col-xl-6">
|
||||
<?php lightspeed_content( 1, 'center', 'col' ) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media {
|
||||
margin-bottom: -' . $mobile_padding . 'px;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block ul {
|
||||
display: inline-block;
|
||||
}
|
||||
@media only screen and (min-width: ' . areoi2_get_option( 'areoi-layout-grid-grid-breakpoint-lg', '992px' ) . ') {
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media {
|
||||
margin-bottom: -' . $padding . 'px;
|
||||
}
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center">
|
||||
<div class="col">
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-lg-8 col-xl-6">
|
||||
<?php lightspeed_content( 1, 'center', 'col' ) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ( lightspeed_get_attribute( 'video', null ) || lightspeed_get_attribute( 'image', null ) || ( lightspeed_get_attribute( 'is_post_image', null ) && get_post_thumbnail_id() ) ) : ?>
|
||||
<div class="row justify-content-center areoi-hero-media">
|
||||
<div class="col-md-12 col-lg-10">
|
||||
<div class="h1"></div>
|
||||
|
||||
<div class="<?php lightspeed_media_col_class() ?> rounded overflow-hidden">
|
||||
<div class="areoi-media-col-content">
|
||||
<div class="d-none d-lg-block"><?php lightspeed_spacer( 'rectangle' ) ?></div>
|
||||
<div class="d-lg-none"><?php lightspeed_spacer( 'square' ) ?></div>
|
||||
<?php lightspeed_media() ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,898 @@
|
||||
<?php
|
||||
require_once( AREOI__PLUGIN_LIGHTSPEED_DIR . 'classes/class.areoi.walker-nav-primary.php' );
|
||||
require_once( AREOI__PLUGIN_LIGHTSPEED_DIR . 'classes/class.areoi.walker-nav-feature.php' );
|
||||
require_once( AREOI__PLUGIN_LIGHTSPEED_DIR . 'classes/class.areoi.walker-nav-feature-carousel.php' );
|
||||
require_once( AREOI__PLUGIN_LIGHTSPEED_DIR . 'classes/class.areoi.walker-nav-more.php' );
|
||||
|
||||
function lightspeed_render_block( $block_type, $attributes, $content )
|
||||
{
|
||||
$attributes['block_type'] = $block_type;
|
||||
|
||||
if ( areoi2_get_option( 'areoi-lightspeed-company-include-lightspeed', false ) ) {
|
||||
|
||||
if ( isset( $attributes['image'] ) && empty( $attributes['image'] ) && empty( $attributes['video'] ) ) {
|
||||
$attributes['video'] = lightspeed_get_placeholder_videos( 'rand' );
|
||||
}
|
||||
if ( isset( $attributes['gallery'] ) && empty( $attributes['gallery'] ) ) {
|
||||
$images = lightspeed_get_placeholder_images( 'rand' );
|
||||
$videos = lightspeed_get_placeholder_videos( 'rand' );
|
||||
|
||||
$medias = [ $images, $videos ];
|
||||
shuffle( $medias );
|
||||
|
||||
$attributes['gallery'] = $medias;
|
||||
}
|
||||
}
|
||||
|
||||
global $lightspeed_block_order;
|
||||
|
||||
$is_editor = isset( $_GET['context'] ) && $_GET['context'] == 'edit';
|
||||
|
||||
if ( $is_editor ) {
|
||||
$post_id = sanitize_text_field( $_GET['post_id'] );
|
||||
$post_content = get_the_content( $post_id );
|
||||
$post_blocks = parse_blocks( $post_content );
|
||||
|
||||
$block_order = 1;
|
||||
$post_order = 1;
|
||||
foreach ( $post_blocks as $block_key => $block ) {
|
||||
if ( !empty( $block['attrs']['block_id'] ) && $block['attrs']['block_id'] == $attributes['block_id'] ) {
|
||||
$block_order = $post_order;
|
||||
}
|
||||
if ( !empty( $block['blockName'] ) ) {
|
||||
$post_order++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$block_order = $lightspeed_block_order;
|
||||
}
|
||||
|
||||
if ( !isset( $attributes['background_display'] ) || !$attributes['background_display'] ) {
|
||||
$attributes['background_display'] = true;
|
||||
$attributes['background_color'] = array();
|
||||
$attributes['background_utility'] = '';
|
||||
}
|
||||
|
||||
if ( areoi2_get_option( 'areoi-lightspeed-styles-strip-background', false ) ) {
|
||||
|
||||
if ( $attributes['background_utility'] == '' && empty( $attributes['background_color']['rgb'] ) ) {
|
||||
if ( $block_order % 3 == 0 && $block_order > 0 ) {
|
||||
$attributes['background_utility'] = 'bg-light';
|
||||
} elseif ( $block_order % 4 == 0 ) {
|
||||
$attributes['background_utility'] = 'bg-dark';
|
||||
} else {
|
||||
$attributes['background_utility'] = 'bg-body';
|
||||
}
|
||||
|
||||
if ( in_array( $block_type, array( 'hero' ) ) ) {
|
||||
$attributes['background_utility'] = 'bg-primary';
|
||||
}
|
||||
if ( in_array( $block_type, array( 'call-to-action' ) ) ) {
|
||||
$attributes['background_utility'] = 'bg-secondary';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ( $block_type == 'hero' && $attributes['background_utility'] == '' && empty( $attributes['background_color']['rgb'] ) ) {
|
||||
$attributes['background_utility'] = 'bg-primary';
|
||||
} elseif ( $attributes['background_utility'] == '' && empty( $attributes['background_color']['rgb'] ) ) {
|
||||
$attributes['background_utility'] = 'bg-body';
|
||||
|
||||
if ( in_array( $block_type, array( 'call-to-action' ) ) ) {
|
||||
$attributes['background_utility'] = 'bg-secondary';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$pattern_align = !empty( $attributes['alignment'] ) ? $attributes['alignment'] : 'start';
|
||||
if ( areoi2_get_option( 'areoi-lightspeed-styles-strip-alignment', false ) ) {
|
||||
if ( empty( $attributes['alignment'] ) ) {
|
||||
if ( $block_order % 2 == 0 ) {
|
||||
$pattern_align = 'end';
|
||||
} else {
|
||||
$pattern_align = 'start';
|
||||
}
|
||||
}
|
||||
if ( empty( $attributes['alignment'] ) && in_array( $block_type, array( 'content-with-media', 'content-with-items', 'contact', 'search' ) ) ) {
|
||||
if ( $block_order % 2 == 0 ) {
|
||||
$attributes['alignment'] = 'end';
|
||||
} else {
|
||||
$attributes['alignment'] = 'start';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( !in_array( $block_type, array( 'header' ) ) ) {
|
||||
$lightspeed_block_order++;
|
||||
}
|
||||
|
||||
global $lightspeed_attributes;
|
||||
$lightspeed_attributes = $attributes;
|
||||
|
||||
if ( in_array( $block_type, [ 'content-with-items', 'posts' ] ) && empty( $attributes['content_filename'] ) ) {
|
||||
switch ( lightspeed_get_template( $block_type, $block_order, false ) ) {
|
||||
|
||||
case '3-column.php':
|
||||
case '3-column-alt.php':
|
||||
case 'tabs-full-width.php':
|
||||
case 'timeline.php':
|
||||
$attributes['content_filename'] = 'basic.php';
|
||||
if ( empty( $attributes['content_alignment'] ) ) $attributes['content_alignment'] = 'center';
|
||||
break;
|
||||
|
||||
case 'accordion.php':
|
||||
case 'content-with-grid.php':
|
||||
case 'scrollable.php':
|
||||
case 'tabs.php':
|
||||
$attributes['content_filename'] = 'basic.php';
|
||||
break;
|
||||
|
||||
default:
|
||||
$attributes['content_filename'] = '2-column.php';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$lightspeed_attributes = $attributes;
|
||||
|
||||
$allow_pattern = true;
|
||||
|
||||
$divider_styles = lightspeed_get_divider_styles( $block_order );
|
||||
|
||||
$template = lightspeed_get_template( $block_type, $block_order );
|
||||
|
||||
switch ( $block_type ) {
|
||||
case 'header':
|
||||
$padding = 20;
|
||||
switch ( lightspeed_get_attribute( 'padding', null ) ) {
|
||||
case 'xs':
|
||||
$padding = 10;
|
||||
break;
|
||||
case 'sm':
|
||||
$padding = 15;
|
||||
break;
|
||||
case 'lg':
|
||||
$padding = 25;
|
||||
break;
|
||||
case 'none':
|
||||
$padding = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
$content = '<div id="' . lightspeed_get_attribute( 'anchor', lightspeed_get_block_id() ) . '" class="' . lightspeed_get_block_id() . ' areoi-lightspeed-block areoi-lightspeed-' . $block_type . '">';
|
||||
ob_start(); include( $template ); $content .= ob_get_clean();
|
||||
$content .= '</div>';
|
||||
break;
|
||||
|
||||
case 'footer':
|
||||
|
||||
$padding = 20;
|
||||
switch ( lightspeed_get_attribute( 'padding', null ) ) {
|
||||
case 'xs':
|
||||
$padding = 10;
|
||||
break;
|
||||
case 'sm':
|
||||
$padding = 15;
|
||||
break;
|
||||
case 'lg':
|
||||
$padding = 25;
|
||||
break;
|
||||
case 'none':
|
||||
$padding = 0;
|
||||
break;
|
||||
}
|
||||
$first_padding = 85;
|
||||
|
||||
$content = '<div id="' . lightspeed_get_attribute( 'anchor', lightspeed_get_block_id() ) . '" class="' . lightspeed_get_block_classes( $block_type ) . ' position-relative" style="' . $divider_styles . '">';
|
||||
ob_start(); include( $template ); $content .= ob_get_clean();
|
||||
$content .= '</div>';
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
$divider = lightspeed_get_divider( $block_order );
|
||||
|
||||
$is_first_strip = $block_type == 'hero' ? true : false;
|
||||
|
||||
$padding = areoi2_get_option( 'areoi-lightspeed-styles-strip-padding', '150' );
|
||||
|
||||
switch ( lightspeed_get_attribute( 'padding', null ) ) {
|
||||
case 'xs':
|
||||
$padding = $padding / 4;
|
||||
break;
|
||||
case 'sm':
|
||||
$padding = $padding / 2;
|
||||
break;
|
||||
case 'lg':
|
||||
$padding = $padding * 2;
|
||||
break;
|
||||
case 'none':
|
||||
$padding = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
$padding_top = $padding;
|
||||
$mobile_padding = $padding / 2;
|
||||
$mobile_padding_top = $mobile_padding;
|
||||
|
||||
if ( $is_first_strip ) {
|
||||
|
||||
$next_divider = lightspeed_get_divider( 2 );
|
||||
|
||||
$padding = 85;
|
||||
$padding_top = 180;
|
||||
if ( $next_divider && $next_divider != 'none.svg' ) $padding += 85;
|
||||
|
||||
$mobile_padding = 85;
|
||||
$mobile_padding_top = 85;
|
||||
if ( $next_divider && $next_divider != 'none.svg' ) $mobile_padding += 85;
|
||||
|
||||
} else {
|
||||
|
||||
if ( $divider && $divider != 'none.svg' && $padding < 85 ) $padding = 85;
|
||||
if ( $divider && $divider != 'none.svg' && $mobile_padding < 85 ) $mobile_padding = 85;
|
||||
|
||||
}
|
||||
|
||||
$block_styles = lightspeed_get_block_styles( $is_first_strip, $padding, $padding_top, $mobile_padding, $mobile_padding_top );
|
||||
|
||||
$content = '<style>' . areoi_minify_css( $block_styles ) . '</style>';
|
||||
|
||||
$background = include( AREOI__PLUGIN_DIR . '/blocks/_partials/background.php' );
|
||||
|
||||
$content .= '<div id="' . lightspeed_get_attribute( 'anchor', lightspeed_get_block_id() ) . '" class="' . lightspeed_get_block_classes( $block_type ) . ' position-relative ' . ( $block_order == 1 ? 'areoi-is-first-strip' : '' ) . '" style="' . $divider_styles . '">';
|
||||
|
||||
$content .= $background;
|
||||
|
||||
ob_start(); include( $template ); $content .= ob_get_clean();
|
||||
|
||||
$content .= '</div>';
|
||||
break;
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
function lightspeed_register_blocks()
|
||||
{
|
||||
$plugin_directory = AREOI__PLUGIN_LIGHTSPEED_DIR . 'blocks/';
|
||||
$plugin_templates = lightspeed_list_files_with_dir( $plugin_directory );
|
||||
|
||||
$custom_theme_directory = lightspeed_get_custom_directory();
|
||||
$custom_theme_templates = lightspeed_list_files_with_dir( $custom_theme_directory );
|
||||
|
||||
$child_templates = array();
|
||||
if ( is_child_theme() ) {
|
||||
$child_directory = lightspeed_get_custom_directory( true );
|
||||
$child_templates = lightspeed_list_files_with_dir( $child_directory );
|
||||
}
|
||||
|
||||
$block_folders = array_merge( $plugin_templates, $custom_theme_templates, $child_templates );
|
||||
|
||||
foreach ( $block_folders as $block_key => $block_folder ) {
|
||||
|
||||
if ( file_exists( $block_folder . '/block.json' ) ) {
|
||||
|
||||
$meta = json_decode( file_get_contents( $block_folder . '/block.json' ), true );
|
||||
|
||||
$meta = lightspeed_get_extra_metas( $meta, $block_key );
|
||||
register_block_type( $meta['name'], $meta );
|
||||
}
|
||||
}
|
||||
}
|
||||
lightspeed_register_blocks();
|
||||
|
||||
function lightspeed_get_extra_metas( $meta, $block_key )
|
||||
{
|
||||
$images = lightspeed_get_placeholder_images();
|
||||
$videos = lightspeed_get_placeholder_videos();
|
||||
$logos = lightspeed_get_placeholder_logos();
|
||||
$items_with_images = lightspeed_get_placeholder_items_with_images();
|
||||
$items_without_images = lightspeed_get_placeholder_items_without_images();
|
||||
|
||||
if ( in_array( $block_key, array( 'logos' ) ) ) {
|
||||
$medias = $logos;
|
||||
} else {
|
||||
$medias = array_merge( $images, $videos );
|
||||
shuffle( $medias );
|
||||
}
|
||||
|
||||
if ( in_array( $block_key, array( '' ) ) ) {
|
||||
$items = $items_without_images;
|
||||
} else {
|
||||
$items = $items_without_images;
|
||||
}
|
||||
|
||||
$meta['attributes']['block_id'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['block_order'] = array(
|
||||
'type' => 'number',
|
||||
'default' => 1
|
||||
);
|
||||
$meta['attributes']['anchor'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['align'] = array(
|
||||
'type' => 'string',
|
||||
'default' => 'full'
|
||||
);
|
||||
$meta['attributes']['alignment'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['size'] = array(
|
||||
'type' => 'string',
|
||||
'default' => '100vh'
|
||||
);
|
||||
$meta['attributes']['padding'] = array(
|
||||
'type' => 'string',
|
||||
'default' => 'md'
|
||||
);
|
||||
$meta['attributes']['filename'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
|
||||
$meta['attributes']['divider'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['pattern'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['mask'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['exclude_transition'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => false
|
||||
);
|
||||
$meta['attributes']['exclude_parallax'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => false
|
||||
);
|
||||
|
||||
if ( !empty( $meta['supports']['lightspeed_header'] ) ) {
|
||||
$meta['attributes']['container'] = array(
|
||||
'type' => 'string',
|
||||
'default' => 'container'
|
||||
);
|
||||
$meta['attributes']['position'] = array(
|
||||
'type' => 'string',
|
||||
'default' => 'position-fixed'
|
||||
);
|
||||
$meta['attributes']['exclude_top_bar'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => false
|
||||
);
|
||||
$meta['attributes']['exclude_search'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => false
|
||||
);
|
||||
$meta['attributes']['exclude_company'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => false
|
||||
);
|
||||
$meta['attributes']['exclude_social'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => false
|
||||
);
|
||||
$meta['attributes']['top_bar_background'] = array(
|
||||
'type' => 'string',
|
||||
'default' => 'bg-dark'
|
||||
);
|
||||
$meta['attributes']['top_bar_text'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['top_bar_border'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['main_background'] = array(
|
||||
'type' => 'string',
|
||||
'default' => 'bg-light'
|
||||
);
|
||||
$meta['attributes']['main_text'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['main_border'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['logo'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['logo_color'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['logo_height'] = array(
|
||||
'type' => 'string',
|
||||
'default' => '40'
|
||||
);
|
||||
}
|
||||
|
||||
if ( !empty( $meta['supports']['lightspeed_footer'] ) ) {
|
||||
$meta['attributes']['container'] = array(
|
||||
'type' => 'string',
|
||||
'default' => 'container'
|
||||
);
|
||||
$meta['attributes']['exclude_top_bar'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => false
|
||||
);
|
||||
$meta['attributes']['exclude_company'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => false
|
||||
);
|
||||
$meta['attributes']['exclude_social'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => false
|
||||
);
|
||||
$meta['attributes']['main_background'] = array(
|
||||
'type' => 'string',
|
||||
'default' => 'bg-light'
|
||||
);
|
||||
$meta['attributes']['main_text'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['logo'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['logo_color'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['logo_height'] = array(
|
||||
'type' => 'string',
|
||||
'default' => '50'
|
||||
);
|
||||
}
|
||||
|
||||
if ( !empty( $meta['supports']['lightspeed_content'] ) ) {
|
||||
$meta['attributes']['content_filename'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['content_alignment'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['sub_heading'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['is_post_title'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => false
|
||||
);
|
||||
$meta['attributes']['heading'] = array(
|
||||
'type' => 'string',
|
||||
'default' => 'An interesting title that passes the blink test.'
|
||||
);
|
||||
$meta['attributes']['is_post_excerpt'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => false
|
||||
);
|
||||
$meta['attributes']['introduction'] = array(
|
||||
'type' => 'string',
|
||||
'default' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla lobortis eros eget erat finibus, sed eleifend augue ultricies. Etiam imperdiet malesuada imperdiet. Mauris libero mauris.</p>'
|
||||
);
|
||||
$meta['attributes']['include_read_more'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => false
|
||||
);
|
||||
$meta['attributes']['active_column'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['columns'] = array(
|
||||
'type' => 'array',
|
||||
'default' => array()
|
||||
);
|
||||
$meta['attributes']['include_cta'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => true
|
||||
);
|
||||
$meta['attributes']['cta'] = array(
|
||||
'type' => 'string',
|
||||
'default' => 'Call to Action'
|
||||
);
|
||||
$meta['attributes']['cta_size'] = array(
|
||||
'type' => 'string',
|
||||
'default' => 'btn-lg'
|
||||
);
|
||||
$meta['attributes']['url'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['opensInNewTab'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$meta['attributes']['heading_color'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['sub_heading_color'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['introduction_color'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['cta_color'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
}
|
||||
|
||||
if ( !empty( $meta['supports']['lightspeed_posts'] ) ) {
|
||||
$meta['attributes']['post_background_color'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['post_title_color'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['post_excerpt_color'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
|
||||
$meta['attributes']['is_post_query'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => false
|
||||
);
|
||||
$meta['attributes']['post_type'] = array(
|
||||
'type' => 'string',
|
||||
'default' => 'post'
|
||||
);
|
||||
$meta['attributes']['display_posts'] = array(
|
||||
'type' => 'string',
|
||||
'default' => 'selected'
|
||||
);
|
||||
$meta['attributes']['posts_per_page'] = array(
|
||||
'type' => 'string',
|
||||
'default' => '8'
|
||||
);
|
||||
$meta['attributes']['orderby'] = array(
|
||||
'type' => 'string',
|
||||
'default' => 'title'
|
||||
);
|
||||
$meta['attributes']['order'] = array(
|
||||
'type' => 'string',
|
||||
'default' => 'asc'
|
||||
);
|
||||
$meta['attributes']['post_ids'] = array(
|
||||
'type' => 'array',
|
||||
'default' => []
|
||||
);
|
||||
$meta['attributes']['include_pagination'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => false
|
||||
);
|
||||
$meta['attributes']['pagination_color'] = array(
|
||||
'type' => 'string',
|
||||
'default' => 'btn-primary'
|
||||
);
|
||||
$meta['attributes']['include_media'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => true
|
||||
);
|
||||
$meta['attributes']['include_title'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => true
|
||||
);
|
||||
$meta['attributes']['include_excerpt'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => true
|
||||
);
|
||||
$meta['attributes']['include_permalink'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => true
|
||||
);
|
||||
}
|
||||
|
||||
if ( !empty( $meta['supports']['lightspeed_media'] ) ) {
|
||||
$meta['attributes']['media_shape'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['media_fit'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['is_post_image'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => false
|
||||
);
|
||||
$meta['attributes']['image'] = array(
|
||||
'type' => 'object',
|
||||
'default' => []
|
||||
);
|
||||
$meta['attributes']['video'] = array(
|
||||
'type' => 'object',
|
||||
'default' => []
|
||||
);
|
||||
}
|
||||
|
||||
if ( !empty( $meta['supports']['lightspeed_gallery'] ) && !in_array( $block_key, ['logos'] ) ) {
|
||||
$meta['attributes']['gallery'] = array(
|
||||
'type' => 'array',
|
||||
'default' => []
|
||||
);
|
||||
}
|
||||
if ( !empty( $meta['supports']['lightspeed_gallery'] ) && in_array( $block_key, ['logos'] ) ) {
|
||||
$meta['attributes']['gallery'] = array(
|
||||
'type' => 'array',
|
||||
'default' => $medias,
|
||||
);
|
||||
}
|
||||
if ( !empty( $meta['supports']['lightspeed_items'] ) ) {
|
||||
$meta['attributes']['active_item'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['items'] = array(
|
||||
'type' => 'array',
|
||||
'default' => $items
|
||||
);
|
||||
}
|
||||
if ( !empty( $meta['supports']['lightspeed_background'] ) ) {
|
||||
$meta['attributes']['background_display'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => false
|
||||
);
|
||||
$meta['attributes']['background_utility'] = array(
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
);
|
||||
$meta['attributes']['background_color'] = array(
|
||||
'type' => 'object',
|
||||
'default' => []
|
||||
);
|
||||
$meta['attributes']['background_image'] = array(
|
||||
'type' => 'object',
|
||||
'default' => []
|
||||
);
|
||||
$meta['attributes']['background_video'] = array(
|
||||
'type' => 'object',
|
||||
'default' => []
|
||||
);
|
||||
$meta['attributes']['background_display_overlay'] = array(
|
||||
'type' => 'boolean',
|
||||
'default' => false
|
||||
);
|
||||
$meta['attributes']['background_overlay'] = array(
|
||||
'type' => 'object',
|
||||
'default' => array(
|
||||
'rgb' => array(
|
||||
'r' => 0,
|
||||
'g' => 0,
|
||||
'b' => 0,
|
||||
'a' => 1
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$meta['render_callback'] = function( $attributes, $content ) use ( $block_key ) {
|
||||
return lightspeed_render_block( $block_key, $attributes, $content );
|
||||
};
|
||||
|
||||
return $meta;
|
||||
}
|
||||
|
||||
function lightspeed_get_placeholder_introduction()
|
||||
{
|
||||
return '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla lobortis eros eget erat finibus, sed eleifend augue ultricies. Etiam imperdiet malesuada imperdiet. Mauris libero mauris.</p>';
|
||||
}
|
||||
|
||||
function lightspeed_get_placeholder_items_with_images()
|
||||
{
|
||||
|
||||
$items = array(
|
||||
array(
|
||||
'id' => 1,
|
||||
'heading' => 'Item 1',
|
||||
'introduction' => lightspeed_get_placeholder_introduction(),
|
||||
'include_cta' => false,
|
||||
'cta' => null,
|
||||
'cta_size' => null,
|
||||
'url' => null,
|
||||
'opensInNewTab' => null,
|
||||
'heading_color' => null,
|
||||
'introduction_color' => null,
|
||||
'cta_color' => null,
|
||||
'background_color' => null,
|
||||
'video' => null,
|
||||
'image' => lightspeed_get_placeholder_images( 0 )
|
||||
),
|
||||
);
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
function lightspeed_get_placeholder_items_without_images()
|
||||
{
|
||||
|
||||
$items = array(
|
||||
array(
|
||||
'id' => 1,
|
||||
'heading' => 'Item 1',
|
||||
'introduction' => lightspeed_get_placeholder_introduction(),
|
||||
'include_cta' => false,
|
||||
'cta' => null,
|
||||
'cta_size' => null,
|
||||
'url' => null,
|
||||
'opensInNewTab' => null,
|
||||
'heading_color' => null,
|
||||
'introduction_color' => null,
|
||||
'cta_color' => null,
|
||||
'background_color' => null,
|
||||
'video' => null,
|
||||
'image' => null
|
||||
),
|
||||
);
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
function lightspeed_get_placeholder_images( $key = null )
|
||||
{
|
||||
$directory = lightspeed_get_placeholder_path();
|
||||
|
||||
$files = array_diff( scandir( $directory ), array( '.', '..' ) );
|
||||
|
||||
$filenames = array();
|
||||
if ( count( $files ) ) {
|
||||
foreach ( $files as $file_key => $file ) {
|
||||
$ext = pathinfo( $file, PATHINFO_EXTENSION );
|
||||
if ( in_array( strtolower( $ext ), array( 'webp', 'jpg', 'jpeg', 'gif', 'png' ) ) ) $filenames[] = $file;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $key == 'rand' ) $key = rand( 0, (count( $filenames ) - 1) );
|
||||
|
||||
$images = array();
|
||||
if ( !empty( $filenames ) ) {
|
||||
foreach ( $filenames as $file_key => $file ) {
|
||||
$images[] = array(
|
||||
'id' => $file_key,
|
||||
'title' => 'image-' . $file_key,
|
||||
'filename' => 'image-' . $file_key,
|
||||
'url' => '' . lightspeed_get_placeholder_uri() . '/' . $file,
|
||||
'mime' => 'image/' . $ext,
|
||||
'type' => 'image',
|
||||
'subtype' => $ext,
|
||||
'height' => 750,
|
||||
'width' => 1125,
|
||||
'alt' => 'Placeholder Image'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $key !== null ) return $images[$key];
|
||||
|
||||
return $images;
|
||||
}
|
||||
|
||||
function lightspeed_get_placeholder_videos( $key = null )
|
||||
{
|
||||
$directory = lightspeed_get_placeholder_path();
|
||||
|
||||
$files = array_diff( scandir( $directory ), array( '.', '..' ) );
|
||||
|
||||
$filenames = array();
|
||||
if ( count( $files ) ) {
|
||||
foreach ( $files as $file_key => $file ) {
|
||||
$ext = pathinfo( $file, PATHINFO_EXTENSION );
|
||||
if ( in_array( strtolower( $ext ), array( 'mov', 'mp4', 'webm' ) ) ) $filenames[] = $file;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $key == 'rand' ) $key = rand( 0, (count( $filenames ) - 1) );
|
||||
|
||||
$videos = array();
|
||||
if ( !empty( $filenames ) ) {
|
||||
foreach ( $filenames as $file_key => $file ) {
|
||||
$ext = pathinfo( $file, PATHINFO_EXTENSION );
|
||||
$videos[] = array(
|
||||
'id' => $file_key,
|
||||
'title' => 'image-' . $file_key,
|
||||
'filename' => 'image-' . $file_key,
|
||||
'url' => '' . lightspeed_get_placeholder_uri() . '/' . $file,
|
||||
'mime' => 'video/' . $ext,
|
||||
'type' => 'video',
|
||||
'subtype' => $ext,
|
||||
'height' => 750,
|
||||
'width' => 1125,
|
||||
'alt' => 'Placeholder Video'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $key !== null ) return $videos[$key];
|
||||
|
||||
return $videos;
|
||||
}
|
||||
|
||||
function lightspeed_get_placeholder_logos()
|
||||
{
|
||||
$logos = array(
|
||||
array(
|
||||
'id' => 1,
|
||||
'title' => '3d-square',
|
||||
'filename' => '3d-square.svg',
|
||||
'url' => '' . AREOI__PLUGIN_LIGHTSPEED_URI . 'placeholders/default/3d-square.svg',
|
||||
'mime' => 'image/svg',
|
||||
'type' => 'image',
|
||||
'subtype' => 'svg',
|
||||
'height' => 1280,
|
||||
'width' => 1920,
|
||||
'alt' => 'Placeholder Image'
|
||||
),
|
||||
array(
|
||||
'id' => 2,
|
||||
'title' => 'shapey',
|
||||
'filename' => 'shapey.svg',
|
||||
'url' => '' . AREOI__PLUGIN_LIGHTSPEED_URI . 'placeholders/default/shapey.svg',
|
||||
'mime' => 'image/svg',
|
||||
'type' => 'image',
|
||||
'subtype' => 'svg',
|
||||
'height' => 1280,
|
||||
'width' => 1920,
|
||||
'alt' => 'Placeholder Image'
|
||||
),
|
||||
array(
|
||||
'id' => 3,
|
||||
'title' => 'speech',
|
||||
'filename' => 'speech.svg',
|
||||
'url' => '' . AREOI__PLUGIN_LIGHTSPEED_URI . 'placeholders/default/speech.svg',
|
||||
'mime' => 'image/svg',
|
||||
'type' => 'image',
|
||||
'subtype' => 'svg',
|
||||
'height' => 1280,
|
||||
'width' => 1920,
|
||||
'alt' => 'Placeholder Image'
|
||||
),
|
||||
array(
|
||||
'id' => 4,
|
||||
'title' => 'triangle-creative',
|
||||
'filename' => 'triangle-creative.svg',
|
||||
'url' => '' . AREOI__PLUGIN_LIGHTSPEED_URI . 'placeholders/default/triangle-creative.svg',
|
||||
'mime' => 'image/svg',
|
||||
'type' => 'image',
|
||||
'subtype' => 'svg',
|
||||
'height' => 1280,
|
||||
'width' => 1920,
|
||||
'alt' => 'Placeholder Image'
|
||||
),
|
||||
array(
|
||||
'id' => 5,
|
||||
'title' => 'waves',
|
||||
'filename' => 'waves.svg',
|
||||
'url' => '' . AREOI__PLUGIN_LIGHTSPEED_URI . 'placeholders/default/waves.svg',
|
||||
'mime' => 'image/svg',
|
||||
'type' => 'image',
|
||||
'subtype' => 'svg',
|
||||
'height' => 1280,
|
||||
'width' => 1920,
|
||||
'alt' => 'Placeholder Image'
|
||||
),
|
||||
);
|
||||
return $logos;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"apiVersion": 2,
|
||||
"name": "areoi-lightspeed/logos",
|
||||
"title": "Logos",
|
||||
"parent": null,
|
||||
"category": "areoi-lightspeed",
|
||||
"description": "",
|
||||
"textdomain": "default",
|
||||
"keywords": [ "areoi", "lightspeed" ],
|
||||
"example": {},
|
||||
"attributes": {
|
||||
"max_width": {
|
||||
"type": "string",
|
||||
"default": "90"
|
||||
},
|
||||
"max_height": {
|
||||
"type": "string",
|
||||
"default": "60"
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
"anchor": true,
|
||||
"align": false,
|
||||
"html": false,
|
||||
"lightspeed_background": true,
|
||||
"lightspeed_content": true,
|
||||
"lightspeed_gallery": true
|
||||
},
|
||||
"editorScript": "",
|
||||
"editorStyle": "",
|
||||
"style": ""
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-lightspeed-block-logos img,
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-lightspeed-block-logos video {
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: ' . lightspeed_get_attribute( 'max_width', '80' ) . '%;
|
||||
max-height: ' . lightspeed_get_attribute( 'max_height', '90' ) . 'px;
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row align-items-center">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="row justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'center' ) == 'center' ? 'center' : lightspeed_get_attribute( 'alignment' ) ?>">
|
||||
<div class="col-lg-6">
|
||||
|
||||
<?php lightspeed_content( 2, 'center', 'col' ) ?>
|
||||
|
||||
<?php if ( lightspeed_get_attribute( 'include_cta', false ) ) : ?>
|
||||
<div class="h1"></div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row row-cols-2 row-cols-md-3 row-cols-lg-6 justify-content-center areoi-lightspeed-block-logos">
|
||||
<?php foreach ( lightspeed_get_attribute( 'gallery', array() ) as $media_key => $media ) : ?>
|
||||
<div class="col mb-4 mt-4 d-flex align-items-center justify-content-center">
|
||||
<?php if ( $media['type'] == 'image' ) : ?>
|
||||
<img
|
||||
src="<?php echo $media['url'] ?>"
|
||||
alt="<?php echo !empty( $media['alt'] ) ? $media['alt'] : '' ?>"
|
||||
width="<?php echo !empty( $media['width'] ) ? $media['width'] : '' ?>"
|
||||
height="<?php echo !empty( $media['height'] ) ? $media['height'] : '' ?>"
|
||||
>
|
||||
<?php else : ?>
|
||||
<video
|
||||
src="<?php echo $media['url'] ?>"
|
||||
muted
|
||||
playsinline
|
||||
autoplay
|
||||
loop
|
||||
></video>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"apiVersion": 2,
|
||||
"name": "areoi-lightspeed/media",
|
||||
"title": "Media",
|
||||
"parent": null,
|
||||
"category": "areoi-lightspeed",
|
||||
"description": "",
|
||||
"textdomain": "default",
|
||||
"keywords": [ "areoi", "lightspeed" ],
|
||||
"example": {},
|
||||
"attributes": {
|
||||
"media_shape": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"media_fit": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
"anchor": true,
|
||||
"align": false,
|
||||
"html": false,
|
||||
"lightspeed_background": true,
|
||||
"lightspeed_gallery": true
|
||||
},
|
||||
"editorScript": "",
|
||||
"editorStyle": "",
|
||||
"style": ""
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-media-col {
|
||||
margin-top: calc(var(--bs-gutter-x) * .5);
|
||||
margin-bottom: calc(var(--bs-gutter-x) * .5);
|
||||
position: relative;
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row align-items-center">
|
||||
|
||||
<div class="col">
|
||||
<div class="row align-items-start areoi-parallax-component areoi-transition-none">
|
||||
|
||||
<?php foreach ( lightspeed_get_attribute( 'gallery', array() ) as $media_key => $media ) : ?>
|
||||
<div class="col-6 col-lg-3 <?php lightspeed_media_col_class() ?>">
|
||||
|
||||
<div class="areoi-media-col-content rounded overflow-hidden">
|
||||
<?php lightspeed_spacer( 'square' ) ?>
|
||||
|
||||
<?php if ( $media['type'] == 'image' ) : ?>
|
||||
<img
|
||||
src="<?php echo $media['url'] ?>"
|
||||
class="d-block"
|
||||
alt="<<?php echo !empty( $media['alt'] ) ? $media['alt'] : '' ?>"
|
||||
width="<?php echo !empty( $media['width'] ) ? $media['width'] : '' ?>"
|
||||
height="<?php echo !empty( $media['height'] ) ? $media['height'] : '' ?>"
|
||||
>
|
||||
<?php else : ?>
|
||||
<video src="<?php echo $media['url'] ?>" muted playsinline autoplay loop></video>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .carousel-item img,
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .carousel-item video,
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .carousel-item .areoi-media-col,
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .carousel-item .areoi-media-col-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
@media only screen and (min-width: ' . areoi2_get_option( 'areoi-layout-grid-grid-breakpoint-lg', '992px' ) . ') {
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block > div.container > .row {
|
||||
height: calc( ' . lightspeed_get_attribute( 'size', '100vh' ) . ' - ' . areoi2_get_option( 'areoi-lightspeed-styles-strip-padding', '0' ) * 2 . 'px );
|
||||
}
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container areoi-parallax-none">
|
||||
<div class="row align-items-center">
|
||||
|
||||
<div class="col areoi-hero-media position-relative areoi-transition-none">
|
||||
|
||||
<?php lightspeed_media_carousel( lightspeed_get_attribute( 'gallery', array() ), lightspeed_get_attribute( 'media_shape', 'rectangle' ), false ) ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-media-col {
|
||||
position: relative;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block {
|
||||
padding: 0;
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container-fluid h-100">
|
||||
<div class="row align-items-center">
|
||||
|
||||
<div class="col">
|
||||
<div class="row align-items-start">
|
||||
|
||||
<?php foreach ( lightspeed_get_attribute( 'gallery', array() ) as $media_key => $media ) : ?>
|
||||
<div class="col-6 col-lg-3 <?php lightspeed_media_col_class() ?> p-0">
|
||||
|
||||
<div class="areoi-media-col-content">
|
||||
<?php lightspeed_spacer( 'square' ) ?>
|
||||
|
||||
<?php lightspeed_gallery_media( $media ) ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .carousel {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .carousel-indicators {
|
||||
bottom: 75px !important;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .carousel-inner,
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .carousel-item,
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .carousel-item .areoi-media-col,
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .carousel-item .areoi-media-col-content {
|
||||
height: 100%;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .carousel-item img,
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media .carousel-item video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block {
|
||||
padding: 0;
|
||||
}
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block > div.container > .row,
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block > div.container-fluid > .row {
|
||||
height: ' . lightspeed_get_attribute( 'size', '100vh' ) . ';
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container-fluid h-100 areoi-parallax-none">
|
||||
<div class="row">
|
||||
|
||||
<div class="col areoi-hero-media h-100 p-0 areoi-transition-none">
|
||||
|
||||
<?php lightspeed_media_carousel( lightspeed_get_attribute( 'gallery', array() ), lightspeed_get_attribute( 'media_shape', 'rectangle' ), false ) ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-media-col {
|
||||
margin-top: calc(var(--bs-gutter-x) * .5);
|
||||
margin-bottom: calc(var(--bs-gutter-x) * .5);
|
||||
position: relative;
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row align-items-center">
|
||||
|
||||
<div class="col">
|
||||
<div class="row d-block areoi-parallax-component">
|
||||
|
||||
<?php
|
||||
$counter = 1;
|
||||
foreach ( lightspeed_get_attribute( 'gallery', array() ) as $media_key => $media ) : ?>
|
||||
<div style="float: <?php echo $counter == 8 ? 'right' : 'left' ?>" class="col-6 <?php echo ( in_array( $counter, array( 1, 8 ) ) ) ? 'col-lg-6' : 'col-lg-3' ?> <?php lightspeed_media_col_class() ?>">
|
||||
|
||||
<div class="areoi-media-col-content rounded overflow-hidden">
|
||||
<?php lightspeed_spacer( 'square' ) ?>
|
||||
|
||||
<?php lightspeed_gallery_media( $media ) ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
$counter++;
|
||||
if ( $counter == 11 ) $counter = 1;
|
||||
endforeach; ?>
|
||||
|
||||
<div style="clear: both;"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"apiVersion": 2,
|
||||
"name": "areoi-lightspeed/next-and-previous",
|
||||
"title": "Next and Previous",
|
||||
"parent": null,
|
||||
"category": "areoi-lightspeed",
|
||||
"description": "",
|
||||
"textdomain": "default",
|
||||
"keywords": [ "areoi", "lightspeed" ],
|
||||
"example": {},
|
||||
"attributes": {},
|
||||
"supports": {
|
||||
"anchor": true,
|
||||
"align": false,
|
||||
"html": false,
|
||||
"lightspeed_background": true
|
||||
},
|
||||
"editorScript": "",
|
||||
"editorStyle": "",
|
||||
"style": ""
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
$prev_post = get_previous_post();
|
||||
$next_post = get_next_post();
|
||||
$items = array(
|
||||
'prev' => array(
|
||||
'heading' => $prev_post ? $prev_post->post_title : '',
|
||||
'media' => $prev_post ? wp_get_attachment_image_url( get_post_thumbnail_id( $prev_post->ID ), 'single-post-thumbnail' ) : '',
|
||||
'permalink' => $prev_post ? get_the_permalink( $prev_post->ID ) : ''
|
||||
),
|
||||
'next' => array(
|
||||
'heading' => $next_post ? $next_post->post_title : '',
|
||||
'media' => $next_post ? wp_get_attachment_image_url( get_post_thumbnail_id( $next_post->ID ), 'single-post-thumbnail' ) : '',
|
||||
'permalink' => $next_post ? get_the_permalink( $next_post->ID ) : ''
|
||||
),
|
||||
);
|
||||
|
||||
if ( !empty( $_GET['context'] ) && $_GET['context'] == 'edit' ) {
|
||||
$items = array(
|
||||
'prev' => array(
|
||||
'heading' => 'Previous post',
|
||||
'media' => lightspeed_get_placeholder_images( 1 )['url'],
|
||||
'permalink' => ''
|
||||
),
|
||||
'next' => array(
|
||||
'heading' => 'Next post',
|
||||
'media' => lightspeed_get_placeholder_images( 3 )['url'],
|
||||
'permalink' => ''
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
if ( empty( $items['prev']['media'] ) && areoi2_get_option( 'areoi-lightspeed-company-include-lightspeed', false ) ) {
|
||||
$items['prev']['media'] = lightspeed_get_placeholder_images( 1 )['url'];
|
||||
}
|
||||
if ( empty( $items['next']['media'] ) && areoi2_get_option( 'areoi-lightspeed-company-include-lightspeed', false ) ) {
|
||||
$items['next']['media'] = lightspeed_get_placeholder_images( 3 )['url'];
|
||||
}
|
||||
|
||||
$styles = '';
|
||||
if ( !$next_post && !$prev_post ) {
|
||||
$styles .= '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block {
|
||||
display: none;
|
||||
}
|
||||
';
|
||||
}
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center">
|
||||
|
||||
<?php foreach ( $items as $item_key => $item ) : ?>
|
||||
|
||||
<div class="col-md-6 position-relative areoi-has-url">
|
||||
<?php if ( !empty( $item['heading'] ) ) : ?>
|
||||
<div class="row align-items-center">
|
||||
<div class="col-6 <?php echo $item_key == 'next' ? 'order-1' : ' text-end' ?>">
|
||||
<?php lightspeed_heading( 2, $item, 'h3' ) ?>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="<?php lightspeed_media_col_class() ?> h-100">
|
||||
<div class="areoi-media-col-content h-100 rounded overflow-hidden">
|
||||
<?php lightspeed_square_spacer() ?>
|
||||
<?php if ( $item['media'] ) : ?>
|
||||
<img src="<?php echo $item['media'] ?>" alt="<?php echo $item['heading'] ?>" />
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="<?php echo $item['permalink'] ?>" class="stretched-link" aria-label="View <?php echo $item['heading'] ?>"></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"apiVersion": 2,
|
||||
"name": "areoi-lightspeed/post-details",
|
||||
"title": "Post Details",
|
||||
"parent": null,
|
||||
"category": "areoi-lightspeed",
|
||||
"description": "",
|
||||
"textdomain": "default",
|
||||
"keywords": [ "areoi", "lightspeed" ],
|
||||
"example": {},
|
||||
"attributes": {
|
||||
|
||||
"include_post_author": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"include_post_date": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"include_post_categories": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
|
||||
"introduction_color": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
"anchor": true,
|
||||
"align": false,
|
||||
"html": false,
|
||||
"lightspeed_background": true
|
||||
},
|
||||
"editorScript": "",
|
||||
"editorStyle": "",
|
||||
"style": ""
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
$color = lightspeed_get_attribute( 'introduction_color', lightspeed_get_default_color( 'text' ) );
|
||||
$styles = '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
|
||||
<div class="row row-cols-1 row-cols-md-3 text-center <?php echo $color; ?>">
|
||||
<?php
|
||||
|
||||
if ( lightspeed_get_attribute( 'include_post_author', null ) ) :
|
||||
?>
|
||||
<div class="col">
|
||||
<?php lightspeed_author_url( $color ) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( lightspeed_get_attribute( 'include_post_date', null ) ) : ?>
|
||||
<div class="col">
|
||||
<?php echo get_the_date() ? get_the_date() : date( 'd/M/Y' ) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( lightspeed_get_attribute( 'include_post_categories', null ) ) : ?>
|
||||
<div class="col">
|
||||
<?php
|
||||
$categories = get_categories();
|
||||
if ( ! empty( $categories ) ) {
|
||||
echo '<a href="' . esc_url( get_category_link( $categories[0]->term_id ) ) . '" class="' . $color . '">' . esc_html( $categories[0]->name ) . '</a>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"apiVersion": 2,
|
||||
"name": "areoi-lightspeed/posts",
|
||||
"title": "Posts",
|
||||
"parent": null,
|
||||
"category": "areoi-lightspeed",
|
||||
"description": "",
|
||||
"textdomain": "default",
|
||||
"keywords": [ "areoi", "lightspeed" ],
|
||||
"example": {},
|
||||
"attributes": {
|
||||
"media_shape": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"media_fit": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
"anchor": true,
|
||||
"align": false,
|
||||
"html": false,
|
||||
"lightspeed_background": true,
|
||||
"lightspeed_content": true,
|
||||
"lightspeed_posts": true
|
||||
},
|
||||
"editorScript": "",
|
||||
"editorStyle": "",
|
||||
"style": ""
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
$the_query = lightspeed_get_posts();
|
||||
|
||||
$styles = '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="row justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'alignment' ) ?>">
|
||||
<div class="col">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col-lg-6 col-xl-5' ) ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-2 justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'alignment' ) ?> <?php echo 'text-' . lightspeed_get_attribute( 'content_alignment', 'start' ) ?>">
|
||||
|
||||
<?php $post_count = 0; while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
|
||||
<div class="col mb-4 position-relative">
|
||||
<?php lightspeed_item( null, true, false, true ) ?>
|
||||
</div>
|
||||
<?php $post_count++; endwhile; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php lightspeed_post_pagination( $the_query ) ?>
|
||||
|
||||
<?php wp_reset_postdata(); ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
$the_query = lightspeed_get_posts();
|
||||
|
||||
$styles = '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="row justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'alignment' ) ?>">
|
||||
<div class="col">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col-lg-6 col-xl-5' ) ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-2 justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'alignment' ) ?> <?php echo 'text-' . lightspeed_get_attribute( 'content_alignment', 'start' ) ?>">
|
||||
|
||||
<?php $post_count = 0; while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
|
||||
<div class="col mb-4 position-relative">
|
||||
<?php lightspeed_item( null, true ) ?>
|
||||
</div>
|
||||
<?php $post_count++; endwhile; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php lightspeed_post_pagination( $the_query ) ?>
|
||||
|
||||
<?php wp_reset_postdata(); ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
$the_query = lightspeed_get_posts();
|
||||
|
||||
$styles = '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="row justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'alignment' ) ?>">
|
||||
<div class="col">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col-lg-6 col-xl-5' ) ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'alignment' ) ?> <?php echo 'text-' . lightspeed_get_attribute( 'content_alignment', 'start' ) ?>">
|
||||
|
||||
<?php $post_count = 0; while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
|
||||
<div class="col mb-4 position-relative">
|
||||
<?php lightspeed_item( null, true, false, true ) ?>
|
||||
</div>
|
||||
<?php $post_count++; endwhile; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php lightspeed_post_pagination( $the_query ) ?>
|
||||
|
||||
<?php wp_reset_postdata(); ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
$the_query = lightspeed_get_posts();
|
||||
|
||||
$styles = '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="row justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'alignment' ) ?>">
|
||||
<div class="col">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col-lg-6 col-xl-5' ) ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'alignment' ) ?> <?php echo 'text-' . lightspeed_get_attribute( 'content_alignment', 'start' ) ?>">
|
||||
|
||||
<?php $post_count = 0; while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
|
||||
<div class="col mb-4 position-relative">
|
||||
<?php lightspeed_item( null, true ) ?>
|
||||
</div>
|
||||
<?php $post_count++; endwhile; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php lightspeed_post_pagination( $the_query ) ?>
|
||||
|
||||
<?php wp_reset_postdata(); ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
$the_query = lightspeed_get_posts();
|
||||
|
||||
$styles = '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="row justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'alignment' ) ?>">
|
||||
<div class="col">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col-lg-6 col-xl-5' ) ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-4 justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'alignment' ) ?> <?php echo 'text-' . lightspeed_get_attribute( 'content_alignment', 'start' ) ?>">
|
||||
|
||||
<?php $post_count = 0; while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
|
||||
<div class="col mb-4 position-relative">
|
||||
<?php lightspeed_item( null, true, false, true ) ?>
|
||||
</div>
|
||||
<?php $post_count++; endwhile; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php lightspeed_post_pagination( $the_query ) ?>
|
||||
|
||||
<?php wp_reset_postdata(); ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
$the_query = lightspeed_get_posts();
|
||||
|
||||
$styles = '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="row justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'alignment' ) ?>">
|
||||
<div class="col">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col-lg-6 col-xl-5' ) ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-4 justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'alignment' ) ?> <?php echo 'text-' . lightspeed_get_attribute( 'content_alignment', 'start' ) ?>">
|
||||
|
||||
<?php $post_count = 0; while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
|
||||
<div class="col mb-4 position-relative">
|
||||
<?php lightspeed_item( null, true ) ?>
|
||||
</div>
|
||||
<?php $post_count++; endwhile; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php lightspeed_post_pagination( $the_query ) ?>
|
||||
|
||||
<?php wp_reset_postdata(); ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
$the_query = lightspeed_get_posts();
|
||||
|
||||
$styles = '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center">
|
||||
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="align-self-start col-lg-6 col-xxl-5 areoi-col-content <?php echo lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'offset-xxl-1 order-lg-1' : '' ?> position-sticky" style="top: 100px;">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col-lg-6 col-xl-5' ) ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 <?php echo lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? '' : 'offset-xxl-1' ?>">
|
||||
<div class="row row-cols-1 row-cols-md-2 areoi-parallax-component">
|
||||
<?php $post_count = 0; while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
|
||||
<div class="col mb-4 position-relative areoi-has-url">
|
||||
<?php lightspeed_item( null, true ) ?>
|
||||
</div>
|
||||
<?php $post_count++; endwhile; ?>
|
||||
</div>
|
||||
|
||||
<?php lightspeed_post_pagination( $the_query ) ?>
|
||||
|
||||
<?php wp_reset_postdata(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
$the_query = lightspeed_get_posts();
|
||||
|
||||
$styles = '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="row justify-content-<?php echo lightspeed_get_attribute( 'content_alignment', 'start' ) == 'center' ? 'center' : lightspeed_get_attribute( 'alignment' ) ?>">
|
||||
<div class="col">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col-lg-6 col-xl-5' ) ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-4 <?php echo lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'justify-content-end' : '' ?>">
|
||||
|
||||
<?php $post_count = 0; while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
|
||||
<div class="col <?php echo in_array( $post_count, array( 0, 5) ) ? 'col-lg-6' : '' ?> mb-4 position-relative areoi-has-url">
|
||||
<?php if ( !empty( lightspeed_get_attribute( 'media_position', null ) ) && lightspeed_get_attribute( 'media_position', null ) == 'background' ) : ?>
|
||||
<?php lightspeed_item_with_background( null, true ) ?>
|
||||
<?php else : ?>
|
||||
<?php lightspeed_item( null, true ) ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php $post_count++; if ( $post_count == 6 ) $post_count = 0; endwhile; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php lightspeed_post_pagination( $the_query ) ?>
|
||||
|
||||
<?php wp_reset_postdata(); ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
$the_query = lightspeed_get_posts();
|
||||
|
||||
$styles = '
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media {
|
||||
position: relative;
|
||||
}
|
||||
@media only screen and (min-width: ' . areoi2_get_option( 'areoi-layout-grid-grid-breakpoint-lg', '992px' ) . ') {
|
||||
.' . lightspeed_get_block_id() . '.areoi-lightspeed-block .areoi-hero-media {
|
||||
position: absolute;
|
||||
' . (lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'left' : 'right') . ': 0
|
||||
}
|
||||
}
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100">
|
||||
<div class="row h-100 align-items-center justify-content-between <?php echo lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'justify-content-lg-end' : '' ?>">
|
||||
|
||||
<div class="col-lg-6 col-xl-5 text-center text-lg-start position-relative">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col' ) ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 areoi-hero-media p-0">
|
||||
<div class="h1 d-lg-none"></div>
|
||||
<div class="areoi-drag-container">
|
||||
<ul class="align-items-start">
|
||||
<?php $post_count = 0; while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
|
||||
<li class="position-relative areoi-has-url">
|
||||
<?php if ( !empty( lightspeed_get_attribute( 'media_position', null ) ) && lightspeed_get_attribute( 'media_position', null ) == 'background' ) : ?>
|
||||
<?php lightspeed_item_with_background( null, true ) ?>
|
||||
<?php else : ?>
|
||||
<?php lightspeed_item( null, true ) ?>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php $post_count++; endwhile; ?>
|
||||
|
||||
<?php wp_reset_postdata(); ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"apiVersion": 2,
|
||||
"name": "areoi-lightspeed/search",
|
||||
"title": "Search",
|
||||
"parent": null,
|
||||
"category": "areoi-lightspeed",
|
||||
"description": "",
|
||||
"textdomain": "default",
|
||||
"keywords": [ "areoi", "lightspeed" ],
|
||||
"example": {},
|
||||
"attributes": {},
|
||||
"supports": {
|
||||
"anchor": true,
|
||||
"align": false,
|
||||
"html": false,
|
||||
"lightspeed_background": true,
|
||||
"lightspeed_gallery": true,
|
||||
"lightspeed_content": true
|
||||
},
|
||||
"editorScript": "",
|
||||
"editorStyle": "",
|
||||
"style": ""
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
$styles = '
|
||||
|
||||
';
|
||||
?>
|
||||
<?php if ( $styles ) : ?>
|
||||
<style><?php echo areoi_minify_css( $styles ) ?></style>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container h-100 position-relative">
|
||||
<div class="row h-100 align-items-center justify-content-between">
|
||||
|
||||
<div class="col-lg-6 col-xxl-5 <?php echo lightspeed_get_attribute( 'alignment', 'start' ) == 'end' ? 'order-lg-1' : '' ?>">
|
||||
|
||||
<?php lightspeed_content( 2, 'start', 'col' ) ?>
|
||||
|
||||
<?php lightspeed_search() ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 areoi-hero-media">
|
||||
|
||||
<div class="h1 d-lg-none"></div>
|
||||
|
||||
<div id="<?php lightspeed_block_id() ?>-media-carousel" class="carousel slide" data-bs-ride="carousel">
|
||||
|
||||
<?php if ( count( lightspeed_get_attribute( 'gallery', array() ) ) > 1 ) : ?>
|
||||
<div class="carousel-indicators">
|
||||
<?php foreach ( lightspeed_get_attribute( 'gallery', array() ) as $gallery_key => $media ) : ?>
|
||||
<button
|
||||
type="button"
|
||||
data-bs-target="#<?php lightspeed_block_id() ?>-media-carousel"
|
||||
data-bs-slide-to="<?php echo $gallery_key ?>"
|
||||
class="<?php echo $gallery_key == 0 ? 'active' : '' ?>"
|
||||
aria-current="true"
|
||||
aria-label="Slide <?php echo $gallery_key + 1 ?>"
|
||||
></button>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="carousel-inner areoi-has-mask">
|
||||
<?php foreach ( lightspeed_get_attribute( 'gallery', array() ) as $gallery_key => $media ) : ?>
|
||||
<div class="carousel-item <?php echo $gallery_key == 0 ? 'active' : '' ?>">
|
||||
<div class="<?php lightspeed_media_col_class() ?>">
|
||||
<div class="areoi-media-col-content">
|
||||
<?php lightspeed_spacer( lightspeed_get_attribute( 'media_shape', 'square' ) ) ?>
|
||||
<?php if ( $media['type'] == 'image' ) : ?>
|
||||
<img src="<?php echo $media['url'] ?>" class="d-block img-fluid" alt="<?php echo $media['alt'] ?>" width="<?php echo $media['width'] ?>" height="<?php echo $media['height'] ?>">
|
||||
<?php else : ?>
|
||||
<video src="<?php echo $media['url'] ?>" muted playsinline autoplay loop class="img-fluid"></video>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<?php if ( count( lightspeed_get_attribute( 'gallery', array() ) ) > 1 ) : ?>
|
||||
<button class="carousel-control-prev" type="button" data-bs-target="#<?php lightspeed_block_id() ?>-media-carousel" data-bs-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Previous</span>
|
||||
</button>
|
||||
<button class="carousel-control-next" type="button" data-bs-target="#<?php lightspeed_block_id() ?>-media-carousel" data-bs-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Next</span>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,650 @@
|
||||
<?php
|
||||
require_once( AREOI__PLUGIN_LIGHTSPEED_DIR . 'helpers.php' );
|
||||
|
||||
class AREOI_Lightspeed
|
||||
{
|
||||
private static $initiated = false;
|
||||
|
||||
public static function init() {
|
||||
|
||||
global $lightspeed_block_order;
|
||||
$lightspeed_block_order = 1;
|
||||
|
||||
if ( ! self::$initiated ) {
|
||||
self::init_hooks();
|
||||
}
|
||||
}
|
||||
|
||||
private static function init_hooks()
|
||||
{
|
||||
self::$initiated = true;
|
||||
|
||||
self::register_blocks();
|
||||
|
||||
if ( areoi2_get_option( 'areoi-lightspeed-features-include-block-patterns', false ) ) {
|
||||
|
||||
self::block_pattern_categories();
|
||||
|
||||
self::block_patterns();
|
||||
|
||||
}
|
||||
|
||||
self::add_menu_locations();
|
||||
|
||||
add_action( 'wp_enqueue_scripts', array( 'AREOI_Lightspeed', 'add_scripts' ), 100 );
|
||||
|
||||
add_action( 'wp_enqueue_scripts', array( 'AREOI_Lightspeed', 'add_styles' ), 100 );
|
||||
|
||||
if ( is_admin() ) {
|
||||
add_action( 'admin_enqueue_scripts', array( 'AREOI_Lightspeed', 'add_styles' ), 100 );
|
||||
add_action( 'admin_enqueue_scripts', array( 'AREOI_Lightspeed', 'add_admin_scripts' ) );
|
||||
}
|
||||
|
||||
self::add_introduction_modals();
|
||||
|
||||
self::lazy_load();
|
||||
|
||||
self::convert_to_webp();
|
||||
}
|
||||
|
||||
public static function add_introduction_modals()
|
||||
{
|
||||
add_filter( 'the_content', function( $content ) {
|
||||
global $areoi_introduction_modals;
|
||||
|
||||
$modal_content = '';
|
||||
|
||||
if ( !empty( $areoi_introduction_modals ) ) {
|
||||
foreach ( $areoi_introduction_modals as $modal_key => $modal ) {
|
||||
$modal_content .= $modal;
|
||||
}
|
||||
}
|
||||
|
||||
return $content . $modal_content;
|
||||
}, 100 );
|
||||
}
|
||||
|
||||
public static function register_blocks()
|
||||
{
|
||||
add_filter( 'block_categories_all', [ 'AREOI_Lightspeed', 'add_block_categories' ], 100, 2 );
|
||||
|
||||
require AREOI__PLUGIN_LIGHTSPEED_DIR . 'blocks/index.php';
|
||||
|
||||
if ( is_admin() ) {
|
||||
$asset_file = include( AREOI__PLUGIN_LIGHTSPEED_DIR . 'assets/build/index.asset.php');
|
||||
|
||||
wp_enqueue_script(
|
||||
'areoi-lightspeed-blocks',
|
||||
AREOI__PLUGIN_LIGHTSPEED_URI . 'assets/build/index.js',
|
||||
array_merge( $asset_file['dependencies'], array( 'areoi-blocks' ) ),
|
||||
$asset_file['version']
|
||||
);
|
||||
|
||||
wp_localize_script( 'areoi-lightspeed-blocks', 'areoi_lightspeed_vars', array(
|
||||
'blocks' => self::get_blocks(),
|
||||
'templates' => self::get_templates(),
|
||||
'forms' => self::get_forms(),
|
||||
'is_lightspeed' => areoi_is_lightspeed(),
|
||||
'pattern' => areoi2_get_option( 'areoi-lightspeed-styles-strip-pattern', false ),
|
||||
'divider' => areoi2_get_option( 'areoi-lightspeed-styles-strip-divider', false ),
|
||||
'mask' => areoi2_get_option( 'areoi-lightspeed-styles-image-mask', false ),
|
||||
'transition' => areoi2_get_option( 'areoi-lightspeed-transition-transition', false ),
|
||||
'parallax' => areoi2_get_option( 'areoi-lightspeed-parallax-parallax', false ),
|
||||
'is_icons' => areoi2_get_option( 'areoi-dashboard-global-bootstrap-icon-css', false )
|
||||
) );
|
||||
|
||||
wp_set_script_translations( 'areoi-lightspeed-blocks', AREOI__TEXT_DOMAIN );
|
||||
}
|
||||
}
|
||||
|
||||
public static function add_block_categories( $categories, $post )
|
||||
{
|
||||
$new_category = [
|
||||
'slug' => 'areoi-custom',
|
||||
'title' => __( 'Custom', AREOI__TEXT_DOMAIN ),
|
||||
'icon' => ''
|
||||
];
|
||||
$custom_category = array( $new_category );
|
||||
|
||||
$new_category = [
|
||||
'slug' => 'areoi-lightspeed',
|
||||
'title' => __( 'Lightspeed', AREOI__TEXT_DOMAIN ),
|
||||
'icon' => ''
|
||||
];
|
||||
$lightspeed_category = array( $new_category );
|
||||
|
||||
if ( areoi_is_lightspeed() ) {
|
||||
return array_merge( $custom_category, $lightspeed_category, $categories);
|
||||
}
|
||||
|
||||
return array_merge( $custom_category, $categories, $lightspeed_category );
|
||||
}
|
||||
|
||||
public static function block_pattern_categories()
|
||||
{
|
||||
$templates = self::get_templates();
|
||||
|
||||
foreach ( $templates as $template_key => $template ) {
|
||||
$pattern_key = 'lightspeed/' . $template_key;
|
||||
|
||||
if ( in_array( $pattern_key, [ 'dividers', 'patterns', 'content', 'masks' ] ) ) continue;
|
||||
|
||||
if ( ! WP_Block_Pattern_Categories_Registry::get_instance()->is_registered( $pattern_key ) ) {
|
||||
|
||||
$pattern_name = str_replace( '-', ' ', $template_key );
|
||||
$pattern_name = ucwords( $pattern_name );
|
||||
|
||||
register_block_pattern_category( $pattern_key, array( 'label' => $pattern_name ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static function block_patterns()
|
||||
{
|
||||
$templates = self::get_templates();
|
||||
|
||||
foreach ( $templates as $template_key => $template ) {
|
||||
$pattern_key = 'lightspeed/' . $template_key;
|
||||
|
||||
foreach ( $template as $pattern ) {
|
||||
|
||||
if ( in_array( $template_key, [ 'dividers', 'patterns', 'content', 'masks' ] ) ) continue;
|
||||
|
||||
if ( !$pattern['value'] ) continue;
|
||||
|
||||
$filename = $pattern['value'];
|
||||
|
||||
register_block_pattern(
|
||||
$pattern_key . '/' . $filename,
|
||||
array(
|
||||
'title' => $pattern['label'],
|
||||
'categories' => array( $pattern_key ),
|
||||
'content' => '<!-- wp:areoi-lightspeed/' . $template_key . ' {"filename":"' . $filename . '"} /-->',
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static function add_menu_locations()
|
||||
{
|
||||
register_nav_menus( [
|
||||
'top-menu' => __( 'Lightspeed: Top Menu', AREOI__TEXT_DOMAIN ),
|
||||
'primary-menu' => __( 'Lightspeed: Primary Menu', AREOI__TEXT_DOMAIN ),
|
||||
'more-menu' => __( 'Lightspeed: More Menu', AREOI__TEXT_DOMAIN ),
|
||||
'feature-menu' => __( 'Lightspeed: Feature Menu', AREOI__TEXT_DOMAIN ),
|
||||
'footer-menu' => __( 'Lightspeed: Footer Menu', AREOI__TEXT_DOMAIN ),
|
||||
'bottom-menu' => __( 'Lightspeed: Bottom Menu', AREOI__TEXT_DOMAIN ),
|
||||
] );
|
||||
}
|
||||
|
||||
public static function add_scripts()
|
||||
{
|
||||
$enqueue = 'assets/js/global.js';
|
||||
|
||||
wp_enqueue_script(
|
||||
'areoi-lightspeed',
|
||||
AREOI__PLUGIN_LIGHTSPEED_URI . $enqueue,
|
||||
array( 'jquery' ),
|
||||
filemtime( AREOI__PLUGIN_LIGHTSPEED_DIR . $enqueue )
|
||||
);
|
||||
|
||||
$scripts = '';
|
||||
|
||||
ob_start(); include( AREOI__PLUGIN_LIGHTSPEED_DIR . 'assets/js/site.js' ); $scripts .= ob_get_clean();
|
||||
|
||||
$parallax = areoi2_get_option( 'areoi-lightspeed-parallax-parallax', false );
|
||||
if ( $parallax ) {
|
||||
$enqueue = 'assets/js/parallax.js';
|
||||
if ( file_exists( AREOI__PLUGIN_LIGHTSPEED_DIR . $enqueue ) ) {
|
||||
ob_start(); include( AREOI__PLUGIN_LIGHTSPEED_DIR . $enqueue ); $scripts .= ob_get_clean();
|
||||
}
|
||||
}
|
||||
|
||||
$transition = areoi2_get_option( 'areoi-lightspeed-transition-transition', false );
|
||||
if ( $transition ) {
|
||||
$enqueue = 'assets/js/transition.js';
|
||||
if ( file_exists( AREOI__PLUGIN_LIGHTSPEED_DIR . $enqueue ) ) {
|
||||
ob_start(); include( AREOI__PLUGIN_LIGHTSPEED_DIR . $enqueue ); $scripts .= ob_get_clean();
|
||||
}
|
||||
}
|
||||
|
||||
$page_transition = areoi2_get_option( 'areoi-lightspeed-transition-page', false );
|
||||
if ( $page_transition ) {
|
||||
$enqueue = 'assets/js/transition-page.js';
|
||||
if ( file_exists( AREOI__PLUGIN_LIGHTSPEED_DIR . $enqueue ) ) {
|
||||
ob_start(); include( AREOI__PLUGIN_LIGHTSPEED_DIR . $enqueue ); $scripts .= ob_get_clean();
|
||||
}
|
||||
}
|
||||
|
||||
$background_transition = areoi2_get_option( 'areoi-lightspeed-transition-background', false );
|
||||
if ( $background_transition ) {
|
||||
$enqueue = 'assets/js/transition-background.js';
|
||||
if ( file_exists( AREOI__PLUGIN_LIGHTSPEED_DIR . $enqueue ) ) {
|
||||
ob_start(); include( AREOI__PLUGIN_LIGHTSPEED_DIR . $enqueue ); $scripts .= ob_get_clean();
|
||||
}
|
||||
}
|
||||
|
||||
$gallery = areoi2_get_option( 'areoi-lightspeed-features-include-gallery', false );
|
||||
if ( $gallery ) {
|
||||
$enqueue = 'assets/js/gallery.js';
|
||||
if ( file_exists( AREOI__PLUGIN_LIGHTSPEED_DIR . $enqueue ) ) {
|
||||
ob_start(); include( AREOI__PLUGIN_LIGHTSPEED_DIR . $enqueue ); $scripts .= ob_get_clean();
|
||||
}
|
||||
}
|
||||
|
||||
if ( $scripts ) {
|
||||
$scripts = '
|
||||
jQuery(document).ready(function($){
|
||||
' . $scripts . '
|
||||
});
|
||||
';
|
||||
wp_add_inline_script( 'areoi-lightspeed', areoi_minify_js( $scripts ) );
|
||||
}
|
||||
}
|
||||
|
||||
public static function add_admin_scripts()
|
||||
{
|
||||
$enqueue = 'assets/js/admin.js';
|
||||
|
||||
wp_enqueue_script(
|
||||
'areoi-lightspeed-admin',
|
||||
AREOI__PLUGIN_LIGHTSPEED_URI . $enqueue,
|
||||
array( 'jquery' ),
|
||||
filemtime( AREOI__PLUGIN_LIGHTSPEED_DIR . $enqueue )
|
||||
);
|
||||
|
||||
self::add_custom_fonts();
|
||||
}
|
||||
|
||||
public static function get_blocks()
|
||||
{
|
||||
$plugin_directory = AREOI__PLUGIN_LIGHTSPEED_DIR . 'blocks/';
|
||||
$plugin_uri = AREOI__PLUGIN_LIGHTSPEED_URI . 'blocks/';
|
||||
$plugin_templates = lightspeed_list_files_with_uri( $plugin_directory, $plugin_uri );
|
||||
|
||||
$custom_theme_directory = lightspeed_get_custom_directory();
|
||||
$custom_theme_uri = lightspeed_get_custom_directory_uri();
|
||||
$custom_theme_templates = lightspeed_list_files_with_uri( $custom_theme_directory, $custom_theme_uri );
|
||||
|
||||
$child_custom_theme_templates = array();
|
||||
if ( is_child_theme() ) {
|
||||
$child_custom_theme_directory = lightspeed_get_custom_directory( true );
|
||||
$child_custom_theme_uri = lightspeed_get_custom_directory_uri( true );
|
||||
$child_custom_theme_templates = lightspeed_list_files_with_uri( $child_custom_theme_directory, $child_custom_theme_uri );
|
||||
}
|
||||
|
||||
$block_folders = array_merge( $plugin_templates, $custom_theme_templates, $child_custom_theme_templates );
|
||||
|
||||
return $block_folders;
|
||||
}
|
||||
|
||||
public static function get_templates()
|
||||
{
|
||||
$block_folders = array(
|
||||
'hero' => 'hero/templates',
|
||||
'header' => 'header/templates',
|
||||
'footer' => 'footer/templates',
|
||||
'content-with-media'=> 'content-with-media/templates',
|
||||
'content-with-items'=> 'content-with-items/templates',
|
||||
'media' => 'media/templates',
|
||||
'posts' => 'posts/templates',
|
||||
'call-to-action' => 'call-to-action/templates',
|
||||
'next-and-previous' => 'next-and-previous/templates',
|
||||
'logos' => 'logos/templates',
|
||||
'contact' => 'contact/templates',
|
||||
'post-details' => 'post-details/templates',
|
||||
'search' => 'search/templates',
|
||||
);
|
||||
|
||||
$theme_custom_directory = lightspeed_get_custom_directory();
|
||||
$theme_custom_templates = lightspeed_list_files( $theme_custom_directory );
|
||||
|
||||
if ( !empty( $theme_custom_templates ) ) {
|
||||
foreach ( $theme_custom_templates as $template_key => $template ) {
|
||||
if ( !isset( $block_folders[$template] ) ) {
|
||||
$block_folders[$template] = 'custom/' . $template . '/templates';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( is_child_theme() ) {
|
||||
$theme_custom_directory = lightspeed_get_custom_directory( true );
|
||||
$theme_custom_templates = lightspeed_list_files( $theme_custom_directory );
|
||||
|
||||
if ( !empty( $theme_custom_templates ) ) {
|
||||
foreach ( $theme_custom_templates as $template_key => $template ) {
|
||||
if ( !isset( $block_folders[$template] ) ) {
|
||||
$block_folders[$template] = 'custom/' . $template . '/templates';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$templates = lightspeed_get_block_templates( $block_folders );
|
||||
|
||||
$block_folders = array();
|
||||
$block_folders['dividers'] = 'dividers';
|
||||
$block_folders['patterns'] = 'patterns';
|
||||
$block_folders['content'] = 'content';
|
||||
$block_folders['masks'] = 'masks';
|
||||
|
||||
$templates = array_merge( $templates, lightspeed_get_block_templates( $block_folders, false ) );
|
||||
|
||||
return $templates;
|
||||
}
|
||||
|
||||
public static function get_forms()
|
||||
{
|
||||
$forms = array(
|
||||
array( 'value' => '', 'label' => 'None' )
|
||||
);
|
||||
|
||||
if ( class_exists( 'Ninja_Forms' ) ) {
|
||||
$ninja_forms = Ninja_Forms()->form()->get_forms();
|
||||
|
||||
foreach ( $ninja_forms as $form_key => $form ) {
|
||||
|
||||
$forms[] = array(
|
||||
'value' => $form->get_id(),
|
||||
'label' => $form->get_setting( 'title' )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $forms;
|
||||
}
|
||||
|
||||
public static function add_custom_fonts()
|
||||
{
|
||||
$fonts = array();
|
||||
$heading_font = areoi2_get_option( 'areoi-lightspeed-company-heading-font-url', '' );
|
||||
$body_font = areoi2_get_option( 'areoi-lightspeed-company-body-font-url', '' );
|
||||
if ( $heading_font ) $fonts['areoi-heading-font'] = $heading_font;
|
||||
if ( $body_font && $body_font != $heading_font ) $fonts['areoi-body-font'] = $body_font;
|
||||
|
||||
if ( !empty( $fonts ) ) {
|
||||
foreach ( $fonts as $font_key => $font ) {
|
||||
wp_enqueue_style( $font_key, $font, array(), '' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static function add_styles()
|
||||
{
|
||||
self::add_custom_fonts();
|
||||
|
||||
ob_start();
|
||||
include( AREOI__PLUGIN_LIGHTSPEED_DIR . 'assets/css/lightspeed.css' );
|
||||
|
||||
$styles = ob_get_clean();
|
||||
|
||||
$frame = areoi2_get_option( 'areoi-lightspeed-styles-frame', false );
|
||||
if ( $frame ) {
|
||||
|
||||
add_action( 'wp_body_open', function() {
|
||||
echo '
|
||||
<div class="areoi-frame areoi-frame-top">
|
||||
<svg class="areoi-frame-corner-left" xmlns="http://www.w3.org/2000/svg" width="23.001" height="23.001" viewBox="0 0 23.001 23.001">
|
||||
<path d="M0 23V0h23v.022A23.986 23.986 0 0 0 .02 23.002z"/></svg>
|
||||
<svg class="areoi-frame-corner-right" xmlns="http://www.w3.org/2000/svg" width="23.001" height="23.001" viewBox="0 0 23.001 23.001">
|
||||
<path d="M0 23V0h23v.022A23.986 23.986 0 0 0 .02 23.002z"/></svg>
|
||||
</div>
|
||||
<div class="areoi-frame areoi-frame-left"></div>
|
||||
<div class="areoi-frame areoi-frame-right"></div>
|
||||
<div class="areoi-frame areoi-frame-bottom">
|
||||
<svg class="areoi-frame-corner-left" xmlns="http://www.w3.org/2000/svg" width="23.001" height="23.001" viewBox="0 0 23.001 23.001">
|
||||
<path d="M0 23V0h23v.022A23.986 23.986 0 0 0 .02 23.002z"/></svg>
|
||||
<svg class="areoi-frame-corner-right" xmlns="http://www.w3.org/2000/svg" width="23.001" height="23.001" viewBox="0 0 23.001 23.001">
|
||||
<path d="M0 23V0h23v.022A23.986 23.986 0 0 0 .02 23.002z"/></svg>
|
||||
</div>
|
||||
';
|
||||
});
|
||||
|
||||
$frame_color = areoi2_get_option( 'areoi-lightspeed-styles-frame-color', '#fff' );
|
||||
$styles .= '
|
||||
.areoi-frame {
|
||||
background-color: ' . $frame_color . ';
|
||||
}
|
||||
.areoi-frame path {
|
||||
fill: ' . $frame_color . ';
|
||||
}
|
||||
';
|
||||
}
|
||||
|
||||
$gallery = areoi2_get_option( 'areoi-lightspeed-gallery-include', false );
|
||||
if ( $gallery ) {
|
||||
|
||||
add_action( 'wp_body_open', function() {
|
||||
echo '
|
||||
<div class="modal fade" id="areoi-gallery" tabindex="-1" aria-labelledby="areoi-gallery" aria-hidden="true">
|
||||
<div class="modal-dialog modal-fullscreen">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title text-dark" id="areoi-gallery-title">' . __( 'Gallery' ) . '</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="areoi-gallery-carousel" class="carousel carousel-dark slide h-100">
|
||||
<div class="carousel-inner h-100"></div>
|
||||
|
||||
<button class="carousel-control-prev" type="button" data-bs-target="#areoi-gallery-carousel" data-bs-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Previous</span>
|
||||
</button>
|
||||
<button class="carousel-control-next" type="button" data-bs-target="#areoi-gallery-carousel" data-bs-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Next</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-dark" data-bs-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
});
|
||||
}
|
||||
|
||||
function body_classes( $classes )
|
||||
{
|
||||
$transition = areoi2_get_option( 'areoi-lightspeed-transition-transition', false );
|
||||
$page_transition = areoi2_get_option( 'areoi-lightspeed-transition-page', false );
|
||||
$background_transition = areoi2_get_option( 'areoi-lightspeed-transition-background', false );
|
||||
$hover_transition = areoi2_get_option( 'areoi-lightspeed-transition-hover', false );
|
||||
$parallax = areoi2_get_option( 'areoi-lightspeed-parallax-parallax', false );
|
||||
$background_parallax = areoi2_get_option( 'areoi-lightspeed-parallax-background', false );
|
||||
$components_parallax = areoi2_get_option( 'areoi-lightspeed-parallax-components', false );
|
||||
$patterns_parallax = areoi2_get_option( 'areoi-lightspeed-parallax-patterns', false );
|
||||
$frame = areoi2_get_option( 'areoi-lightspeed-styles-frame', false );
|
||||
$gallery = areoi2_get_option( 'areoi-lightspeed-gallery-include', false );
|
||||
|
||||
if ( $transition ) $classes[] = 'has-areoi-transition areoi-transition-' . $transition;
|
||||
if ( $page_transition ) $classes[] = 'has-areoi-page-transition';
|
||||
if ( $background_transition ) $classes[] = 'has-areoi-background-transition';
|
||||
if ( $hover_transition ) $classes[] = 'has-areoi-hover-transition areoi-hover-transition-' . $hover_transition;
|
||||
if ( $parallax ) $classes[] = 'has-areoi-parallax';
|
||||
if ( $background_parallax ) $classes[] = 'has-areoi-parallax-background';
|
||||
if ( $components_parallax ) $classes[] = 'has-areoi-parallax-components';
|
||||
if ( $patterns_parallax ) $classes[] = 'has-areoi-parallax-patterns';
|
||||
if ( $frame ) $classes[] = 'has-areoi-frame areoi-frame-' . $frame;
|
||||
if ( $gallery ) $classes[] = 'has-areoi-gallery';
|
||||
|
||||
return $classes;
|
||||
}
|
||||
add_filter( 'body_class','body_classes' );
|
||||
|
||||
$divider = areoi2_get_option( 'areoi-lightspeed-styles-strip-divider', 'none.svg' );
|
||||
if ( !$divider ) $divider = 'none.svg';
|
||||
$divider_template = lightspeed_get_dividers_directory_uri( $divider );
|
||||
$styles .= '
|
||||
.areoi-divider {
|
||||
mask-image: url(' . $divider_template . ');
|
||||
-webkit-mask-image: url(' . $divider_template . ');
|
||||
}
|
||||
';
|
||||
|
||||
$mask = areoi2_get_option( 'areoi-lightspeed-styles-image-mask', 'none.svg' );
|
||||
if ( !$mask ) $mask = 'none.svg';
|
||||
$mask_template = lightspeed_get_masks_directory_uri( $mask );
|
||||
$styles .= '
|
||||
.areoi-has-mask {
|
||||
mask-image: url(' . $mask_template . ');
|
||||
-webkit-mask-image: url(' . $mask_template . ');
|
||||
}
|
||||
';
|
||||
if ( $mask != 'none.svg' ) {
|
||||
$styles .= '
|
||||
.areoi-has-mask {
|
||||
mask-position: center !important;
|
||||
mask-size: 100% 90% !important;
|
||||
-webkit-mask-position: center !important;
|
||||
-webkit-mask-size: 100% 90% !important;
|
||||
}
|
||||
';
|
||||
}
|
||||
|
||||
if ( $styles ) {
|
||||
$styles = str_replace( 'url(../', 'url(' . AREOI__PLUGIN_LIGHTSPEED_URI . '/assets/', $styles );
|
||||
wp_add_inline_style( 'areoi-style-index', areoi_minify_css( $styles ) );
|
||||
wp_add_inline_style( 'areoi-index', areoi_minify_css( $styles ) );
|
||||
}
|
||||
}
|
||||
|
||||
public static function lazy_load()
|
||||
{
|
||||
$is_lazy = areoi2_get_option( 'areoi-lightspeed-performance-lazy-load', false );
|
||||
|
||||
if ( $is_lazy ) {
|
||||
|
||||
add_filter( 'wp_lazy_loading_enabled', '__return_false' );
|
||||
|
||||
add_action( 'wp_enqueue_scripts', function() {
|
||||
$scripts = '';
|
||||
|
||||
$enqueue = 'assets/js/lazy-load.js';
|
||||
if ( file_exists( AREOI__PLUGIN_LIGHTSPEED_DIR . $enqueue ) ) {
|
||||
ob_start(); include( AREOI__PLUGIN_LIGHTSPEED_DIR . $enqueue ); $scripts .= ob_get_clean();
|
||||
}
|
||||
|
||||
if ( $scripts ) {
|
||||
$scripts = '
|
||||
jQuery(document).ready(function($){
|
||||
' . $scripts . '
|
||||
});
|
||||
';
|
||||
wp_add_inline_script( 'areoi-lightspeed', areoi_minify_js( $scripts ) );
|
||||
}
|
||||
}, 110 );
|
||||
|
||||
add_filter( 'the_content', function( $content ) {
|
||||
|
||||
$images = array();
|
||||
if ( $content ) {
|
||||
|
||||
libxml_use_internal_errors( true );
|
||||
$content = mb_convert_encoding( $content, 'HTML-ENTITIES', "UTF-8" );
|
||||
$document = new DOMDocument();
|
||||
$document->formatOutput = FALSE;
|
||||
$document->preserveWhiteSpace = FALSE;
|
||||
$document->loadHTML( utf8_decode( $content ) );
|
||||
|
||||
$head = $document->getElementsByTagName('head');
|
||||
$body = $document->getElementsByTagName('body');
|
||||
$content = '';
|
||||
if ( $head && 0 < $head->length ) {
|
||||
$head = $head->item(0);
|
||||
foreach ( $head->childNodes as $childNode ) $content .= $document->savehtml( $childNode );
|
||||
}
|
||||
if ( $body && 0 < $body->length ) {
|
||||
$body = $body->item(0);
|
||||
foreach ( $body->childNodes as $childNode ) $content .= $document->savehtml( $childNode );
|
||||
}
|
||||
|
||||
$imgs = $document->getElementsByTagName('img');
|
||||
foreach ($imgs as $img) {
|
||||
|
||||
$original = $img->ownerDocument->savehtml( $img );
|
||||
|
||||
$class = $img->getAttribute( 'class' );
|
||||
$style = $img->getAttribute( 'style' );
|
||||
$img->setAttribute( 'class', 'areoi-lazy ' . $class );
|
||||
$img->setAttribute( 'style', 'opacity: 0;' . $style );
|
||||
$img->setAttribute( 'data-src', $img->getAttribute( 'src' ) );
|
||||
$img->removeAttribute( 'src' );
|
||||
$new = $img->ownerDocument->savehtml( $img );
|
||||
|
||||
$images[] = array(
|
||||
'original' => $original,
|
||||
'new' => $new
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ( !empty( $images ) ) {
|
||||
foreach ( $images as $image_key => $image ) {
|
||||
$content = str_replace( $image['original'], $image['new'], $content );
|
||||
}
|
||||
}
|
||||
|
||||
return $content;
|
||||
}, 100 );
|
||||
}
|
||||
}
|
||||
|
||||
public static function convert_to_webp()
|
||||
{
|
||||
$is_webp = areoi2_get_option( 'areoi-lightspeed-performance-webp', false );
|
||||
|
||||
if ( $is_webp ) {
|
||||
|
||||
add_action( 'upload_mimes', function( $mimes ) {
|
||||
if ( empty( $mimes['webp'] ) ) {
|
||||
$mimes['webp'] = 'image/webp';
|
||||
}
|
||||
return $mimes;
|
||||
} );
|
||||
|
||||
add_filter( 'wp_handle_upload', function( $file ) {
|
||||
|
||||
$img = null;
|
||||
|
||||
$pathinfo = pathinfo( $file['file'] );
|
||||
$filename = $pathinfo['dirname'] . '/' . $pathinfo['filename'] . '.webp';
|
||||
|
||||
$pathinfo = pathinfo( $file['url'] );
|
||||
$url = $pathinfo['dirname'] . '/' . $pathinfo['filename'] . '.webp';
|
||||
|
||||
if ( function_exists( 'imagecreatefrompng' ) && $file['type'] === 'image/png' ) {
|
||||
$img = imagecreatefrompng( $file['file'] );
|
||||
} elseif ( function_exists( 'imagecreatefromjpeg' ) && in_array( $file['type'], array( 'image/jpeg', 'image/jpg' ) ) ) {
|
||||
$img = imagecreatefromjpeg( $file['file'] );
|
||||
} elseif ( function_exists( 'imagecreatefromgif' ) && $file['type'] === 'image/gif' ) {
|
||||
$img = imagecreatefromgif( $file['file'] );
|
||||
}
|
||||
|
||||
if ( $img ) {
|
||||
imagepalettetotruecolor( $img );
|
||||
imagealphablending( $img, true );
|
||||
imagesavealpha( $img, true );
|
||||
imagewebp( $img, $filename, 100 );
|
||||
imagedestroy( $img );
|
||||
unlink( $file['file'] );
|
||||
|
||||
$file = array(
|
||||
'file' => $filename,
|
||||
'url' => $url,
|
||||
'type' => 'image/webp'
|
||||
);
|
||||
}
|
||||
|
||||
return $file;
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( areoi_is_lightspeed() ) add_action( 'init', array( 'AREOI_Lightspeed', 'init' ) );
|
||||
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
|
||||
class AREOI_Plugins
|
||||
{
|
||||
private static $initiated = false;
|
||||
|
||||
public static function init() {
|
||||
|
||||
if ( !self::$initiated ) {
|
||||
|
||||
self::override_ninja_forms();
|
||||
}
|
||||
}
|
||||
|
||||
public static function override_ninja_forms()
|
||||
{
|
||||
$override = areoi2_get_option('areoi-lightspeed-plugins-nf-styles', false );
|
||||
|
||||
if ( !areoi_has_plugin( 'ninja-forms/ninja-forms.php' ) || !$override ) return;
|
||||
|
||||
$settings = areoi2_get_option( 'ninja_forms_settings', null );
|
||||
|
||||
if ( $settings ) {
|
||||
if ( is_array( $settings ) ) {
|
||||
$settings['opinionated_styles'] = '';
|
||||
update_option( 'ninja_forms_settings', $settings );
|
||||
}
|
||||
}
|
||||
|
||||
add_filter( 'body_class', function( $classes ) {
|
||||
$classes[] = 'areoi-override-nf';
|
||||
return $classes;
|
||||
} );
|
||||
|
||||
add_filter( 'ninja_forms_field_template_file_paths', function( $paths ) {
|
||||
$paths[] = AREOI__PLUGIN_LIGHTSPEED_DIR . 'plugins/ninja-forms/templates/';
|
||||
return $paths;
|
||||
});
|
||||
|
||||
add_action( 'ninja_forms_display_fields', function( $fields = array(), $form_id = null ) {
|
||||
|
||||
foreach ( $fields as $field_key => $field ) {
|
||||
|
||||
$fields[$field_key]['container_class'] .= ' mb-3';
|
||||
|
||||
switch ( $field['type'] ) {
|
||||
case 'listselect':
|
||||
$fields[$field_key]['element_class'] .= ' form-select';
|
||||
break;
|
||||
case 'color':
|
||||
$fields[$field_key]['element_class'] .= ' form-control form-control-color';
|
||||
break;
|
||||
case 'submit':
|
||||
case 'button':
|
||||
$fields[$field_key]['element_class'] .= ' btn';
|
||||
break;
|
||||
case 'checkbox':
|
||||
case 'listcheckbox':
|
||||
$fields[$field_key]['element_class'] .= ' form-check-input';
|
||||
break;
|
||||
default:
|
||||
$fields[$field_key]['element_class'] .= ' form-control';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $fields;
|
||||
} );
|
||||
|
||||
add_action( 'wp_enqueue_scripts', function() {
|
||||
$styles = '
|
||||
.nf-form-cont .alert {
|
||||
display: none;
|
||||
}
|
||||
.nf-form-cont.areoi-nf-has-errors .alert {
|
||||
display: block;
|
||||
}
|
||||
.nf-form-cont.areoi-nf-has-errors .invalid-feedback {
|
||||
display: block;
|
||||
}
|
||||
.nf-form-cont .form-label label {
|
||||
font-weight: inherit;
|
||||
}
|
||||
';
|
||||
wp_add_inline_style( 'nf-display', areoi_minify_css( $styles ) );
|
||||
|
||||
$scripts = '';
|
||||
$enqueue = 'plugins/ninja-forms/ninja-forms.js';
|
||||
if ( file_exists( AREOI__PLUGIN_LIGHTSPEED_DIR . $enqueue ) ) {
|
||||
ob_start(); include( AREOI__PLUGIN_LIGHTSPEED_DIR . $enqueue ); $scripts = ob_get_clean();
|
||||
}
|
||||
wp_add_inline_script( 'nf-front-end', areoi_minify_js( $scripts ) );
|
||||
} );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
class AREOI_HAF_Walker_Nav_Menu_Feature_Carousel extends Walker_Nav_Menu
|
||||
{
|
||||
public $item_count = 0;
|
||||
|
||||
public function start_lvl( &$output, $depth = 0, $args = null )
|
||||
{
|
||||
if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
|
||||
$t = '';
|
||||
$n = '';
|
||||
} else {
|
||||
$t = "\t";
|
||||
$n = "\n";
|
||||
}
|
||||
$indent = str_repeat( $t, $depth );
|
||||
|
||||
$classes = array( 'sub-menu' );
|
||||
|
||||
$class_names = implode( ' ', apply_filters( 'nav_menu_submenu_css_class', $classes, $args, $depth ) );
|
||||
$class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
|
||||
|
||||
$output .= "{$n}{$indent}<ul$class_names>{$n}";
|
||||
}
|
||||
|
||||
public function end_lvl( &$output, $depth = 0, $args = null )
|
||||
{
|
||||
if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
|
||||
$t = '';
|
||||
$n = '';
|
||||
} else {
|
||||
$t = "\t";
|
||||
$n = "\n";
|
||||
}
|
||||
$indent = str_repeat( $t, $depth );
|
||||
$output .= "$indent</ul>{$n}";
|
||||
}
|
||||
|
||||
public function start_el( &$output, $data_object, $depth = 0, $args = null, $current_object_id = 0 )
|
||||
{
|
||||
$menu_item = $data_object;
|
||||
|
||||
if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
|
||||
$t = '';
|
||||
$n = '';
|
||||
} else {
|
||||
$t = "\t";
|
||||
$n = "\n";
|
||||
}
|
||||
$indent = ( $depth ) ? str_repeat( $t, $depth ) : '';
|
||||
|
||||
$classes = empty( $menu_item->classes ) ? array() : (array) $menu_item->classes;
|
||||
$classes[] = 'menu-item-' . $menu_item->ID;
|
||||
if ( $depth == 0 ) $classes[] = 'carousel-item h-100';
|
||||
if ( $this->item_count === 0 ) $classes[] = 'active';
|
||||
$this->item_count++;
|
||||
|
||||
$args = apply_filters( 'nav_menu_item_args', $args, $menu_item, $depth );
|
||||
|
||||
$class_names = implode( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $menu_item, $args, $depth ) );
|
||||
$class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
|
||||
|
||||
$id = apply_filters( 'nav_menu_item_id', 'menu-item-' . $menu_item->ID, $menu_item, $args, $depth );
|
||||
$id = $id ? ' id="' . esc_attr( $id ) . '"' : '';
|
||||
|
||||
$output .= $indent . '<li' . $id . $class_names . '>';
|
||||
|
||||
$atts = array();
|
||||
$atts['title'] = ! empty( $menu_item->attr_title ) ? $menu_item->attr_title : '';
|
||||
$atts['target'] = ! empty( $menu_item->target ) ? $menu_item->target : '';
|
||||
if ( '_blank' === $menu_item->target && empty( $menu_item->xfn ) ) {
|
||||
$atts['rel'] = 'noopener';
|
||||
} else {
|
||||
$atts['rel'] = $menu_item->xfn;
|
||||
}
|
||||
$atts['href'] = ! empty( $menu_item->url ) ? $menu_item->url : '';
|
||||
$atts['aria-current'] = $menu_item->current ? 'page' : '';
|
||||
|
||||
$atts = apply_filters( 'nav_menu_link_attributes', $atts, $menu_item, $args, $depth );
|
||||
|
||||
$attributes = '';
|
||||
foreach ( $atts as $attr => $value ) {
|
||||
if ( is_scalar( $value ) && '' !== $value && false !== $value ) {
|
||||
$value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
|
||||
$attributes .= ' ' . $attr . '="' . $value . '"';
|
||||
}
|
||||
}
|
||||
|
||||
$title = apply_filters( 'the_title', $menu_item->title, $menu_item->ID );
|
||||
|
||||
$title = apply_filters( 'nav_menu_item_title', $title, $menu_item, $args, $depth );
|
||||
|
||||
$thumb_id = get_post_thumbnail_id( $menu_item->object_id );
|
||||
$featured_image = '';
|
||||
if ( $thumb_id ) {
|
||||
$featured_image = '<span class="areoi-menu-item-featured-image" style="background-image: url(' . wp_get_attachment_image_url( $thumb_id, 'poster') . ')"></span>';
|
||||
} elseif ( areoi2_get_option( 'areoi-lightspeed-company-include-lightspeed', false ) ) {
|
||||
$featured_image = '<span class="areoi-menu-item-featured-image" style="background-image: url(' . lightspeed_get_placeholder_images( 'rand' )['url'] . ')"></span>';
|
||||
}
|
||||
|
||||
$item_output = $args->before;
|
||||
$item_output .= '<a' . $attributes . '>';
|
||||
$item_output .= $featured_image;
|
||||
$item_output .= $args->link_before . $title . $args->link_after;
|
||||
$item_output .= '</a>';
|
||||
$item_output .= $args->after;
|
||||
|
||||
$output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $menu_item, $depth, $args );
|
||||
}
|
||||
|
||||
public function end_el( &$output, $data_object, $depth = 0, $args = null )
|
||||
{
|
||||
if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
|
||||
$t = '';
|
||||
$n = '';
|
||||
} else {
|
||||
$t = "\t";
|
||||
$n = "\n";
|
||||
}
|
||||
$output .= "</li>{$n}";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
class AREOI_HAF_Walker_Nav_Menu_Feature extends Walker_Nav_Menu
|
||||
{
|
||||
public function start_lvl( &$output, $depth = 0, $args = null )
|
||||
{
|
||||
if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
|
||||
$t = '';
|
||||
$n = '';
|
||||
} else {
|
||||
$t = "\t";
|
||||
$n = "\n";
|
||||
}
|
||||
$indent = str_repeat( $t, $depth );
|
||||
|
||||
$classes = array( 'sub-menu' );
|
||||
|
||||
$class_names = implode( ' ', apply_filters( 'nav_menu_submenu_css_class', $classes, $args, $depth ) );
|
||||
$class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
|
||||
|
||||
$output .= "{$n}{$indent}<ul$class_names>{$n}";
|
||||
}
|
||||
|
||||
public function end_lvl( &$output, $depth = 0, $args = null )
|
||||
{
|
||||
if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
|
||||
$t = '';
|
||||
$n = '';
|
||||
} else {
|
||||
$t = "\t";
|
||||
$n = "\n";
|
||||
}
|
||||
$indent = str_repeat( $t, $depth );
|
||||
$output .= "$indent</ul>{$n}";
|
||||
}
|
||||
|
||||
public function start_el( &$output, $data_object, $depth = 0, $args = null, $current_object_id = 0 )
|
||||
{
|
||||
$menu_item = $data_object;
|
||||
|
||||
if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
|
||||
$t = '';
|
||||
$n = '';
|
||||
} else {
|
||||
$t = "\t";
|
||||
$n = "\n";
|
||||
}
|
||||
$indent = ( $depth ) ? str_repeat( $t, $depth ) : '';
|
||||
|
||||
$classes = empty( $menu_item->classes ) ? array() : (array) $menu_item->classes;
|
||||
$classes[] = 'menu-item-' . $menu_item->ID;
|
||||
$classes[] = 'areoi-has-url';
|
||||
|
||||
$args = apply_filters( 'nav_menu_item_args', $args, $menu_item, $depth );
|
||||
|
||||
$class_names = implode( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $menu_item, $args, $depth ) );
|
||||
$class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
|
||||
|
||||
$id = apply_filters( 'nav_menu_item_id', 'menu-item-' . $menu_item->ID, $menu_item, $args, $depth );
|
||||
$id = $id ? ' id="' . esc_attr( $id ) . '"' : '';
|
||||
|
||||
$output .= $indent . '<li' . $id . $class_names . '>';
|
||||
|
||||
$atts = array();
|
||||
$atts['title'] = ! empty( $menu_item->attr_title ) ? $menu_item->attr_title : '';
|
||||
$atts['target'] = ! empty( $menu_item->target ) ? $menu_item->target : '';
|
||||
if ( '_blank' === $menu_item->target && empty( $menu_item->xfn ) ) {
|
||||
$atts['rel'] = 'noopener';
|
||||
} else {
|
||||
$atts['rel'] = $menu_item->xfn;
|
||||
}
|
||||
$atts['href'] = ! empty( $menu_item->url ) ? $menu_item->url : '';
|
||||
$atts['aria-current'] = $menu_item->current ? 'page' : '';
|
||||
|
||||
$atts = apply_filters( 'nav_menu_link_attributes', $atts, $menu_item, $args, $depth );
|
||||
|
||||
$attributes = '';
|
||||
foreach ( $atts as $attr => $value ) {
|
||||
if ( is_scalar( $value ) && '' !== $value && false !== $value ) {
|
||||
$value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
|
||||
$attributes .= ' ' . $attr . '="' . $value . '"';
|
||||
}
|
||||
}
|
||||
|
||||
$title = apply_filters( 'the_title', $menu_item->title, $menu_item->ID );
|
||||
|
||||
$title = apply_filters( 'nav_menu_item_title', $title, $menu_item, $args, $depth );
|
||||
|
||||
$thumb_id = get_post_thumbnail_id( $menu_item->object_id );
|
||||
$featured_image = '';
|
||||
if ( $thumb_id ) {
|
||||
$featured_image = '<span class="areoi-menu-item-featured-image" style="background-image: url(' . wp_get_attachment_image_url( $thumb_id, 'poster') . ')"></span>';
|
||||
}
|
||||
|
||||
$item_output = $args->before;
|
||||
$item_output .= '<a' . $attributes . '>';
|
||||
$item_output .= $featured_image;
|
||||
$item_output .= $args->link_before . $title . $args->link_after;
|
||||
$item_output .= '</a>';
|
||||
$item_output .= $args->after;
|
||||
|
||||
$output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $menu_item, $depth, $args );
|
||||
}
|
||||
|
||||
public function end_el( &$output, $data_object, $depth = 0, $args = null )
|
||||
{
|
||||
if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
|
||||
$t = '';
|
||||
$n = '';
|
||||
} else {
|
||||
$t = "\t";
|
||||
$n = "\n";
|
||||
}
|
||||
$output .= "</li>{$n}";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
class AREOI_HAF_Walker_Nav_Menu_More extends Walker_Nav_Menu
|
||||
{
|
||||
public function start_lvl( &$output, $depth = 0, $args = null )
|
||||
{
|
||||
if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
|
||||
$t = '';
|
||||
$n = '';
|
||||
} else {
|
||||
$t = "\t";
|
||||
$n = "\n";
|
||||
}
|
||||
$indent = str_repeat( $t, $depth );
|
||||
|
||||
$classes = array( 'sub-menu' );
|
||||
|
||||
$class_names = implode( ' ', apply_filters( 'nav_menu_submenu_css_class', $classes, $args, $depth ) );
|
||||
$class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
|
||||
|
||||
$back = '<li><button type="button" class="areoi-menu-back">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"><rect fill="none" height="24" width="24"/><path d="M9,19l1.41-1.41L5.83,13H22V11H5.83l4.59-4.59L9,5l-7,7L9,19z"/></svg>
|
||||
</button></li>';
|
||||
|
||||
$output .= "{$n}{$indent}<div class=\"areoi-sub-menu\">
|
||||
<ul$class_names>{$n}$back";
|
||||
}
|
||||
|
||||
public function end_lvl( &$output, $depth = 0, $args = null )
|
||||
{
|
||||
if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
|
||||
$t = '';
|
||||
$n = '';
|
||||
} else {
|
||||
$t = "\t";
|
||||
$n = "\n";
|
||||
}
|
||||
$indent = str_repeat( $t, $depth );
|
||||
$output .= "$indent</ul></div>{$n}";
|
||||
}
|
||||
|
||||
public function start_el( &$output, $data_object, $depth = 0, $args = null, $current_object_id = 0 )
|
||||
{
|
||||
$menu_item = $data_object;
|
||||
|
||||
if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
|
||||
$t = '';
|
||||
$n = '';
|
||||
} else {
|
||||
$t = "\t";
|
||||
$n = "\n";
|
||||
}
|
||||
$indent = ( $depth ) ? str_repeat( $t, $depth ) : '';
|
||||
|
||||
$classes = empty( $menu_item->classes ) ? array() : (array) $menu_item->classes;
|
||||
$classes[] = 'menu-item-' . $menu_item->ID;
|
||||
|
||||
$args = apply_filters( 'nav_menu_item_args', $args, $menu_item, $depth );
|
||||
|
||||
$class_names = implode( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $menu_item, $args, $depth ) );
|
||||
$class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
|
||||
|
||||
$id = apply_filters( 'nav_menu_item_id', 'menu-item-' . $menu_item->ID, $menu_item, $args, $depth );
|
||||
$id = $id ? ' id="' . esc_attr( $id ) . '"' : '';
|
||||
|
||||
$output .= $indent . '<li' . $id . $class_names . '>';
|
||||
|
||||
$atts = array();
|
||||
$atts['title'] = ! empty( $menu_item->attr_title ) ? $menu_item->attr_title : '';
|
||||
$atts['target'] = ! empty( $menu_item->target ) ? $menu_item->target : '';
|
||||
if ( '_blank' === $menu_item->target && empty( $menu_item->xfn ) ) {
|
||||
$atts['rel'] = 'noopener';
|
||||
} else {
|
||||
$atts['rel'] = $menu_item->xfn;
|
||||
}
|
||||
$atts['href'] = ! empty( $menu_item->url ) ? $menu_item->url : '';
|
||||
$atts['aria-current'] = $menu_item->current ? 'page' : '';
|
||||
|
||||
$atts = apply_filters( 'nav_menu_link_attributes', $atts, $menu_item, $args, $depth );
|
||||
|
||||
$attributes = '';
|
||||
foreach ( $atts as $attr => $value ) {
|
||||
if ( is_scalar( $value ) && '' !== $value && false !== $value ) {
|
||||
$value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
|
||||
$attributes .= ' ' . $attr . '="' . $value . '"';
|
||||
}
|
||||
}
|
||||
|
||||
$title = apply_filters( 'the_title', $menu_item->title, $menu_item->ID );
|
||||
|
||||
$title = apply_filters( 'nav_menu_item_title', $title, $menu_item, $args, $depth );
|
||||
|
||||
$dropdown = ( $args->walker->has_children ) ? ' <button type="button" class="areoi-menu-more-btn">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg>
|
||||
</button>' : '';
|
||||
|
||||
$item_output = $args->before;
|
||||
$item_output .= '<a' . $attributes . '>';
|
||||
$item_output .= $args->link_before . $title . $args->link_after;
|
||||
$item_output .= '</a>';
|
||||
$item_output .= $dropdown;
|
||||
$item_output .= $args->after;
|
||||
|
||||
$output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $menu_item, $depth, $args );
|
||||
}
|
||||
|
||||
public function end_el( &$output, $data_object, $depth = 0, $args = null )
|
||||
{
|
||||
if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
|
||||
$t = '';
|
||||
$n = '';
|
||||
} else {
|
||||
$t = "\t";
|
||||
$n = "\n";
|
||||
}
|
||||
$output .= "</li>{$n}";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
class AREOI_HAF_Walker_Nav_Menu_Primary extends Walker_Nav_Menu
|
||||
{
|
||||
public function start_lvl( &$output, $depth = 0, $args = null )
|
||||
{
|
||||
if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
|
||||
$t = '';
|
||||
$n = '';
|
||||
} else {
|
||||
$t = "\t";
|
||||
$n = "\n";
|
||||
}
|
||||
$indent = str_repeat( $t, $depth );
|
||||
|
||||
$classes = array( 'dropdown-menu dropdown-menu-end' );
|
||||
|
||||
$class_names = implode( ' ', apply_filters( 'nav_menu_submenu_css_class', $classes, $args, $depth ) );
|
||||
$class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
|
||||
|
||||
$output .= "{$n}{$indent}<ul$class_names>{$n}";
|
||||
}
|
||||
|
||||
public function end_lvl( &$output, $depth = 0, $args = null )
|
||||
{
|
||||
if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
|
||||
$t = '';
|
||||
$n = '';
|
||||
} else {
|
||||
$t = "\t";
|
||||
$n = "\n";
|
||||
}
|
||||
$indent = str_repeat( $t, $depth );
|
||||
$output .= "$indent</ul>{$n}";
|
||||
}
|
||||
|
||||
public function start_el( &$output, $data_object, $depth = 0, $args = null, $current_object_id = 0 )
|
||||
{
|
||||
$menu_item = $data_object;
|
||||
|
||||
if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
|
||||
$t = '';
|
||||
$n = '';
|
||||
} else {
|
||||
$t = "\t";
|
||||
$n = "\n";
|
||||
}
|
||||
$indent = ( $depth ) ? str_repeat( $t, $depth ) : '';
|
||||
|
||||
$classes = empty( $menu_item->classes ) ? array() : (array) $menu_item->classes;
|
||||
$classes[] = 'menu-item-' . $menu_item->ID;
|
||||
|
||||
$args = apply_filters( 'nav_menu_item_args', $args, $menu_item, $depth );
|
||||
|
||||
$class_names = implode( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $menu_item, $args, $depth ) );
|
||||
$class_names .= ( $args->walker->has_children ) ? ' dropdown' : '';
|
||||
$class_names .= ( $depth > 0 ) ? ' dropdown-item' : '';
|
||||
$class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
|
||||
|
||||
$id = apply_filters( 'nav_menu_item_id', 'menu-item-' . $menu_item->ID, $menu_item, $args, $depth );
|
||||
$id = $id ? ' id="' . esc_attr( $id ) . '"' : '';
|
||||
|
||||
$output .= $indent . '<li' . $id . $class_names . '>';
|
||||
|
||||
$atts = array();
|
||||
$atts['title'] = ! empty( $menu_item->attr_title ) ? $menu_item->attr_title : '';
|
||||
$atts['target'] = ! empty( $menu_item->target ) ? $menu_item->target : '';
|
||||
if ( '_blank' === $menu_item->target && empty( $menu_item->xfn ) ) {
|
||||
$atts['rel'] = 'noopener';
|
||||
} else {
|
||||
$atts['rel'] = $menu_item->xfn;
|
||||
}
|
||||
$atts['href'] = ! empty( $menu_item->url ) ? $menu_item->url : '';
|
||||
$atts['aria-current'] = $menu_item->current ? 'page' : '';
|
||||
|
||||
$atts = apply_filters( 'nav_menu_link_attributes', $atts, $menu_item, $args, $depth );
|
||||
|
||||
$attributes = '';
|
||||
foreach ( $atts as $attr => $value ) {
|
||||
if ( is_scalar( $value ) && '' !== $value && false !== $value ) {
|
||||
$value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
|
||||
$attributes .= ' ' . $attr . '="' . $value . '"';
|
||||
}
|
||||
}
|
||||
|
||||
// $attributes .= ( $args->walker->has_children ) ? ' data-bs-toggle="dropdown" aria-expanded="false"' : '';
|
||||
|
||||
$title = apply_filters( 'the_title', $menu_item->title, $menu_item->ID );
|
||||
|
||||
$title = apply_filters( 'nav_menu_item_title', $title, $menu_item, $args, $depth );
|
||||
|
||||
$dropdown = ( $args->walker->has_children ) ? ' <button type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/>
|
||||
</svg>
|
||||
</button>' : '';
|
||||
|
||||
$item_output = $args->before;
|
||||
$item_output .= '<a' . $attributes . '>';
|
||||
$item_output .= $args->link_before . $title . $args->link_after;
|
||||
$item_output .= '</a>';
|
||||
$item_output .= $dropdown;
|
||||
$item_output .= $args->after;
|
||||
|
||||
$output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $menu_item, $depth, $args );
|
||||
}
|
||||
|
||||
public function end_el( &$output, $data_object, $depth = 0, $args = null )
|
||||
{
|
||||
if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
|
||||
$t = '';
|
||||
$n = '';
|
||||
} else {
|
||||
$t = "\t";
|
||||
$n = "\n";
|
||||
}
|
||||
$output .= "</li>{$n}";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<div class="row row-cols-1 row-cols-lg-2 align-items-start justify-content-between <?php echo 'text-' . lightspeed_get_attribute( 'content_alignment', $default_align ) ?>">
|
||||
|
||||
<div class="col <?php echo $col_class ?>">
|
||||
|
||||
<?php lightspeed_heading( $heading_level ) ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col col-lg-6 <?php echo ( !trim( strip_tags( lightspeed_get_attribute( 'introduction', null ) ) ) && empty( lightspeed_get_attribute( 'columns', array() ) ) ) ? 'text-end' : '' ?>">
|
||||
|
||||
<?php lightspeed_introduction() ?>
|
||||
|
||||
<?php if ( lightspeed_get_attribute( 'columns', array() ) ) : ?>
|
||||
<div class="row row-cols-1 row-cols-md-<?php echo count( lightspeed_get_attribute( 'columns', array() ) ) ?> ">
|
||||
<?php foreach ( lightspeed_get_attribute( 'columns', array() ) as $column_key => $column ) : ?>
|
||||
<div class="col mb-4 position-relative">
|
||||
<?php lightspeed_item( $column, false, true ) ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php lightspeed_cta() ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php if ( lightspeed_get_attribute( 'include_cta', false ) ) : ?>
|
||||
<div style="height: 50px;"></div>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php $justify = 'justify-content-' . lightspeed_get_attribute( 'content_alignment', $default_align ); ?>
|
||||
|
||||
<div class="row <?php echo 'text-' . lightspeed_get_attribute( 'content_alignment', $default_align ) ?> <?php echo $justify ?>">
|
||||
|
||||
<div class="col <?php echo $col_class ?>">
|
||||
|
||||
<?php lightspeed_heading( $heading_level ) ?>
|
||||
|
||||
<?php lightspeed_introduction() ?>
|
||||
|
||||
<?php if ( lightspeed_get_attribute( 'columns', array() ) ) : ?>
|
||||
<div class="row row-cols-1 row-cols-md-<?php echo count( lightspeed_get_attribute( 'columns', array() ) ) ?> ">
|
||||
<?php foreach ( lightspeed_get_attribute( 'columns', array() ) as $column_key => $column ) : ?>
|
||||
<div class="col mb-4 position-relative">
|
||||
<?php lightspeed_item( $column, false, true ) ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php lightspeed_cta() ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php if ( lightspeed_get_attribute( 'include_cta', false ) ) : ?>
|
||||
<div style="height: 50px;"></div>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 26.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 39.4 64" style="enable-background:new 0 0 39.4 64;" xml:space="preserve">
|
||||
<polygon points="0,1.4 0,64.2 39.4,64.2 39.4,1.2 39.4,0 "/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 422 B |
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 27.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 39.4 64" style="enable-background:new 0 0 39.4 64;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{opacity:0.5;enable-background:new ;}
|
||||
</style>
|
||||
<polygon class="st0" points="39.4,1.4 0,1.4 0,1.4 17.4,0 "/>
|
||||
<polygon points="39.4,1.9 0,2.1 0,1.4 39.4,0 "/>
|
||||
<polygon points="0,1.4 0,64.6 39.4,64.2 39.4,1.4 "/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 609 B |
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 27.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 39.4 64" style="enable-background:new 0 0 39.4 64;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{opacity:0.2;}
|
||||
</style>
|
||||
<g class="st0">
|
||||
<path d="M0,1.4h19.7C3.6,1.4,0,0,0,0V1.4z"/>
|
||||
<path d="M19.7,1.4h19.7V0C39.4,0,35.8,1.4,19.7,1.4z"/>
|
||||
</g>
|
||||
<path d="M17.2,1.4C8.8,1.4,3.4,1.2,0,1.1v63.1h39.4V1.4V0.7C39.4,0.7,35.3,1.4,17.2,1.4z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 635 B |
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 27.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 39.4 64" style="enable-background:new 0 0 39.4 64;" xml:space="preserve">
|
||||
<polygon points="39.4,2.1 39.4,0 23.9,0 23.8,0 23.5,0.7 7.2,0.7 6.9,1.5 0,1.5 0,64.2 39.4,64.2 "/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 461 B |
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 26.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 39.4 64" style="enable-background:new 0 0 39.4 64;" xml:space="preserve">
|
||||
<rect width="39.4" height="64"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 395 B |
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 27.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 39.4 64" style="enable-background:new 0 0 39.4 64;" xml:space="preserve">
|
||||
<path d="M38.4,1.4C38.5,1.4,38.4,1.4,38.4,1.4C38.6,1.1,37.9,1,37.7,1c-0.3,0.1,0.2,0.2,0.4,0.2l-0.4,0.2h-0.3c0,0-0.1,0-0.1-0.1
|
||||
c-0.1-0.1,0-0.3-0.2-0.3c-0.7,0,0,0.3-0.6,0.3c0,0,0,0,0,0.1H36c-0.1-0.1-0.2-0.2,0-0.4c-0.2,0-0.3-0.2-0.6-0.1
|
||||
c-0.8,0.3-1.1-0.1-1.8,0c0.1,0,0,0.1-0.1,0.2c-1-0.1,0.3-0.8-1-0.6c-0.2,0-0.4,0.1-0.3,0.2c0.2,0.1,0.3,0.2,0.6,0.1
|
||||
c0,0.1,0.4,0.1,0.2,0.2c-0.6-0.1-0.9,0.2-1.4,0.2l-0.2,0.1c-0.1,0-0.4,0.1-0.6,0.1h-0.1c-0.1,0-0.1,0-0.2,0
|
||||
c-0.8-0.1,0.1-0.3,0.1-0.4L30,0.9c-0.7,0.3-1.2-0.4-1.8-0.1l0.1-0.1c0.4-0.1-0.1-0.3-0.4-0.3l-0.2,0.1c-0.3,0.3-1.2,0.1-1.9,0.2
|
||||
c-0.1,0-0.2-0.1-0.1-0.1L25,0.5c-0.2,0.3-0.5,0-0.9,0.1c-0.3,0.1-0.4,0.3-0.7,0.4c-0.9-0.2-1.5,0.1-2.3-0.2C21,1,20.5,1.1,20.9,1.4
|
||||
C19.8,1.2,19,1,18.1,0.9C18,0.9,18,1,17.9,1c0,0.1-0.1,0.3-0.2,0.4h-2.2c0,0,0,0-0.1-0.1c-0.8-0.5-1.7-0.8-2.8-1
|
||||
c-0.2,0.1-0.4,0.2-0.7,0.3l-0.7-0.2c-0.7,0-1.5,0.1-1.9,0.4C9.1,0.8,9.1,0.7,9,0.7c-0.2,0.1-0.7,0-1,0.2C7.9,0.7,7.9,0.6,7.7,0.4
|
||||
C7,0.5,6.2,0.2,5.5,0.4C5.2,0,4.4,0.7,4.1,0.3c-0.8-0.2-1.5,0-1.7,0.3c0-0.1,0.2-0.3-0.1-0.4c-0.1,0-0.2,0-0.2,0.1
|
||||
c-0.1,0-0.6-0.1-0.8,0c-0.1,0-0.1,0.1-0.1,0.1c0.5,0.2,0,0.6-0.6,1H0v62.8h39.4V1.4H38.4z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 27.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 39.4 64" style="enable-background:new 0 0 39.4 64;" xml:space="preserve">
|
||||
<polyline points="39.4,1.1 0,1.1 0,64.2 39.4,64.2 "/>
|
||||
<path d="M39.4,0.9C32.9,0.3,26.3,0,19.7,0S6.5,0.3,0,0.9v457.3c6.5,0.6,13.1,0.9,19.7,0.9s13.2-0.3,19.7-0.9V0.9z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 531 B |
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 27.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 39.4 64" style="enable-background:new 0 0 39.4 64;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{opacity:0.2;enable-background:new ;}
|
||||
</style>
|
||||
<path d="M0,1.2c0,0,13.6,0.3,17.8-0.4s9.3-1,14.6-0.4s3.1,0.4,7,1H0V1.2z"/>
|
||||
<path class="st0" d="M20.1,0.9C15.9,0,10.7-0.3,5.5,0.4C1.2,1,1.9,0.9,0,1.3v0.3h38V1.4C38,1.4,24.3,1.8,20.1,0.9z"/>
|
||||
<polygon points="0,1.4 0,64.2 39.4,64.2 39.4,61.3 39.4,1.4 "/>
|
||||
<polygon points="39.4,1.4 39.4,5.1 0,5.1 0,1.2 "/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 751 B |