diff --git a/assets/fonts/fira-code/FiraCode-VariableFont_wght.woff2 b/assets/fonts/fira-code/FiraCode-VariableFont_wght.woff2 new file mode 100644 index 0000000..f40961f Binary files /dev/null and b/assets/fonts/fira-code/FiraCode-VariableFont_wght.woff2 differ diff --git a/assets/fonts/manrope/Manrope-VariableFont_wght.woff2 b/assets/fonts/manrope/Manrope-VariableFont_wght.woff2 new file mode 100644 index 0000000..44f81dc Binary files /dev/null and b/assets/fonts/manrope/Manrope-VariableFont_wght.woff2 differ diff --git a/blocks/button/.editorconfig b/blocks/button/.editorconfig new file mode 100644 index 0000000..b5df0fc --- /dev/null +++ b/blocks/button/.editorconfig @@ -0,0 +1,18 @@ +# This file is for unifying the coding style for different editors and IDEs +# editorconfig.org + +# WordPress Coding Standards +# https://make.wordpress.org/core/handbook/coding-standards/ + +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = tab + +[*.{yml,yaml}] +indent_style = space +indent_size = 2 diff --git a/blocks/button/.gitignore b/blocks/button/.gitignore new file mode 100644 index 0000000..f66335e --- /dev/null +++ b/blocks/button/.gitignore @@ -0,0 +1,30 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Coverage directory used by tools like istanbul +coverage + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Output of `npm pack` +*.tgz + +# Output of `wp-scripts plugin-zip` +*.zip + +# dotenv environment variables file +.env diff --git a/blocks/button/components/IconSelectControl.js b/blocks/button/components/IconSelectControl.js new file mode 100644 index 0000000..660d00c --- /dev/null +++ b/blocks/button/components/IconSelectControl.js @@ -0,0 +1,52 @@ +import { __ } from '@wordpress/i18n'; +import { SelectControl } from '@wordpress/components'; + +export function IconSelectControl(props) { + const { iconSvgId, onIconChange } = props; + + // Hardcoded icon data + const iconData = [ + { + "uuid": "c0a8012345678f3d5b847ad0f8a890f1", + "iconId": "comment-dots", + "family": "Font Awesome", + "sub-family": "solid", + "name": "Comment Dots", + "path": "" + }, + { + "uuid": "a1b2c3d4e5f6789abcdef0123456789ab", + "iconId": "newspaper", + "family": "Font Awesome", + "sub-family": "solid", + "name": "Newspaper", + "path": "" + } + ]; + + // Handle icon selection from dropdown + const handleIconChange = (selectedIconId) => { + const selectedIcon = iconData.find(icon => icon.uuid === selectedIconId); + + if (selectedIcon && onIconChange) { + onIconChange({ + iconSvgId: selectedIconId, // UUID of the selected icon + iconSvgPath: selectedIcon.path // SVG path of the selected icon + }); + } + }; + + return ( + <> + ({ + label: icon.name, + value: icon.uuid, // Store the UUID as the value + }))} + onChange={handleIconChange} + /> + > + ); +} diff --git a/blocks/button/components/iconsvgs.json b/blocks/button/components/iconsvgs.json new file mode 100644 index 0000000..5db8c02 --- /dev/null +++ b/blocks/button/components/iconsvgs.json @@ -0,0 +1,18 @@ +[ + { + "uuid": "c0a8012345678f3d5b847ad0f8a890f1", + "iconId": "comment-dots", + "family": "Font Awesome", + "sub-family": "solid", + "name": "Comment Dots", + "path": "" + }, + { + "uuid": "a1b2c3d4e5f6789abcdef0123456789ab", + "iconId": "newspaper", + "family": "Font Awesome", + "sub-family": "solid", + "name": "Newspaper", + "path": "" + } +] \ No newline at end of file diff --git a/blocks/button/icon-svgs.json b/blocks/button/icon-svgs.json new file mode 100644 index 0000000..515fad1 --- /dev/null +++ b/blocks/button/icon-svgs.json @@ -0,0 +1,23 @@ +[ + { + "id": "comment-dots", + "family": "Font Awesome", + "sub-family": "solid", + "name": "Comment Dots", + "path": "" + }, + { + "id": "newspaper", + "family": "Font Awesome", + "sub-family": "solid", + "name": "Newspaper", + "path": "" + }, + { + "id": "map", + "family": "Font Awesome", + "sub-family": "solid", + "name": "Map", + "path": "" + } +] \ No newline at end of file diff --git a/blocks/button/lcp-button.php b/blocks/button/lcp-button.php new file mode 100644 index 0000000..29437d8 --- /dev/null +++ b/blocks/button/lcp-button.php @@ -0,0 +1,30 @@ +" + }, + { + "uuid": "a1b2c3d4e5f6789abcdef0123456789ab", + "iconId": "newspaper", + "family": "Font Awesome", + "sub-family": "solid", + "name": "Newspaper", + "path": "" + } +]; + +export default function Edit(props) { + const { attributes, setAttributes } = props; + const { buttonFunction, popUpId, buttonText, iconSvgId, iconSvgPath, displayIcon, iconSource} = attributes; // iconSvgId holds the UUID and iconSvgPath holds the SVG path + const [popups, setPopups] = useState([]); + + // Fetch published popups (lcp-popup CPT) + useEffect(() => { + const fetchPopups = async () => { + const response = await fetch('/wp-json/wp/v2/lcp-popup'); + const data = await response.json(); + setPopups(data); + }; + fetchPopups(); + }, []); + + // Handle icon selection from dropdown + const handleIconChange = (selectedIconId) => { + console.log("an icon is selected"); + // Find the selected icon from the iconData array using the UUID + const selectedIcon = iconData.find(icon => icon.uuid === selectedIconId); + + if (selectedIcon) { + // Update both iconSvgId (UUID) and iconSvgPath (SVG path) + setAttributes({ + iconSvgId: selectedIconId, // UUID of the selected icon + iconSvgPath: selectedIcon.path // SVG path of the selected icon + }); + } + }; + + const handleToggleChange = (value) => { + setAttributes({ displayIcon: value }); + }; + + const iconSourceOptions = [ + { value: 'manualSvgPath', label: 'SVG Path' }, + { value: 'iconSelector', label: 'Select Icon' }, + ]; + + const buttonFunctionOptions = [ + { value: 'customUrl', label: 'Custom URL' }, + { value: 'openPopup', label: 'Open Popup' }, + { value: 'showLoginForm', label: 'Show Login Form' }, + { value: 'logOut', label: 'Open Popup' }, + { value: 'shareCurrentPost', label: 'Share Current Post' } + ]; + + + return ( + <> + + + + setAttributes({ iconSource })} + /> + {buttonFunction === 'openPopup' && ( + setAttributes({ iconSource })} + /> + )} + setAttributes({ buttonText: value })} + /> + + {displayIcon && ( + <> + setAttributes({ iconSource: value })} + /> + {iconSource === 'manualSvgPath' && ( + props.setAttributes({ iconSvgPath: value })} + /> + )} + {iconSource === 'iconSelector' && ( + <> + ({ + label: icon.name, + value: icon.uuid, // Store the UUID as the value + }))} + onChange={handleIconChange} + /> + + > + )} + > + )} + + + + + + + {buttonText} + + + > + ); +} diff --git a/blocks/button/src/editor.scss b/blocks/button/src/editor.scss new file mode 100644 index 0000000..b05ba39 --- /dev/null +++ b/blocks/button/src/editor.scss @@ -0,0 +1,9 @@ +/** + * The following styles get applied inside the editor only. + * + * Replace them with your own styles or remove the file completely. + */ + +.wp-block-create-block-button { + border: 1px dotted #f00; +} diff --git a/blocks/button/src/index.js b/blocks/button/src/index.js new file mode 100644 index 0000000..ade1e47 --- /dev/null +++ b/blocks/button/src/index.js @@ -0,0 +1,39 @@ +/** + * Registers a new block provided a unique name and an object defining its behavior. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ + */ +import { registerBlockType } from '@wordpress/blocks'; + +/** + * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. + * All files containing `style` keyword are bundled together. The code used + * gets applied both to the front of your site and to the editor. + * + * @see https://www.npmjs.com/package/@wordpress/scripts#using-css + */ +import './style.scss'; + +/** + * Internal dependencies + */ +import Edit from './edit'; +import save from './save'; +import metadata from './block.json'; + +/** + * Every block starts by registering a new block type definition. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ + */ +registerBlockType( metadata.name, { + /** + * @see ./edit.js + */ + edit: Edit, + + /** + * @see ./save.js + */ + save, +} ); diff --git a/blocks/button/src/save.js b/blocks/button/src/save.js new file mode 100644 index 0000000..9073353 --- /dev/null +++ b/blocks/button/src/save.js @@ -0,0 +1,25 @@ +import { useBlockProps } from '@wordpress/block-editor'; + +export default function save(props) { + const { attributes } = props; + const { type, popUpId, buttonText, iconSvgPath } = attributes; // Destructure buttonText and iconSvgPath from attributes + + // Get the block props for the button + const blockProps = useBlockProps.save(); + + // Conditionally add data-open-popup if type is 'openPopUp' and popUpId is not empty + if (type === 'openPopUp' && popUpId) { + blockProps['data-open-popup'] = popUpId; // Add the data attribute dynamically + } + + return ( + + {/* Conditionally render the icon if iconSvgPath is set */} + {iconSvgPath && ( + + )} + {/* Render the button text */} + {buttonText || 'Button'} {/* Use buttonText or fallback */} + + ); +} diff --git a/blocks/button/src/style.scss b/blocks/button/src/style.scss new file mode 100644 index 0000000..62882bd --- /dev/null +++ b/blocks/button/src/style.scss @@ -0,0 +1,12 @@ +/** + * The following styles get applied both on the front of your site + * and in the editor. + * + * Replace them with your own styles or remove the file completely. + */ + +.wp-block-create-block-button { + background-color: #21759b; + color: #fff; + padding: 2px; +} diff --git a/blocks/button/src/view.js b/blocks/button/src/view.js new file mode 100644 index 0000000..ff0d052 --- /dev/null +++ b/blocks/button/src/view.js @@ -0,0 +1,25 @@ +/** + * Use this file for JavaScript code that you want to run in the front-end + * on posts/pages that contain this block. + * + * When this file is defined as the value of the `viewScript` property + * in `block.json` it will be enqueued on the front end of the site. + * + * Example: + * + * ```js + * { + * "viewScript": "file:./view.js" + * } + * ``` + * + * If you're not making any changes to this file because your project doesn't need any + * JavaScript running in the front-end, then you should delete this file and remove + * the `viewScript` property from `block.json`. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#view-script + */ + +/* eslint-disable no-console */ +console.log( 'Hello World! (from create-block-button block)' ); +/* eslint-enable no-console */ diff --git a/blocks/lcp-dynamic-container/.editorconfig b/blocks/lcp-dynamic-container/.editorconfig new file mode 100644 index 0000000..b5df0fc --- /dev/null +++ b/blocks/lcp-dynamic-container/.editorconfig @@ -0,0 +1,18 @@ +# This file is for unifying the coding style for different editors and IDEs +# editorconfig.org + +# WordPress Coding Standards +# https://make.wordpress.org/core/handbook/coding-standards/ + +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = tab + +[*.{yml,yaml}] +indent_style = space +indent_size = 2 diff --git a/blocks/lcp-dynamic-container/.gitignore b/blocks/lcp-dynamic-container/.gitignore new file mode 100644 index 0000000..f66335e --- /dev/null +++ b/blocks/lcp-dynamic-container/.gitignore @@ -0,0 +1,30 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Coverage directory used by tools like istanbul +coverage + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Output of `npm pack` +*.tgz + +# Output of `wp-scripts plugin-zip` +*.zip + +# dotenv environment variables file +.env diff --git a/blocks/lcp-dynamic-container/lcp-dynamic-container.php b/blocks/lcp-dynamic-container/lcp-dynamic-container.php new file mode 100644 index 0000000..f8a85bd --- /dev/null +++ b/blocks/lcp-dynamic-container/lcp-dynamic-container.php @@ -0,0 +1,131 @@ + tag with the final CSS (either inline or media queries) + $style_tag = ''; + if ( ! empty( $style ) ) { + $style_tag = sprintf( '', esc_attr( $random_class ), $style ); + } + + // Output the content wrapped in the div with the random class and padding styles + return $style_tag . sprintf( + '%s', + esc_attr( $random_class ), + $content + ); +} + + +/** + * Function to return the media query breakpoint based on the size + */ +function get_media_query_breakpoint( $size ) { + // Define breakpoints for each size + $breakpoints = array( + 'extraLarge' => '1200px', + 'large' => '1024px', + 'medium' => '768px', + 'small' => '480px', + ); + + return isset( $breakpoints[$size] ) ? $breakpoints[$size] : '480px'; +} + +/** + * Function to initialize the block + */ +function lcp_dynamic_container_block_init() { + register_block_type( __DIR__ . '/build', array( + 'render_callback' => 'render_lcp_dynamic_container', // Add the render callback here + )); +} +add_action( 'init', 'lcp_dynamic_container_block_init' ); diff --git a/blocks/lcp-dynamic-container/package.json b/blocks/lcp-dynamic-container/package.json new file mode 100644 index 0000000..75c43b5 --- /dev/null +++ b/blocks/lcp-dynamic-container/package.json @@ -0,0 +1,20 @@ +{ + "name": "lcp-viewport", + "version": "0.1.0", + "description": "Example block scaffolded with Create Block tool.", + "author": "The WordPress Contributors", + "license": "GPL-2.0-or-later", + "main": "build/index.js", + "scripts": { + "build": "wp-scripts build", + "format": "wp-scripts format", + "lint:css": "wp-scripts lint-style", + "lint:js": "wp-scripts lint-js", + "packages-update": "wp-scripts packages-update", + "plugin-zip": "wp-scripts plugin-zip", + "start": "wp-scripts start" + }, + "devDependencies": { + "@wordpress/scripts": "^30.4.0" + } +} diff --git a/blocks/lcp-dynamic-container/readme.txt b/blocks/lcp-dynamic-container/readme.txt new file mode 100644 index 0000000..d7775a0 --- /dev/null +++ b/blocks/lcp-dynamic-container/readme.txt @@ -0,0 +1,55 @@ +=== Lcp Viewport === +Contributors: The WordPress Contributors +Tags: block +Tested up to: 6.6 +Stable tag: 0.1.0 +License: GPL-2.0-or-later +License URI: https://www.gnu.org/licenses/gpl-2.0.html + +Example block scaffolded with Create Block tool. + +== Description == + +This is the long description. No limit, and you can use Markdown (as well as in the following sections). + +For backwards compatibility, if this section is missing, the full length of the short description will be used, and +Markdown parsed. + +== Installation == + +This section describes how to install the plugin and get it working. + +e.g. + +1. Upload the plugin files to the `/wp-content/plugins/lcp-viewport` directory, or install the plugin through the WordPress plugins screen directly. +1. Activate the plugin through the 'Plugins' screen in WordPress + + +== Frequently Asked Questions == + += A question that someone might have = + +An answer to that question. + += What about foo bar? = + +Answer to foo bar dilemma. + +== Screenshots == + +1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from +the /assets directory or the directory that contains the stable readme.txt (tags or trunk). Screenshots in the /assets +directory take precedence. For example, `/assets/screenshot-1.png` would win over `/tags/4.3/screenshot-1.png` +(or jpg, jpeg, gif). +2. This is the second screen shot + +== Changelog == + += 0.1.0 = +* Release + +== Arbitrary section == + +You may provide arbitrary sections, in the same format as the ones above. This may be of use for extremely complicated +plugins where more information needs to be conveyed that doesn't fit into the categories of "description" or +"installation." Arbitrary sections will be shown below the built-in sections outlined above. diff --git a/blocks/lcp-dynamic-container/src/block.json b/blocks/lcp-dynamic-container/src/block.json new file mode 100644 index 0000000..b748577 --- /dev/null +++ b/blocks/lcp-dynamic-container/src/block.json @@ -0,0 +1,136 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "lcp/dynamic-container", + "version": "0.1.0", + "title": "Dynamic Container", + "category": "widgets", + "icon": "smiley", + "description": "A general purpose container that uses dynamic rendering", + "example": {}, + "supports": { + "anchor": true, + "align": [ "left", "right", "wide", "full" ], + "background": { + "backgroundImage": true, + "backgroundSize": true, + "__experimentalDefaultControls": { + "backgroundImage": true + } + }, + "color": { + "gradients": true, + "background": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true + } + } +}, + "attributes": { + "maxWidthExtraLarge": { + "type": "string" + }, + "maxWidthLarge": { + "type": "string" + }, + "maxWidthMedium": { + "type": "string" + }, + "maxWidthSmall": { + "type": "string" + }, + "minHeightExtraLarge": { + "type": "string" + }, + "minHeightLarge": { + "type": "string" + }, + "minHeightMedium": { + "type": "string" + }, + "minHeightSmall": { + "type": "string" + }, + "isBox": { + "type": "boolean", + "default": false + }, + "backgroundColor": { + "type": "string" + }, + "entranceAnimation": { + "type": "string" + }, + "exitAnimation": { + "type": "string" + }, + + "overflow": { + "type": "string" + }, + "padding": { + "type": "object", + "default": { + "extraLarge": { + "top": "0", + "right": "0", + "bottom": "0", + "left": "0" + }, + "large": { + "top": "0", + "right": "0", + "bottom": "0", + "left": "0" + }, + "medium": { + "top": "0", + "right": "0", + "bottom": "0", + "left": "0" + }, + "small": { + "top": "0", + "right": "0", + "bottom": "0", + "left": "0" + } + } + }, + "margin": { + "type": "object", + "default": { + "extraLarge": { + "top": "12px", + "right": "0", + "bottom": "12px", + "left": "0" + }, + "large": { + "top": "12px", + "right": "0", + "bottom": "12px", + "left": "0" + }, + "medium": { + "top": "12px", + "right": "0", + "bottom": "12px", + "left": "0" + }, + "small": { + "top": "12px", + "right": "0", + "bottom": "12px", + "left": "0" + } + } + } + }, + "textdomain": "lcp", + "editorScript": "file:./index.js", + "editorStyle": "file:./index.css", + "style": "file:./style-index.css", + "viewScript": "file:./view.js"} diff --git a/blocks/lcp-dynamic-container/src/edit.js b/blocks/lcp-dynamic-container/src/edit.js new file mode 100644 index 0000000..07d8ec6 --- /dev/null +++ b/blocks/lcp-dynamic-container/src/edit.js @@ -0,0 +1,211 @@ +import { useBlockProps, InnerBlocks, InspectorControls } from '@wordpress/block-editor'; +import { __experimentalToggleGroupControl as ToggleGroupControl, + __experimentalToggleGroupControlOption as ToggleGroupControlOption, __experimentalUnitControl as UnitControl, BaseControl, ToggleControl, ColorPalette, Popover, Button } from '@wordpress/components'; +import { useState, useEffect } from 'react'; +import { __ } from '@wordpress/i18n'; + +/** + * The edit function describes the structure of your block in the context of the editor. + * This represents what the editor will render when the block is used. + * + * @param {Object} props - The props for the block. + * @return {Element} Element to render. + */ +export default function Edit({ attributes, setAttributes }) { + const blockProps = useBlockProps(); + const { padding, maxWidthLarge, maxWidthMedium, maxWidthSmall, minHeightLarge, minHeightMedium, minHeightSmall, backgroundColor } = attributes; // Destructure necessary attributes + + // State for independent padding toggle + const [isIndependentLarge, setIsIndependentLarge] = useState(false); + + // Toggle to show or hide the color picker popover + const [showColorPopover, setShowColorPopover] = useState(false); + const [selectedColor, setSelectedColor] = useState(backgroundColor || '#ffffff'); // Default color + + // Toggle padding for individual sizes + const handleToggleChange = () => { + setIsIndependentLarge(!isIndependentLarge); + }; + + // Update padding for all sizes + const updatePaddingForAllSizes = (newValue) => { + const newPadding = { + extraLarge: { top: newValue, right: newValue, bottom: newValue, left: newValue }, + large: { top: newValue, right: newValue, bottom: newValue, left: newValue }, + medium: { top: newValue, right: newValue, bottom: newValue, left: newValue }, + small: { top: newValue, right: newValue, bottom: newValue, left: newValue } + }; + setAttributes({ padding: newPadding }); + }; + + // Handle individual padding changes + const handlePaddingChange = (size, position, newValue) => { + const updatedPadding = { ...padding }; + updatedPadding[size][position] = newValue; + setAttributes({ padding: updatedPadding }); + }; + + // Handle color change + const handleColorChange = (color) => { + setSelectedColor(color); + setAttributes({ backgroundColor: color }); // Update background color + }; + + // Handle maxWidth change for different sizes + const handleMaxWidthChange = (value, size) => { + setAttributes({ [`maxWidth${size}`]: value }); + }; + + // Handle minHeight change for different sizes + const handleMinHeightChange = (value, size) => { + setAttributes({ [`minHeight${size}`]: value }); + }; + + useEffect(() => { + console.log("Updated attributes:", attributes); + }, [attributes]); + + return ( + <> + + + + + + {/* BaseControl for padding */} + + + Padding + + + + {/* Padding controls */} + {isIndependentLarge ? ( + + {/* Padding controls for top, left, right, bottom */} + + Top + handlePaddingChange('extraLarge', 'top', newValue)} + /> + + + Left + handlePaddingChange('extraLarge', 'left', newValue)} + /> + + + Right + handlePaddingChange('extraLarge', 'right', newValue)} + /> + + + Bottom + handlePaddingChange('extraLarge', 'bottom', newValue)} + /> + + + ) : ( + + )} + + + {/* Max Width Controls */} + + + handleMaxWidthChange(value, 'Large')} + defaultUnit="px" + /> + handleMaxWidthChange(value, 'Medium')} + defaultUnit="px" + /> + handleMaxWidthChange(value, 'Small')} + defaultUnit="px" + /> + + + + {/* Min Height Controls */} + + + handleMinHeightChange(value, 'Large')} + defaultUnit="px" + /> + handleMinHeightChange(value, 'Medium')} + defaultUnit="px" + /> + handleMinHeightChange(value, 'Small')} + defaultUnit="px" + /> + + + + {/* Background color picker */} + + + setShowColorPopover(!showColorPopover)}> + {__('Choose Background Color')} + + + {showColorPopover && ( + + + + )} + + {/* Color indicator */} + + + + + + + + + > + ); +} diff --git a/blocks/lcp-dynamic-container/src/editor.scss b/blocks/lcp-dynamic-container/src/editor.scss new file mode 100644 index 0000000..6e6850f --- /dev/null +++ b/blocks/lcp-dynamic-container/src/editor.scss @@ -0,0 +1,9 @@ +/** + * The following styles get applied inside the editor only. + * + * Replace them with your own styles or remove the file completely. + */ + +.wp-block-create-block-lcp-viewport { + border: 1px dotted #f00; +} diff --git a/blocks/lcp-dynamic-container/src/index.js b/blocks/lcp-dynamic-container/src/index.js new file mode 100644 index 0000000..ade1e47 --- /dev/null +++ b/blocks/lcp-dynamic-container/src/index.js @@ -0,0 +1,39 @@ +/** + * Registers a new block provided a unique name and an object defining its behavior. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ + */ +import { registerBlockType } from '@wordpress/blocks'; + +/** + * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. + * All files containing `style` keyword are bundled together. The code used + * gets applied both to the front of your site and to the editor. + * + * @see https://www.npmjs.com/package/@wordpress/scripts#using-css + */ +import './style.scss'; + +/** + * Internal dependencies + */ +import Edit from './edit'; +import save from './save'; +import metadata from './block.json'; + +/** + * Every block starts by registering a new block type definition. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ + */ +registerBlockType( metadata.name, { + /** + * @see ./edit.js + */ + edit: Edit, + + /** + * @see ./save.js + */ + save, +} ); diff --git a/blocks/lcp-dynamic-container/src/save.js b/blocks/lcp-dynamic-container/src/save.js new file mode 100644 index 0000000..813166b --- /dev/null +++ b/blocks/lcp-dynamic-container/src/save.js @@ -0,0 +1,12 @@ +import { useBlockProps, InnerBlocks } from '@wordpress/block-editor'; + +export default function Save() { + // Block props + const blockProps = useBlockProps.save(); + + return ( + + + + ); +} diff --git a/blocks/lcp-dynamic-container/src/style.scss b/blocks/lcp-dynamic-container/src/style.scss new file mode 100644 index 0000000..e19fc0b --- /dev/null +++ b/blocks/lcp-dynamic-container/src/style.scss @@ -0,0 +1,12 @@ +/** + * The following styles get applied both on the front of your site + * and in the editor. + * + * Replace them with your own styles or remove the file completely. + */ + +.wp-block-create-block-lcp-viewport { + background-color: #21759b; + color: #fff; + padding: 2px; +} diff --git a/blocks/lcp-dynamic-container/src/view.js b/blocks/lcp-dynamic-container/src/view.js new file mode 100644 index 0000000..e2a7ec6 --- /dev/null +++ b/blocks/lcp-dynamic-container/src/view.js @@ -0,0 +1,25 @@ +/** + * Use this file for JavaScript code that you want to run in the front-end + * on posts/pages that contain this block. + * + * When this file is defined as the value of the `viewScript` property + * in `block.json` it will be enqueued on the front end of the site. + * + * Example: + * + * ```js + * { + * "viewScript": "file:./view.js" + * } + * ``` + * + * If you're not making any changes to this file because your project doesn't need any + * JavaScript running in the front-end, then you should delete this file and remove + * the `viewScript` property from `block.json`. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#view-script + */ + +/* eslint-disable no-console */ +console.log( 'Hello World! (from create-block-lcp-viewport block)' ); +/* eslint-enable no-console */ diff --git a/blocks/lcp-gallery/.editorconfig b/blocks/lcp-gallery/.editorconfig new file mode 100644 index 0000000..b5df0fc --- /dev/null +++ b/blocks/lcp-gallery/.editorconfig @@ -0,0 +1,18 @@ +# This file is for unifying the coding style for different editors and IDEs +# editorconfig.org + +# WordPress Coding Standards +# https://make.wordpress.org/core/handbook/coding-standards/ + +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = tab + +[*.{yml,yaml}] +indent_style = space +indent_size = 2 diff --git a/blocks/lcp-gallery/.gitignore b/blocks/lcp-gallery/.gitignore new file mode 100644 index 0000000..f66335e --- /dev/null +++ b/blocks/lcp-gallery/.gitignore @@ -0,0 +1,30 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Coverage directory used by tools like istanbul +coverage + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Output of `npm pack` +*.tgz + +# Output of `wp-scripts plugin-zip` +*.zip + +# dotenv environment variables file +.env diff --git a/blocks/lcp-gallery/assets/css/lcp-gallery.css b/blocks/lcp-gallery/assets/css/lcp-gallery.css new file mode 100644 index 0000000..4b42641 --- /dev/null +++ b/blocks/lcp-gallery/assets/css/lcp-gallery.css @@ -0,0 +1,2 @@ +.admin-bar .lg-outer {top:32px;height:calc(100% - 32px)!important} + diff --git a/blocks/lcp-gallery/assets/css/lg-transitions.css b/blocks/lcp-gallery/assets/css/lg-transitions.css new file mode 100644 index 0000000..0e78bfb --- /dev/null +++ b/blocks/lcp-gallery/assets/css/lg-transitions.css @@ -0,0 +1,845 @@ +.lg-css3.lg-zoom-in .lg-item { + opacity: 0; + } + .lg-css3.lg-zoom-in .lg-item.lg-prev-slide { + -webkit-transform: scale3d(1.3, 1.3, 1.3); + transform: scale3d(1.3, 1.3, 1.3); + } + .lg-css3.lg-zoom-in .lg-item.lg-next-slide { + -webkit-transform: scale3d(1.3, 1.3, 1.3); + transform: scale3d(1.3, 1.3, 1.3); + } + .lg-css3.lg-zoom-in .lg-item.lg-current { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + opacity: 1; + } + .lg-css3.lg-zoom-in .lg-item.lg-prev-slide, .lg-css3.lg-zoom-in .lg-item.lg-next-slide, .lg-css3.lg-zoom-in .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + } + + .lg-css3.lg-lollipop-rev .lg-item { + opacity: 0; + } + .lg-css3.lg-lollipop-rev .lg-item.lg-prev-slide { + -moz-transform: translate3d(0, 0, 0) scale(0.5); + -o-transform: translate3d(0, 0, 0) scale(0.5); + -ms-transform: translate3d(0, 0, 0) scale(0.5); + -webkit-transform: translate3d(0, 0, 0) scale(0.5); + transform: translate3d(0, 0, 0) scale(0.5); + } + .lg-css3.lg-lollipop-rev .lg-item.lg-next-slide { + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } + .lg-css3.lg-lollipop-rev .lg-item.lg-current { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1; + } + .lg-css3.lg-lollipop-rev .lg-item.lg-prev-slide, .lg-css3.lg-lollipop-rev .lg-item.lg-next-slide, .lg-css3.lg-lollipop-rev .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + + .lg-css3.lg-slide-skew-ver-cross .lg-item { + opacity: 0; + } + .lg-css3.lg-slide-skew-ver-cross .lg-item.lg-prev-slide { + -moz-transform: skew(0deg, 20deg) translate3d(0, -100%, 0px); + -o-transform: skew(0deg, 20deg) translate3d(0, -100%, 0px); + -ms-transform: skew(0deg, 20deg) translate3d(0, -100%, 0px); + -webkit-transform: skew(0deg, 20deg) translate3d(0, -100%, 0px); + transform: skew(0deg, 20deg) translate3d(0, -100%, 0px); + } + .lg-css3.lg-slide-skew-ver-cross .lg-item.lg-next-slide { + -moz-transform: skew(0deg, 20deg) translate3d(0, 100%, 0px); + -o-transform: skew(0deg, 20deg) translate3d(0, 100%, 0px); + -ms-transform: skew(0deg, 20deg) translate3d(0, 100%, 0px); + -webkit-transform: skew(0deg, 20deg) translate3d(0, 100%, 0px); + transform: skew(0deg, 20deg) translate3d(0, 100%, 0px); + } + .lg-css3.lg-slide-skew-ver-cross .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -o-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -ms-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -webkit-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + opacity: 1; + } + .lg-css3.lg-slide-skew-ver-cross .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-ver-cross .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-ver-cross .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + + .lg-css3.lg-lollipop .lg-item { + opacity: 0; + } + .lg-css3.lg-lollipop .lg-item.lg-prev-slide { + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + } + .lg-css3.lg-lollipop .lg-item.lg-next-slide { + -moz-transform: translate3d(0, 0, 0) scale(0.5); + -o-transform: translate3d(0, 0, 0) scale(0.5); + -ms-transform: translate3d(0, 0, 0) scale(0.5); + -webkit-transform: translate3d(0, 0, 0) scale(0.5); + transform: translate3d(0, 0, 0) scale(0.5); + } + .lg-css3.lg-lollipop .lg-item.lg-current { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1; + } + .lg-css3.lg-lollipop .lg-item.lg-prev-slide, .lg-css3.lg-lollipop .lg-item.lg-next-slide, .lg-css3.lg-lollipop .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + + .lg-css3.lg-slide-skew-ver-rev .lg-item { + opacity: 0; + } + .lg-css3.lg-slide-skew-ver-rev .lg-item.lg-prev-slide { + -moz-transform: skew(-60deg, 0deg) translate3d(0, -100%, 0px); + -o-transform: skew(-60deg, 0deg) translate3d(0, -100%, 0px); + -ms-transform: skew(-60deg, 0deg) translate3d(0, -100%, 0px); + -webkit-transform: skew(-60deg, 0deg) translate3d(0, -100%, 0px); + transform: skew(-60deg, 0deg) translate3d(0, -100%, 0px); + } + .lg-css3.lg-slide-skew-ver-rev .lg-item.lg-next-slide { + -moz-transform: skew(-60deg, 0deg) translate3d(0, 100%, 0px); + -o-transform: skew(-60deg, 0deg) translate3d(0, 100%, 0px); + -ms-transform: skew(-60deg, 0deg) translate3d(0, 100%, 0px); + -webkit-transform: skew(-60deg, 0deg) translate3d(0, 100%, 0px); + transform: skew(-60deg, 0deg) translate3d(0, 100%, 0px); + } + .lg-css3.lg-slide-skew-ver-rev .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -o-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -ms-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -webkit-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + opacity: 1; + } + .lg-css3.lg-slide-skew-ver-rev .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-ver-rev .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-ver-rev .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + + .lg-css3.lg-rotate-rev .lg-item { + opacity: 0; + } + .lg-css3.lg-rotate-rev .lg-item.lg-prev-slide { + -moz-transform: rotate(360deg); + -o-transform: rotate(360deg); + -ms-transform: rotate(360deg); + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } + .lg-css3.lg-rotate-rev .lg-item.lg-next-slide { + -moz-transform: rotate(-360deg); + -o-transform: rotate(-360deg); + -ms-transform: rotate(-360deg); + -webkit-transform: rotate(-360deg); + transform: rotate(-360deg); + } + .lg-css3.lg-rotate-rev .lg-item.lg-current { + -moz-transform: rotate(0deg); + -o-transform: rotate(0deg); + -ms-transform: rotate(0deg); + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + opacity: 1; + } + .lg-css3.lg-rotate-rev .lg-item.lg-prev-slide, .lg-css3.lg-rotate-rev .lg-item.lg-next-slide, .lg-css3.lg-rotate-rev .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + + .lg-css3.lg-slide-skew-ver .lg-item { + opacity: 0; + } + .lg-css3.lg-slide-skew-ver .lg-item.lg-prev-slide { + -moz-transform: skew(60deg, 0deg) translate3d(0, -100%, 0px); + -o-transform: skew(60deg, 0deg) translate3d(0, -100%, 0px); + -ms-transform: skew(60deg, 0deg) translate3d(0, -100%, 0px); + -webkit-transform: skew(60deg, 0deg) translate3d(0, -100%, 0px); + transform: skew(60deg, 0deg) translate3d(0, -100%, 0px); + } + .lg-css3.lg-slide-skew-ver .lg-item.lg-next-slide { + -moz-transform: skew(60deg, 0deg) translate3d(0, 100%, 0px); + -o-transform: skew(60deg, 0deg) translate3d(0, 100%, 0px); + -ms-transform: skew(60deg, 0deg) translate3d(0, 100%, 0px); + -webkit-transform: skew(60deg, 0deg) translate3d(0, 100%, 0px); + transform: skew(60deg, 0deg) translate3d(0, 100%, 0px); + } + .lg-css3.lg-slide-skew-ver .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -o-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -ms-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -webkit-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + opacity: 1; + } + .lg-css3.lg-slide-skew-ver .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-ver .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-ver .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + + .lg-css3.lg-rotate .lg-item { + opacity: 0; + } + .lg-css3.lg-rotate .lg-item.lg-prev-slide { + -moz-transform: rotate(-360deg); + -o-transform: rotate(-360deg); + -ms-transform: rotate(-360deg); + -webkit-transform: rotate(-360deg); + transform: rotate(-360deg); + } + .lg-css3.lg-rotate .lg-item.lg-next-slide { + -moz-transform: rotate(360deg); + -o-transform: rotate(360deg); + -ms-transform: rotate(360deg); + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } + .lg-css3.lg-rotate .lg-item.lg-current { + -moz-transform: rotate(0deg); + -o-transform: rotate(0deg); + -ms-transform: rotate(0deg); + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + opacity: 1; + } + .lg-css3.lg-rotate .lg-item.lg-prev-slide, .lg-css3.lg-rotate .lg-item.lg-next-slide, .lg-css3.lg-rotate .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + + .lg-css3.lg-slide-skew .lg-item { + opacity: 0; + } + .lg-css3.lg-slide-skew .lg-item.lg-prev-slide { + -moz-transform: skew(20deg, 0deg) translate3d(-100%, 0%, 0px); + -o-transform: skew(20deg, 0deg) translate3d(-100%, 0%, 0px); + -ms-transform: skew(20deg, 0deg) translate3d(-100%, 0%, 0px); + -webkit-transform: skew(20deg, 0deg) translate3d(-100%, 0%, 0px); + transform: skew(20deg, 0deg) translate3d(-100%, 0%, 0px); + } + .lg-css3.lg-slide-skew .lg-item.lg-next-slide { + -moz-transform: skew(20deg, 0deg) translate3d(100%, 0%, 0px); + -o-transform: skew(20deg, 0deg) translate3d(100%, 0%, 0px); + -ms-transform: skew(20deg, 0deg) translate3d(100%, 0%, 0px); + -webkit-transform: skew(20deg, 0deg) translate3d(100%, 0%, 0px); + transform: skew(20deg, 0deg) translate3d(100%, 0%, 0px); + } + .lg-css3.lg-slide-skew .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -o-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -ms-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -webkit-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + opacity: 1; + } + .lg-css3.lg-slide-skew .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew .lg-item.lg-next-slide, .lg-css3.lg-slide-skew .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + + .lg-css3.lg-scale-up .lg-item { + opacity: 0; + } + .lg-css3.lg-scale-up .lg-item.lg-prev-slide { + -moz-transform: scale3d(0.8, 0.8, 0.8) translate3d(0%, 10%, 0); + -o-transform: scale3d(0.8, 0.8, 0.8) translate3d(0%, 10%, 0); + -ms-transform: scale3d(0.8, 0.8, 0.8) translate3d(0%, 10%, 0); + -webkit-transform: scale3d(0.8, 0.8, 0.8) translate3d(0%, 10%, 0); + transform: scale3d(0.8, 0.8, 0.8) translate3d(0%, 10%, 0); + } + .lg-css3.lg-scale-up .lg-item.lg-next-slide { + -moz-transform: scale3d(0.8, 0.8, 0.8) translate3d(0%, 10%, 0); + -o-transform: scale3d(0.8, 0.8, 0.8) translate3d(0%, 10%, 0); + -ms-transform: scale3d(0.8, 0.8, 0.8) translate3d(0%, 10%, 0); + -webkit-transform: scale3d(0.8, 0.8, 0.8) translate3d(0%, 10%, 0); + transform: scale3d(0.8, 0.8, 0.8) translate3d(0%, 10%, 0); + } + .lg-css3.lg-scale-up .lg-item.lg-current { + -moz-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -o-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -ms-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -webkit-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + opacity: 1; + } + .lg-css3.lg-scale-up .lg-item.lg-prev-slide, .lg-css3.lg-scale-up .lg-item.lg-next-slide, .lg-css3.lg-scale-up .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + } + + .lg-css3.lg-slide-vertical-growth .lg-item { + opacity: 0; + } + .lg-css3.lg-slide-vertical-growth .lg-item.lg-prev-slide { + -moz-transform: scale3d(0.5, 0.5, 0.5) translate3d(0, -150%, 0); + -o-transform: scale3d(0.5, 0.5, 0.5) translate3d(0, -150%, 0); + -ms-transform: scale3d(0.5, 0.5, 0.5) translate3d(0, -150%, 0); + -webkit-transform: scale3d(0.5, 0.5, 0.5) translate3d(0, -150%, 0); + transform: scale3d(0.5, 0.5, 0.5) translate3d(0, -150%, 0); + } + .lg-css3.lg-slide-vertical-growth .lg-item.lg-next-slide { + -moz-transform: scale3d(0.5, 0.5, 0.5) translate3d(0, 150%, 0); + -o-transform: scale3d(0.5, 0.5, 0.5) translate3d(0, 150%, 0); + -ms-transform: scale3d(0.5, 0.5, 0.5) translate3d(0, 150%, 0); + -webkit-transform: scale3d(0.5, 0.5, 0.5) translate3d(0, 150%, 0); + transform: scale3d(0.5, 0.5, 0.5) translate3d(0, 150%, 0); + } + .lg-css3.lg-slide-vertical-growth .lg-item.lg-current { + -moz-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -o-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -ms-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -webkit-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + opacity: 1; + } + .lg-css3.lg-slide-vertical-growth .lg-item.lg-prev-slide, .lg-css3.lg-slide-vertical-growth .lg-item.lg-next-slide, .lg-css3.lg-slide-vertical-growth .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + + .lg-css3.lg-slide-circular-vertical .lg-item { + opacity: 0; + } + .lg-css3.lg-slide-circular-vertical .lg-item.lg-prev-slide { + -moz-transform: scale3d(0, 0, 0) translate3d(0, -100%, 0); + -o-transform: scale3d(0, 0, 0) translate3d(0, -100%, 0); + -ms-transform: scale3d(0, 0, 0) translate3d(0, -100%, 0); + -webkit-transform: scale3d(0, 0, 0) translate3d(0, -100%, 0); + transform: scale3d(0, 0, 0) translate3d(0, -100%, 0); + } + .lg-css3.lg-slide-circular-vertical .lg-item.lg-next-slide { + -moz-transform: scale3d(0, 0, 0) translate3d(0, 100%, 0); + -o-transform: scale3d(0, 0, 0) translate3d(0, 100%, 0); + -ms-transform: scale3d(0, 0, 0) translate3d(0, 100%, 0); + -webkit-transform: scale3d(0, 0, 0) translate3d(0, 100%, 0); + transform: scale3d(0, 0, 0) translate3d(0, 100%, 0); + } + .lg-css3.lg-slide-circular-vertical .lg-item.lg-current { + -moz-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -o-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -ms-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -webkit-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + opacity: 1; + } + .lg-css3.lg-slide-circular-vertical .lg-item.lg-prev-slide, .lg-css3.lg-slide-circular-vertical .lg-item.lg-next-slide, .lg-css3.lg-slide-circular-vertical .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + } + + .lg-css3.lg-slide-vertical .lg-item { + opacity: 0; + } + .lg-css3.lg-slide-vertical .lg-item.lg-prev-slide { + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } + .lg-css3.lg-slide-vertical .lg-item.lg-next-slide { + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } + .lg-css3.lg-slide-vertical .lg-item.lg-current { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1; + } + .lg-css3.lg-slide-vertical .lg-item.lg-prev-slide, .lg-css3.lg-slide-vertical .lg-item.lg-next-slide, .lg-css3.lg-slide-vertical .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + + .lg-css3.lg-slide-circular .lg-item { + opacity: 0; + } + .lg-css3.lg-slide-circular .lg-item.lg-prev-slide { + -moz-transform: scale3d(0, 0, 0) translate3d(-100%, 0, 0); + -o-transform: scale3d(0, 0, 0) translate3d(-100%, 0, 0); + -ms-transform: scale3d(0, 0, 0) translate3d(-100%, 0, 0); + -webkit-transform: scale3d(0, 0, 0) translate3d(-100%, 0, 0); + transform: scale3d(0, 0, 0) translate3d(-100%, 0, 0); + } + .lg-css3.lg-slide-circular .lg-item.lg-next-slide { + -moz-transform: scale3d(0, 0, 0) translate3d(100%, 0, 0); + -o-transform: scale3d(0, 0, 0) translate3d(100%, 0, 0); + -ms-transform: scale3d(0, 0, 0) translate3d(100%, 0, 0); + -webkit-transform: scale3d(0, 0, 0) translate3d(100%, 0, 0); + transform: scale3d(0, 0, 0) translate3d(100%, 0, 0); + } + .lg-css3.lg-slide-circular .lg-item.lg-current { + -moz-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -o-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -ms-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -webkit-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + opacity: 1; + } + .lg-css3.lg-slide-circular .lg-item.lg-prev-slide, .lg-css3.lg-slide-circular .lg-item.lg-next-slide, .lg-css3.lg-slide-circular .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + } + + .lg-css3.lg-soft-zoom .lg-item { + opacity: 0; + } + .lg-css3.lg-soft-zoom .lg-item.lg-prev-slide { + -webkit-transform: scale3d(1.1, 1.1, 1.1); + transform: scale3d(1.1, 1.1, 1.1); + } + .lg-css3.lg-soft-zoom .lg-item.lg-next-slide { + -webkit-transform: scale3d(0.9, 0.9, 0.9); + transform: scale3d(0.9, 0.9, 0.9); + } + .lg-css3.lg-soft-zoom .lg-item.lg-current { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + opacity: 1; + } + .lg-css3.lg-soft-zoom .lg-item.lg-prev-slide, .lg-css3.lg-soft-zoom .lg-item.lg-next-slide, .lg-css3.lg-soft-zoom .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + } + + .lg-css3.lg-slide-skew-cross-rev .lg-item { + opacity: 0; + } + .lg-css3.lg-slide-skew-cross-rev .lg-item.lg-prev-slide { + -moz-transform: skew(0deg, -60deg) translate3d(-100%, 0%, 0px); + -o-transform: skew(0deg, -60deg) translate3d(-100%, 0%, 0px); + -ms-transform: skew(0deg, -60deg) translate3d(-100%, 0%, 0px); + -webkit-transform: skew(0deg, -60deg) translate3d(-100%, 0%, 0px); + transform: skew(0deg, -60deg) translate3d(-100%, 0%, 0px); + } + .lg-css3.lg-slide-skew-cross-rev .lg-item.lg-next-slide { + -moz-transform: skew(0deg, -60deg) translate3d(100%, 0%, 0px); + -o-transform: skew(0deg, -60deg) translate3d(100%, 0%, 0px); + -ms-transform: skew(0deg, -60deg) translate3d(100%, 0%, 0px); + -webkit-transform: skew(0deg, -60deg) translate3d(100%, 0%, 0px); + transform: skew(0deg, -60deg) translate3d(100%, 0%, 0px); + } + .lg-css3.lg-slide-skew-cross-rev .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -o-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -ms-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -webkit-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + opacity: 1; + } + .lg-css3.lg-slide-skew-cross-rev .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-cross-rev .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-cross-rev .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + + .lg-css3.lg-tube .lg-item { + opacity: 0; + } + .lg-css3.lg-tube .lg-item.lg-prev-slide { + -moz-transform: scale3d(1, 0, 1) translate3d(-100%, 0, 0); + -o-transform: scale3d(1, 0, 1) translate3d(-100%, 0, 0); + -ms-transform: scale3d(1, 0, 1) translate3d(-100%, 0, 0); + -webkit-transform: scale3d(1, 0, 1) translate3d(-100%, 0, 0); + transform: scale3d(1, 0, 1) translate3d(-100%, 0, 0); + } + .lg-css3.lg-tube .lg-item.lg-next-slide { + -moz-transform: scale3d(1, 0, 1) translate3d(100%, 0, 0); + -o-transform: scale3d(1, 0, 1) translate3d(100%, 0, 0); + -ms-transform: scale3d(1, 0, 1) translate3d(100%, 0, 0); + -webkit-transform: scale3d(1, 0, 1) translate3d(100%, 0, 0); + transform: scale3d(1, 0, 1) translate3d(100%, 0, 0); + } + .lg-css3.lg-tube .lg-item.lg-current { + -moz-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -o-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -ms-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -webkit-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + opacity: 1; + } + .lg-css3.lg-tube .lg-item.lg-prev-slide, .lg-css3.lg-tube .lg-item.lg-next-slide, .lg-css3.lg-tube .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + + .lg-css3.lg-slide-skew-cross .lg-item { + opacity: 0; + } + .lg-css3.lg-slide-skew-cross .lg-item.lg-prev-slide { + -moz-transform: skew(0deg, 60deg) translate3d(-100%, 0%, 0px); + -o-transform: skew(0deg, 60deg) translate3d(-100%, 0%, 0px); + -ms-transform: skew(0deg, 60deg) translate3d(-100%, 0%, 0px); + -webkit-transform: skew(0deg, 60deg) translate3d(-100%, 0%, 0px); + transform: skew(0deg, 60deg) translate3d(-100%, 0%, 0px); + } + .lg-css3.lg-slide-skew-cross .lg-item.lg-next-slide { + -moz-transform: skew(0deg, 60deg) translate3d(100%, 0%, 0px); + -o-transform: skew(0deg, 60deg) translate3d(100%, 0%, 0px); + -ms-transform: skew(0deg, 60deg) translate3d(100%, 0%, 0px); + -webkit-transform: skew(0deg, 60deg) translate3d(100%, 0%, 0px); + transform: skew(0deg, 60deg) translate3d(100%, 0%, 0px); + } + .lg-css3.lg-slide-skew-cross .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -o-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -ms-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -webkit-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + opacity: 1; + } + .lg-css3.lg-slide-skew-cross .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-cross .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-cross .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + + .lg-css3.lg-zoom-in-big .lg-item { + opacity: 0; + } + .lg-css3.lg-zoom-in-big .lg-item.lg-prev-slide { + -webkit-transform: scale3d(2, 2, 2); + transform: scale3d(2, 2, 2); + } + .lg-css3.lg-zoom-in-big .lg-item.lg-next-slide { + -webkit-transform: scale3d(2, 2, 2); + transform: scale3d(2, 2, 2); + } + .lg-css3.lg-zoom-in-big .lg-item.lg-current { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + opacity: 1; + } + .lg-css3.lg-zoom-in-big .lg-item.lg-prev-slide, .lg-css3.lg-zoom-in-big .lg-item.lg-next-slide, .lg-css3.lg-zoom-in-big .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + } + + .lg-css3.lg-slide-skew-only-rev .lg-item { + opacity: 0; + } + .lg-css3.lg-slide-skew-only-rev .lg-item.lg-prev-slide { + -moz-transform: skew(-10deg, 0deg); + -o-transform: skew(-10deg, 0deg); + -ms-transform: skew(-10deg, 0deg); + -webkit-transform: skew(-10deg, 0deg); + transform: skew(-10deg, 0deg); + } + .lg-css3.lg-slide-skew-only-rev .lg-item.lg-next-slide { + -moz-transform: skew(-10deg, 0deg); + -o-transform: skew(-10deg, 0deg); + -ms-transform: skew(-10deg, 0deg); + -webkit-transform: skew(-10deg, 0deg); + transform: skew(-10deg, 0deg); + } + .lg-css3.lg-slide-skew-only-rev .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg); + -o-transform: skew(0deg, 0deg); + -ms-transform: skew(0deg, 0deg); + -webkit-transform: skew(0deg, 0deg); + transform: skew(0deg, 0deg); + opacity: 1; + } + .lg-css3.lg-slide-skew-only-rev .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-only-rev .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-only-rev .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + + .lg-css3.lg-zoom-in-out .lg-item { + opacity: 0; + } + .lg-css3.lg-zoom-in-out .lg-item.lg-prev-slide { + -webkit-transform: scale3d(2, 2, 2); + transform: scale3d(2, 2, 2); + } + .lg-css3.lg-zoom-in-out .lg-item.lg-next-slide { + -webkit-transform: scale3d(0, 0, 0); + transform: scale3d(0, 0, 0); + } + .lg-css3.lg-zoom-in-out .lg-item.lg-current { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + opacity: 1; + } + .lg-css3.lg-zoom-in-out .lg-item.lg-prev-slide, .lg-css3.lg-zoom-in-out .lg-item.lg-next-slide, .lg-css3.lg-zoom-in-out .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + } + + .lg-css3.lg-slide-skew-only-y-rev .lg-item { + opacity: 0; + } + .lg-css3.lg-slide-skew-only-y-rev .lg-item.lg-prev-slide { + -moz-transform: skew(0deg, -10deg); + -o-transform: skew(0deg, -10deg); + -ms-transform: skew(0deg, -10deg); + -webkit-transform: skew(0deg, -10deg); + transform: skew(0deg, -10deg); + } + .lg-css3.lg-slide-skew-only-y-rev .lg-item.lg-next-slide { + -moz-transform: skew(0deg, -10deg); + -o-transform: skew(0deg, -10deg); + -ms-transform: skew(0deg, -10deg); + -webkit-transform: skew(0deg, -10deg); + transform: skew(0deg, -10deg); + } + .lg-css3.lg-slide-skew-only-y-rev .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg); + -o-transform: skew(0deg, 0deg); + -ms-transform: skew(0deg, 0deg); + -webkit-transform: skew(0deg, 0deg); + transform: skew(0deg, 0deg); + opacity: 1; + } + .lg-css3.lg-slide-skew-only-y-rev .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-only-y-rev .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-only-y-rev .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + + .lg-css3.lg-slide-skew-only-y .lg-item { + opacity: 0; + } + .lg-css3.lg-slide-skew-only-y .lg-item.lg-prev-slide { + -moz-transform: skew(0deg, 10deg); + -o-transform: skew(0deg, 10deg); + -ms-transform: skew(0deg, 10deg); + -webkit-transform: skew(0deg, 10deg); + transform: skew(0deg, 10deg); + } + .lg-css3.lg-slide-skew-only-y .lg-item.lg-next-slide { + -moz-transform: skew(0deg, 10deg); + -o-transform: skew(0deg, 10deg); + -ms-transform: skew(0deg, 10deg); + -webkit-transform: skew(0deg, 10deg); + transform: skew(0deg, 10deg); + } + .lg-css3.lg-slide-skew-only-y .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg); + -o-transform: skew(0deg, 0deg); + -ms-transform: skew(0deg, 0deg); + -webkit-transform: skew(0deg, 0deg); + transform: skew(0deg, 0deg); + opacity: 1; + } + .lg-css3.lg-slide-skew-only-y .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-only-y .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-only-y .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + + .lg-css3.lg-zoom-out-big .lg-item { + opacity: 0; + } + .lg-css3.lg-zoom-out-big .lg-item.lg-prev-slide { + -webkit-transform: scale3d(0, 0, 0); + transform: scale3d(0, 0, 0); + } + .lg-css3.lg-zoom-out-big .lg-item.lg-next-slide { + -webkit-transform: scale3d(0, 0, 0); + transform: scale3d(0, 0, 0); + } + .lg-css3.lg-zoom-out-big .lg-item.lg-current { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + opacity: 1; + } + .lg-css3.lg-zoom-out-big .lg-item.lg-prev-slide, .lg-css3.lg-zoom-out-big .lg-item.lg-next-slide, .lg-css3.lg-zoom-out-big .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + } + + .lg-css3.lg-slide-skew-only .lg-item { + opacity: 0; + } + .lg-css3.lg-slide-skew-only .lg-item.lg-prev-slide { + -moz-transform: skew(10deg, 0deg); + -o-transform: skew(10deg, 0deg); + -ms-transform: skew(10deg, 0deg); + -webkit-transform: skew(10deg, 0deg); + transform: skew(10deg, 0deg); + } + .lg-css3.lg-slide-skew-only .lg-item.lg-next-slide { + -moz-transform: skew(10deg, 0deg); + -o-transform: skew(10deg, 0deg); + -ms-transform: skew(10deg, 0deg); + -webkit-transform: skew(10deg, 0deg); + transform: skew(10deg, 0deg); + } + .lg-css3.lg-slide-skew-only .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg); + -o-transform: skew(0deg, 0deg); + -ms-transform: skew(0deg, 0deg); + -webkit-transform: skew(0deg, 0deg); + transform: skew(0deg, 0deg); + opacity: 1; + } + .lg-css3.lg-slide-skew-only .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-only .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-only .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + + .lg-css3.lg-zoom-out-in .lg-item { + opacity: 0; + } + .lg-css3.lg-zoom-out-in .lg-item.lg-prev-slide { + -webkit-transform: scale3d(0, 0, 0); + transform: scale3d(0, 0, 0); + } + .lg-css3.lg-zoom-out-in .lg-item.lg-next-slide { + -webkit-transform: scale3d(2, 2, 2); + transform: scale3d(2, 2, 2); + } + .lg-css3.lg-zoom-out-in .lg-item.lg-current { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + opacity: 1; + } + .lg-css3.lg-zoom-out-in .lg-item.lg-prev-slide, .lg-css3.lg-zoom-out-in .lg-item.lg-next-slide, .lg-css3.lg-zoom-out-in .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + } + + .lg-css3.lg-slide-skew-rev .lg-item { + opacity: 0; + } + .lg-css3.lg-slide-skew-rev .lg-item.lg-prev-slide { + -moz-transform: skew(-20deg, 0deg) translate3d(-100%, 0%, 0px); + -o-transform: skew(-20deg, 0deg) translate3d(-100%, 0%, 0px); + -ms-transform: skew(-20deg, 0deg) translate3d(-100%, 0%, 0px); + -webkit-transform: skew(-20deg, 0deg) translate3d(-100%, 0%, 0px); + transform: skew(-20deg, 0deg) translate3d(-100%, 0%, 0px); + } + .lg-css3.lg-slide-skew-rev .lg-item.lg-next-slide { + -moz-transform: skew(-20deg, 0deg) translate3d(100%, 0%, 0px); + -o-transform: skew(-20deg, 0deg) translate3d(100%, 0%, 0px); + -ms-transform: skew(-20deg, 0deg) translate3d(100%, 0%, 0px); + -webkit-transform: skew(-20deg, 0deg) translate3d(100%, 0%, 0px); + transform: skew(-20deg, 0deg) translate3d(100%, 0%, 0px); + } + .lg-css3.lg-slide-skew-rev .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -o-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -ms-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -webkit-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + opacity: 1; + } + .lg-css3.lg-slide-skew-rev .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-rev .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-rev .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + + .lg-css3.lg-zoom-out .lg-item { + opacity: 0; + } + .lg-css3.lg-zoom-out .lg-item.lg-prev-slide { + -webkit-transform: scale3d(0.7, 0.7, 0.7); + transform: scale3d(0.7, 0.7, 0.7); + } + .lg-css3.lg-zoom-out .lg-item.lg-next-slide { + -webkit-transform: scale3d(0.7, 0.7, 0.7); + transform: scale3d(0.7, 0.7, 0.7); + } + .lg-css3.lg-zoom-out .lg-item.lg-current { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + opacity: 1; + } + .lg-css3.lg-zoom-out .lg-item.lg-prev-slide, .lg-css3.lg-zoom-out .lg-item.lg-next-slide, .lg-css3.lg-zoom-out .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + } + + .lg-css3.lg-slide-skew-ver-cross-rev .lg-item { + opacity: 0; + } + .lg-css3.lg-slide-skew-ver-cross-rev .lg-item.lg-prev-slide { + -moz-transform: skew(0deg, -20deg) translate3d(0, -100%, 0px); + -o-transform: skew(0deg, -20deg) translate3d(0, -100%, 0px); + -ms-transform: skew(0deg, -20deg) translate3d(0, -100%, 0px); + -webkit-transform: skew(0deg, -20deg) translate3d(0, -100%, 0px); + transform: skew(0deg, -20deg) translate3d(0, -100%, 0px); + } + .lg-css3.lg-slide-skew-ver-cross-rev .lg-item.lg-next-slide { + -moz-transform: skew(0deg, -20deg) translate3d(0, 100%, 0px); + -o-transform: skew(0deg, -20deg) translate3d(0, 100%, 0px); + -ms-transform: skew(0deg, -20deg) translate3d(0, 100%, 0px); + -webkit-transform: skew(0deg, -20deg) translate3d(0, 100%, 0px); + transform: skew(0deg, -20deg) translate3d(0, 100%, 0px); + } + .lg-css3.lg-slide-skew-ver-cross-rev .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -o-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -ms-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -webkit-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + opacity: 1; + } + .lg-css3.lg-slide-skew-ver-cross-rev .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-ver-cross-rev .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-ver-cross-rev .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + + /*# sourceMappingURL=lg-transitions.css.map */ \ No newline at end of file diff --git a/blocks/lcp-gallery/assets/css/lightgallery-bundle.min.css b/blocks/lcp-gallery/assets/css/lightgallery-bundle.min.css new file mode 100644 index 0000000..da7c3ce --- /dev/null +++ b/blocks/lcp-gallery/assets/css/lightgallery-bundle.min.css @@ -0,0 +1 @@ +@font-face{font-family:lg;src:url(../fonts/lg.woff2?io9a6k) format("woff2"),url(../fonts/lg.ttf?io9a6k) format("truetype"),url(../fonts/lg.woff?io9a6k) format("woff"),url(../fonts/lg.svg?io9a6k#lg) format("svg");font-weight:400;font-style:normal;font-display:block}.lg-icon{font-family:lg!important;speak:never;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.lg-container{font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"}.lg-next,.lg-prev{background-color:rgba(0,0,0,.45);border-radius:2px;color:#999;cursor:pointer;display:block;font-size:22px;margin-top:-10px;padding:8px 10px 9px;position:absolute;top:50%;z-index:1084;outline:0;border:none}.lg-next.disabled,.lg-prev.disabled{opacity:0!important;cursor:default}.lg-next:hover:not(.disabled),.lg-prev:hover:not(.disabled){color:#fff}.lg-single-item .lg-next,.lg-single-item .lg-prev{display:none}.lg-next{right:20px}.lg-next:before{content:"\e095"}.lg-prev{left:20px}.lg-prev:after{content:"\e094"}@-webkit-keyframes lg-right-end{0%{left:0}50%{left:-30px}100%{left:0}}@-moz-keyframes lg-right-end{0%{left:0}50%{left:-30px}100%{left:0}}@-ms-keyframes lg-right-end{0%{left:0}50%{left:-30px}100%{left:0}}@keyframes lg-right-end{0%{left:0}50%{left:-30px}100%{left:0}}@-webkit-keyframes lg-left-end{0%{left:0}50%{left:30px}100%{left:0}}@-moz-keyframes lg-left-end{0%{left:0}50%{left:30px}100%{left:0}}@-ms-keyframes lg-left-end{0%{left:0}50%{left:30px}100%{left:0}}@keyframes lg-left-end{0%{left:0}50%{left:30px}100%{left:0}}.lg-outer.lg-right-end .lg-object{-webkit-animation:lg-right-end .3s;-o-animation:lg-right-end .3s;animation:lg-right-end .3s;position:relative}.lg-outer.lg-left-end .lg-object{-webkit-animation:lg-left-end .3s;-o-animation:lg-left-end .3s;animation:lg-left-end .3s;position:relative}.lg-toolbar{z-index:1082;left:0;position:absolute;top:0;width:100%}.lg-media-overlap .lg-toolbar{background-image:linear-gradient(0deg,rgba(0,0,0,0),rgba(0,0,0,.4))}.lg-toolbar .lg-icon{color:#999;cursor:pointer;float:right;font-size:24px;height:47px;line-height:27px;padding:10px 0;text-align:center;width:50px;text-decoration:none!important;outline:medium none;will-change:color;-webkit-transition:color .2s linear;-o-transition:color .2s linear;transition:color .2s linear;background:0 0;border:none;box-shadow:none}.lg-toolbar .lg-icon.lg-icon-18{font-size:18px}.lg-toolbar .lg-icon:hover{color:#fff}.lg-toolbar .lg-close:after{content:"\e070"}.lg-toolbar .lg-maximize{font-size:22px}.lg-toolbar .lg-maximize:after{content:"\e90a"}.lg-toolbar .lg-download:after{content:"\e0f2"}.lg-sub-html{color:#eee;font-size:16px;padding:10px 40px;text-align:center;z-index:1080;opacity:0;-webkit-transition:opacity .2s ease-out 0s;-o-transition:opacity .2s ease-out 0s;transition:opacity .2s ease-out 0s}.lg-sub-html h4{margin:0;font-size:13px;font-weight:700}.lg-sub-html p{font-size:12px;margin:5px 0 0}.lg-sub-html a{color:inherit}.lg-sub-html a:hover{text-decoration:underline}.lg-media-overlap .lg-sub-html{background-image:linear-gradient(180deg,rgba(0,0,0,0),rgba(0,0,0,.6))}.lg-item .lg-sub-html{position:absolute;bottom:0;right:0;left:0}.lg-error-msg{font-size:14px;color:#999}.lg-counter{color:#999;display:inline-block;font-size:16px;padding-left:20px;padding-top:12px;height:47px;vertical-align:middle}.lg-closing .lg-next,.lg-closing .lg-prev,.lg-closing .lg-sub-html,.lg-closing .lg-toolbar{opacity:0;-webkit-transition:-webkit-transform .08 cubic-bezier(0,0,.25,1) 0s,opacity .08 cubic-bezier(0,0,.25,1) 0s,color .08 linear;-moz-transition:-moz-transform .08 cubic-bezier(0,0,.25,1) 0s,opacity .08 cubic-bezier(0,0,.25,1) 0s,color .08 linear;-o-transition:-o-transform .08 cubic-bezier(0,0,.25,1) 0s,opacity .08 cubic-bezier(0,0,.25,1) 0s,color .08 linear;transition:transform .08 cubic-bezier(0,0,.25,1) 0s,opacity .08 cubic-bezier(0,0,.25,1) 0s,color .08 linear}body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable) .lg-img-wrap,body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable) .lg-media-cont,body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable) .lg-video-cont{opacity:0;-moz-transform:scale3d(.5,.5,.5);-o-transform:scale3d(.5,.5,.5);-ms-transform:scale3d(.5,.5,.5);-webkit-transform:scale3d(.5,.5,.5);transform:scale3d(.5,.5,.5);will-change:transform,opacity;-webkit-transition:-webkit-transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important;-moz-transition:-moz-transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important;-o-transition:-o-transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important;transition:transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important}body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable).lg-complete .lg-img-wrap,body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable).lg-complete .lg-media-cont,body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable).lg-complete .lg-video-cont{opacity:1;-moz-transform:scale3d(1,1,1);-o-transform:scale3d(1,1,1);-ms-transform:scale3d(1,1,1);-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}.lg-icon:focus-visible{color:#fff;border-radius:3px;outline:1px dashed rgba(255,255,255,.6)}.lg-toolbar .lg-icon:focus-visible{border-radius:8px;outline-offset:-5px}.lg-outer .lg-thumb-outer{background-color:#0d0a0a;width:100%;max-height:350px;overflow:hidden;float:left}.lg-outer .lg-thumb-outer.lg-grab .lg-thumb-item{cursor:-webkit-grab;cursor:-moz-grab;cursor:-o-grab;cursor:-ms-grab;cursor:grab}.lg-outer .lg-thumb-outer.lg-grabbing .lg-thumb-item{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:-o-grabbing;cursor:-ms-grabbing;cursor:grabbing}.lg-outer .lg-thumb-outer.lg-dragging .lg-thumb{-webkit-transition-duration:0s!important;transition-duration:0s!important}.lg-outer .lg-thumb-outer.lg-rebuilding-thumbnails .lg-thumb{-webkit-transition-duration:0s!important;transition-duration:0s!important}.lg-outer .lg-thumb-outer.lg-thumb-align-middle{text-align:center}.lg-outer .lg-thumb-outer.lg-thumb-align-left{text-align:left}.lg-outer .lg-thumb-outer.lg-thumb-align-right{text-align:right}.lg-outer.lg-single-item .lg-thumb-outer{display:none}.lg-outer .lg-thumb{padding:5px 0;height:100%;margin-bottom:-5px;display:inline-block;vertical-align:middle}@media (min-width:768px){.lg-outer .lg-thumb{padding:10px 0}}.lg-outer .lg-thumb-item{cursor:pointer;float:left;overflow:hidden;height:100%;border-radius:2px;margin-bottom:5px;will-change:border-color}@media (min-width:768px){.lg-outer .lg-thumb-item{border-radius:4px;border:2px solid #fff;-webkit-transition:border-color .25s ease;-o-transition:border-color .25s ease;transition:border-color .25s ease}}.lg-outer .lg-thumb-item.active,.lg-outer .lg-thumb-item:hover{border-color:#a90707}.lg-outer .lg-thumb-item img{width:100%;height:100%;object-fit:cover;display:block}.lg-outer.lg-can-toggle .lg-item{padding-bottom:0}.lg-outer .lg-toggle-thumb:after{content:"\e1ff"}.lg-outer.lg-animate-thumb .lg-thumb{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1)}.lg-outer .lg-video-cont{text-align:center;display:inline-block;vertical-align:middle;position:relative}.lg-outer .lg-video-cont .lg-object{width:100%!important;height:100%!important}.lg-outer .lg-has-iframe .lg-video-cont{-webkit-overflow-scrolling:touch;overflow:auto}.lg-outer .lg-video-object{position:absolute;left:0;right:0;width:100%;height:100%;top:0;bottom:0;z-index:3}.lg-outer .lg-video-poster{z-index:1}.lg-outer .lg-has-video .lg-video-object{opacity:0;will-change:opacity;-webkit-transition:opacity .3s ease-in;-o-transition:opacity .3s ease-in;transition:opacity .3s ease-in}.lg-outer .lg-has-video.lg-video-loaded .lg-video-play-button,.lg-outer .lg-has-video.lg-video-loaded .lg-video-poster{opacity:0!important}.lg-outer .lg-has-video.lg-video-loaded .lg-video-object{opacity:1}@keyframes lg-play-stroke{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes lg-play-rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.lg-video-play-button{width:18%;max-width:140px;position:absolute;top:50%;left:50%;z-index:2;cursor:pointer;transform:translate(-50%,-50%) scale(1);will-change:opacity,transform;-webkit-transition:-webkit-transform .25s cubic-bezier(.17,.88,.32,1.28),opacity .1s;-moz-transition:-moz-transform .25s cubic-bezier(.17,.88,.32,1.28),opacity .1s;-o-transition:-o-transform .25s cubic-bezier(.17,.88,.32,1.28),opacity .1s;transition:transform .25s cubic-bezier(.17,.88,.32,1.28),opacity .1s}.lg-video-play-button:hover .lg-video-play-icon,.lg-video-play-button:hover .lg-video-play-icon-bg{opacity:1}.lg-video-play-icon-bg{fill:none;stroke-width:3%;stroke:#fcfcfc;opacity:.6;will-change:opacity;-webkit-transition:opacity .12s ease-in;-o-transition:opacity .12s ease-in;transition:opacity .12s ease-in}.lg-video-play-icon-circle{position:absolute;top:0;left:0;bottom:0;right:0;fill:none;stroke-width:3%;stroke:rgba(30,30,30,.9);stroke-opacity:1;stroke-linecap:round;stroke-dasharray:200;stroke-dashoffset:200}.lg-video-play-icon{position:absolute;width:25%;max-width:120px;left:50%;top:50%;transform:translate3d(-50%,-50%,0);opacity:.6;will-change:opacity;-webkit-transition:opacity .12s ease-in;-o-transition:opacity .12s ease-in;transition:opacity .12s ease-in}.lg-video-play-icon .lg-video-play-icon-inner{fill:#fcfcfc}.lg-video-loading .lg-video-play-icon-circle{animation:lg-play-rotate 2s linear .25s infinite,lg-play-stroke 1.5s ease-in-out .25s infinite}.lg-video-loaded .lg-video-play-button{opacity:0;transform:translate(-50%,-50%) scale(.7)}.lg-progress-bar{background-color:#333;height:5px;left:0;position:absolute;top:0;width:100%;z-index:1083;opacity:0;will-change:opacity;-webkit-transition:opacity 80ms ease 0s;-moz-transition:opacity 80ms ease 0s;-o-transition:opacity 80ms ease 0s;transition:opacity 80ms ease 0s}.lg-progress-bar .lg-progress{background-color:#a90707;height:5px;width:0}.lg-progress-bar.lg-start .lg-progress{width:100%}.lg-show-autoplay .lg-progress-bar{opacity:1}.lg-autoplay-button:after{content:"\e01d"}.lg-show-autoplay .lg-autoplay-button:after{content:"\e01a"}.lg-single-item .lg-autoplay-button{opacity:.75;pointer-events:none}.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-image,.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-img-wrap{-webkit-transition-duration:0s!important;transition-duration:0s!important}.lg-outer.lg-use-transition-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap{will-change:transform;-webkit-transition:-webkit-transform .5s cubic-bezier(.12,.415,.01,1.19) 0s;-moz-transition:-moz-transform .5s cubic-bezier(.12,.415,.01,1.19) 0s;-o-transition:-o-transform .5s cubic-bezier(.12,.415,.01,1.19) 0s;transition:transform .5s cubic-bezier(.12,.415,.01,1.19) 0s}.lg-outer.lg-use-transition-for-zoom.lg-zoom-drag-transition .lg-item.lg-complete.lg-zoomable .lg-img-wrap{will-change:transform;-webkit-transition:-webkit-transform .8s cubic-bezier(0,0,.25,1) 0s;-moz-transition:-moz-transform .8s cubic-bezier(0,0,.25,1) 0s;-o-transition:-o-transform .8s cubic-bezier(0,0,.25,1) 0s;transition:transform .8s cubic-bezier(0,0,.25,1) 0s}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-img-wrap{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img,.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1);-webkit-transition:-webkit-transform .5s cubic-bezier(.12,.415,.01,1.19) 0s,opacity .15s!important;-moz-transition:-moz-transform .5s cubic-bezier(.12,.415,.01,1.19) 0s,opacity .15s!important;-o-transition:-o-transform .5s cubic-bezier(.12,.415,.01,1.19) 0s,opacity .15s!important;transition:transform .5s cubic-bezier(.12,.415,.01,1.19) 0s,opacity .15s!important;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.no-transition,.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.no-transition{transition:none!important}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.reset-transition,.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.reset-transition{transform:scale3d(1,1,1) translate3d(-50%,-50%,0)!important;max-width:none!important;max-height:none!important;top:50%!important;left:50%!important}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.reset-transition-x,.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.reset-transition-x{transform:scale3d(1,1,1) translate3d(-50%,0,0)!important;top:0!important;left:50%!important;max-width:none!important;max-height:none!important}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.reset-transition-y,.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.reset-transition-y{transform:scale3d(1,1,1) translate3d(0,-50%,0)!important;top:50%!important;left:0!important;max-width:none!important;max-height:none!important}.lg-icon.lg-zoom-in:after{content:"\e311"}.lg-actual-size .lg-icon.lg-zoom-in{opacity:1;pointer-events:auto}.lg-icon.lg-actual-size{font-size:20px}.lg-icon.lg-actual-size:after{content:"\e033"}.lg-icon.lg-zoom-out{opacity:.5;pointer-events:none}.lg-icon.lg-zoom-out:after{content:"\e312"}.lg-zoomed .lg-icon.lg-zoom-out{opacity:1;pointer-events:auto}.lg-outer.lg-first-slide-loading .lg-actual-size,.lg-outer.lg-first-slide-loading .lg-zoom-in,.lg-outer.lg-first-slide-loading .lg-zoom-out,.lg-outer[data-lg-slide-type=iframe] .lg-actual-size,.lg-outer[data-lg-slide-type=iframe] .lg-zoom-in,.lg-outer[data-lg-slide-type=iframe] .lg-zoom-out,.lg-outer[data-lg-slide-type=video] .lg-actual-size,.lg-outer[data-lg-slide-type=video] .lg-zoom-in,.lg-outer[data-lg-slide-type=video] .lg-zoom-out{opacity:.75;pointer-events:none}.lg-outer .lg-pager-outer{text-align:center;z-index:1080;height:10px;margin-bottom:10px}.lg-outer .lg-pager-outer.lg-pager-hover .lg-pager-cont{overflow:visible}.lg-outer.lg-single-item .lg-pager-outer{display:none}.lg-outer .lg-pager-cont{cursor:pointer;display:inline-block;overflow:hidden;position:relative;vertical-align:top;margin:0 5px}.lg-outer .lg-pager-cont:hover .lg-pager-thumb-cont{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.lg-outer .lg-pager-cont.lg-pager-active .lg-pager{box-shadow:0 0 0 2px #fff inset}.lg-outer .lg-pager-thumb-cont{background-color:#fff;color:#fff;bottom:100%;height:83px;left:0;margin-bottom:20px;margin-left:-60px;opacity:0;padding:5px;position:absolute;width:120px;border-radius:3px;will-change:transform,opacity;-webkit-transition:opacity .15s ease 0s,-webkit-transform .15s ease 0s;-moz-transition:opacity .15s ease 0s,-moz-transform .15s ease 0s;-o-transition:opacity .15s ease 0s,-o-transform .15s ease 0s;transition:opacity .15s ease 0s,transform .15s ease 0s;-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}.lg-outer .lg-pager-thumb-cont img{width:100%;height:100%}.lg-outer .lg-pager{background-color:rgba(255,255,255,.5);border-radius:50%;box-shadow:0 0 0 8px rgba(255,255,255,.7) inset;display:block;height:12px;-webkit-transition:box-shadow .3s ease 0s;-o-transition:box-shadow .3s ease 0s;transition:box-shadow .3s ease 0s;width:12px}.lg-outer .lg-pager:focus,.lg-outer .lg-pager:hover{box-shadow:0 0 0 8px #fff inset}.lg-outer .lg-caret{border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px dashed;bottom:-10px;display:inline-block;height:0;left:50%;margin-left:-5px;position:absolute;vertical-align:middle;width:0}.lg-fullscreen:after{content:"\e20c"}.lg-fullscreen-on .lg-fullscreen:after{content:"\e20d"}.lg-outer .lg-dropdown-overlay{background-color:rgba(0,0,0,.25);bottom:0;cursor:default;left:0;position:absolute;right:0;top:0;z-index:1081;opacity:0;visibility:hidden;will-change:visibility,opacity;-webkit-transition:visibility 0s linear .18s,opacity .18s linear 0s;-o-transition:visibility 0s linear .18s,opacity .18s linear 0s;transition:visibility 0s linear .18s,opacity .18s linear 0s}.lg-outer.lg-dropdown-active .lg-dropdown,.lg-outer.lg-dropdown-active .lg-dropdown-overlay{-webkit-transition-delay:0s;transition-delay:0s;-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1;visibility:visible}.lg-outer.lg-dropdown-active .lg-share{color:#fff}.lg-outer .lg-dropdown{background-color:#fff;border-radius:2px;font-size:14px;list-style-type:none;margin:0;padding:10px 0;position:absolute;right:0;text-align:left;top:50px;opacity:0;visibility:hidden;-moz-transform:translate3d(0,5px,0);-o-transform:translate3d(0,5px,0);-ms-transform:translate3d(0,5px,0);-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0);will-change:visibility,opacity,transform;-webkit-transition:-webkit-transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s;-moz-transition:-moz-transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s;-o-transition:-o-transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s;transition:transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s}.lg-outer .lg-dropdown:after{content:"";display:block;height:0;width:0;position:absolute;border:8px solid transparent;border-bottom-color:#fff;right:16px;top:-16px}.lg-outer .lg-dropdown>li:last-child{margin-bottom:0}.lg-outer .lg-dropdown>li:hover a{color:#333}.lg-outer .lg-dropdown a{color:#333;display:block;white-space:pre;padding:4px 12px;font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px}.lg-outer .lg-dropdown a:hover{background-color:rgba(0,0,0,.07)}.lg-outer .lg-dropdown .lg-dropdown-text{display:inline-block;line-height:1;margin-top:-3px;vertical-align:middle}.lg-outer .lg-dropdown .lg-icon{color:#333;display:inline-block;float:none;font-size:20px;height:auto;line-height:1;margin-right:8px;padding:0;vertical-align:middle;width:auto}.lg-outer .lg-share{position:relative}.lg-outer .lg-share:after{content:"\e80d"}.lg-outer .lg-share-facebook .lg-icon{color:#3b5998}.lg-outer .lg-share-facebook .lg-icon:after{content:"\e904"}.lg-outer .lg-share-twitter .lg-icon{color:#00aced}.lg-outer .lg-share-twitter .lg-icon:after{content:"\e907"}.lg-outer .lg-share-pinterest .lg-icon{color:#cb2027}.lg-outer .lg-share-pinterest .lg-icon:after{content:"\e906"}.lg-comment-box{width:420px;max-width:100%;position:absolute;right:0;top:0;bottom:0;z-index:9999;background-color:#fff;will-change:transform;-moz-transform:translate3d(100%,0,0);-o-transform:translate3d(100%,0,0);-ms-transform:translate3d(100%,0,0);-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);-webkit-transition:-webkit-transform .4s cubic-bezier(0,0,.25,1) 0s;-moz-transition:-moz-transform .4s cubic-bezier(0,0,.25,1) 0s;-o-transition:-o-transform .4s cubic-bezier(0,0,.25,1) 0s;transition:transform .4s cubic-bezier(0,0,.25,1) 0s}.lg-comment-box .lg-comment-title{margin:0;color:#fff;font-size:18px}.lg-comment-box .lg-comment-header{background-color:#000;padding:12px 20px;position:absolute;left:0;right:0;top:0}.lg-comment-box .lg-comment-body{height:100%!important;padding-top:43px!important;width:100%!important}.lg-comment-box .fb-comments{height:100%;width:100%;background:url(../images/loading.gif) no-repeat scroll center center #fff;overflow-y:auto;display:inline-block}.lg-comment-box .fb-comments[fb-xfbml-state=rendered]{background-image:none}.lg-comment-box .fb-comments>span{max-width:100%}.lg-comment-box .lg-comment-close{position:absolute;right:5px;top:12px;cursor:pointer;font-size:20px;color:#999;will-change:color;-webkit-transition:color .2s linear;-o-transition:color .2s linear;transition:color .2s linear}.lg-comment-box .lg-comment-close:hover{color:#fff}.lg-comment-box .lg-comment-close:after{content:"\e070"}.lg-comment-box iframe{max-width:100%!important;width:100%!important}.lg-comment-box #disqus_thread{padding:0 20px}.lg-outer .lg-comment-overlay{background-color:rgba(0,0,0,.25);bottom:0;cursor:default;left:0;position:fixed;right:0;top:0;z-index:1081;opacity:0;visibility:hidden;will-change:visibility,opacity;-webkit-transition:visibility 0s linear .18s,opacity .18s linear 0s;-o-transition:visibility 0s linear .18s,opacity .18s linear 0s;transition:visibility 0s linear .18s,opacity .18s linear 0s}.lg-outer .lg-comment-toggle:after{content:"\e908"}.lg-outer.lg-comment-active .lg-comment-overlay{-webkit-transition-delay:0s;transition-delay:0s;-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1;visibility:visible}.lg-outer.lg-comment-active .lg-comment-toggle{color:#fff}.lg-outer.lg-comment-active .lg-comment-box{-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.lg-outer .lg-img-rotate{position:absolute;left:0;right:0;top:0;bottom:0;-webkit-transition:-webkit-transform .4s cubic-bezier(0,0,.25,1) 0s;-moz-transition:-moz-transform .4s cubic-bezier(0,0,.25,1) 0s;-o-transition:-o-transform .4s cubic-bezier(0,0,.25,1) 0s;transition:transform .4s cubic-bezier(0,0,.25,1) 0s}.lg-outer[data-lg-slide-type=iframe] .lg-flip-hor,.lg-outer[data-lg-slide-type=iframe] .lg-flip-ver,.lg-outer[data-lg-slide-type=iframe] .lg-rotate-left,.lg-outer[data-lg-slide-type=iframe] .lg-rotate-right,.lg-outer[data-lg-slide-type=video] .lg-flip-hor,.lg-outer[data-lg-slide-type=video] .lg-flip-ver,.lg-outer[data-lg-slide-type=video] .lg-rotate-left,.lg-outer[data-lg-slide-type=video] .lg-rotate-right{opacity:.75;pointer-events:none}.lg-outer .lg-img-rotate:before{content:"";display:inline-block;height:100%;vertical-align:middle}.lg-rotate-left:after{content:"\e900"}.lg-rotate-right:after{content:"\e901"}.lg-icon.lg-flip-hor,.lg-icon.lg-flip-ver{font-size:26px}.lg-flip-ver:after{content:"\e903"}.lg-flip-hor:after{content:"\e902"}.lg-medium-zoom-item{cursor:zoom-in}.lg-medium-zoom .lg-outer{cursor:zoom-out}.lg-medium-zoom .lg-outer.lg-grab img.lg-object{cursor:zoom-out}.lg-medium-zoom .lg-outer.lg-grabbing img.lg-object{cursor:zoom-out}.lg-relative-caption .lg-outer .lg-sub-html{white-space:normal;bottom:auto;padding:0;background-image:none}.lg-relative-caption .lg-outer .lg-relative-caption-item{opacity:0;padding:16px 0;transition:.5s opacity ease}.lg-relative-caption .lg-outer .lg-show-caption .lg-relative-caption-item{opacity:1}.lg-group:after{content:"";display:table;clear:both}.lg-container{display:none;outline:0}.lg-container.lg-show{display:block}.lg-on{scroll-behavior:unset}.lg-overlay-open{overflow:hidden}.lg-hide-sub-html .lg-sub-html,.lg-next,.lg-pager-outer,.lg-prev,.lg-toolbar{opacity:0;will-change:transform,opacity;-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1) 0s,opacity .25s cubic-bezier(0,0,.25,1) 0s;-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1) 0s,opacity .25s cubic-bezier(0,0,.25,1) 0s;-o-transition:-o-transform .25s cubic-bezier(0,0,.25,1) 0s,opacity .25s cubic-bezier(0,0,.25,1) 0s;transition:transform .25s cubic-bezier(0,0,.25,1) 0s,opacity .25s cubic-bezier(0,0,.25,1) 0s}.lg-show-in .lg-next,.lg-show-in .lg-pager-outer,.lg-show-in .lg-prev,.lg-show-in .lg-toolbar{opacity:1}.lg-show-in.lg-hide-sub-html .lg-sub-html{opacity:1}.lg-show-in .lg-hide-items .lg-prev{opacity:0;-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}.lg-show-in .lg-hide-items .lg-next{opacity:0;-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}.lg-show-in .lg-hide-items .lg-toolbar{opacity:0;-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}.lg-show-in .lg-hide-items.lg-hide-sub-html .lg-sub-html{opacity:0;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}.lg-outer{width:100%;height:100%;position:fixed;top:0;left:0;z-index:1050;text-align:left;opacity:.001;outline:0;will-change:auto;overflow:hidden;-webkit-transition:opacity .15s ease 0s;-o-transition:opacity .15s ease 0s;transition:opacity .15s ease 0s}.lg-outer *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.lg-outer.lg-zoom-from-image{opacity:1}.lg-outer.lg-visible{opacity:1}.lg-outer.lg-css3 .lg-item:not(.lg-start-end-progress).lg-current,.lg-outer.lg-css3 .lg-item:not(.lg-start-end-progress).lg-next-slide,.lg-outer.lg-css3 .lg-item:not(.lg-start-end-progress).lg-prev-slide{-webkit-transition-duration:inherit!important;transition-duration:inherit!important;-webkit-transition-timing-function:inherit!important;transition-timing-function:inherit!important}.lg-outer.lg-css3.lg-dragging .lg-item.lg-current,.lg-outer.lg-css3.lg-dragging .lg-item.lg-next-slide,.lg-outer.lg-css3.lg-dragging .lg-item.lg-prev-slide{-webkit-transition-duration:0s!important;transition-duration:0s!important;opacity:1}.lg-outer.lg-grab img.lg-object{cursor:-webkit-grab;cursor:-moz-grab;cursor:-o-grab;cursor:-ms-grab;cursor:grab}.lg-outer.lg-grabbing img.lg-object{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:-o-grabbing;cursor:-ms-grabbing;cursor:grabbing}.lg-outer .lg-content{position:absolute;top:0;left:0;right:0;bottom:0}.lg-outer .lg-inner{width:100%;position:absolute;left:0;top:0;bottom:0;-webkit-transition:opacity 0s;-o-transition:opacity 0s;transition:opacity 0s;white-space:nowrap}.lg-outer .lg-item{display:none!important}.lg-outer .lg-item:not(.lg-start-end-progress){background:url(../images/loading.gif) no-repeat scroll center center transparent}.lg-outer.lg-css3 .lg-current,.lg-outer.lg-css3 .lg-next-slide,.lg-outer.lg-css3 .lg-prev-slide{display:inline-block!important}.lg-outer.lg-css .lg-current{display:inline-block!important}.lg-outer .lg-img-wrap,.lg-outer .lg-item{display:inline-block;text-align:center;position:absolute;width:100%;height:100%}.lg-outer .lg-img-wrap:before,.lg-outer .lg-item:before{content:"";display:inline-block;height:100%;vertical-align:middle}.lg-outer .lg-img-wrap{position:absolute;left:0;right:0;top:0;bottom:0;white-space:nowrap;font-size:0}.lg-outer .lg-item.lg-complete{background-image:none}.lg-outer .lg-item.lg-current{z-index:1060}.lg-outer .lg-object{display:inline-block;vertical-align:middle;max-width:100%;max-height:100%;width:auto;height:auto;position:relative}.lg-outer .lg-empty-html .lg-sub-html,.lg-outer .lg-empty-html.lg-sub-html{display:none}.lg-outer.lg-hide-download .lg-download{opacity:.75;pointer-events:none}.lg-outer .lg-first-slide .lg-dummy-img{position:absolute;top:50%;left:50%}.lg-outer.lg-components-open:not(.lg-zoomed) .lg-components{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.lg-outer.lg-components-open:not(.lg-zoomed) .lg-sub-html{opacity:1;transition:opacity .2s ease-out .15s}.lg-outer .lg-media-cont{text-align:center;display:inline-block;vertical-align:middle;position:relative}.lg-outer .lg-media-cont .lg-object{width:100%!important;height:100%!important}.lg-outer .lg-has-iframe .lg-media-cont{-webkit-overflow-scrolling:touch;overflow:auto}.lg-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1040;background-color:#000;opacity:0;will-change:auto;-webkit-transition:opacity 333ms ease-in 0s;-o-transition:opacity 333ms ease-in 0s;transition:opacity 333ms ease-in 0s}.lg-backdrop.in{opacity:1}.lg-css3.lg-no-trans .lg-current,.lg-css3.lg-no-trans .lg-next-slide,.lg-css3.lg-no-trans .lg-prev-slide{-webkit-transition:none 0s ease 0s!important;-moz-transition:none 0s ease 0s!important;-o-transition:none 0s ease 0s!important;transition:none 0s ease 0s!important}.lg-css3.lg-use-css3 .lg-item{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden}.lg-css3.lg-fade .lg-item{opacity:0}.lg-css3.lg-fade .lg-item.lg-current{opacity:1}.lg-css3.lg-fade .lg-item.lg-current,.lg-css3.lg-fade .lg-item.lg-next-slide,.lg-css3.lg-fade .lg-item.lg-prev-slide{-webkit-transition:opacity .1s ease 0s;-moz-transition:opacity .1s ease 0s;-o-transition:opacity .1s ease 0s;transition:opacity .1s ease 0s}.lg-css3.lg-use-css3 .lg-item.lg-start-progress{-webkit-transition:-webkit-transform 1s cubic-bezier(.175,.885,.32,1.275) 0s;-moz-transition:-moz-transform 1s cubic-bezier(.175,.885,.32,1.275) 0s;-o-transition:-o-transform 1s cubic-bezier(.175,.885,.32,1.275) 0s;transition:transform 1s cubic-bezier(.175,.885,.32,1.275) 0s}.lg-css3.lg-use-css3 .lg-item.lg-start-end-progress{-webkit-transition:-webkit-transform 1s cubic-bezier(0,0,.25,1) 0s;-moz-transition:-moz-transform 1s cubic-bezier(0,0,.25,1) 0s;-o-transition:-o-transform 1s cubic-bezier(0,0,.25,1) 0s;transition:transform 1s cubic-bezier(0,0,.25,1) 0s}.lg-css3.lg-slide.lg-use-css3 .lg-item{opacity:0}.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current,.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide,.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide{-webkit-transition:-webkit-transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;-moz-transition:-moz-transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;-o-transition:-o-transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;transition:transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s}.lg-container{display:none}.lg-container.lg-show{display:block}.lg-container.lg-dragging-vertical .lg-backdrop{-webkit-transition-duration:0s!important;transition-duration:0s!important}.lg-container.lg-dragging-vertical .lg-css3 .lg-item.lg-current{-webkit-transition-duration:0s!important;transition-duration:0s!important;opacity:1}.lg-inline .lg-backdrop,.lg-inline .lg-outer{position:absolute}.lg-inline .lg-backdrop{z-index:1}.lg-inline .lg-outer{z-index:2}.lg-inline .lg-maximize:after{content:"\e909"}.lg-components{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);will-change:transform;-webkit-transition:-webkit-transform .35s ease-out 0s;-moz-transition:-moz-transform .35s ease-out 0s;-o-transition:-o-transform .35s ease-out 0s;transition:transform .35s ease-out 0s;z-index:1080;position:absolute;bottom:0;right:0;left:0} \ No newline at end of file diff --git a/blocks/lcp-gallery/assets/css/lightgallery.css b/blocks/lcp-gallery/assets/css/lightgallery.css new file mode 100644 index 0000000..b32656e --- /dev/null +++ b/blocks/lcp-gallery/assets/css/lightgallery.css @@ -0,0 +1,1151 @@ +@font-face { + font-family: 'lg'; + src: url("../fonts/lg.ttf?22t19m") format("truetype"), url("../fonts/lg.woff?22t19m") format("woff"), url("../fonts/lg.svg?22t19m#lg") format("svg"); + font-weight: normal; + font-style: normal; + font-display: block; + } + + .lg-icon { + /* use !important to prevent issues with browser extensions that change fonts */ + font-family: 'lg' !important; + speak: never; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + + .lg-actions .lg-next, .lg-actions .lg-prev { + background-color: rgba(0, 0, 0, 0.45); + border-radius: 2px; + color: #999; + cursor: pointer; + display: block; + font-size: 22px; + margin-top: -10px; + padding: 8px 10px 9px; + position: absolute; + top: 50%; + z-index: 1080; + outline: none; + border: none; + background-color: transparent; + } + + .lg-actions .lg-next.disabled, .lg-actions .lg-prev.disabled { + pointer-events: none; + opacity: 0.5; + } + + .lg-actions .lg-next:hover, .lg-actions .lg-prev:hover { + color: #FFF; + } + + .lg-actions .lg-next { + right: 20px; + } + + .lg-actions .lg-next:before { + content: "\e095"; + } + + .lg-actions .lg-prev { + left: 20px; + } + + .lg-actions .lg-prev:after { + content: "\e094"; + } + + @-webkit-keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } + } + + @-moz-keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } + } + + @-ms-keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } + } + + @keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } + } + + @-webkit-keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } + } + + @-moz-keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } + } + + @-ms-keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } + } + + @keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } + } + + .lg-outer.lg-right-end .lg-object { + -webkit-animation: lg-right-end 0.3s; + -o-animation: lg-right-end 0.3s; + animation: lg-right-end 0.3s; + position: relative; + } + + .lg-outer.lg-left-end .lg-object { + -webkit-animation: lg-left-end 0.3s; + -o-animation: lg-left-end 0.3s; + animation: lg-left-end 0.3s; + position: relative; + } + + .lg-toolbar { + z-index: 1082; + left: 0; + position: absolute; + top: 0; + width: 100%; + background-color: rgba(0, 0, 0, 0.45); + } + + .lg-toolbar .lg-icon { + color: #999; + cursor: pointer; + float: right; + font-size: 24px; + height: 47px; + line-height: 27px; + padding: 10px 0; + text-align: center; + width: 50px; + text-decoration: none !important; + outline: medium none; + background: none; + border: none; + box-shadow: none; + -webkit-transition: color 0.2s linear; + -o-transition: color 0.2s linear; + transition: color 0.2s linear; + } + + .lg-toolbar .lg-icon:hover { + color: #FFF; + } + + .lg-toolbar .lg-close:after { + content: "\e070"; + } + + .lg-toolbar .lg-download:after { + content: "\e0f2"; + } + + .lg-sub-html { + background-color: rgba(0, 0, 0, 0.45); + bottom: 0; + color: #EEE; + font-size: 16px; + left: 0; + padding: 10px 40px; + position: fixed; + right: 0; + text-align: center; + z-index: 1080; + } + + .lg-sub-html h4 { + margin: 0; + font-size: 13px; + font-weight: bold; + } + + .lg-sub-html p { + font-size: 12px; + margin: 5px 0 0; + } + + #lg-counter { + color: #999; + display: inline-block; + font-size: 16px; + padding-left: 20px; + padding-top: 12px; + vertical-align: middle; + } + + .lg-toolbar, .lg-prev, .lg-next { + opacity: 1; + -webkit-transition: -webkit-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, color 0.2s linear; + -moz-transition: -moz-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, color 0.2s linear; + -o-transition: -o-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, color 0.2s linear; + transition: transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, color 0.2s linear; + } + + .lg-hide-items .lg-prev { + opacity: 0; + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); + } + + .lg-hide-items .lg-next { + opacity: 0; + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); + } + + .lg-hide-items .lg-toolbar { + opacity: 0; + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0); + } + + body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-object { + -webkit-transform: scale3d(0.5, 0.5, 0.5); + transform: scale3d(0.5, 0.5, 0.5); + opacity: 0; + -webkit-transition: -webkit-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; + -moz-transition: -moz-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; + -o-transition: -o-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; + transition: transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; + -webkit-transform-origin: 50% 50%; + -moz-transform-origin: 50% 50%; + -ms-transform-origin: 50% 50%; + transform-origin: 50% 50%; + } + + body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + opacity: 1; + } + + .lg-outer .lg-thumb-outer { + background-color: #0D0A0A; + bottom: 0; + position: absolute; + width: 100%; + z-index: 1080; + max-height: 350px; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + } + + .lg-outer .lg-thumb-outer.lg-grab .lg-thumb-item { + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: -o-grab; + cursor: -ms-grab; + cursor: grab; + } + + .lg-outer .lg-thumb-outer.lg-grabbing .lg-thumb-item { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: -o-grabbing; + cursor: -ms-grabbing; + cursor: grabbing; + } + + .lg-outer .lg-thumb-outer.lg-dragging .lg-thumb { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; + } + + .lg-outer.lg-thumb-open .lg-thumb-outer { + -webkit-transform: translate3d(0, 0%, 0); + transform: translate3d(0, 0%, 0); + } + + .lg-outer .lg-thumb { + padding: 10px 0; + height: 100%; + margin-bottom: -5px; + } + + .lg-outer .lg-thumb-item { + border-radius: 5px; + cursor: pointer; + float: left; + overflow: hidden; + height: 100%; + border: 2px solid #FFF; + border-radius: 4px; + margin-bottom: 5px; + } + + @media (min-width: 1025px) { + .lg-outer .lg-thumb-item { + -webkit-transition: border-color 0.25s ease; + -o-transition: border-color 0.25s ease; + transition: border-color 0.25s ease; + } + } + + .lg-outer .lg-thumb-item.active, .lg-outer .lg-thumb-item:hover { + border-color: #a90707; + } + + .lg-outer .lg-thumb-item img { + width: 100%; + height: 100%; + object-fit: cover; + } + + .lg-outer.lg-has-thumb .lg-item { + padding-bottom: 120px; + } + + .lg-outer.lg-can-toggle .lg-item { + padding-bottom: 0; + } + + .lg-outer.lg-pull-caption-up .lg-sub-html { + -webkit-transition: bottom 0.25s ease; + -o-transition: bottom 0.25s ease; + transition: bottom 0.25s ease; + } + + .lg-outer.lg-pull-caption-up.lg-thumb-open .lg-sub-html { + bottom: 100px; + } + + .lg-outer .lg-toggle-thumb { + background-color: #0D0A0A; + border-radius: 2px 2px 0 0; + color: #999; + cursor: pointer; + font-size: 24px; + height: 39px; + line-height: 27px; + padding: 5px 0; + position: absolute; + right: 20px; + text-align: center; + top: -39px; + width: 50px; + outline: medium none; + border: none; + } + + .lg-outer .lg-toggle-thumb:after { + content: "\e1ff"; + } + + .lg-outer .lg-toggle-thumb:hover { + color: #FFF; + } + + .lg-outer .lg-video-cont { + display: inline-block; + vertical-align: middle; + max-width: 1140px; + max-height: 100%; + width: 100%; + padding: 0 5px; + } + + .lg-outer .lg-video { + width: 100%; + height: 0; + padding-bottom: 56.25%; + overflow: hidden; + position: relative; + } + + .lg-outer .lg-video .lg-object { + display: inline-block; + position: absolute; + top: 0; + left: 0; + width: 100% !important; + height: 100% !important; + } + + .lg-outer .lg-video .lg-video-play { + width: 84px; + height: 59px; + position: absolute; + left: 50%; + top: 50%; + margin-left: -42px; + margin-top: -30px; + z-index: 1080; + cursor: pointer; + } + + .lg-outer .lg-has-vimeo .lg-video-play { + background: url("../img/vimeo-play.png") no-repeat scroll 0 0 transparent; + } + + .lg-outer .lg-has-vimeo:hover .lg-video-play { + background: url("../img/vimeo-play.png") no-repeat scroll 0 -58px transparent; + } + + .lg-outer .lg-has-html5 .lg-video-play { + background: transparent url("../img/video-play.png") no-repeat scroll 0 0; + height: 64px; + margin-left: -32px; + margin-top: -32px; + width: 64px; + opacity: 0.8; + } + + .lg-outer .lg-has-html5:hover .lg-video-play { + opacity: 1; + } + + .lg-outer .lg-has-youtube .lg-video-play { + background: url("../img/youtube-play.png") no-repeat scroll 0 0 transparent; + } + + .lg-outer .lg-has-youtube:hover .lg-video-play { + background: url("../img/youtube-play.png") no-repeat scroll 0 -60px transparent; + } + + .lg-outer .lg-video-object { + width: 100% !important; + height: 100% !important; + position: absolute; + top: 0; + left: 0; + } + + .lg-outer .lg-has-video .lg-video-object { + visibility: hidden; + } + + .lg-outer .lg-has-video.lg-video-playing .lg-object, .lg-outer .lg-has-video.lg-video-playing .lg-video-play { + display: none; + } + + .lg-outer .lg-has-video.lg-video-playing .lg-video-object { + visibility: visible; + } + + .lg-progress-bar { + background-color: #333; + height: 5px; + left: 0; + position: absolute; + top: 0; + width: 100%; + z-index: 1083; + opacity: 0; + -webkit-transition: opacity 0.08s ease 0s; + -moz-transition: opacity 0.08s ease 0s; + -o-transition: opacity 0.08s ease 0s; + transition: opacity 0.08s ease 0s; + } + + .lg-progress-bar .lg-progress { + background-color: #a90707; + height: 5px; + width: 0; + } + + .lg-progress-bar.lg-start .lg-progress { + width: 100%; + } + + .lg-show-autoplay .lg-progress-bar { + opacity: 1; + } + + .lg-autoplay-button:after { + content: "\e01d"; + } + + .lg-show-autoplay .lg-autoplay-button:after { + content: "\e01a"; + } + + .lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-img-wrap, .lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-image { + -webkit-transition-duration: 0s; + transition-duration: 0s; + } + + .lg-outer.lg-use-transition-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap { + -webkit-transition: -webkit-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s; + } + + .lg-outer.lg-use-left-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap { + -webkit-transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s; + } + + .lg-outer .lg-item.lg-complete.lg-zoomable .lg-img-wrap { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; + } + + .lg-outer .lg-item.lg-complete.lg-zoomable .lg-image { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + -webkit-transition: -webkit-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.15s !important; + -moz-transition: -moz-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.15s !important; + -o-transition: -o-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.15s !important; + transition: transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.15s !important; + -webkit-transform-origin: 0 0; + -moz-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; + } + + #lg-zoom-in:after { + content: "\e311"; + } + + #lg-actual-size { + font-size: 20px; + } + + #lg-actual-size:after { + content: "\e033"; + } + + #lg-zoom-out { + opacity: 0.5; + pointer-events: none; + } + + #lg-zoom-out:after { + content: "\e312"; + } + + .lg-zoomed #lg-zoom-out { + opacity: 1; + pointer-events: auto; + } + + .lg-outer .lg-pager-outer { + bottom: 60px; + left: 0; + position: absolute; + right: 0; + text-align: center; + z-index: 1080; + height: 10px; + } + + .lg-outer .lg-pager-outer.lg-pager-hover .lg-pager-cont { + overflow: visible; + } + + .lg-outer .lg-pager-cont { + cursor: pointer; + display: inline-block; + overflow: hidden; + position: relative; + vertical-align: top; + margin: 0 5px; + } + + .lg-outer .lg-pager-cont:hover .lg-pager-thumb-cont { + opacity: 1; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + .lg-outer .lg-pager-cont.lg-pager-active .lg-pager { + box-shadow: 0 0 0 2px white inset; + } + + .lg-outer .lg-pager-thumb-cont { + background-color: #fff; + color: #FFF; + bottom: 100%; + height: 83px; + left: 0; + margin-bottom: 20px; + margin-left: -60px; + opacity: 0; + padding: 5px; + position: absolute; + width: 120px; + border-radius: 3px; + -webkit-transition: opacity 0.15s ease 0s, -webkit-transform 0.15s ease 0s; + -moz-transition: opacity 0.15s ease 0s, -moz-transform 0.15s ease 0s; + -o-transition: opacity 0.15s ease 0s, -o-transform 0.15s ease 0s; + transition: opacity 0.15s ease 0s, transform 0.15s ease 0s; + -webkit-transform: translate3d(0, 5px, 0); + transform: translate3d(0, 5px, 0); + } + + .lg-outer .lg-pager-thumb-cont img { + width: 100%; + height: 100%; + } + + .lg-outer .lg-pager { + background-color: rgba(255, 255, 255, 0.5); + border-radius: 50%; + box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.7) inset; + display: block; + height: 12px; + -webkit-transition: box-shadow 0.3s ease 0s; + -o-transition: box-shadow 0.3s ease 0s; + transition: box-shadow 0.3s ease 0s; + width: 12px; + } + + .lg-outer .lg-pager:hover, .lg-outer .lg-pager:focus { + box-shadow: 0 0 0 8px white inset; + } + + .lg-outer .lg-caret { + border-left: 10px solid transparent; + border-right: 10px solid transparent; + border-top: 10px dashed; + bottom: -10px; + display: inline-block; + height: 0; + left: 50%; + margin-left: -5px; + position: absolute; + vertical-align: middle; + width: 0; + } + + .lg-fullscreen:after { + content: "\e20c"; + } + + .lg-fullscreen-on .lg-fullscreen:after { + content: "\e20d"; + } + + .lg-outer #lg-dropdown-overlay { + background-color: rgba(0, 0, 0, 0.25); + bottom: 0; + cursor: default; + left: 0; + position: fixed; + right: 0; + top: 0; + z-index: 1081; + opacity: 0; + visibility: hidden; + -webkit-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s; + -o-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s; + transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s; + } + + .lg-outer.lg-dropdown-active .lg-dropdown, .lg-outer.lg-dropdown-active #lg-dropdown-overlay { + -webkit-transition-delay: 0s; + transition-delay: 0s; + -moz-transform: translate3d(0, 0px, 0); + -o-transform: translate3d(0, 0px, 0); + -ms-transform: translate3d(0, 0px, 0); + -webkit-transform: translate3d(0, 0px, 0); + transform: translate3d(0, 0px, 0); + opacity: 1; + visibility: visible; + } + + .lg-outer.lg-dropdown-active #lg-share { + color: #FFF; + } + + .lg-outer .lg-dropdown { + background-color: #fff; + border-radius: 2px; + font-size: 14px; + list-style-type: none; + margin: 0; + padding: 10px 0; + position: absolute; + right: 0; + text-align: left; + top: 50px; + opacity: 0; + visibility: hidden; + -moz-transform: translate3d(0, 5px, 0); + -o-transform: translate3d(0, 5px, 0); + -ms-transform: translate3d(0, 5px, 0); + -webkit-transform: translate3d(0, 5px, 0); + transform: translate3d(0, 5px, 0); + -webkit-transition: -webkit-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s; + -moz-transition: -moz-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s; + -o-transition: -o-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s; + transition: transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s; + } + + .lg-outer .lg-dropdown:after { + content: ""; + display: block; + height: 0; + width: 0; + position: absolute; + border: 8px solid transparent; + border-bottom-color: #FFF; + right: 16px; + top: -16px; + } + + .lg-outer .lg-dropdown > li:last-child { + margin-bottom: 0px; + } + + .lg-outer .lg-dropdown > li:hover a, .lg-outer .lg-dropdown > li:hover .lg-icon { + color: #333; + } + + .lg-outer .lg-dropdown a { + color: #333; + display: block; + white-space: pre; + padding: 4px 12px; + font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif; + font-size: 12px; + } + + .lg-outer .lg-dropdown a:hover { + background-color: rgba(0, 0, 0, 0.07); + } + + .lg-outer .lg-dropdown .lg-dropdown-text { + display: inline-block; + line-height: 1; + margin-top: -3px; + vertical-align: middle; + } + + .lg-outer .lg-dropdown .lg-icon { + color: #333; + display: inline-block; + float: none; + font-size: 20px; + height: auto; + line-height: 1; + margin-right: 8px; + padding: 0; + vertical-align: middle; + width: auto; + } + + .lg-outer #lg-share { + position: relative; + } + + .lg-outer #lg-share:after { + content: "\e80d"; + } + + .lg-outer #lg-share-facebook .lg-icon { + color: #3b5998; + } + + .lg-outer #lg-share-facebook .lg-icon:after { + content: "\e904"; + } + + .lg-outer #lg-share-twitter .lg-icon { + color: #00aced; + } + + .lg-outer #lg-share-twitter .lg-icon:after { + content: "\e907"; + } + + .lg-outer #lg-share-googleplus .lg-icon { + color: #dd4b39; + } + + .lg-outer #lg-share-googleplus .lg-icon:after { + content: "\e905"; + } + + .lg-outer #lg-share-pinterest .lg-icon { + color: #cb2027; + } + + .lg-outer #lg-share-pinterest .lg-icon:after { + content: "\e906"; + } + + .lg-outer .lg-img-rotate { + position: absolute; + padding: 0 5px; + left: 0; + right: 0; + top: 0; + bottom: 0; + -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.32, 0, 0.67, 0) 0s; + -moz-transition: -moz-transform 0.3s cubic-bezier(0.32, 0, 0.67, 0) 0s; + -o-transition: -o-transform 0.3s cubic-bezier(0.32, 0, 0.67, 0) 0s; + transition: transform 0.3s cubic-bezier(0.32, 0, 0.67, 0) 0s; + } + + .lg-rotate-left:after { + content: "\e900"; + } + + .lg-rotate-right:after { + content: "\e901"; + } + + .lg-icon.lg-flip-hor, .lg-icon.lg-flip-ver { + font-size: 26px; + } + + .lg-flip-hor:after { + content: "\e902"; + } + + .lg-flip-ver:after { + content: "\e903"; + } + + + .lg-group:before, .lg-group:after { + display: table; + content: ""; + line-height: 0; + } + + .lg-group:after { + clear: both; + } + + .lg-outer { + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + z-index: 1050; + opacity: 0; + outline: none; + -webkit-transition: opacity 0.15s ease 0s; + -o-transition: opacity 0.15s ease 0s; + transition: opacity 0.15s ease 0s; + } + + .lg-outer * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + + .lg-outer.lg-visible { + opacity: 1; + } + + .lg-outer.lg-css3 .lg-item.lg-prev-slide, .lg-outer.lg-css3 .lg-item.lg-next-slide, .lg-outer.lg-css3 .lg-item.lg-current { + -webkit-transition-duration: inherit !important; + transition-duration: inherit !important; + -webkit-transition-timing-function: inherit !important; + transition-timing-function: inherit !important; + } + + .lg-outer.lg-css3.lg-dragging .lg-item.lg-prev-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-next-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-current { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; + opacity: 1; + } + + .lg-outer.lg-grab img.lg-object { + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: -o-grab; + cursor: -ms-grab; + cursor: grab; + } + + .lg-outer.lg-grabbing img.lg-object { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: -o-grabbing; + cursor: -ms-grabbing; + cursor: grabbing; + } + + .lg-outer .lg { + height: 100%; + width: 100%; + position: relative; + overflow: hidden; + margin-left: auto; + margin-right: auto; + max-width: 100%; + max-height: 100%; + } + + .lg-outer .lg-inner { + width: 100%; + height: 100%; + position: absolute; + left: 0; + top: 0; + white-space: nowrap; + } + + .lg-outer .lg-item { + background: url("../img/loading.gif") no-repeat scroll center center transparent; + display: none !important; + } + + .lg-outer.lg-css3 .lg-prev-slide, .lg-outer.lg-css3 .lg-current, .lg-outer.lg-css3 .lg-next-slide { + display: inline-block !important; + } + + .lg-outer.lg-css .lg-current { + display: inline-block !important; + } + + .lg-outer .lg-item, .lg-outer .lg-img-wrap { + display: inline-block; + text-align: center; + position: absolute; + width: 100%; + height: 100%; + } + + .lg-outer .lg-item:before, .lg-outer .lg-img-wrap:before { + content: ""; + display: inline-block; + height: 50%; + width: 1px; + margin-right: -1px; + } + + .lg-outer .lg-img-wrap { + position: absolute; + padding: 0 5px; + left: 0; + right: 0; + top: 0; + bottom: 0; + } + + .lg-outer .lg-item.lg-complete { + background-image: none; + } + + .lg-outer .lg-item.lg-current { + z-index: 1060; + } + + .lg-outer .lg-image { + display: inline-block; + vertical-align: middle; + max-width: 100%; + max-height: 100%; + width: auto !important; + height: auto !important; + } + + .lg-outer.lg-show-after-load .lg-item .lg-object, .lg-outer.lg-show-after-load .lg-item .lg-video-play { + opacity: 0; + -webkit-transition: opacity 0.15s ease 0s; + -o-transition: opacity 0.15s ease 0s; + transition: opacity 0.15s ease 0s; + } + + .lg-outer.lg-show-after-load .lg-item.lg-complete .lg-object, .lg-outer.lg-show-after-load .lg-item.lg-complete .lg-video-play { + opacity: 1; + } + + .lg-outer .lg-empty-html { + display: none; + } + + .lg-outer.lg-hide-download #lg-download { + display: none; + } + + .lg-backdrop { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 1040; + background-color: #000; + opacity: 0; + -webkit-transition: opacity 0.15s ease 0s; + -o-transition: opacity 0.15s ease 0s; + transition: opacity 0.15s ease 0s; + } + + .lg-backdrop.in { + opacity: 1; + } + + .lg-css3.lg-no-trans .lg-prev-slide, .lg-css3.lg-no-trans .lg-next-slide, .lg-css3.lg-no-trans .lg-current { + -webkit-transition: none 0s ease 0s !important; + -moz-transition: none 0s ease 0s !important; + -o-transition: none 0s ease 0s !important; + transition: none 0s ease 0s !important; + } + + .lg-css3.lg-use-css3 .lg-item { + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; + } + + .lg-css3.lg-use-left .lg-item { + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; + } + + .lg-css3.lg-fade .lg-item { + opacity: 0; + } + + .lg-css3.lg-fade .lg-item.lg-current { + opacity: 1; + } + + .lg-css3.lg-fade .lg-item.lg-prev-slide, .lg-css3.lg-fade .lg-item.lg-next-slide, .lg-css3.lg-fade .lg-item.lg-current { + -webkit-transition: opacity 0.1s ease 0s; + -moz-transition: opacity 0.1s ease 0s; + -o-transition: opacity 0.1s ease 0s; + transition: opacity 0.1s ease 0s; + } + + .lg-css3.lg-slide.lg-use-css3 .lg-item { + opacity: 0; + } + + .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide { + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + } + + .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide { + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } + + .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1; + } + + .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + + .lg-css3.lg-slide.lg-use-left .lg-item { + opacity: 0; + position: absolute; + left: 0; + } + + .lg-css3.lg-slide.lg-use-left .lg-item.lg-prev-slide { + left: -100%; + } + + .lg-css3.lg-slide.lg-use-left .lg-item.lg-next-slide { + left: 100%; + } + + .lg-css3.lg-slide.lg-use-left .lg-item.lg-current { + left: 0; + opacity: 1; + } + + .lg-css3.lg-slide.lg-use-left .lg-item.lg-prev-slide, .lg-css3.lg-slide.lg-use-left .lg-item.lg-next-slide, .lg-css3.lg-slide.lg-use-left .lg-item.lg-current { + -webkit-transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + \ No newline at end of file diff --git a/blocks/lcp-gallery/assets/css/lightgallery.min.css b/blocks/lcp-gallery/assets/css/lightgallery.min.css new file mode 100644 index 0000000..104d68f --- /dev/null +++ b/blocks/lcp-gallery/assets/css/lightgallery.min.css @@ -0,0 +1 @@ +@font-face{font-family:lg;src:url(../fonts/lg.ttf?22t19m) format("truetype"),url(../fonts/lg.woff?22t19m) format("woff"),url(../fonts/lg.svg?22t19m#lg) format("svg");font-weight:400;font-style:normal;font-display:block}.lg-icon{font-family:lg!important;speak:never;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.lg-actions .lg-next,.lg-actions .lg-prev{border-radius:2px;color:#999;cursor:pointer;display:block;font-size:22px;margin-top:-10px;padding:8px 10px 9px;position:absolute;top:50%;z-index:1080;outline:0;border:none;background-color:transparent}.lg-actions .lg-next.disabled,.lg-actions .lg-prev.disabled{pointer-events:none;opacity:.5}.lg-actions .lg-next:hover,.lg-actions .lg-prev:hover{color:#FFF}.lg-actions .lg-next{right:20px}.lg-actions .lg-next:before{content:"\e095"}.lg-actions .lg-prev{left:20px}.lg-actions .lg-prev:after{content:"\e094"}@-webkit-keyframes lg-right-end{0%,100%{left:0}50%{left:-30px}}@-moz-keyframes lg-right-end{0%,100%{left:0}50%{left:-30px}}@-ms-keyframes lg-right-end{0%,100%{left:0}50%{left:-30px}}@keyframes lg-right-end{0%,100%{left:0}50%{left:-30px}}@-webkit-keyframes lg-left-end{0%,100%{left:0}50%{left:30px}}@-moz-keyframes lg-left-end{0%,100%{left:0}50%{left:30px}}@-ms-keyframes lg-left-end{0%,100%{left:0}50%{left:30px}}@keyframes lg-left-end{0%,100%{left:0}50%{left:30px}}.lg-outer.lg-right-end .lg-object{-webkit-animation:lg-right-end .3s;-o-animation:lg-right-end .3s;animation:lg-right-end .3s;position:relative}.lg-outer.lg-left-end .lg-object{-webkit-animation:lg-left-end .3s;-o-animation:lg-left-end .3s;animation:lg-left-end .3s;position:relative}.lg-toolbar{z-index:1082;left:0;position:absolute;top:0;width:100%;background-color:rgba(0,0,0,.45)}.lg-toolbar .lg-icon{color:#999;cursor:pointer;float:right;font-size:24px;height:47px;line-height:27px;padding:10px 0;text-align:center;width:50px;text-decoration:none!important;outline:0;background:0 0;border:none;box-shadow:none;-webkit-transition:color .2s linear;-o-transition:color .2s linear;transition:color .2s linear}.lg-toolbar .lg-icon:hover{color:#FFF}.lg-toolbar .lg-close:after{content:"\e070"}.lg-toolbar .lg-download:after{content:"\e0f2"}.lg-sub-html{background-color:rgba(0,0,0,.45);bottom:0;color:#EEE;font-size:16px;left:0;padding:10px 40px;position:fixed;right:0;text-align:center;z-index:1080}.lg-sub-html h4{margin:0;font-size:13px;font-weight:700}.lg-sub-html p{font-size:12px;margin:5px 0 0}#lg-counter{color:#999;display:inline-block;font-size:16px;padding-left:20px;padding-top:12px;vertical-align:middle}.lg-next,.lg-prev,.lg-toolbar{opacity:1;-webkit-transition:-webkit-transform .35s cubic-bezier(0,0,.25,1) 0s,opacity .35s cubic-bezier(0,0,.25,1) 0s,color .2s linear;-moz-transition:-moz-transform .35s cubic-bezier(0,0,.25,1) 0s,opacity .35s cubic-bezier(0,0,.25,1) 0s,color .2s linear;-o-transition:-o-transform .35s cubic-bezier(0,0,.25,1) 0s,opacity .35s cubic-bezier(0,0,.25,1) 0s,color .2s linear;transition:transform .35s cubic-bezier(0,0,.25,1) 0s,opacity .35s cubic-bezier(0,0,.25,1) 0s,color .2s linear}.lg-hide-items .lg-prev{opacity:0;-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}.lg-hide-items .lg-next{opacity:0;-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}.lg-hide-items .lg-toolbar{opacity:0;-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-object{-webkit-transform:scale3d(.5,.5,.5);transform:scale3d(.5,.5,.5);opacity:0;-webkit-transition:-webkit-transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important;-moz-transition:-moz-transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important;-o-transition:-o-transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important;transition:transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important;-webkit-transform-origin:50% 50%;-moz-transform-origin:50% 50%;-ms-transform-origin:50% 50%;transform-origin:50% 50%}body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1);opacity:1}.lg-outer .lg-thumb-outer{background-color:#0D0A0A;bottom:0;position:absolute;width:100%;z-index:1080;max-height:350px;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1) 0s;-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1) 0s;-o-transition:-o-transform .25s cubic-bezier(0,0,.25,1) 0s;transition:transform .25s cubic-bezier(0,0,.25,1) 0s}.lg-outer .lg-thumb-outer.lg-grab .lg-thumb-item{cursor:-webkit-grab;cursor:-moz-grab;cursor:-o-grab;cursor:-ms-grab;cursor:grab}.lg-outer .lg-thumb-outer.lg-grabbing .lg-thumb-item{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:-o-grabbing;cursor:-ms-grabbing;cursor:grabbing}.lg-outer .lg-thumb-outer.lg-dragging .lg-thumb{-webkit-transition-duration:0s!important;transition-duration:0s!important}.lg-outer.lg-thumb-open .lg-thumb-outer{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.lg-outer .lg-thumb{padding:10px 0;height:100%;margin-bottom:-5px}.lg-outer .lg-thumb-item{cursor:pointer;float:left;overflow:hidden;height:100%;border:2px solid #FFF;border-radius:4px;margin-bottom:5px}@media (min-width:1025px){.lg-outer .lg-thumb-item{-webkit-transition:border-color .25s ease;-o-transition:border-color .25s ease;transition:border-color .25s ease}}.lg-outer .lg-thumb-item.active,.lg-outer .lg-thumb-item:hover{border-color:#a90707}.lg-outer .lg-thumb-item img{width:100%;height:100%;object-fit:cover}.lg-outer.lg-has-thumb .lg-item{padding-bottom:120px}.lg-outer.lg-can-toggle .lg-item{padding-bottom:0}.lg-outer.lg-pull-caption-up .lg-sub-html{-webkit-transition:bottom .25s ease;-o-transition:bottom .25s ease;transition:bottom .25s ease}.lg-outer.lg-pull-caption-up.lg-thumb-open .lg-sub-html{bottom:100px}.lg-outer .lg-toggle-thumb{background-color:#0D0A0A;border-radius:2px 2px 0 0;color:#999;cursor:pointer;font-size:24px;height:39px;line-height:27px;padding:5px 0;position:absolute;right:20px;text-align:center;top:-39px;width:50px;outline:0;border:none}.lg-outer .lg-toggle-thumb:after{content:"\e1ff"}.lg-outer .lg-toggle-thumb:hover{color:#FFF}.lg-outer .lg-video-cont{display:inline-block;vertical-align:middle;max-width:1140px;max-height:100%;width:100%;padding:0 5px}.lg-outer .lg-video{width:100%;height:0;padding-bottom:56.25%;overflow:hidden;position:relative}.lg-outer .lg-video .lg-object{display:inline-block;position:absolute;top:0;left:0;width:100%!important;height:100%!important}.lg-outer .lg-video .lg-video-play{width:84px;height:59px;position:absolute;left:50%;top:50%;margin-left:-42px;margin-top:-30px;z-index:1080;cursor:pointer}.lg-outer .lg-has-vimeo .lg-video-play{background:url(../img/vimeo-play.png) no-repeat}.lg-outer .lg-has-vimeo:hover .lg-video-play{background:url(../img/vimeo-play.png) 0 -58px no-repeat}.lg-outer .lg-has-html5 .lg-video-play{background:url(../img/video-play.png) no-repeat;height:64px;margin-left:-32px;margin-top:-32px;width:64px;opacity:.8}.lg-outer .lg-has-html5:hover .lg-video-play{opacity:1}.lg-outer .lg-has-youtube .lg-video-play{background:url(../img/youtube-play.png) no-repeat}.lg-outer .lg-has-youtube:hover .lg-video-play{background:url(../img/youtube-play.png) 0 -60px no-repeat}.lg-outer .lg-video-object{width:100%!important;height:100%!important;position:absolute;top:0;left:0}.lg-outer .lg-has-video .lg-video-object{visibility:hidden}.lg-outer .lg-has-video.lg-video-playing .lg-object,.lg-outer .lg-has-video.lg-video-playing .lg-video-play{display:none}.lg-outer .lg-has-video.lg-video-playing .lg-video-object{visibility:visible}.lg-progress-bar{background-color:#333;height:5px;left:0;position:absolute;top:0;width:100%;z-index:1083;opacity:0;-webkit-transition:opacity 80ms ease 0s;-moz-transition:opacity 80ms ease 0s;-o-transition:opacity 80ms ease 0s;transition:opacity 80ms ease 0s}.lg-progress-bar .lg-progress{background-color:#a90707;height:5px;width:0}.lg-progress-bar.lg-start .lg-progress{width:100%}.lg-show-autoplay .lg-progress-bar{opacity:1}.lg-autoplay-button:after{content:"\e01d"}.lg-show-autoplay .lg-autoplay-button:after{content:"\e01a"}.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-image,.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-img-wrap{-webkit-transition-duration:0s;transition-duration:0s}.lg-outer.lg-use-transition-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap{-webkit-transition:-webkit-transform .3s cubic-bezier(0,0,.25,1) 0s;-moz-transition:-moz-transform .3s cubic-bezier(0,0,.25,1) 0s;-o-transition:-o-transform .3s cubic-bezier(0,0,.25,1) 0s;transition:transform .3s cubic-bezier(0,0,.25,1) 0s}.lg-outer.lg-use-left-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap{-webkit-transition:left .3s cubic-bezier(0,0,.25,1) 0s,top .3s cubic-bezier(0,0,.25,1) 0s;-moz-transition:left .3s cubic-bezier(0,0,.25,1) 0s,top .3s cubic-bezier(0,0,.25,1) 0s;-o-transition:left .3s cubic-bezier(0,0,.25,1) 0s,top .3s cubic-bezier(0,0,.25,1) 0s;transition:left .3s cubic-bezier(0,0,.25,1) 0s,top .3s cubic-bezier(0,0,.25,1) 0s}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-img-wrap{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1);-webkit-transition:-webkit-transform .3s cubic-bezier(0,0,.25,1) 0s,opacity .15s!important;-moz-transition:-moz-transform .3s cubic-bezier(0,0,.25,1) 0s,opacity .15s!important;-o-transition:-o-transform .3s cubic-bezier(0,0,.25,1) 0s,opacity .15s!important;transition:transform .3s cubic-bezier(0,0,.25,1) 0s,opacity .15s!important;-webkit-transform-origin:0 0;-moz-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden}#lg-zoom-in:after{content:"\e311"}#lg-actual-size{font-size:20px}#lg-actual-size:after{content:"\e033"}#lg-zoom-out{opacity:.5;pointer-events:none}#lg-zoom-out:after{content:"\e312"}.lg-zoomed #lg-zoom-out{opacity:1;pointer-events:auto}.lg-outer .lg-pager-outer{bottom:60px;left:0;position:absolute;right:0;text-align:center;z-index:1080;height:10px}.lg-outer .lg-pager-outer.lg-pager-hover .lg-pager-cont{overflow:visible}.lg-outer .lg-pager-cont{cursor:pointer;display:inline-block;overflow:hidden;position:relative;vertical-align:top;margin:0 5px}.lg-outer .lg-pager-cont:hover .lg-pager-thumb-cont{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.lg-outer .lg-pager-cont.lg-pager-active .lg-pager{box-shadow:0 0 0 2px #fff inset}.lg-outer .lg-pager-thumb-cont{background-color:#fff;color:#FFF;bottom:100%;height:83px;left:0;margin-bottom:20px;margin-left:-60px;opacity:0;padding:5px;position:absolute;width:120px;border-radius:3px;-webkit-transition:opacity .15s ease 0s,-webkit-transform .15s ease 0s;-moz-transition:opacity .15s ease 0s,-moz-transform .15s ease 0s;-o-transition:opacity .15s ease 0s,-o-transform .15s ease 0s;transition:opacity .15s ease 0s,transform .15s ease 0s;-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}.lg-outer .lg-pager-thumb-cont img{width:100%;height:100%}.lg-outer .lg-pager{background-color:rgba(255,255,255,.5);border-radius:50%;box-shadow:0 0 0 8px rgba(255,255,255,.7) inset;display:block;height:12px;-webkit-transition:box-shadow .3s ease 0s;-o-transition:box-shadow .3s ease 0s;transition:box-shadow .3s ease 0s;width:12px}.lg-outer .lg-pager:focus,.lg-outer .lg-pager:hover{box-shadow:0 0 0 8px #fff inset}.lg-outer .lg-caret{border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px dashed;bottom:-10px;display:inline-block;height:0;left:50%;margin-left:-5px;position:absolute;vertical-align:middle;width:0}.lg-fullscreen:after{content:"\e20c"}.lg-fullscreen-on .lg-fullscreen:after{content:"\e20d"}.lg-outer #lg-dropdown-overlay{background-color:rgba(0,0,0,.25);bottom:0;cursor:default;left:0;position:fixed;right:0;top:0;z-index:1081;opacity:0;visibility:hidden;-webkit-transition:visibility 0s linear .18s,opacity .18s linear 0s;-o-transition:visibility 0s linear .18s,opacity .18s linear 0s;transition:visibility 0s linear .18s,opacity .18s linear 0s}.lg-outer.lg-dropdown-active #lg-dropdown-overlay,.lg-outer.lg-dropdown-active .lg-dropdown{-webkit-transition-delay:0s;transition-delay:0s;-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1;visibility:visible}.lg-outer.lg-dropdown-active #lg-share{color:#FFF}.lg-outer .lg-dropdown{background-color:#fff;border-radius:2px;font-size:14px;list-style-type:none;margin:0;padding:10px 0;position:absolute;right:0;text-align:left;top:50px;opacity:0;visibility:hidden;-moz-transform:translate3d(0,5px,0);-o-transform:translate3d(0,5px,0);-ms-transform:translate3d(0,5px,0);-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0);-webkit-transition:-webkit-transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s;-moz-transition:-moz-transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s;-o-transition:-o-transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s;transition:transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s}.lg-outer .lg-dropdown:after{content:"";display:block;height:0;width:0;position:absolute;border:8px solid transparent;border-bottom-color:#FFF;right:16px;top:-16px}.lg-outer .lg-dropdown>li:last-child{margin-bottom:0}.lg-outer .lg-dropdown>li:hover .lg-icon,.lg-outer .lg-dropdown>li:hover a{color:#333}.lg-outer .lg-dropdown a{color:#333;display:block;white-space:pre;padding:4px 12px;font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px}.lg-outer .lg-dropdown a:hover{background-color:rgba(0,0,0,.07)}.lg-outer .lg-dropdown .lg-dropdown-text{display:inline-block;line-height:1;margin-top:-3px;vertical-align:middle}.lg-outer .lg-dropdown .lg-icon{color:#333;display:inline-block;float:none;font-size:20px;height:auto;line-height:1;margin-right:8px;padding:0;vertical-align:middle;width:auto}.lg-outer,.lg-outer .lg,.lg-outer .lg-inner{height:100%;width:100%}.lg-outer #lg-share{position:relative}.lg-outer #lg-share:after{content:"\e80d"}.lg-outer #lg-share-facebook .lg-icon{color:#3b5998}.lg-outer #lg-share-facebook .lg-icon:after{content:"\e904"}.lg-outer #lg-share-twitter .lg-icon{color:#00aced}.lg-outer #lg-share-twitter .lg-icon:after{content:"\e907"}.lg-outer #lg-share-googleplus .lg-icon{color:#dd4b39}.lg-outer #lg-share-googleplus .lg-icon:after{content:"\e905"}.lg-outer #lg-share-pinterest .lg-icon{color:#cb2027}.lg-outer #lg-share-pinterest .lg-icon:after{content:"\e906"}.lg-outer .lg-img-rotate{position:absolute;padding:0 5px;left:0;right:0;top:0;bottom:0;-webkit-transition:-webkit-transform .3s cubic-bezier(.32,0,.67,0) 0s;-moz-transition:-moz-transform .3s cubic-bezier(.32,0,.67,0) 0s;-o-transition:-o-transform .3s cubic-bezier(.32,0,.67,0) 0s;transition:transform .3s cubic-bezier(.32,0,.67,0) 0s}.lg-rotate-left:after{content:"\e900"}.lg-rotate-right:after{content:"\e901"}.lg-icon.lg-flip-hor,.lg-icon.lg-flip-ver{font-size:26px}.lg-flip-hor:after{content:"\e902"}.lg-flip-ver:after{content:"\e903"}.lg-group:after,.lg-group:before{display:table;content:"";line-height:0}.lg-group:after{clear:both}.lg-outer{position:fixed;top:0;left:0;z-index:1050;opacity:0;outline:0;-webkit-transition:opacity .15s ease 0s;-o-transition:opacity .15s ease 0s;transition:opacity .15s ease 0s}.lg-outer *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.lg-outer.lg-visible{opacity:1}.lg-outer.lg-css3 .lg-item.lg-current,.lg-outer.lg-css3 .lg-item.lg-next-slide,.lg-outer.lg-css3 .lg-item.lg-prev-slide{-webkit-transition-duration:inherit!important;transition-duration:inherit!important;-webkit-transition-timing-function:inherit!important;transition-timing-function:inherit!important}.lg-outer.lg-css3.lg-dragging .lg-item.lg-current,.lg-outer.lg-css3.lg-dragging .lg-item.lg-next-slide,.lg-outer.lg-css3.lg-dragging .lg-item.lg-prev-slide{-webkit-transition-duration:0s!important;transition-duration:0s!important;opacity:1}.lg-outer.lg-grab img.lg-object{cursor:-webkit-grab;cursor:-moz-grab;cursor:-o-grab;cursor:-ms-grab;cursor:grab}.lg-outer.lg-grabbing img.lg-object{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:-o-grabbing;cursor:-ms-grabbing;cursor:grabbing}.lg-outer .lg{position:relative;overflow:hidden;margin-left:auto;margin-right:auto;max-width:100%;max-height:100%}.lg-outer .lg-inner{position:absolute;left:0;top:0;white-space:nowrap}.lg-outer .lg-item{background:url(../img/loading.gif) center center no-repeat;display:none!important}.lg-outer.lg-css .lg-current,.lg-outer.lg-css3 .lg-current,.lg-outer.lg-css3 .lg-next-slide,.lg-outer.lg-css3 .lg-prev-slide{display:inline-block!important}.lg-outer .lg-img-wrap,.lg-outer .lg-item{display:inline-block;text-align:center;position:absolute;width:100%;height:100%}.lg-outer .lg-img-wrap:before,.lg-outer .lg-item:before{content:"";display:inline-block;height:50%;width:1px;margin-right:-1px}.lg-outer .lg-img-wrap{position:absolute;padding:0 5px;left:0;right:0;top:0;bottom:0}.lg-outer .lg-item.lg-complete{background-image:none}.lg-outer .lg-item.lg-current{z-index:1060}.lg-outer .lg-image{display:inline-block;vertical-align:middle;max-width:100%;max-height:100%;width:auto!important;height:auto!important}.lg-outer.lg-show-after-load .lg-item .lg-object,.lg-outer.lg-show-after-load .lg-item .lg-video-play{opacity:0;-webkit-transition:opacity .15s ease 0s;-o-transition:opacity .15s ease 0s;transition:opacity .15s ease 0s}.lg-outer.lg-show-after-load .lg-item.lg-complete .lg-object,.lg-outer.lg-show-after-load .lg-item.lg-complete .lg-video-play{opacity:1}.lg-outer .lg-empty-html,.lg-outer.lg-hide-download #lg-download{display:none}.lg-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1040;background-color:#000;opacity:0;-webkit-transition:opacity .15s ease 0s;-o-transition:opacity .15s ease 0s;transition:opacity .15s ease 0s}.lg-backdrop.in{opacity:1}.lg-css3.lg-no-trans .lg-current,.lg-css3.lg-no-trans .lg-next-slide,.lg-css3.lg-no-trans .lg-prev-slide{-webkit-transition:none 0s ease 0s!important;-moz-transition:none 0s ease 0s!important;-o-transition:none 0s ease 0s!important;transition:none 0s ease 0s!important}.lg-css3.lg-use-css3 .lg-item,.lg-css3.lg-use-left .lg-item{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden}.lg-css3.lg-fade .lg-item{opacity:0}.lg-css3.lg-fade .lg-item.lg-current{opacity:1}.lg-css3.lg-fade .lg-item.lg-current,.lg-css3.lg-fade .lg-item.lg-next-slide,.lg-css3.lg-fade .lg-item.lg-prev-slide{-webkit-transition:opacity .1s ease 0s;-moz-transition:opacity .1s ease 0s;-o-transition:opacity .1s ease 0s;transition:opacity .1s ease 0s}.lg-css3.lg-slide.lg-use-css3 .lg-item{opacity:0}.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current,.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide,.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide{-webkit-transition:-webkit-transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;-moz-transition:-moz-transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;-o-transition:-o-transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;transition:transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s}.lg-css3.lg-slide.lg-use-left .lg-item{opacity:0;position:absolute;left:0}.lg-css3.lg-slide.lg-use-left .lg-item.lg-prev-slide{left:-100%}.lg-css3.lg-slide.lg-use-left .lg-item.lg-next-slide{left:100%}.lg-css3.lg-slide.lg-use-left .lg-item.lg-current{left:0;opacity:1}.lg-css3.lg-slide.lg-use-left .lg-item.lg-current,.lg-css3.lg-slide.lg-use-left .lg-item.lg-next-slide,.lg-css3.lg-slide.lg-use-left .lg-item.lg-prev-slide{-webkit-transition:left 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;-moz-transition:left 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;-o-transition:left 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;transition:left 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s} \ No newline at end of file diff --git a/blocks/lcp-gallery/assets/img/sample/sample-img-1-300px-200px.jpg b/blocks/lcp-gallery/assets/img/sample/sample-img-1-300px-200px.jpg new file mode 100644 index 0000000..eae7694 Binary files /dev/null and b/blocks/lcp-gallery/assets/img/sample/sample-img-1-300px-200px.jpg differ diff --git a/blocks/lcp-gallery/assets/img/sample/sample-img-1.jpg b/blocks/lcp-gallery/assets/img/sample/sample-img-1.jpg new file mode 100644 index 0000000..4e57d2f Binary files /dev/null and b/blocks/lcp-gallery/assets/img/sample/sample-img-1.jpg differ diff --git a/blocks/lcp-gallery/assets/img/sample/sample-img-10.jpg b/blocks/lcp-gallery/assets/img/sample/sample-img-10.jpg new file mode 100644 index 0000000..3386450 Binary files /dev/null and b/blocks/lcp-gallery/assets/img/sample/sample-img-10.jpg differ diff --git a/blocks/lcp-gallery/assets/img/sample/sample-img-2-200px-300px.jpg b/blocks/lcp-gallery/assets/img/sample/sample-img-2-200px-300px.jpg new file mode 100644 index 0000000..4108084 Binary files /dev/null and b/blocks/lcp-gallery/assets/img/sample/sample-img-2-200px-300px.jpg differ diff --git a/blocks/lcp-gallery/assets/img/sample/sample-img-2.jpg b/blocks/lcp-gallery/assets/img/sample/sample-img-2.jpg new file mode 100644 index 0000000..3e7290a Binary files /dev/null and b/blocks/lcp-gallery/assets/img/sample/sample-img-2.jpg differ diff --git a/blocks/lcp-gallery/assets/img/sample/sample-img-3.jpg b/blocks/lcp-gallery/assets/img/sample/sample-img-3.jpg new file mode 100644 index 0000000..2bb0b54 Binary files /dev/null and b/blocks/lcp-gallery/assets/img/sample/sample-img-3.jpg differ diff --git a/blocks/lcp-gallery/assets/img/sample/sample-img-4.jpg b/blocks/lcp-gallery/assets/img/sample/sample-img-4.jpg new file mode 100644 index 0000000..0823072 Binary files /dev/null and b/blocks/lcp-gallery/assets/img/sample/sample-img-4.jpg differ diff --git a/blocks/lcp-gallery/assets/img/sample/sample-img-5.jpg b/blocks/lcp-gallery/assets/img/sample/sample-img-5.jpg new file mode 100644 index 0000000..1cedf4d Binary files /dev/null and b/blocks/lcp-gallery/assets/img/sample/sample-img-5.jpg differ diff --git a/blocks/lcp-gallery/assets/img/sample/sample-img-6.jpg b/blocks/lcp-gallery/assets/img/sample/sample-img-6.jpg new file mode 100644 index 0000000..a95cecf Binary files /dev/null and b/blocks/lcp-gallery/assets/img/sample/sample-img-6.jpg differ diff --git a/blocks/lcp-gallery/assets/img/sample/sample-img-7.jpg b/blocks/lcp-gallery/assets/img/sample/sample-img-7.jpg new file mode 100644 index 0000000..11aef91 Binary files /dev/null and b/blocks/lcp-gallery/assets/img/sample/sample-img-7.jpg differ diff --git a/blocks/lcp-gallery/assets/img/sample/sample-img-8.jpg b/blocks/lcp-gallery/assets/img/sample/sample-img-8.jpg new file mode 100644 index 0000000..94460a5 Binary files /dev/null and b/blocks/lcp-gallery/assets/img/sample/sample-img-8.jpg differ diff --git a/blocks/lcp-gallery/assets/img/sample/sample-img-9.jpg b/blocks/lcp-gallery/assets/img/sample/sample-img-9.jpg new file mode 100644 index 0000000..5c41eff Binary files /dev/null and b/blocks/lcp-gallery/assets/img/sample/sample-img-9.jpg differ diff --git a/blocks/lcp-gallery/assets/js/lg-autoplay.min.js b/blocks/lcp-gallery/assets/js/lg-autoplay.min.js new file mode 100644 index 0000000..714b8ed --- /dev/null +++ b/blocks/lcp-gallery/assets/js/lg-autoplay.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.8.2 | November 28th 2024 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(t="undefined"!=typeof globalThis?globalThis:t||self).lgAutoplay=o()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var o,e=1,s=arguments.length;e'),this.settings.slideShowAutoplay&&this.core.LGel.once(o+".autoplay",(function(){t.startAutoPlay()})),this.core.LGel.on(r+".autoplay touchstart.lg.autoplay",(function(){t.interval&&(t.stopAutoPlay(),t.pausedOnTouchDrag=!0)})),this.core.LGel.on(i+".autoplay touchend.lg.autoplay",(function(){!t.interval&&t.pausedOnTouchDrag&&(t.startAutoPlay(),t.pausedOnTouchDrag=!1)})),this.core.LGel.on(e+".autoplay",(function(){t.showProgressBar(),!t.fromAuto&&t.interval?(t.stopAutoPlay(),t.pausedOnSlideChange=!0):t.pausedOnSlideChange=!1,t.fromAuto=!1})),this.core.LGel.on(s+".autoplay",(function(){t.pausedOnSlideChange&&!t.interval&&t.settings.forceSlideShowAutoplay&&(t.startAutoPlay(),t.pausedOnSlideChange=!1)})),this.showProgressBar())},p.prototype.showProgressBar=function(){var t=this;if(this.settings.progressBar&&this.fromAuto){var o=this.core.outer.find(".lg-progress-bar"),e=this.core.outer.find(".lg-progress");this.interval&&(e.removeAttr("style"),o.removeClass("lg-start"),setTimeout((function(){e.css("transition","width "+(t.core.settings.speed+t.settings.slideShowInterval)+"ms ease 0s"),o.addClass("lg-start")}),20))}},p.prototype.controls=function(){var t=this,o='';this.core.outer.find(this.settings.appendAutoplayControlsTo).append(o),this.core.outer.find(".lg-autoplay-button").first().on("click.lg.autoplay",(function(){t.core.outer.hasClass("lg-show-autoplay")?t.stopAutoPlay():t.interval||t.startAutoPlay()}))},p.prototype.startAutoPlay=function(){var t=this;this.core.outer.find(".lg-progress").css("transition","width "+(this.core.settings.speed+this.settings.slideShowInterval)+"ms ease 0s"),this.core.outer.addClass("lg-show-autoplay"),this.core.outer.find(".lg-progress-bar").addClass("lg-start"),this.core.LGel.trigger(l,{index:this.core.index}),this.interval=setInterval((function(){t.core.index+1Leave a comment.',commentPluginStrings:{toggleComments:"Toggle Comments"}};return function(){function i(e,o){return this.core=e,this.$LG=o,this.settings=t(t({},n),this.core.settings),this}return i.prototype.init=function(){this.settings.commentBox&&(this.setMarkup(),this.toggleCommentBox(),this.settings.fbComments?this.addFbComments():this.settings.disqusComments&&this.addDisqusComments())},i.prototype.setMarkup=function(){this.core.outer.append(this.settings.commentsMarkup+'');var t='';this.core.$toolbar.append(t)},i.prototype.toggleCommentBox=function(){var t=this;this.core.outer.find(".lg-comment-toggle").first().on("click.lg.comment",(function(){t.core.outer.toggleClass("lg-comment-active")})),this.core.outer.find(".lg-comment-overlay").first().on("click.lg.comment",(function(){t.core.outer.removeClass("lg-comment-active")})),this.core.outer.find(".lg-comment-close").first().on("click.lg.comment",(function(){t.core.outer.removeClass("lg-comment-active")}))},i.prototype.addFbComments=function(){var t=this,n=this;this.core.LGel.on(e+".comment",(function(e){var o=t.core.galleryItems[e.detail.index].fbHtml;t.core.outer.find(".lg-comment-body").html(o)})),this.core.LGel.on(o+".comment",(function(){try{FB.XFBML.parse()}catch(t){n.$LG(window).on("fbAsyncInit",(function(){FB.XFBML.parse()}))}}))},i.prototype.addDisqusComments=function(){var t=this,n=this.$LG("#disqus_thread");n.remove(),this.core.outer.find(".lg-comment-body").append(''),this.core.LGel.on(e+".comment",(function(){n.html("")})),this.core.LGel.on(o+".comment",(function(e){var o=e.detail.index,n=t;setTimeout((function(){try{DISQUS.reset({reload:!0,config:function(){this.page.identifier=n.core.galleryItems[o].disqusIdentifier,this.page.url=n.core.galleryItems[o].disqusURL,this.page.title=n.settings.disqusConfig.title,this.language=n.settings.disqusConfig.language}})}catch(t){console.error("Make sure you have included disqus JavaScript code in your document. Ex - https://lg-disqus.disqus.com/admin/install/platforms/universalcode/")}}),n.core.lGalleryOn?0:1e3)}))},i.prototype.destroy=function(){this.core.LGel.off(".lg.comment"),this.core.LGel.off(".comment")},i}()})); diff --git a/blocks/lcp-gallery/assets/js/lg-fullscreen.min.js b/blocks/lcp-gallery/assets/js/lg-fullscreen.min.js new file mode 100644 index 0000000..a2ad8c0 --- /dev/null +++ b/blocks/lcp-gallery/assets/js/lg-fullscreen.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.8.2 | November 28th 2024 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l():"function"==typeof define&&define.amd?define(l):(e="undefined"!=typeof globalThis?globalThis:e||self).lgFullscreen=l()}(this,(function(){"use strict";var e=function(){return(e=Object.assign||function(e){for(var l,n=1,t=arguments.length;n',this.core.$toolbar.append(e),this.fullScreen()}},n.prototype.isFullScreen=function(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement},n.prototype.requestFullscreen=function(){var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()},n.prototype.exitFullscreen=function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},n.prototype.fullScreen=function(){var e=this;this.$LG(document).on("fullscreenchange.lg.global"+this.core.lgId+" \n webkitfullscreenchange.lg.global"+this.core.lgId+" \n mozfullscreenchange.lg.global"+this.core.lgId+" \n MSFullscreenChange.lg.global"+this.core.lgId,(function(){e.core.lgOpened&&e.core.outer.toggleClass("lg-fullscreen-on")})),this.core.outer.find(".lg-fullscreen").first().on("click.lg",(function(){e.isFullScreen()?e.exitFullscreen():e.requestFullscreen()}))},n.prototype.closeGallery=function(){this.isFullScreen()&&this.exitFullscreen()},n.prototype.destroy=function(){this.$LG(document).off("fullscreenchange.lg.global"+this.core.lgId+" \n webkitfullscreenchange.lg.global"+this.core.lgId+" \n mozfullscreenchange.lg.global"+this.core.lgId+" \n MSFullscreenChange.lg.global"+this.core.lgId)},n}()})); diff --git a/blocks/lcp-gallery/assets/js/lg-hash.min.js b/blocks/lcp-gallery/assets/js/lg-hash.min.js new file mode 100644 index 0000000..45af15f --- /dev/null +++ b/blocks/lcp-gallery/assets/js/lg-hash.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.8.2 | November 28th 2024 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgHash=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,i=1,o=arguments.length;i0){this.$LG(document.body).addClass("lg-from-hash");var e=this.getIndexFromUrl(t);return this.core.openGallery(e),!0}},s.prototype.onCloseAfter=function(){this.oldHash&&this.oldHash.indexOf("lg="+this.settings.galleryId)<0?history.replaceState?history.replaceState(null,"",this.oldHash):window.location.hash=this.oldHash:history.replaceState?history.replaceState(null,document.title,window.location.pathname+window.location.search):window.location.hash=""},s.prototype.onHashchange=function(){if(this.core.lgOpened){var t=window.location.hash,e=this.getIndexFromUrl(t);t.indexOf("lg="+this.settings.galleryId)>-1?this.core.slide(e,!1,!1):this.core.lGalleryOn&&this.core.closeGallery()}},s.prototype.closeGallery=function(){this.settings.hash&&this.$LG(document.body).removeClass("lg-from-hash")},s.prototype.destroy=function(){this.core.LGel.off(".lg.hash"),this.core.LGel.off(".hash"),this.$LG(window).off("hashchange.lg.hash.global"+this.core.lgId)},s}()})); diff --git a/blocks/lcp-gallery/assets/js/lg-medium-zoom.min.js b/blocks/lcp-gallery/assets/js/lg-medium-zoom.min.js new file mode 100644 index 0000000..f8717af --- /dev/null +++ b/blocks/lcp-gallery/assets/js/lg-medium-zoom.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.8.2 | November 28th 2024 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(o,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(o="undefined"!=typeof globalThis?globalThis:o||self).lgMediumZoom=t()}(this,(function(){"use strict";var o=function(){return(o=Object.assign||function(o){for(var t,e=1,i=arguments.length;e \n \n \n ';return t},i.prototype.init=function(){var e=this;if(this.settings.pager){var o;this.core.$lgComponents.prepend('');var i=this.core.outer.find(".lg-pager-outer");i.html(this.getPagerHtml(this.core.galleryItems)),i.first().on("click.lg touchend.lg",(function(t){var r=e.$LG(t.target);if(r.hasAttribute("data-lg-item-id")){var o=parseInt(r.attr("data-lg-item-id"));e.core.slide(o,!1,!0,!1)}})),i.first().on("mouseover.lg",(function(){clearTimeout(o),i.addClass("lg-pager-hover")})),i.first().on("mouseout.lg",(function(){o=setTimeout((function(){i.removeClass("lg-pager-hover")}))})),this.core.LGel.on(r+".pager",(function(t){var r=t.detail.index;e.manageActiveClass.call(e,r)})),this.core.LGel.on(t+".pager",(function(){i.empty(),i.html(e.getPagerHtml(e.core.galleryItems)),e.manageActiveClass(e.core.index)}))}},i.prototype.manageActiveClass=function(e){var t=this.core.outer.find(".lg-pager-cont");t.removeClass("lg-pager-active"),t.eq(e).addClass("lg-pager-active")},i.prototype.destroy=function(){this.core.outer.find(".lg-pager-outer").remove(),this.core.LGel.off(".lg.pager"),this.core.LGel.off(".pager")},i}()})); diff --git a/blocks/lcp-gallery/assets/js/lg-relative-caption.min.js b/blocks/lcp-gallery/assets/js/lg-relative-caption.min.js new file mode 100644 index 0000000..145d744 --- /dev/null +++ b/blocks/lcp-gallery/assets/js/lg-relative-caption.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.8.2 | November 28th 2024 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgRelativeCaption=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,i=1,o=arguments.length;i'),this.settings.flipHorizontal&&(t+=''),this.settings.rotateLeft&&(t+=''),this.settings.rotateRight&&(t+=''),this.core.$toolbar.append(t)},n.prototype.init=function(){var t=this;this.settings.rotate&&(this.buildTemplates(),this.rotateValuesList={},this.core.LGel.on(e+".rotate",(function(e){var i=e.detail.index;t.core.getSlideItem(i).find(".lg-img-rotate").get()||(t.core.getSlideItem(i).find(".lg-object").first().wrap("lg-img-rotate"),t.core.getSlideItem(t.core.index).find(".lg-img-rotate").css("transition-duration",t.settings.rotateSpeed+"ms"))})),this.core.outer.find("#lg-rotate-left").first().on("click.lg",this.rotateLeft.bind(this)),this.core.outer.find("#lg-rotate-right").first().on("click.lg",this.rotateRight.bind(this)),this.core.outer.find("#lg-flip-hor").first().on("click.lg",this.flipHorizontal.bind(this)),this.core.outer.find("#lg-flip-ver").first().on("click.lg",this.flipVertical.bind(this)),this.core.LGel.on(i+".rotate",(function(e){t.rotateValuesList[e.detail.index]||(t.rotateValuesList[e.detail.index]={rotate:0,flipHorizontal:1,flipVertical:1})})))},n.prototype.applyStyles=function(){this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().css("transform","rotate("+this.rotateValuesList[this.core.index].rotate+"deg) scale3d("+this.rotateValuesList[this.core.index].flipHorizontal+", "+this.rotateValuesList[this.core.index].flipVertical+", 1)")},n.prototype.rotateLeft=function(){this.rotateValuesList[this.core.index].rotate-=90,this.applyStyles(),this.triggerEvents(o,{rotate:this.rotateValuesList[this.core.index].rotate})},n.prototype.rotateRight=function(){this.rotateValuesList[this.core.index].rotate+=90,this.applyStyles(),this.triggerEvents(r,{rotate:this.rotateValuesList[this.core.index].rotate})},n.prototype.getCurrentRotation=function(t){if(!t)return 0;var e=this.$LG(t).style(),i=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform")||"none";if("none"!==i){var o=i.split("(")[1].split(")")[0].split(",");if(o){var r=Math.round(Math.atan2(o[1],o[0])*(180/Math.PI));return r<0?r+360:r}}return 0},n.prototype.flipHorizontal=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().get(),e=this.getCurrentRotation(t),i="flipHorizontal";90!==e&&270!==e||(i="flipVertical"),this.rotateValuesList[this.core.index][i]*=-1,this.applyStyles(),this.triggerEvents(s,{flipHorizontal:this.rotateValuesList[this.core.index][i]})},n.prototype.flipVertical=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().get(),e=this.getCurrentRotation(t),i="flipVertical";90!==e&&270!==e||(i="flipHorizontal"),this.rotateValuesList[this.core.index][i]*=-1,this.applyStyles(),this.triggerEvents(a,{flipVertical:this.rotateValuesList[this.core.index][i]})},n.prototype.triggerEvents=function(t,e){var i=this;setTimeout((function(){i.core.LGel.trigger(t,e)}),this.settings.rotateSpeed+10)},n.prototype.isImageOrientationChanged=function(){var t=this.rotateValuesList[this.core.index],e=Math.abs(t.rotate)%360!=0,i=t.flipHorizontal<0,o=t.flipVertical<0;return e||i||o},n.prototype.closeGallery=function(){this.isImageOrientationChanged()&&this.core.getSlideItem(this.core.index).css("opacity",0),this.rotateValuesList={}},n.prototype.destroy=function(){this.core.LGel.off(".lg.rotate"),this.core.LGel.off(".rotate")},n}()})); diff --git a/blocks/lcp-gallery/assets/js/lg-share.min.js b/blocks/lcp-gallery/assets/js/lg-share.min.js new file mode 100644 index 0000000..a7758db --- /dev/null +++ b/blocks/lcp-gallery/assets/js/lg-share.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.8.2 | November 28th 2024 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgShare=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,r=1,o=arguments.length;r\n '),this.core.outer.append(''),this.core.outer.find(".lg-share").first().on("click.lg",(function(){t.core.outer.toggleClass("lg-dropdown-active"),t.core.outer.hasClass("lg-dropdown-active")?t.core.outer.attr("aria-expanded",!0):t.core.outer.attr("aria-expanded",!1)})),this.core.outer.find(".lg-dropdown-overlay").first().on("click.lg",(function(){t.core.outer.removeClass("lg-dropdown-active"),t.core.outer.attr("aria-expanded",!1)}))},a.prototype.onAfterSlide=function(t){var e=this,r=t.detail.index,o=this.core.galleryItems[r];setTimeout((function(){e.shareOptions.forEach((function(t){var r=t.selector;e.core.outer.find(r).attr("href",t.generateLink(o))}))}),100)},a.prototype.getShareListItemHTML=function(t,e){return''+e+""},a.prototype.getDefaultShareOptions=function(){return e(this.settings.facebook?[{type:"facebook",generateLink:o,dropdownHTML:this.getShareListItemHTML("facebook",this.settings.facebookDropdownText),selector:".lg-share-facebook"}]:[],this.settings.twitter?[{type:"twitter",generateLink:n,dropdownHTML:this.getShareListItemHTML("twitter",this.settings.twitterDropdownText),selector:".lg-share-twitter"}]:[],this.settings.pinterest?[{type:"pinterest",generateLink:i,dropdownHTML:this.getShareListItemHTML("pinterest",this.settings.pinterestDropdownText),selector:".lg-share-pinterest"}]:[])},a.prototype.destroy=function(){this.core.outer.find(".lg-dropdown-overlay").remove(),this.core.outer.find(".lg-share").remove(),this.core.LGel.off(".lg.share"),this.core.LGel.off(".share")},a}()})); diff --git a/blocks/lcp-gallery/assets/js/lg-thumbnail.min.js b/blocks/lcp-gallery/assets/js/lg-thumbnail.min.js new file mode 100644 index 0000000..ad939c7 --- /dev/null +++ b/blocks/lcp-gallery/assets/js/lg-thumbnail.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.8.2 | November 28th 2024 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgThumbnail=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,i=1,s=arguments.length;i\n \n \n ';this.core.outer.addClass("lg-has-thumb"),".lg-components"===this.settings.appendThumbnailsTo?this.core.$lgComponents.append(e):this.core.outer.append(e),this.$thumbOuter=this.core.outer.find(".lg-thumb-outer").first(),this.$lgThumb=this.core.outer.find(".lg-thumb").first(),this.settings.animateThumb&&this.core.outer.find(".lg-thumb").css("transition-duration",this.core.settings.speed+"ms").css("width",this.thumbTotalWidth+"px").css("position","relative"),this.setThumbItemHtml(this.core.galleryItems)},o.prototype.enableThumbDrag=function(){var t=this,e={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0},i=!1;this.$thumbOuter.addClass("lg-grab"),this.core.outer.find(".lg-thumb").first().on("mousedown.lg.thumb",(function(s){t.thumbTotalWidth>t.thumbOuterWidth&&(s.preventDefault(),e.cords.startX=s.pageX,e.startTime=new Date,t.thumbClickable=!1,i=!0,t.core.outer.get().scrollLeft+=1,t.core.outer.get().scrollLeft-=1,t.$thumbOuter.removeClass("lg-grab").addClass("lg-grabbing"))})),this.$LG(window).on("mousemove.lg.thumb.global"+this.core.lgId,(function(s){t.core.lgOpened&&i&&(e.cords.endX=s.pageX,e=t.onThumbTouchMove(e))})),this.$LG(window).on("mouseup.lg.thumb.global"+this.core.lgId,(function(){t.core.lgOpened&&(e.isMoved?e=t.onThumbTouchEnd(e):t.thumbClickable=!0,i&&(i=!1,t.$thumbOuter.removeClass("lg-grabbing").addClass("lg-grab")))}))},o.prototype.enableThumbSwipe=function(){var t=this,e={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0};this.$lgThumb.on("touchstart.lg",(function(i){t.thumbTotalWidth>t.thumbOuterWidth&&(i.preventDefault(),e.cords.startX=i.targetTouches[0].pageX,t.thumbClickable=!1,e.startTime=new Date)})),this.$lgThumb.on("touchmove.lg",(function(i){t.thumbTotalWidth>t.thumbOuterWidth&&(i.preventDefault(),e.cords.endX=i.targetTouches[0].pageX,e=t.onThumbTouchMove(e))})),this.$lgThumb.on("touchend.lg",(function(){e.isMoved?e=t.onThumbTouchEnd(e):t.thumbClickable=!0}))},o.prototype.rebuildThumbnails=function(){var t=this;this.$thumbOuter.addClass("lg-rebuilding-thumbnails"),setTimeout((function(){t.thumbTotalWidth=t.core.galleryItems.length*(t.settings.thumbWidth+t.settings.thumbMargin),t.$lgThumb.css("width",t.thumbTotalWidth+"px"),t.$lgThumb.empty(),t.setThumbItemHtml(t.core.galleryItems),t.animateThumb(t.core.index)}),50),setTimeout((function(){t.$thumbOuter.removeClass("lg-rebuilding-thumbnails")}),200)},o.prototype.setTranslate=function(t){this.$lgThumb.css("transform","translate3d(-"+t+"px, 0px, 0px)")},o.prototype.getPossibleTransformX=function(t){return t>this.thumbTotalWidth-this.thumbOuterWidth&&(t=this.thumbTotalWidth-this.thumbOuterWidth),t<0&&(t=0),t},o.prototype.animateThumb=function(t){if(this.$lgThumb.css("transition-duration",this.core.settings.speed+"ms"),this.settings.animateThumb){var e=0;switch(this.settings.currentPagerPosition){case"left":e=0;break;case"middle":e=this.thumbOuterWidth/2-this.settings.thumbWidth/2;break;case"right":e=this.thumbOuterWidth-this.settings.thumbWidth}this.translateX=(this.settings.thumbWidth+this.settings.thumbMargin)*t-1-e,this.translateX>this.thumbTotalWidth-this.thumbOuterWidth&&(this.translateX=this.thumbTotalWidth-this.thumbOuterWidth),this.translateX<0&&(this.translateX=0),this.setTranslate(this.translateX)}},o.prototype.onThumbTouchMove=function(t){return t.newTranslateX=this.translateX,t.isMoved=!0,t.touchMoveTime=(new Date).valueOf(),t.newTranslateX-=t.cords.endX-t.cords.startX,t.newTranslateX=this.getPossibleTransformX(t.newTranslateX),this.setTranslate(t.newTranslateX),this.$thumbOuter.addClass("lg-dragging"),t},o.prototype.onThumbTouchEnd=function(t){t.isMoved=!1,t.endTime=new Date,this.$thumbOuter.removeClass("lg-dragging");var e=t.endTime.valueOf()-t.startTime.valueOf(),i=t.cords.endX-t.cords.startX,s=Math.abs(i)/e;return s>.15&&t.endTime.valueOf()-t.touchMoveTime<30?((s+=1)>2&&(s+=1),s+=s*(Math.abs(i)/this.thumbOuterWidth),this.$lgThumb.css("transition-duration",Math.min(s-1,2)+"settings"),i*=s,this.translateX=this.getPossibleTransformX(this.translateX-i),this.setTranslate(this.translateX)):this.translateX=t.newTranslateX,Math.abs(t.cords.endX-t.cords.startX)'),this.core.outer.find(".lg-toggle-thumb").first().on("click.lg",(function(){t.core.outer.toggleClass("lg-components-open")})))},o.prototype.thumbKeyPress=function(){var t=this;this.$LG(window).on("keydown.lg.thumb.global"+this.core.lgId,(function(e){t.core.lgOpened&&t.settings.toggleThumb&&(38===e.keyCode?(e.preventDefault(),t.core.outer.addClass("lg-components-open")):40===e.keyCode&&(e.preventDefault(),t.core.outer.removeClass("lg-components-open")))}))},o.prototype.destroy=function(){this.settings.thumbnail&&(this.$LG(window).off(".lg.thumb.global"+this.core.lgId),this.core.LGel.off(".lg.thumb"),this.core.LGel.off(".thumb"),this.$thumbOuter.remove(),this.core.outer.removeClass("lg-has-thumb"))},o}()})); diff --git a/blocks/lcp-gallery/assets/js/lg-video.min.js b/blocks/lcp-gallery/assets/js/lg-video.min.js new file mode 100644 index 0000000..2a8956b --- /dev/null +++ b/blocks/lcp-gallery/assets/js/lg-video.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.8.2 | November 28th 2024 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).lgVideo=o()}(this,(function(){"use strict";var e=function(){return(e=Object.assign||function(e){for(var o,i=1,t=arguments.length;i"}else if(n.vimeo){u="lg-vimeo"+i;var h=function(e,o){if(!o||!o.vimeo)return"";var i=o.vimeo[2]||"",t=Object.assign({},{autoplay:0,muted:1},e),s=t&&0!==Object.keys(t).length?r(t):"",n=((o.vimeo[0].split("/").pop()||"").split("?")[0]||"").split("#")[0],l=o.vimeo[1]!==n;l&&(i=i.replace("/"+n,""));var d=l?"h="+n:"";return"?"+d+(s=d?"&"+s:s)+("?"==i[0]?"&"+i.slice(1):i||"")}(this.settings.vimeoPlayerParams,n);s='"}else if(n.wistia){var g="lg-wistia"+i;h=(h=r(this.settings.wistiaPlayerParams))?"?"+h:"",s='"}else if(n.html5){for(var p="",y=0;y"}if(t.tracks){var w=function(e){var o="",i=t.tracks[e];Object.keys(i||{}).forEach((function(e){o+=e+'="'+i[e]+'" '})),p+=""};for(y=0;y\n "+p+"\n Your browser does not support HTML5 video.\n "}return s},a.prototype.appendVideos=function(e,o){var i,t=this.getVideoHtml(o.src,o.addClass,o.index,o.html5Video);e.find(".lg-video-cont").append(t);var s=e.find(".lg-video-object").first();if(o.html5Video&&s.on("mousedown.lg.video",(function(e){e.stopPropagation()})),this.settings.videojs&&(null===(i=this.core.galleryItems[o.index].__slideVideoInfo)||void 0===i?void 0:i.html5))try{return videojs(s.get(),this.settings.videojsOptions)}catch(e){console.error("lightGallery:- Make sure you have included videojs")}},a.prototype.gotoNextSlideOnVideoEnd=function(e,o){var i=this,t=this.core.getSlideItem(o).find(".lg-video-object").first(),s=this.core.galleryItems[o].__slideVideoInfo||{};if(this.settings.gotoNextSlideOnVideoEnd)if(s.html5)t.on("ended",(function(){i.core.goToNextSlide()}));else if(s.vimeo)try{new Vimeo.Player(t.get()).on("ended",(function(){i.core.goToNextSlide()}))}catch(e){console.error("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(s.wistia)try{window._wq=window._wq||[],window._wq.push({id:t.attr("id"),onReady:function(e){e.bind("end",(function(){i.core.goToNextSlide()}))}})}catch(e){console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}},a.prototype.controlVideo=function(e,o){var i=this.core.getSlideItem(e).find(".lg-video-object").first(),t=this.core.galleryItems[e].__slideVideoInfo||{};if(i.get())if(t.youtube)try{i.get().contentWindow.postMessage('{"event":"command","func":"'+o+'Video","args":""}',"*")}catch(e){console.error("lightGallery:- "+e)}else if(t.vimeo)try{new Vimeo.Player(i.get())[o]()}catch(e){console.error("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(t.html5)if(this.settings.videojs)try{videojs(i.get())[o]()}catch(e){console.error("lightGallery:- Make sure you have included videojs")}else i.get()[o]();else if(t.wistia)try{window._wq=window._wq||[],window._wq.push({id:i.attr("id"),onReady:function(e){e[o]()}})}catch(e){console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}},a.prototype.loadVideoOnPosterClick=function(e,o){var i=this;if(e.hasClass("lg-video-loaded"))o&&this.playVideo(this.core.index);else if(e.hasClass("lg-has-video"))this.playVideo(this.core.index);else{e.addClass("lg-has-video");var t=void 0,s=this.core.galleryItems[this.core.index].src,n=this.core.galleryItems[this.core.index].video;n&&(t="string"==typeof n?JSON.parse(n):n);var l=this.appendVideos(e,{src:s,addClass:"",index:this.core.index,html5Video:t});this.gotoNextSlideOnVideoEnd(s,this.core.index);var r=e.find(".lg-object").first().get();e.find(".lg-video-cont").first().append(r),e.addClass("lg-video-loading"),l&&l.ready((function(){l.on("loadedmetadata",(function(){i.onVideoLoadAfterPosterClick(e,i.core.index)}))})),e.find(".lg-video-object").first().on("load.lg error.lg loadedmetadata.lg",(function(){setTimeout((function(){i.onVideoLoadAfterPosterClick(e,i.core.index)}),50)}))}},a.prototype.onVideoLoadAfterPosterClick=function(e,o){e.addClass("lg-video-loaded"),this.playVideo(o)},a.prototype.destroy=function(){this.core.LGel.off(".lg.video"),this.core.LGel.off(".video")},a}()})); diff --git a/blocks/lcp-gallery/assets/js/lg-vimeo-thumbnail.min.js b/blocks/lcp-gallery/assets/js/lg-vimeo-thumbnail.min.js new file mode 100644 index 0000000..f20b53e --- /dev/null +++ b/blocks/lcp-gallery/assets/js/lg-vimeo-thumbnail.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.8.2 | November 28th 2024 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgVimeoThumbnail=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&i[i.length-1])||6!==r[0]&&2!==r[0])){u=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]':"";this.settings.actualSize&&(e+=''),this.core.outer.addClass("lg-use-transition-for-zoom"),this.core.$toolbar.first().append(e)},h.prototype.enableZoom=function(e){var t=this,o=this.settings.enableZoomAfter+e.detail.delay;this.$LG("body").first().hasClass("lg-from-hash")&&e.detail.delay?o=0:this.$LG("body").first().removeClass("lg-from-hash"),this.zoomableTimeout=setTimeout((function(){t.isImageSlide(t.core.index)&&(t.core.getSlideItem(e.detail.index).addClass("lg-zoomable"),e.detail.index===t.core.index&&t.setZoomEssentials())}),o+30)},h.prototype.enableZoomOnSlideItemLoad=function(){this.core.LGel.on(a+".zoom",this.enableZoom.bind(this))},h.prototype.getDragCords=function(e){return{x:e.pageX,y:e.pageY}},h.prototype.getSwipeCords=function(e){return{x:e.touches[0].pageX,y:e.touches[0].pageY}},h.prototype.getDragAllowedAxises=function(e,t){if(!this.containerRect)return{allowX:!1,allowY:!1};var o=this.core.getSlideItem(this.core.index).find(".lg-image").first().get(),i=0,s=0,a=o.getBoundingClientRect();e?(i=o.offsetHeight*e,s=o.offsetWidth*e):t?(i=a.height+t*a.height,s=a.width+t*a.width):(i=a.height,s=a.width);var n=i>this.containerRect.height;return{allowX:s>this.containerRect.width,allowY:n}},h.prototype.setZoomEssentials=function(){this.containerRect=this.core.$content.get().getBoundingClientRect()},h.prototype.zoomImage=function(e,t,o,i){if(!(Math.abs(t)<=0)){var s,a,n=this.containerRect.width/2+this.containerRect.left,r=this.containerRect.height/2+this.containerRect.top+this.scrollTop;1===e&&(this.positionChanged=!1);var l=this.getDragAllowedAxises(0,t),c=l.allowY,g=l.allowX;this.positionChanged&&(s=this.left/(this.scale-t),a=this.top/(this.scale-t),this.pageX=n-s,this.pageY=r-a,this.positionChanged=!1);var h,m,u=this.getPossibleSwipeDragCords(t),d=n-this.pageX,f=r-this.pageY;if(e-t>1){var p=(e-t)/Math.abs(t);h=(d=(t<0?-d:d)+this.left*(p+(t<0?-1:1)))/p,m=(f=(t<0?-f:f)+this.top*(p+(t<0?-1:1)))/p}else{h=d*(p=(e-t)*t),m=f*p}o&&(g?this.isBeyondPossibleLeft(h,u.minX)?h=u.minX:this.isBeyondPossibleRight(h,u.maxX)&&(h=u.maxX):e>1&&(hu.maxX&&(h=u.maxX)),c?this.isBeyondPossibleTop(m,u.minY)?m=u.minY:this.isBeyondPossibleBottom(m,u.maxY)&&(m=u.maxY):e>1&&(mu.maxY&&(m=u.maxY))),this.setZoomStyles({x:h,y:m,scale:e}),this.left=h,this.top=m,i&&this.setZoomImageSize()}},h.prototype.resetImageTranslate=function(e){if(this.isImageSlide(e)){var t=this.core.getSlideItem(e).find(".lg-image").first();this.imageReset=!1,t.removeClass("reset-transition reset-transition-y reset-transition-x"),this.core.outer.removeClass("lg-actual-size"),t.css("width","auto").css("height","auto"),setTimeout((function(){t.removeClass("no-transition")}),10)}},h.prototype.setZoomImageSize=function(){var e=this,t=this.core.getSlideItem(this.core.index).find(".lg-image").first();setTimeout((function(){var o=e.getCurrentImageActualSizeScale();e.scale>=o&&(t.addClass("no-transition"),e.imageReset=!0)}),500),setTimeout((function(){var o=e.getCurrentImageActualSizeScale();if(e.scale>=o){var i=e.getDragAllowedAxises(e.scale);t.css("width",t.get().naturalWidth+"px").css("height",t.get().naturalHeight+"px"),e.core.outer.addClass("lg-actual-size"),i.allowX&&i.allowY?t.addClass("reset-transition"):i.allowX&&!i.allowY?t.addClass("reset-transition-x"):!i.allowX&&i.allowY&&t.addClass("reset-transition-y")}}),550)},h.prototype.setZoomStyles=function(e){var t=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),o=this.core.getSlideItem(this.core.index).find(".lg-image").first(),i=this.core.outer.find(".lg-current .lg-dummy-img").first();this.scale=e.scale,o.css("transform","scale3d("+e.scale+", "+e.scale+", 1)"),i.css("transform","scale3d("+e.scale+", "+e.scale+", 1)");var s="translate3d("+e.x+"px, "+e.y+"px, 0)";t.css("transform",s)},h.prototype.setActualSize=function(e,t){var o=this;if(!this.zoomInProgress){this.zoomInProgress=!0;var i=this.core.galleryItems[this.core.index];this.resetImageTranslate(e),setTimeout((function(){if(i.src&&!o.core.outer.hasClass("lg-first-slide-loading")){var e=o.getCurrentImageActualSizeScale(),s=o.scale;o.core.outer.hasClass("lg-zoomed")?o.scale=1:o.scale=o.getScale(e),o.setPageCords(t),o.beginZoom(o.scale),o.zoomImage(o.scale,o.scale-s,!0,!0)}}),50),setTimeout((function(){o.core.outer.removeClass("lg-grabbing").addClass("lg-grab")}),60),setTimeout((function(){o.zoomInProgress=!1}),610)}},h.prototype.getNaturalWidth=function(e){var t=this.core.getSlideItem(e).find(".lg-image").first(),o=this.core.galleryItems[e].width;return o?parseFloat(o):t.get().naturalWidth},h.prototype.getActualSizeScale=function(e,t){return e>=t?e/t||2:1},h.prototype.getCurrentImageActualSizeScale=function(){var e=this.core.getSlideItem(this.core.index).find(".lg-image").first().get().offsetWidth,t=this.getNaturalWidth(this.core.index)||e;return this.getActualSizeScale(t,e)},h.prototype.getPageCords=function(e){var t={};if(e)t.x=e.pageX||e.touches[0].pageX,t.y=e.pageY||e.touches[0].pageY;else{var o=this.core.$content.get().getBoundingClientRect();t.x=o.width/2+o.left,t.y=o.height/2+this.scrollTop+o.top}return t},h.prototype.setPageCords=function(e){var t=this.getPageCords(e);this.pageX=t.x,this.pageY=t.y},h.prototype.manageActualPixelClassNames=function(){this.core.getElementById("lg-actual-size").removeClass(this.settings.actualSizeIcons.zoomIn).addClass(this.settings.actualSizeIcons.zoomOut)},h.prototype.beginZoom=function(e){return this.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),e>1?(this.core.outer.addClass("lg-zoomed"),this.manageActualPixelClassNames()):this.resetZoom(),e>1},h.prototype.getScale=function(e){var t=this.getCurrentImageActualSizeScale();return e<1?e=1:e>t&&(e=t),e},h.prototype.init=function(){var e=this;if(this.settings.zoom){this.buildTemplates(),this.enableZoomOnSlideItemLoad();var t=null;this.core.outer.on("dblclick.lg",(function(t){e.$LG(t.target).hasClass("lg-image")&&e.setActualSize(e.core.index,t)})),this.core.outer.on("touchstart.lg",(function(o){var i=e.$LG(o.target);1===o.touches.length&&i.hasClass("lg-image")&&(t?(clearTimeout(t),t=null,o.preventDefault(),e.setActualSize(e.core.index,o)):t=setTimeout((function(){t=null}),300))})),this.core.LGel.on(o+".zoom "+l+".zoom "+r+".zoom "+c+".zoom "+g+".zoom",(function(){if(e.core.lgOpened&&e.isImageSlide(e.core.index)&&!e.core.touchAction){var t=e.core.getSlideItem(e.core.index).find(".lg-img-wrap").first();e.top=0,e.left=0,e.setZoomEssentials(),e.setZoomSwipeStyles(t,{x:0,y:0}),e.positionChanged=!0}})),this.$LG(window).on("scroll.lg.zoom.global"+this.core.lgId,(function(){e.core.lgOpened&&(e.scrollTop=e.$LG(window).scrollTop())})),this.core.getElementById("lg-zoom-out").on("click.lg",(function(){if(e.isImageSlide(e.core.index)){var t=0;e.imageReset&&(e.resetImageTranslate(e.core.index),t=50),setTimeout((function(){var t=e.scale-e.settings.scale;t<1&&(t=1),e.beginZoom(t),e.zoomImage(t,-e.settings.scale,!0,!e.settings.infiniteZoom)}),t)}})),this.core.getElementById("lg-zoom-in").on("click.lg",(function(){e.zoomIn()})),this.core.getElementById("lg-actual-size").on("click.lg",(function(){e.setActualSize(e.core.index)})),this.core.LGel.on(i+".zoom",(function(){e.core.outer.find(".lg-item").removeClass("lg-zoomable")})),this.core.LGel.on(s+".zoom",(function(){e.scrollTop=e.$LG(window).scrollTop(),e.pageX=e.core.outer.width()/2,e.pageY=e.core.outer.height()/2+e.scrollTop,e.scale=1})),this.core.LGel.on(n+".zoom",(function(t){var o=t.detail.prevIndex;e.scale=1,e.positionChanged=!1,e.zoomInProgress=!1,e.resetZoom(o),e.resetImageTranslate(o),e.isImageSlide(e.core.index)&&e.setZoomEssentials()})),this.zoomDrag(),this.pinchZoom(),this.zoomSwipe(),this.zoomableTimeout=!1,this.positionChanged=!1,this.zoomInProgress=!1}},h.prototype.zoomIn=function(){if(this.isImageSlide(this.core.index)){var e=this.scale+this.settings.scale;this.settings.infiniteZoom||(e=this.getScale(e)),this.beginZoom(e),this.zoomImage(e,Math.min(this.settings.scale,e-this.scale),!0,!this.settings.infiniteZoom)}},h.prototype.resetZoom=function(e){this.core.outer.removeClass("lg-zoomed lg-zoom-drag-transition");var t=this.core.getElementById("lg-actual-size"),o=this.core.getSlideItem(void 0!==e?e:this.core.index);t.removeClass(this.settings.actualSizeIcons.zoomOut).addClass(this.settings.actualSizeIcons.zoomIn),o.find(".lg-img-wrap").first().removeAttr("style"),o.find(".lg-image").first().removeAttr("style"),this.scale=1,this.left=0,this.top=0,this.setPageCords()},h.prototype.getTouchDistance=function(e){return Math.sqrt((e.touches[0].pageX-e.touches[1].pageX)*(e.touches[0].pageX-e.touches[1].pageX)+(e.touches[0].pageY-e.touches[1].pageY)*(e.touches[0].pageY-e.touches[1].pageY))},h.prototype.pinchZoom=function(){var e=this,t=0,o=!1,i=1,s=0,a=this.core.getSlideItem(this.core.index);this.core.outer.on("touchstart.lg",(function(o){if(a=e.core.getSlideItem(e.core.index),e.isImageSlide(e.core.index)&&2===o.touches.length){if(o.preventDefault(),e.core.outer.hasClass("lg-first-slide-loading"))return;i=e.scale||1,e.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),e.setPageCords(o),e.resetImageTranslate(e.core.index),e.core.touchAction="pinch",t=e.getTouchDistance(o)}})),this.core.$inner.on("touchmove.lg",(function(n){if(2===n.touches.length&&"pinch"===e.core.touchAction&&(e.$LG(n.target).hasClass("lg-item")||a.get().contains(n.target))){n.preventDefault();var r=e.getTouchDistance(n),l=t-r;if(!o&&Math.abs(l)>5&&(o=!0),o){s=e.scale;var c=Math.max(1,i+.02*-l);e.scale=Math.round(100*(c+Number.EPSILON))/100;var g=e.scale-s;e.zoomImage(e.scale,Math.round(100*(g+Number.EPSILON))/100,!1,!1)}}})),this.core.$inner.on("touchend.lg",(function(i){if("pinch"===e.core.touchAction&&(e.$LG(i.target).hasClass("lg-item")||a.get().contains(i.target))){if(o=!1,t=0,e.scale<=1)e.resetZoom();else{var s=e.getCurrentImageActualSizeScale();if(e.scale>=s){var n=s-e.scale;0===n&&(n=.01),e.zoomImage(s,n,!1,!0)}e.manageActualPixelClassNames(),e.core.outer.addClass("lg-zoomed")}e.core.touchAction=void 0}}))},h.prototype.touchendZoom=function(e,t,o,i,s){var a=t.x-e.x,n=t.y-e.y,r=Math.abs(a)/s+1,l=Math.abs(n)/s+1;r>2&&(r+=1),l>2&&(l+=1),a*=r,n*=l;var c=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),g={};g.x=this.left+a,g.y=this.top+n;var h=this.getPossibleSwipeDragCords();(Math.abs(a)>15||Math.abs(n)>15)&&(i&&(this.isBeyondPossibleTop(g.y,h.minY)?g.y=h.minY:this.isBeyondPossibleBottom(g.y,h.maxY)&&(g.y=h.maxY)),o&&(this.isBeyondPossibleLeft(g.x,h.minX)?g.x=h.minX:this.isBeyondPossibleRight(g.x,h.maxX)&&(g.x=h.maxX)),i?this.top=g.y:g.y=this.top,o?this.left=g.x:g.x=this.left,this.setZoomSwipeStyles(c,g),this.positionChanged=!0)},h.prototype.getZoomSwipeCords=function(e,t,o,i,s){var a={};if(i){if(a.y=this.top+(t.y-e.y),this.isBeyondPossibleTop(a.y,s.minY)){var n=s.minY-a.y;a.y=s.minY-n/6}else if(this.isBeyondPossibleBottom(a.y,s.maxY)){var r=a.y-s.maxY;a.y=s.maxY+r/6}}else a.y=this.top;if(o){if(a.x=this.left+(t.x-e.x),this.isBeyondPossibleLeft(a.x,s.minX)){var l=s.minX-a.x;a.x=s.minX-l/6}else if(this.isBeyondPossibleRight(a.x,s.maxX)){var c=a.x-s.maxX;a.x=s.maxX+c/6}}else a.x=this.left;return a},h.prototype.isBeyondPossibleLeft=function(e,t){return e>=t},h.prototype.isBeyondPossibleRight=function(e,t){return e<=t},h.prototype.isBeyondPossibleTop=function(e,t){return e>=t},h.prototype.isBeyondPossibleBottom=function(e,t){return e<=t},h.prototype.isImageSlide=function(e){var t=this.core.galleryItems[e];return"image"===this.core.getSlideType(t)},h.prototype.getPossibleSwipeDragCords=function(e){var t=this.core.getSlideItem(this.core.index).find(".lg-image").first(),o=this.core.mediaContainerPosition.bottom,i=t.get().getBoundingClientRect(),s=i.height,a=i.width;return e&&(s+=e*s,a+=e*a),{minY:(s-this.containerRect.height)/2,maxY:(this.containerRect.height-s)/2+o,minX:(a-this.containerRect.width)/2,maxX:(this.containerRect.width-a)/2}},h.prototype.setZoomSwipeStyles=function(e,t){e.css("transform","translate3d("+t.x+"px, "+t.y+"px, 0)")},h.prototype.zoomSwipe=function(){var e,t,o=this,i={},s={},a=!1,n=!1,r=!1,l=new Date,c=(new Date,this.core.getSlideItem(this.core.index));this.core.$inner.on("touchstart.lg",(function(s){if(o.isImageSlide(o.core.index)&&(c=o.core.getSlideItem(o.core.index),(o.$LG(s.target).hasClass("lg-item")||c.get().contains(s.target))&&1===s.touches.length&&o.core.outer.hasClass("lg-zoomed"))){s.preventDefault(),l=new Date,o.core.touchAction="zoomSwipe",t=o.core.getSlideItem(o.core.index).find(".lg-img-wrap").first();var a=o.getDragAllowedAxises(0);r=a.allowY,((n=a.allowX)||r)&&(i=o.getSwipeCords(s)),e=o.getPossibleSwipeDragCords(),o.core.outer.addClass("lg-zoom-dragging lg-zoom-drag-transition")}})),this.core.$inner.on("touchmove.lg",(function(l){if(1===l.touches.length&&"zoomSwipe"===o.core.touchAction&&(o.$LG(l.target).hasClass("lg-item")||c.get().contains(l.target))){l.preventDefault(),o.core.touchAction="zoomSwipe",s=o.getSwipeCords(l);var g=o.getZoomSwipeCords(i,s,n,r,e);(Math.abs(s.x-i.x)>15||Math.abs(s.y-i.y)>15)&&(a=!0,o.setZoomSwipeStyles(t,g))}})),this.core.$inner.on("touchend.lg",(function(e){if("zoomSwipe"===o.core.touchAction&&(o.$LG(e.target).hasClass("lg-item")||c.get().contains(e.target))){if(e.preventDefault(),o.core.touchAction=void 0,o.core.outer.removeClass("lg-zoom-dragging"),!a)return;a=!1;var t=(new Date).valueOf()-l.valueOf();o.touchendZoom(i,s,n,r,t)}}))},h.prototype.zoomDrag=function(){var e,t,o,i,s=this,a={},n={},r=!1,l=!1,c=!1,g=!1;this.core.outer.on("mousedown.lg.zoom",(function(t){if(s.isImageSlide(s.core.index)){var n=s.core.getSlideItem(s.core.index);if(s.$LG(t.target).hasClass("lg-item")||n.get().contains(t.target)){e=new Date,i=s.core.getSlideItem(s.core.index).find(".lg-img-wrap").first();var l=s.getDragAllowedAxises(0);g=l.allowY,c=l.allowX,s.core.outer.hasClass("lg-zoomed")&&s.$LG(t.target).hasClass("lg-object")&&(c||g)&&(t.preventDefault(),a=s.getDragCords(t),o=s.getPossibleSwipeDragCords(),r=!0,s.core.outer.removeClass("lg-grab").addClass("lg-grabbing lg-zoom-drag-transition lg-zoom-dragging"))}}})),this.$LG(window).on("mousemove.lg.zoom.global"+this.core.lgId,(function(e){if(r){l=!0,n=s.getDragCords(e);var t=s.getZoomSwipeCords(a,n,c,g,o);s.setZoomSwipeStyles(i,t)}})),this.$LG(window).on("mouseup.lg.zoom.global"+this.core.lgId,(function(o){if(r){if(t=new Date,r=!1,s.core.outer.removeClass("lg-zoom-dragging"),l&&(a.x!==n.x||a.y!==n.y)){n=s.getDragCords(o);var i=t.valueOf()-e.valueOf();s.touchendZoom(a,n,c,g,i)}l=!1}s.core.outer.removeClass("lg-grabbing").addClass("lg-grab")}))},h.prototype.closeGallery=function(){this.resetZoom(),this.zoomInProgress=!1},h.prototype.destroy=function(){this.$LG(window).off(".lg.zoom.global"+this.core.lgId),this.core.LGel.off(".lg.zoom"),this.core.LGel.off(".zoom"),clearTimeout(this.zoomableTimeout),this.zoomableTimeout=!1},h}()})); diff --git a/blocks/lcp-gallery/assets/js/lightgallery.min.js b/blocks/lcp-gallery/assets/js/lightgallery.min.js new file mode 100644 index 0000000..23c6803 --- /dev/null +++ b/blocks/lcp-gallery/assets/js/lightgallery.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.8.2 | November 28th 2024 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lightGallery=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,i=1,s=arguments.length;i";e.append(s)}else e.html(t)}))},E=function(t,e,i,s){void 0===i&&(i=0);var n=x(t).attr("data-lg-size")||s;if(n){var o=n.split(",");if(o[1])for(var r=window.innerWidth,l=0;lr){n=a;break}l===o.length-1&&(n=a)}var d=n.split("-"),g=parseInt(d[0],10),h=parseInt(d[1],10),c=e.width(),u=e.height()-i,m=Math.min(c,g),p=Math.min(u,h),f=Math.min(m/g,p/h);return{width:g*f,height:h*f}}},O=function(t,e,i,s,n){if(n){var o=x(t).find("img").first();if(o.get()){var r=e.get().getBoundingClientRect(),l=r.width,a=e.height()-(i+s),d=o.width(),g=o.height(),h=o.style(),c=(l-d)/2-o.offset().left+(parseFloat(h.paddingLeft)||0)+(parseFloat(h.borderLeft)||0)+x(window).scrollLeft()+r.left,u=(a-g)/2-o.offset().top+(parseFloat(h.paddingTop)||0)+(parseFloat(h.borderTop)||0)+x(window).scrollTop()+i;return"translate3d("+(c*=-1)+"px, "+(u*=-1)+"px, 0) scale3d("+d/n.width+", "+g/n.height+", 1)"}}},L=function(t,e,i,s,n,o){return'\n \n '},D=function(t,e,i,s,n,o){var r="',l="";o&&(l=("string"==typeof o?JSON.parse(o):o).map((function(t){var e="";return Object.keys(t).forEach((function(i){e+=" "+i+'="'+t[i]+'"'})),""})));return""+l+r},z=function(t){for(var e=[],i=[],s="",n=0;nr){s=i[l];break}return s},M=function(t){return!!t&&(!!t.complete&&0!==t.naturalWidth)},G=function(t,e,i,s,n){var o="";o=n&&n.youtube?"lg-has-youtube":n&&n.vimeo?"lg-has-vimeo":"lg-has-html5";var r=e;return"string"!=typeof e&&(r=e.outerHTML),'\n \n \n '+s+'\n \n \n \n \n \n \n \n \n '+r+'\n \n '},k=function(t){var e=t.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])');return[].filter.call(e,(function(t){var e=window.getComputedStyle(t);return"none"!==e.display&&"hidden"!==e.visibility}))},A=function(t,e,i,s){var n=[],o=function(){for(var t=0,e=0,i=arguments.length;e-1&&(d=a),d&&(e[d]=l.value)}}var g=x(t),h=g.find("img").first().attr("alt"),c=g.attr("title"),u=s?g.attr(s):g.find("img").first().attr("src");e.thumb=u,i&&!e.subHtml&&(e.subHtml=c||h||""),e.alt=h||c||"",n.push(e)})),console.log(n,"dynamicElements"),n},B=function(){return/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)},P=function(t,e,i){if(!t)return e?{html5:!0}:void console.error("lightGallery :- data-src is not provided on slide item "+(i+1)+". Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/");var s=t.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)([\&|?][\S]*)*/i),n=t.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)(.*)?/i),o=t.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/);return s?{youtube:s}:n?{vimeo:n}:o?{wistia:o}:void 0},F=0,H=function(){function w(t,e){if(this.lgOpened=!1,this.index=0,this.plugins=[],this.lGalleryOn=!1,this.lgBusy=!1,this.currentItemsInDom=[],this.prevScrollTop=0,this.bodyPaddingRight=0,this.isDummyImageRemoved=!1,this.dragOrSwipeEnabled=!1,this.mediaContainerPosition={top:0,bottom:0},!t)return this;if(F++,this.lgId=F,this.el=t,this.LGel=x(t),this.generateSettings(e),this.buildModules(),this.settings.dynamic&&void 0!==this.settings.dynamicEl&&!Array.isArray(this.settings.dynamicEl))throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.galleryItems=this.getItems(),this.normalizeSettings(),this.init(),this.validateLicense(),this}return w.prototype.generateSettings=function(e){if(this.settings=t(t({},C),e),this.settings.isMobile&&"function"==typeof this.settings.isMobile?this.settings.isMobile():B()){var i=t(t({},this.settings.mobileSettings),this.settings.mobileSettings);this.settings=t(t({},this.settings),i)}},w.prototype.normalizeSettings=function(){if(this.settings.slideEndAnimation&&(this.settings.hideControlOnEnd=!1),this.settings.closable||(this.settings.swipeToClose=!1),this.zoomFromOrigin=this.settings.zoomFromOrigin,this.settings.dynamic&&(this.zoomFromOrigin=!1),this.settings.container){var t=this.settings.container;if("function"==typeof t)this.settings.container=t();else if("string"==typeof t){var e=document.querySelector(t);this.settings.container=null!=e?e:document.body}}else this.settings.container=document.body;this.settings.preload=Math.min(this.settings.preload,this.galleryItems.length)},w.prototype.init=function(){var t=this;this.addSlideVideoInfo(this.galleryItems),this.buildStructure(),this.LGel.trigger(i,{instance:this}),this.settings.keyPress&&this.keyPress(),setTimeout((function(){t.enableDrag(),t.enableSwipe(),t.triggerPosterClick()}),50),this.arrow(),this.settings.mousewheel&&this.mousewheel(),this.settings.dynamic||this.openGalleryOnItemClick()},w.prototype.openGalleryOnItemClick=function(){for(var t=this,e=function(e){var s=i.items[e],n=x(s),o=I.generateUUID();n.attr("data-lg-id",o).on("click.lgcustom-item-"+o,(function(i){i.preventDefault();var n=t.settings.index||e;t.openGallery(n,s)}))},i=this,s=0;s '+this.settings.prevHtml+' \n '+this.settings.nextHtml+" "),".lg-item"!==this.settings.appendSubHtmlTo&&(i='');var s="";this.settings.allowMediaOverlap&&(s+="lg-media-overlap ");var n=this.settings.ariaLabelledby?'aria-labelledby="'+this.settings.ariaLabelledby+'"':"",o=this.settings.ariaDescribedby?'aria-describedby="'+this.settings.ariaDescribedby+'"':"",r="lg-container "+this.settings.addClass+" "+(document.body!==this.settings.container?"lg-inline":""),l=this.settings.closable&&this.settings.showCloseIcon?'':"",a=this.settings.showMaximizeIcon?'':"",d='\n \n \n\n \n\n \n \n \n '+e+'\n \n \n '+a+"\n "+l+"\n \n "+(".lg-outer"===this.settings.appendSubHtmlTo?i:"")+'\n \n '+(".lg-sub-html"===this.settings.appendSubHtmlTo?i:"")+"\n \n \n \n ";x(this.settings.container).append(d),document.body!==this.settings.container&&x(this.settings.container).css("position","relative"),this.outer=this.getElementById("lg-outer"),this.$lgComponents=this.getElementById("lg-components"),this.$backdrop=this.getElementById("lg-backdrop"),this.$container=this.getElementById("lg-container"),this.$inner=this.getElementById("lg-inner"),this.$content=this.getElementById("lg-content"),this.$toolbar=this.getElementById("lg-toolbar"),this.$backdrop.css("transition-duration",this.settings.backdropDuration+"ms");var g=this.settings.mode+" ";this.manageSingleSlideClassName(),this.settings.enableDrag&&(g+="lg-grab "),this.outer.addClass(g),this.$inner.css("transition-timing-function",this.settings.easing),this.$inner.css("transition-duration",this.settings.speed+"ms"),this.settings.download&&this.$toolbar.append(''),this.counter(),x(window).on("resize.lg.global"+this.lgId+" orientationchange.lg.global"+this.lgId,(function(){t.refreshOnResize()})),this.hideBars(),this.manageCloseGallery(),this.toggleMaximize(),this.initModules()}},w.prototype.refreshOnResize=function(){if(this.lgOpened){var t=this.galleryItems[this.index].__slideVideoInfo;this.mediaContainerPosition=this.getMediaContainerPosition();var e=this.mediaContainerPosition,i=e.top,s=e.bottom;if(this.currentImageSize=E(this.items[this.index],this.outer,i+s,t&&this.settings.videoMaxSize),t&&this.resizeVideoSlide(this.index,this.currentImageSize),this.zoomFromOrigin&&!this.isDummyImageRemoved){var o=this.getDummyImgStyles(this.currentImageSize);this.outer.find(".lg-current .lg-dummy-img").first().attr("style",o)}this.LGel.trigger(n)}},w.prototype.resizeVideoSlide=function(t,e){var i=this.getVideoContStyle(e);this.getSlideItem(t).find(".lg-video-cont").attr("style",i)},w.prototype.updateSlides=function(t,e){if(this.index>t.length-1&&(this.index=t.length-1),1===t.length&&(this.index=0),t.length){var i=this.galleryItems[e].src;this.galleryItems=t,this.updateControls(),this.$inner.empty(),this.currentItemsInDom=[];var s=0;this.galleryItems.some((function(t,e){return t.src===i&&(s=e,!0)})),this.currentItemsInDom=this.organizeSlideItems(s,-1),this.loadContent(s,!0),this.getSlideItem(s).addClass("lg-current"),this.index=s,this.updateCurrentCounter(s),this.LGel.trigger(o)}else this.closeGallery()},w.prototype.getItems=function(){if(this.items=[],this.settings.dynamic)return this.settings.dynamicEl||[];if("this"===this.settings.selector)this.items.push(this.el);else if(this.settings.selector)if("string"==typeof this.settings.selector)if(this.settings.selectWithin){var t=x(this.settings.selectWithin);this.items=t.find(this.settings.selector).get()}else this.items=this.el.querySelectorAll(this.settings.selector);else this.items=this.settings.selector;else this.items=this.el.children;return A(this.items,this.settings.extraProps,this.settings.getCaptionFromTitleOrAlt,this.settings.exThumbImage)},w.prototype.shouldHideScrollbar=function(){return this.settings.hideScrollbar&&document.body===this.settings.container},w.prototype.hideScrollbar=function(){if(this.shouldHideScrollbar()){this.bodyPaddingRight=parseFloat(x("body").style().paddingRight);var t=document.documentElement.getBoundingClientRect(),e=window.innerWidth-t.width;x(document.body).css("padding-right",e+this.bodyPaddingRight+"px"),x(document.body).addClass("lg-overlay-open")}},w.prototype.resetScrollBar=function(){this.shouldHideScrollbar()&&(x(document.body).css("padding-right",this.bodyPaddingRight+"px"),x(document.body).removeClass("lg-overlay-open"))},w.prototype.openGallery=function(t,e){var i=this;if(void 0===t&&(t=this.settings.index),!this.lgOpened){this.lgOpened=!0,this.outer.removeClass("lg-hide-items"),this.hideScrollbar(),this.$container.addClass("lg-show");var s=this.getItemsToBeInsertedToDom(t,t);this.currentItemsInDom=s;var n="";s.forEach((function(t){n=n+''})),this.$inner.append(n),this.addHtml(t);var o="";this.mediaContainerPosition=this.getMediaContainerPosition();var r=this.mediaContainerPosition,d=r.top,g=r.bottom;this.settings.allowMediaOverlap||this.setMediaContainerPosition(d,g);var h=this.galleryItems[t].__slideVideoInfo;this.zoomFromOrigin&&e&&(this.currentImageSize=E(e,this.outer,d+g,h&&this.settings.videoMaxSize),o=O(e,this.outer,d,g,this.currentImageSize)),this.zoomFromOrigin&&o||(this.outer.addClass(this.settings.startClass),this.getSlideItem(t).removeClass("lg-complete"));var c=this.settings.zoomFromOrigin?100:this.settings.backdropDuration;setTimeout((function(){i.outer.addClass("lg-components-open")}),c),this.index=t,this.LGel.trigger(l),this.getSlideItem(t).addClass("lg-current"),this.lGalleryOn=!1,this.prevScrollTop=x(window).scrollTop(),setTimeout((function(){if(i.zoomFromOrigin&&o){var e=i.getSlideItem(t);e.css("transform",o),setTimeout((function(){e.addClass("lg-start-progress lg-start-end-progress").css("transition-duration",i.settings.startAnimationDuration+"ms"),i.outer.addClass("lg-zoom-from-image")})),setTimeout((function(){e.css("transform","translate3d(0, 0, 0)")}),100)}setTimeout((function(){i.$backdrop.addClass("in"),i.$container.addClass("lg-show-in")}),10),setTimeout((function(){i.settings.trapFocus&&document.body===i.settings.container&&i.trapFocus()}),i.settings.backdropDuration+50),i.zoomFromOrigin&&o||setTimeout((function(){i.outer.addClass("lg-visible")}),i.settings.backdropDuration),i.slide(t,!1,!1,!1),i.LGel.trigger(a)})),document.body===this.settings.container&&x("html").addClass("lg-on")}},w.prototype.getMediaContainerPosition=function(){if(this.settings.allowMediaOverlap)return{top:0,bottom:0};var t=this.$toolbar.get().clientHeight||0,e=this.outer.find(".lg-components .lg-sub-html").get(),i=this.settings.defaultCaptionHeight||e&&e.clientHeight||0,s=this.outer.find(".lg-thumb-outer").get();return{top:t,bottom:(s?s.clientHeight:0)+i}},w.prototype.setMediaContainerPosition=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.$content.css("top",t+"px").css("bottom",e+"px")},w.prototype.hideBars=function(){var t=this;setTimeout((function(){t.outer.removeClass("lg-hide-items"),t.settings.hideBarsDelay>0&&(t.outer.on("mousemove.lg click.lg touchstart.lg",(function(){t.outer.removeClass("lg-hide-items"),clearTimeout(t.hideBarTimeout),t.hideBarTimeout=setTimeout((function(){t.outer.addClass("lg-hide-items")}),t.settings.hideBarsDelay)})),t.outer.trigger("mousemove.lg"))}),this.settings.showBarsAfter)},w.prototype.initPictureFill=function(t){if(this.settings.supportLegacyBrowser)try{picturefill({elements:[t.get()]})}catch(t){console.warn("lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.")}},w.prototype.counter=function(){if(this.settings.counter){var t='\n '+(this.index+1)+' /\n '+this.galleryItems.length+" ";this.outer.find(this.settings.appendCounterTo).append(t)}},w.prototype.addHtml=function(t){var e,i;if(this.galleryItems[t].subHtmlUrl?i=this.galleryItems[t].subHtmlUrl:e=this.galleryItems[t].subHtml,!i)if(e){var s=e.substring(0,1);"."!==s&&"#"!==s||(e=this.settings.subHtmlSelectorRelative&&!this.settings.dynamic?x(this.items).eq(t).find(e).first().html():x(e).first().html())}else e="";if(".lg-item"!==this.settings.appendSubHtmlTo)i?T(i,this.outer.find(".lg-sub-html"),"replace"):this.outer.find(".lg-sub-html").html(e);else{var n=x(this.getSlideItemId(t));i?T(i,n,"append"):n.append(''+e+"")}null!=e&&(""===e?this.outer.find(this.settings.appendSubHtmlTo).addClass("lg-empty-html"):this.outer.find(this.settings.appendSubHtmlTo).removeClass("lg-empty-html")),this.LGel.trigger(r,{index:t})},w.prototype.preload=function(t){for(var e=1;e<=this.settings.preload&&!(e>=this.galleryItems.length-t);e++)this.loadContent(t+e,!1);for(var i=1;i<=this.settings.preload&&!(t-i<0);i++)this.loadContent(t-i,!1)},w.prototype.getDummyImgStyles=function(t){return t?"width:"+t.width+"px;\n margin-left: -"+t.width/2+"px;\n margin-top: -"+t.height/2+"px;\n height:"+t.height+"px":""},w.prototype.getVideoContStyle=function(t){return t?"width:"+t.width+"px;\n height:"+t.height+"px":""},w.prototype.getDummyImageContent=function(t,e,i){var s;if(this.settings.dynamic||(s=x(this.items).eq(e)),s){var n=void 0;if(!(n=this.settings.exThumbImage?s.attr(this.settings.exThumbImage):s.find("img").first().attr("src")))return"";var o=this.getDummyImgStyles(this.currentImageSize),r=document.createElement("img");return r.alt=i||"",r.src=n,r.className="lg-dummy-img",r.style.cssText=o,t.addClass("lg-first-slide"),this.outer.addClass("lg-first-slide-loading"),r}return""},w.prototype.setImgMarkup=function(t,e,i){var s=this.galleryItems[i],n=s.alt,o=s.srcset,r=s.sizes,l=s.sources,a="",d=n?'alt="'+n+'"':"";a=this.isFirstSlideWithZoomAnimation()?this.getDummyImageContent(e,i,d):D(i,t,d,o,r,l);var g=document.createElement("picture");g.className="lg-img-wrap",x(g).append(a),e.prepend(g)},w.prototype.onSlideObjectLoad=function(t,e,i,s){var n=t.find(".lg-object").first();M(n.get())||e?i():(n.on("load.lg error.lg",(function(){i&&i()})),n.on("error.lg",(function(){s&&s()})))},w.prototype.onLgObjectLoad=function(t,e,i,s,n,o){var r=this;this.onSlideObjectLoad(t,o,(function(){r.triggerSlideItemLoad(t,e,i,s,n)}),(function(){t.addClass("lg-complete lg-complete_"),t.html(''+r.settings.strings.mediaLoadingFailed+"")}))},w.prototype.triggerSlideItemLoad=function(t,e,i,s,n){var o=this,r=this.galleryItems[e],l=n&&"video"===this.getSlideType(r)&&!r.poster?s:0;setTimeout((function(){t.addClass("lg-complete lg-complete_"),o.LGel.trigger(d,{index:e,delay:i||0,isFirstSlide:n})}),l)},w.prototype.isFirstSlideWithZoomAnimation=function(){return!(this.lGalleryOn||!this.zoomFromOrigin||!this.currentImageSize)},w.prototype.addSlideVideoInfo=function(t){var e=this;t.forEach((function(t,i){t.__slideVideoInfo=P(t.src,!!t.video,i),t.__slideVideoInfo&&e.settings.loadYouTubePoster&&!t.poster&&t.__slideVideoInfo.youtube&&(t.poster="//img.youtube.com/vi/"+t.__slideVideoInfo.youtube[1]+"/maxresdefault.jpg")}))},w.prototype.loadContent=function(t,i){var n=this,o=this.galleryItems[t],r=x(this.getSlideItemId(t)),l=o.poster,a=o.srcset,d=o.sizes,g=o.sources,h=o.src,c=o.video,u=c&&"string"==typeof c?JSON.parse(c):c;if(o.responsive){var m=o.responsive.split(",");h=z(m)||h}var p=o.__slideVideoInfo,f="",y=!!o.iframe,v=!this.lGalleryOn,b=0;if(v&&(b=this.zoomFromOrigin&&this.currentImageSize?this.settings.startAnimationDuration+10:this.settings.backdropDuration+10),!r.hasClass("lg-loaded")){if(p){var C=this.mediaContainerPosition,I=C.top,w=C.bottom,S=E(this.items[t],this.outer,I+w,p&&this.settings.videoMaxSize);f=this.getVideoContStyle(S)}if(y){var T=L(this.settings.iframeWidth,this.settings.iframeHeight,this.settings.iframeMaxWidth,this.settings.iframeMaxHeight,h,o.iframeTitle);r.prepend(T)}else if(l){var O="";v&&this.zoomFromOrigin&&this.currentImageSize&&(O=this.getDummyImageContent(r,t,""));T=G(l,O||"",f,this.settings.strings.playVideo,p);r.prepend(T)}else if(p){T='';r.prepend(T)}else if(this.setImgMarkup(h,r,t),a||g){var M=r.find(".lg-object");this.initPictureFill(M)}(l||p)&&this.LGel.trigger(s,{index:t,src:h,html5Video:u,hasPoster:!!l}),this.LGel.trigger(e,{index:t}),this.lGalleryOn&&".lg-item"===this.settings.appendSubHtmlTo&&this.addHtml(t)}var k=0;b&&!x(document.body).hasClass("lg-from-hash")&&(k=b),this.isFirstSlideWithZoomAnimation()&&(setTimeout((function(){r.removeClass("lg-start-end-progress lg-start-progress").removeAttr("style")}),this.settings.startAnimationDuration+100),r.hasClass("lg-loaded")||setTimeout((function(){if("image"===n.getSlideType(o)){var e=o.alt,i=e?'alt="'+e+'"':"";if(r.find(".lg-img-wrap").append(D(t,h,i,a,d,o.sources)),a||g){var s=r.find(".lg-object");n.initPictureFill(s)}}("image"===n.getSlideType(o)||"video"===n.getSlideType(o)&&l)&&(n.onLgObjectLoad(r,t,b,k,!0,!1),n.onSlideObjectLoad(r,!(!p||!p.html5||l),(function(){n.loadContentOnFirstSlideLoad(t,r,k)}),(function(){n.loadContentOnFirstSlideLoad(t,r,k)})))}),this.settings.startAnimationDuration+100)),r.addClass("lg-loaded"),this.isFirstSlideWithZoomAnimation()&&("video"!==this.getSlideType(o)||l)||this.onLgObjectLoad(r,t,b,k,v,!(!p||!p.html5||l)),this.zoomFromOrigin&&this.currentImageSize||!r.hasClass("lg-complete_")||this.lGalleryOn||setTimeout((function(){r.addClass("lg-complete")}),this.settings.backdropDuration),this.lGalleryOn=!0,!0===i&&(r.hasClass("lg-complete_")?this.preload(t):r.find(".lg-object").first().on("load.lg error.lg",(function(){n.preload(t)})))},w.prototype.loadContentOnFirstSlideLoad=function(t,e,i){var s=this;setTimeout((function(){e.find(".lg-dummy-img").remove(),e.removeClass("lg-first-slide"),s.outer.removeClass("lg-first-slide-loading"),s.isDummyImageRemoved=!0,s.preload(t)}),i+300)},w.prototype.getItemsToBeInsertedToDom=function(t,e,i){var s=this;void 0===i&&(i=0);var n=[],o=Math.max(i,3);o=Math.min(o,this.galleryItems.length);var r="lg-item-"+this.lgId+"-"+e;if(this.galleryItems.length<=3)return this.galleryItems.forEach((function(t,e){n.push("lg-item-"+s.lgId+"-"+e)})),n;if(t<(this.galleryItems.length-1)/2){for(var l=t;l>t-o/2&&l>=0;l--)n.push("lg-item-"+this.lgId+"-"+l);var a=n.length;for(l=0;l')})),this.currentItemsInDom.forEach((function(t){-1===s.indexOf(t)&&x("#"+t).remove()})),s},w.prototype.getPreviousSlideIndex=function(){var t=0;try{var e=this.outer.find(".lg-current").first().attr("id");t=parseInt(e.split("-")[3])||0}catch(e){t=0}return t},w.prototype.setDownloadValue=function(t){if(this.settings.download){var e=this.galleryItems[t];if(!1===e.downloadUrl||"false"===e.downloadUrl)this.outer.addClass("lg-hide-download");else{var i=this.getElementById("lg-download");this.outer.removeClass("lg-hide-download"),i.attr("href",e.downloadUrl||e.src),e.download&&i.attr("download",e.download)}}},w.prototype.makeSlideAnimation=function(t,e,i){var s=this;this.lGalleryOn&&i.addClass("lg-slide-progress"),setTimeout((function(){s.outer.addClass("lg-no-trans"),s.outer.find(".lg-item").removeClass("lg-prev-slide lg-next-slide"),"prev"===t?(e.addClass("lg-prev-slide"),i.addClass("lg-next-slide")):(e.addClass("lg-next-slide"),i.addClass("lg-prev-slide")),setTimeout((function(){s.outer.find(".lg-item").removeClass("lg-current"),e.addClass("lg-current"),s.outer.removeClass("lg-no-trans")}),50)}),this.lGalleryOn?this.settings.slideDelay:0)},w.prototype.slide=function(t,e,i,s){var n=this,o=this.getPreviousSlideIndex();if(this.currentItemsInDom=this.organizeSlideItems(t,o),!this.lGalleryOn||o!==t){var r=this.galleryItems.length;if(!this.lgBusy){this.settings.counter&&this.updateCurrentCounter(t);var l=this.getSlideItem(t),a=this.getSlideItem(o),d=this.galleryItems[t],c=d.__slideVideoInfo;if(this.outer.attr("data-lg-slide-type",this.getSlideType(d)),this.setDownloadValue(t),c){var u=this.mediaContainerPosition,m=u.top,p=u.bottom,f=E(this.items[t],this.outer,m+p,c&&this.settings.videoMaxSize);this.resizeVideoSlide(t,f)}if(this.LGel.trigger(g,{prevIndex:o,index:t,fromTouch:!!e,fromThumb:!!i}),this.lgBusy=!0,clearTimeout(this.hideBarTimeout),this.arrowDisable(t),s||(to&&(s="next")),e){this.outer.find(".lg-item").removeClass("lg-prev-slide lg-current lg-next-slide");var y=void 0,v=void 0;r>2?(y=t-1,v=t+1,(0===t&&o===r-1||t===r-1&&0===o)&&(v=0,y=r-1)):(y=0,v=1),"prev"===s?this.getSlideItem(v).addClass("lg-next-slide"):this.getSlideItem(y).addClass("lg-prev-slide"),l.addClass("lg-current")}else this.makeSlideAnimation(s,l,a);this.lGalleryOn?setTimeout((function(){n.loadContent(t,!0),".lg-item"!==n.settings.appendSubHtmlTo&&n.addHtml(t)}),this.settings.speed+50+(e?0:this.settings.slideDelay)):this.loadContent(t,!0),setTimeout((function(){n.lgBusy=!1,a.removeClass("lg-slide-progress"),n.LGel.trigger(h,{prevIndex:o,index:t,fromTouch:e,fromThumb:i})}),(this.lGalleryOn?this.settings.speed+100:100)+(e?0:this.settings.slideDelay))}this.index=t}},w.prototype.updateCurrentCounter=function(t){this.getElementById("lg-counter-current").html(t+1+"")},w.prototype.updateCounterTotal=function(){this.getElementById("lg-counter-all").html(this.galleryItems.length+"")},w.prototype.getSlideType=function(t){return t.__slideVideoInfo?"video":t.iframe?"iframe":"image"},w.prototype.touchMove=function(t,e,i){var s=e.pageX-t.pageX,n=e.pageY-t.pageY,o=!1;if(this.swipeDirection?o=!0:Math.abs(s)>15?(this.swipeDirection="horizontal",o=!0):Math.abs(n)>15&&(this.swipeDirection="vertical",o=!0),o){var r=this.getSlideItem(this.index);if("horizontal"===this.swipeDirection){null==i||i.preventDefault(),this.outer.addClass("lg-dragging"),this.setTranslate(r,s,0);var l=r.get().offsetWidth,a=15*l/100-Math.abs(10*s/100);this.setTranslate(this.outer.find(".lg-prev-slide").first(),-l+s-a,0),this.setTranslate(this.outer.find(".lg-next-slide").first(),l+s+a,0)}else if("vertical"===this.swipeDirection&&this.settings.swipeToClose){null==i||i.preventDefault(),this.$container.addClass("lg-dragging-vertical");var d=1-Math.abs(n)/window.innerHeight;this.$backdrop.css("opacity",d);var g=1-Math.abs(n)/(2*window.innerWidth);this.setTranslate(r,0,n,g,g),Math.abs(n)>100&&this.outer.addClass("lg-hide-items").removeClass("lg-components-open")}}},w.prototype.touchEnd=function(t,e,i){var s,n=this;"lg-slide"!==this.settings.mode&&this.outer.addClass("lg-slide"),setTimeout((function(){n.$container.removeClass("lg-dragging-vertical"),n.outer.removeClass("lg-dragging lg-hide-items").addClass("lg-components-open");var o=!0;if("horizontal"===n.swipeDirection){s=t.pageX-e.pageX;var r=Math.abs(t.pageX-e.pageX);s<0&&r>n.settings.swipeThreshold?(n.goToNextSlide(!0),o=!1):s>0&&r>n.settings.swipeThreshold&&(n.goToPrevSlide(!0),o=!1)}else if("vertical"===n.swipeDirection){if(s=Math.abs(t.pageY-e.pageY),n.settings.closable&&n.settings.swipeToClose&&s>100)return void n.closeGallery();n.$backdrop.css("opacity",1)}if(n.outer.find(".lg-item").removeAttr("style"),o&&Math.abs(t.pageX-e.pageX)<5){var l=x(i.target);n.isPosterElement(l)&&n.LGel.trigger(c)}n.swipeDirection=void 0})),setTimeout((function(){n.outer.hasClass("lg-dragging")||"lg-slide"===n.settings.mode||n.outer.removeClass("lg-slide")}),this.settings.speed+100)},w.prototype.enableSwipe=function(){var t=this,e={},i={},s=!1,n=!1;this.settings.enableSwipe&&(this.$inner.on("touchstart.lg",(function(i){t.dragOrSwipeEnabled=!0;var s=t.getSlideItem(t.index);!x(i.target).hasClass("lg-item")&&!s.get().contains(i.target)||t.outer.hasClass("lg-zoomed")||t.lgBusy||1!==i.touches.length||(n=!0,t.touchAction="swipe",t.manageSwipeClass(),e={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY})})),this.$inner.on("touchmove.lg",(function(o){n&&"swipe"===t.touchAction&&1===o.touches.length&&(i={pageX:o.touches[0].pageX,pageY:o.touches[0].pageY},t.touchMove(e,i,o),s=!0)})),this.$inner.on("touchend.lg",(function(o){if("swipe"===t.touchAction){if(s)s=!1,t.touchEnd(i,e,o);else if(n){var r=x(o.target);t.isPosterElement(r)&&t.LGel.trigger(c)}t.touchAction=void 0,n=!1}})))},w.prototype.enableDrag=function(){var t=this,e={},i={},s=!1,n=!1;this.settings.enableDrag&&(this.outer.on("mousedown.lg",(function(i){t.dragOrSwipeEnabled=!0;var n=t.getSlideItem(t.index);(x(i.target).hasClass("lg-item")||n.get().contains(i.target))&&(t.outer.hasClass("lg-zoomed")||t.lgBusy||(i.preventDefault(),t.lgBusy||(t.manageSwipeClass(),e={pageX:i.pageX,pageY:i.pageY},s=!0,t.outer.get().scrollLeft+=1,t.outer.get().scrollLeft-=1,t.outer.removeClass("lg-grab").addClass("lg-grabbing"),t.LGel.trigger(u))))})),x(window).on("mousemove.lg.global"+this.lgId,(function(o){s&&t.lgOpened&&(n=!0,i={pageX:o.pageX,pageY:o.pageY},t.touchMove(e,i),t.LGel.trigger(m))})),x(window).on("mouseup.lg.global"+this.lgId,(function(o){if(t.lgOpened){var r=x(o.target);n?(n=!1,t.touchEnd(i,e,o),t.LGel.trigger(p)):t.isPosterElement(r)&&t.LGel.trigger(c),s&&(s=!1,t.outer.removeClass("lg-grabbing").addClass("lg-grab"))}})))},w.prototype.triggerPosterClick=function(){var t=this;this.$inner.on("click.lg",(function(e){!t.dragOrSwipeEnabled&&t.isPosterElement(x(e.target))&&t.LGel.trigger(c)}))},w.prototype.manageSwipeClass=function(){var t=this.index+1,e=this.index-1;this.settings.loop&&this.galleryItems.length>2&&(0===this.index?e=this.galleryItems.length-1:this.index===this.galleryItems.length-1&&(t=0)),this.outer.find(".lg-item").removeClass("lg-next-slide lg-prev-slide"),e>-1&&this.getSlideItem(e).addClass("lg-prev-slide"),this.getSlideItem(t).addClass("lg-next-slide")},w.prototype.goToNextSlide=function(t){var e=this,i=this.settings.loop;t&&this.galleryItems.length<3&&(i=!1),this.lgBusy||(this.index+10?(this.index--,this.LGel.trigger(y,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):i?(this.index=this.galleryItems.length-1,this.LGel.trigger(y,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-left-end"),setTimeout((function(){e.outer.removeClass("lg-left-end")}),400)))},w.prototype.keyPress=function(){var t=this;x(window).on("keydown.lg.global"+this.lgId,(function(e){t.lgOpened&&!0===t.settings.escKey&&27===e.keyCode&&(e.preventDefault(),t.settings.allowMediaOverlap&&t.outer.hasClass("lg-can-toggle")&&t.outer.hasClass("lg-components-open")?t.outer.removeClass("lg-components-open"):t.closeGallery()),t.lgOpened&&t.galleryItems.length>1&&(37===e.keyCode&&(e.preventDefault(),t.goToPrevSlide()),39===e.keyCode&&(e.preventDefault(),t.goToNextSlide()))}))},w.prototype.arrow=function(){var t=this;this.getElementById("lg-prev").on("click.lg",(function(){t.goToPrevSlide()})),this.getElementById("lg-next").on("click.lg",(function(){t.goToNextSlide()}))},w.prototype.arrowDisable=function(t){if(!this.settings.loop&&this.settings.hideControlOnEnd){var e=this.getElementById("lg-prev"),i=this.getElementById("lg-next");t+1===this.galleryItems.length?i.attr("disabled","disabled").addClass("disabled"):i.removeAttr("disabled").removeClass("disabled"),0===t?e.attr("disabled","disabled").addClass("disabled"):e.removeAttr("disabled").removeClass("disabled")}},w.prototype.setTranslate=function(t,e,i,s,n){void 0===s&&(s=1),void 0===n&&(n=1),t.css("transform","translate3d("+e+"px, "+i+"px, 0px) scale3d("+s+", "+n+", 1)")},w.prototype.mousewheel=function(){var t=this,e=0;this.outer.on("wheel.lg",(function(i){if(i.deltaY&&!(t.galleryItems.length<2)){i.preventDefault();var s=(new Date).getTime();s-e<1e3||(e=s,i.deltaY>0?t.goToNextSlide():i.deltaY<0&&t.goToPrevSlide())}}))},w.prototype.isSlideElement=function(t){return t.hasClass("lg-outer")||t.hasClass("lg-item")||t.hasClass("lg-img-wrap")||t.hasClass("lg-img-rotate")},w.prototype.isPosterElement=function(t){var e=this.getSlideItem(this.index).find(".lg-video-play-button").get();return t.hasClass("lg-video-poster")||t.hasClass("lg-video-play-button")||e&&e.contains(t.get())},w.prototype.toggleMaximize=function(){var t=this;this.getElementById("lg-maximize").on("click.lg",(function(){t.$container.toggleClass("lg-inline"),t.refreshOnResize()}))},w.prototype.invalidateItems=function(){for(var t=0;t { + + const dynamicEl = [ + { + src: '...', + responsive: '...', + thumb: '...', + subHtml: `...`, + }, + { + src: '...', + responsive: '...', + subHtml: `...`, + }, + // Add more placeholder images as needed + ]; + + return ( + <> + + > + ); +}; \ No newline at end of file diff --git a/blocks/lcp-gallery/components/style.css b/blocks/lcp-gallery/components/style.css new file mode 100644 index 0000000..ebd16ca --- /dev/null +++ b/blocks/lcp-gallery/components/style.css @@ -0,0 +1,668 @@ +@font-face { + font-family: "lg"; + src: url("../fonts/lg.woff2?io9a6k") format("woff2"), url("../fonts/lg.ttf?io9a6k") format("truetype"), url("../fonts/lg.woff?io9a6k") format("woff"), url("../fonts/lg.svg?io9a6k#lg") format("svg"); + font-weight: normal; + font-style: normal; + font-display: block; + } + .lg-icon { + /* use !important to prevent issues with browser extensions that change fonts */ + font-family: "lg" !important; + speak: never; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + + .lg-container { + font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + } + + .lg-next, + .lg-prev { + background-color: rgba(0, 0, 0, 0.45); + border-radius: 2px; + color: #999; + cursor: pointer; + display: block; + font-size: 22px; + margin-top: -10px; + padding: 8px 10px 9px; + position: absolute; + top: 50%; + z-index: 1084; + outline: none; + border: none; + } + .lg-next.disabled, + .lg-prev.disabled { + opacity: 0 !important; + cursor: default; + } + .lg-next:hover:not(.disabled), + .lg-prev:hover:not(.disabled) { + color: #fff; + } + .lg-single-item .lg-next, + .lg-single-item .lg-prev { + display: none; + } + + .lg-next { + right: 20px; + } + .lg-next:before { + content: "\e095"; + } + + .lg-prev { + left: 20px; + } + .lg-prev:after { + content: "\e094"; + } + + @-webkit-keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } + } + @-moz-keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } + } + @-ms-keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } + } + @keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } + } + @-webkit-keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } + } + @-moz-keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } + } + @-ms-keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } + } + @keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } + } + .lg-outer.lg-right-end .lg-object { + -webkit-animation: lg-right-end 0.3s; + -o-animation: lg-right-end 0.3s; + animation: lg-right-end 0.3s; + position: relative; + } + .lg-outer.lg-left-end .lg-object { + -webkit-animation: lg-left-end 0.3s; + -o-animation: lg-left-end 0.3s; + animation: lg-left-end 0.3s; + position: relative; + } + + .lg-toolbar { + z-index: 1082; + left: 0; + position: absolute; + top: 0; + width: 100%; + } + .lg-media-overlap .lg-toolbar { + background-image: linear-gradient(0deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4)); + } + .lg-toolbar .lg-icon { + color: #999; + cursor: pointer; + float: right; + font-size: 24px; + height: 47px; + line-height: 27px; + padding: 10px 0; + text-align: center; + width: 50px; + text-decoration: none !important; + outline: medium none; + will-change: color; + -webkit-transition: color 0.2s linear; + -o-transition: color 0.2s linear; + transition: color 0.2s linear; + background: none; + border: none; + box-shadow: none; + } + .lg-toolbar .lg-icon.lg-icon-18 { + font-size: 18px; + } + .lg-toolbar .lg-icon:hover { + color: #fff; + } + .lg-toolbar .lg-close:after { + content: "\e070"; + } + .lg-toolbar .lg-maximize { + font-size: 22px; + } + .lg-toolbar .lg-maximize:after { + content: "\e90a"; + } + .lg-toolbar .lg-download:after { + content: "\e0f2"; + } + + .lg-sub-html { + color: #eee; + font-size: 16px; + padding: 10px 40px; + text-align: center; + z-index: 1080; + opacity: 0; + -webkit-transition: opacity 0.2s ease-out 0s; + -o-transition: opacity 0.2s ease-out 0s; + transition: opacity 0.2s ease-out 0s; + } + .lg-sub-html h4 { + margin: 0; + font-size: 13px; + font-weight: bold; + } + .lg-sub-html p { + font-size: 12px; + margin: 5px 0 0; + } + .lg-sub-html a { + color: inherit; + } + .lg-sub-html a:hover { + text-decoration: underline; + } + .lg-media-overlap .lg-sub-html { + background-image: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)); + } + .lg-item .lg-sub-html { + position: absolute; + bottom: 0; + right: 0; + left: 0; + } + + .lg-error-msg { + font-size: 14px; + color: #999; + } + + .lg-counter { + color: #999; + display: inline-block; + font-size: 16px; + padding-left: 20px; + padding-top: 12px; + height: 47px; + vertical-align: middle; + } + + .lg-closing .lg-toolbar, + .lg-closing .lg-prev, + .lg-closing .lg-next, + .lg-closing .lg-sub-html { + opacity: 0; + -webkit-transition: -webkit-transform 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, color 0.08 linear; + -moz-transition: -moz-transform 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, color 0.08 linear; + -o-transition: -o-transform 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, color 0.08 linear; + transition: transform 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, color 0.08 linear; + } + + body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable) .lg-img-wrap, + body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable) .lg-video-cont, + body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable) .lg-media-cont { + opacity: 0; + -moz-transform: scale3d(0.5, 0.5, 0.5); + -o-transform: scale3d(0.5, 0.5, 0.5); + -ms-transform: scale3d(0.5, 0.5, 0.5); + -webkit-transform: scale3d(0.5, 0.5, 0.5); + transform: scale3d(0.5, 0.5, 0.5); + will-change: transform, opacity; + -webkit-transition: -webkit-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; + -moz-transition: -moz-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; + -o-transition: -o-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; + transition: transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; + } + body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable).lg-complete .lg-img-wrap, + body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable).lg-complete .lg-video-cont, + body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable).lg-complete .lg-media-cont { + opacity: 1; + -moz-transform: scale3d(1, 1, 1); + -o-transform: scale3d(1, 1, 1); + -ms-transform: scale3d(1, 1, 1); + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } + + .lg-icon:focus-visible { + color: #fff; + border-radius: 3px; + outline: 1px dashed rgba(255, 255, 255, 0.6); + } + + .lg-toolbar .lg-icon:focus-visible { + border-radius: 8px; + outline-offset: -5px; + } + + .lg-group:after { + content: ""; + display: table; + clear: both; + } + + .lg-container { + display: none; + outline: none; + } + .lg-container.lg-show { + display: block; + } + + .lg-on { + scroll-behavior: unset; + } + + .lg-overlay-open { + overflow: hidden; + } + + .lg-toolbar, + .lg-prev, + .lg-next, + .lg-pager-outer, + .lg-hide-sub-html .lg-sub-html { + opacity: 0; + will-change: transform, opacity; + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + } + + .lg-show-in .lg-toolbar, + .lg-show-in .lg-prev, + .lg-show-in .lg-next, + .lg-show-in .lg-pager-outer { + opacity: 1; + } + .lg-show-in.lg-hide-sub-html .lg-sub-html { + opacity: 1; + } + .lg-show-in .lg-hide-items .lg-prev { + opacity: 0; + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); + } + .lg-show-in .lg-hide-items .lg-next { + opacity: 0; + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); + } + .lg-show-in .lg-hide-items .lg-toolbar { + opacity: 0; + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0); + } + .lg-show-in .lg-hide-items.lg-hide-sub-html .lg-sub-html { + opacity: 0; + -webkit-transform: translate3d(0, 20px, 0); + transform: translate3d(0, 20px, 0); + } + + .lg-outer { + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + z-index: 1050; + text-align: left; + opacity: 0.001; + outline: none; + will-change: auto; + overflow: hidden; + -webkit-transition: opacity 0.15s ease 0s; + -o-transition: opacity 0.15s ease 0s; + transition: opacity 0.15s ease 0s; + } + .lg-outer * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .lg-outer.lg-zoom-from-image { + opacity: 1; + } + .lg-outer.lg-visible { + opacity: 1; + } + .lg-outer.lg-css3 .lg-item:not(.lg-start-end-progress).lg-prev-slide, .lg-outer.lg-css3 .lg-item:not(.lg-start-end-progress).lg-next-slide, .lg-outer.lg-css3 .lg-item:not(.lg-start-end-progress).lg-current { + -webkit-transition-duration: inherit !important; + transition-duration: inherit !important; + -webkit-transition-timing-function: inherit !important; + transition-timing-function: inherit !important; + } + .lg-outer.lg-css3.lg-dragging .lg-item.lg-prev-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-next-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-current { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; + opacity: 1; + } + .lg-outer.lg-grab img.lg-object { + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: -o-grab; + cursor: -ms-grab; + cursor: grab; + } + .lg-outer.lg-grabbing img.lg-object { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: -o-grabbing; + cursor: -ms-grabbing; + cursor: grabbing; + } + .lg-outer .lg-content { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + } + .lg-outer .lg-inner { + width: 100%; + position: absolute; + left: 0; + top: 0; + bottom: 0; + -webkit-transition: opacity 0s; + -o-transition: opacity 0s; + transition: opacity 0s; + white-space: nowrap; + } + .lg-outer .lg-item { + display: none !important; + } + .lg-outer .lg-item:not(.lg-start-end-progress) { + background: url("../images/loading.gif") no-repeat scroll center center transparent; + } + .lg-outer.lg-css3 .lg-prev-slide, + .lg-outer.lg-css3 .lg-current, + .lg-outer.lg-css3 .lg-next-slide { + display: inline-block !important; + } + .lg-outer.lg-css .lg-current { + display: inline-block !important; + } + .lg-outer .lg-item, + .lg-outer .lg-img-wrap { + display: inline-block; + text-align: center; + position: absolute; + width: 100%; + height: 100%; + } + .lg-outer .lg-item:before, + .lg-outer .lg-img-wrap:before { + content: ""; + display: inline-block; + height: 100%; + vertical-align: middle; + } + .lg-outer .lg-img-wrap { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + white-space: nowrap; + font-size: 0; + } + .lg-outer .lg-item.lg-complete { + background-image: none; + } + .lg-outer .lg-item.lg-current { + z-index: 1060; + } + .lg-outer .lg-object { + display: inline-block; + vertical-align: middle; + max-width: 100%; + max-height: 100%; + width: auto; + height: auto; + position: relative; + } + .lg-outer .lg-empty-html.lg-sub-html, + .lg-outer .lg-empty-html .lg-sub-html { + display: none; + } + .lg-outer.lg-hide-download .lg-download { + opacity: 0.75; + pointer-events: none; + } + .lg-outer .lg-first-slide .lg-dummy-img { + position: absolute; + top: 50%; + left: 50%; + } + .lg-outer.lg-components-open:not(.lg-zoomed) .lg-components { + -webkit-transform: translate3d(0, 0%, 0); + transform: translate3d(0, 0%, 0); + opacity: 1; + } + .lg-outer.lg-components-open:not(.lg-zoomed) .lg-sub-html { + opacity: 1; + transition: opacity 0.2s ease-out 0.15s; + } + .lg-outer .lg-media-cont { + text-align: center; + display: inline-block; + vertical-align: middle; + position: relative; + } + .lg-outer .lg-media-cont .lg-object { + width: 100% !important; + height: 100% !important; + } + .lg-outer .lg-has-iframe .lg-media-cont { + -webkit-overflow-scrolling: touch; + overflow: auto; + } + + .lg-backdrop { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 1040; + background-color: #000; + opacity: 0; + will-change: auto; + -webkit-transition: opacity 333ms ease-in 0s; + -o-transition: opacity 333ms ease-in 0s; + transition: opacity 333ms ease-in 0s; + } + .lg-backdrop.in { + opacity: 1; + } + + .lg-css3.lg-no-trans .lg-prev-slide, + .lg-css3.lg-no-trans .lg-next-slide, + .lg-css3.lg-no-trans .lg-current { + -webkit-transition: none 0s ease 0s !important; + -moz-transition: none 0s ease 0s !important; + -o-transition: none 0s ease 0s !important; + transition: none 0s ease 0s !important; + } + .lg-css3.lg-use-css3 .lg-item { + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; + } + .lg-css3.lg-fade .lg-item { + opacity: 0; + } + .lg-css3.lg-fade .lg-item.lg-current { + opacity: 1; + } + .lg-css3.lg-fade .lg-item.lg-prev-slide, .lg-css3.lg-fade .lg-item.lg-next-slide, .lg-css3.lg-fade .lg-item.lg-current { + -webkit-transition: opacity 0.1s ease 0s; + -moz-transition: opacity 0.1s ease 0s; + -o-transition: opacity 0.1s ease 0s; + transition: opacity 0.1s ease 0s; + } + .lg-css3.lg-use-css3 .lg-item.lg-start-progress { + -webkit-transition: -webkit-transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s; + -o-transition: -o-transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s; + transition: transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s; + } + .lg-css3.lg-use-css3 .lg-item.lg-start-end-progress { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s; + } + .lg-css3.lg-slide.lg-use-css3 .lg-item { + opacity: 0; + } + .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide { + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + } + .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide { + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } + .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1; + } + .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + } + + .lg-container { + display: none; + } + .lg-container.lg-show { + display: block; + } + .lg-container.lg-dragging-vertical .lg-backdrop { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; + } + .lg-container.lg-dragging-vertical .lg-css3 .lg-item.lg-current { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; + opacity: 1; + } + + .lg-inline .lg-backdrop, + .lg-inline .lg-outer { + position: absolute; + } + .lg-inline .lg-backdrop { + z-index: 1; + } + .lg-inline .lg-outer { + z-index: 2; + } + .lg-inline .lg-maximize:after { + content: "\e909"; + } + + .lg-components { + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + will-change: transform; + -webkit-transition: -webkit-transform 0.35s ease-out 0s; + -moz-transition: -moz-transform 0.35s ease-out 0s; + -o-transition: -o-transform 0.35s ease-out 0s; + transition: transform 0.35s ease-out 0s; + z-index: 1080; + position: absolute; + bottom: 0; + right: 0; + left: 0; + } + + /*# sourceMappingURL=lightgallery.css.map */ \ No newline at end of file diff --git a/blocks/lcp-gallery/lcp-gallery.php b/blocks/lcp-gallery/lcp-gallery.php new file mode 100644 index 0000000..fddd3c7 --- /dev/null +++ b/blocks/lcp-gallery/lcp-gallery.php @@ -0,0 +1,549 @@ +?'; + $all_chars = $lowercase . $uppercase . $numbers . $special_chars; + + // Default to using all characters if no specific types are provided + if (empty($include_character_types)) { + $include_character_types = 'all'; + } + + // Build the allowed character set + $char_set = ''; + + if ($include_character_types === 'all') { + // Include everything + $char_set = $all_chars; + } else { + // Add specific types requested + if (strpos($include_character_types, 'lowercase') !== false) { + $char_set .= $lowercase; + } + if (strpos($include_character_types, 'uppercase') !== false) { + $char_set .= $uppercase; + } + if (strpos($include_character_types, 'numbers') !== false) { + $char_set .= $numbers; + } + if (strpos($include_character_types, 'special') !== false) { + $char_set .= $special_chars; + } + } + + // Ensure that the string is valid for CSS (starts with a letter and can only include letters, digits, hyphens, or underscores) + $css_char_set = $lowercase . $uppercase . $numbers . '-_'; + + // Random string generation logic + $random_string = ''; + $first_char = ''; + + // If CSS compliant, start with a letter (either lowercase or uppercase) + if ($css_compliant) { + // Ensure the first character is a letter (CSS compliant start) + $first_char = $lowercase[rand(0, strlen($lowercase) - 1)]; + $random_string .= $first_char; + $length--; // Decrease length by 1 as we already added the first char + } + + // Fill the rest of the string with random characters from the valid set (CSS compliant) + for ($i = 0; $i < $length; $i++) { + // Use only characters that are CSS compliant (letters, digits, hyphens, or underscores) + $random_string .= $css_char_set[rand(0, strlen($css_char_set) - 1)]; + } + + // Return the string + return $random_string; + } +} + +// Return an array of Media IDs +function get_media_ids($attributes) { + // Ensure 'galleryItems' exists in the attributes array + if (isset($attributes['galleryItems']) && $attributes['source'] == "manual") { + // Extract 'id' from each item in the 'galleryItems' array + $media_ids = array_map(function($item) { + return $item['id']; // Return the 'id' value from each array item + }, $attributes['galleryItems']); // Use $attributes['galleryItems'] here + // Check if we need to include the post thumbnail + if ($attributes['includePostThumbnail']) { + // Get the featured image (post thumbnail) ID + $featured_media_id = get_post_thumbnail_id(get_the_ID()); + if ($featured_media_id) { + // Add the featured media ID to the beginning of the array + array_unshift($media_ids, $featured_media_id); + } + } + // Return the array of media IDs + return $media_ids; + } + // Return an empty array if 'galleryItems' doesn't exist or 'source' is not 'manual' + return []; +} + + +//Get the gallery items from the media IDs +function get_gallery_items_data($media_ids) { + $gallery_items = array(); + + // Loop through each media ID + foreach ($media_ids as $media_id) { + // Get the full-size image URL + $image_url = wp_get_attachment_url($media_id); + + // Get the attachment metadata, including available image sizes + $metadata = wp_get_attachment_metadata($media_id); + + // Initialize the `data-lg-size` and `data-responsive` attributes + $lg_size = ''; + $responsive_data = ''; + + // Check if metadata exists and extract image sizes + if (isset($metadata['sizes'])) { + // Loop through the sizes and build the data-lg-size and data-responsive attributes + foreach ($metadata['sizes'] as $size_name => $size_info) { + // data-lg-size format: width-height-width (for each image size) + $lg_size .= $size_info['width'] . '-' . $size_info['height'] . '-'. $size_info['width'] . ', '; + + // Get the URL of the size's image for data-responsive + $file_url = wp_get_attachment_image_url($media_id, $size_name); // Get the URL of the size's image + + // Add the image URL and width to the data-responsive string + if ($file_url) { + $responsive_data .= $file_url . ' ' . $size_info['width'] . ', '; + } + } + + // Clean up trailing commas and spaces + $lg_size = rtrim($lg_size, ', '); + $responsive_data = rtrim($responsive_data, ', '); + } + + // Get the caption from the media's post (if available) + $caption = get_post_field('post_excerpt', $media_id); // Retrieves the caption (if set) + + // Get the alt text from the media's metadata (if available) + $alt_text = get_post_meta($media_id, '_wp_attachment_image_alt', true); + + // Use a fallback for alt text if it's empty + if (empty($alt_text)) { + $alt_text = 'No alt text available'; + } + + // Add the gallery item to the array + $gallery_items[] = array( + 'src' => esc_url($image_url), // Full-size image URL + 'responsive' => esc_attr($responsive_data), // Responsive srcset + 'thumb' => wp_get_attachment_image_url($media_id, 'thumbnail'), // Thumbnail URL + 'medium' => wp_get_attachment_image_url($media_id, 'medium'), // Medium URL + 'subHtml' => !empty($caption) ? + '' . esc_html($caption) . '' : + '' . esc_html($alt_text) . '', + 'lg_size' => $lg_size, // The data-lg-size string + 'responsive_data' => $responsive_data, // The data-responsive string + 'size' => 'full' // Added size attribute for better responsive handling + ); + } + + // Return the array of gallery items + return $gallery_items; +} + +// Build the HTML for the gallery items +function build_gallery_items_html($gallery_items_data, $attributes) { + // Initialize an empty string for the HTML output + $html = ''; + + // If the gallery is set to render dynamically, limit the number of items if applicable + // otherwise, return all items + if ($attributes['dynamic']) { + // Get the value of 'maxInitialItems' from attributes, default to 0 if not set + $max_initial_items = isset($attributes['maxInitialItems']) ? (int) $attributes['maxInitialItems'] : 0; + // Limit the number of gallery items based on maxInitialItems + if ($max_initial_items > 0) { + // Slice the array to only include the first $max_initial_items items + $gallery_items_data = array_slice($gallery_items_data, 0, $max_initial_items); + } + } + + // Loop through each gallery item and create the HTML + foreach ($gallery_items_data as $item) { + $src = $item['src']; + $thumb = $item['thumb']; + $medium = $item['medium']; + $sub_html = $item['subHtml']; + $lg_size = $item['lg_size']; // Fetch the lg_size data for the current item + $responsive = $item['responsive_data']; // Fetch the responsive data (URLs + widths) + + // Create the HTML structure for each item, including data-responsive + $html .= ' + + + '; + } + + // Return the constructed HTML + return $html; +} + + + +// Array of required plugins +function build_plugins_json($attributes) { + // Initialize the plugins array + $plugins = array(); + + // Check if lgSettings['zoom'] is true and add 'lgShare' to the plugins array + if (isset($attributes['lgSettings']['zoom']) && $attributes['lgSettings']['zoom'] === true) { + $plugins[] = 'lgZoom'; + } + // Check if lgSettings['share'] is true and add 'lgShare' to the plugins array + if (isset($attributes['lgSettings']['share']) && $attributes['lgSettings']['share'] === true) { + $plugins[] = 'lgShare'; + } + // Check if lgSettings['share'] is true and add 'lgShare' to the plugins array + if (isset($attributes['lgSettings']['autoplay']) && $attributes['lgSettings']['autoplay'] === true) { + $plugins[] = 'lgAutoplay'; + } + if (isset($attributes['lgSettings']['fullScreen']) && $attributes['lgSettings']['fullScreen'] === true) { + $plugins[] = 'lgFullScreen'; + } + if (isset($attributes['lgSettings']['thumbnail']) && $attributes['lgSettings']['thumbnail'] === true) { + $plugins[] = 'lgThumbnail'; + } + if (isset($attributes['lgSettings']['rotate']) && $attributes['lgSettings']['rotate'] === true) { + $plugins[] = 'lgRotate'; + } + // JSON encode the plugins array and return the result + return ($plugins); + +} + + +// Build array of dynamic elements - returns an array +function build_dynamic_elements_array($gallery_items_data) { + $dynamic_elements = []; + + foreach ($gallery_items_data as $item) { + $src = $item['src']; + $responsive = $item['responsive'] ?: ''; // Fallback if responsive is empty + $thumb = $item['thumb']; + $subHtml = $item['subHtml']; + $alt_text = isset($item['alt_text']) ? $item['alt_text'] : 'No title available'; + + $subHtmlContent = '' . esc_html($alt_text) . '' . esc_html($subHtml) . ''; + + $dynamic_elements[] = [ + 'src' => esc_url($src), + 'responsive' => esc_attr($responsive), + 'thumb' => esc_url($thumb), + 'subHtml' => $subHtmlContent, + ]; + } + + return $dynamic_elements; +} + +// Build the gallery settings JSON +function build_gallery_settings_json($attributes,$unique_class) { + $container_class = ".". $unique_class; + // Step 1: Get the media IDs based on the attributes + $media_ids = get_media_ids($attributes); + if (empty($media_ids)) { + return json_encode(['error' => 'No media IDs found']); + } + + // Step 2: Get the gallery items data + $gallery_items_data = get_gallery_items_data($media_ids); + if (empty($gallery_items_data)) { + return json_encode(['error' => 'No gallery items data found']); + } + + // Step 3: Build the dynamic elements array + $dynamic_elements = build_dynamic_elements_array($gallery_items_data); + if (empty($dynamic_elements)) { + return json_encode(['error' => 'No dynamic elements found']); + } + + // Step 4: Initialize lgSettings from $attributes + $lgSettings = isset($attributes['lgSettings']) ? $attributes['lgSettings'] : []; + + // Step 5: Modify lgSettings if initialLayout is "inline" + if (isset($attributes['initialLayout']) && $attributes['initialLayout'] == "inline") { + $lgSettings['container'] = $container_class; + } + + // Step 6: Add dynamic elements to lgSettings if dynamic is true + if (isset($lgSettings['dynamic']) && $lgSettings['dynamic']) { + $lgSettings['dynamicEl'] = $dynamic_elements; + } + + // Step 7: Return the modified lgSettings object as JSON + $json = json_encode($lgSettings); + + // Step 8: Check for JSON encoding errors + if ($json === false) { + return json_encode(['error' => 'JSON encoding failed', 'error_details' => json_last_error_msg()]); + } + + return $json; +} + + +// Build the gallery styles based on $attributes and a unique class for rendering multiple galleries on the same page +function build_gallery_styles($attributes,$unique_class) { + $styles = ""; + + // Return the generated styles + return $styles; +} + +// Render the block +function render_lcp_gallery_block($attributes) { + $unique_class = lcp_random_string(8, true); + // Get the media IDs based on the attributes + $media_ids = get_media_ids($attributes); + + // Get the gallery items data using the media IDs + $gallery_items_data = get_gallery_items_data($media_ids); + + // Generate the HTML for the gallery items + $gallery_items_html = build_gallery_items_html($gallery_items_data, $attributes); + + // Generate the gallery settings JSON + $gallery_settings_json = build_gallery_settings_json($attributes,$unique_class); + + + + +// Generate styles for the gallery based on the unique class +$classes = 'lcp-gallery'; // Start with lcp-gallery class + +// Check if 'initialLayout' is set to 'grid' and add grid column classes if applicable +if (isset($attributes['initialLayout']) && $attributes['initialLayout'] === 'grid') { + // Image aspect ratios + $classes .= ' aspect-' . esc_attr($attributes['itemsAspectRatio']); + // Grid classes + $classes .= ' grid'; + // Grid columns + if (isset($attributes['gridColumnsLarge'])) { + $classes .= ' large-' . esc_attr($attributes['gridColumnsLarge']) . '-columns'; + } + if (isset($attributes['gridColumnsMedium'])) { + $classes .= ' medium-' . esc_attr($attributes['gridColumnsMedium']) . '-columns'; + } + if (isset($attributes['gridColumnsSmall'])) { + $classes .= ' small-' . esc_attr($attributes['gridColumnsSmall']) . '-columns'; + } +} + +// Add 'initialLayout' class if it exists and isn't 'grid' +if (isset($attributes['initialLayout']) && !empty($attributes['initialLayout']) && $attributes['initialLayout'] !== 'grid') { + $classes .= ' ' . esc_attr($attributes['initialLayout']); +} + +// Build the styles using the unique class (if necessary) +$styles = build_gallery_styles($attributes, $unique_class); + +// Return the complete gallery HTML with the unique class and the settings as a JSON string +return " + + {$gallery_items_html} + "; +} +/* Initialize Gallery Block */ +function lcp_gallery_block_init() { + register_block_type( __DIR__ . '/build', array( + 'render_callback' => 'render_lcp_gallery_block', + )); + +} +add_action( 'init', 'lcp_gallery_block_init' ); + +/* Set Block Flag for Dynamic Enqueue */ + + +/* Enqueue scripts and styles */ +function enqueue_lightgallery_scripts() { + // Enqueue styles + wp_enqueue_style('lcp-gallery', get_template_directory_uri() . '/blocks/lcp-gallery/assets/css/lcp-gallery.css'); + wp_enqueue_style('lightgallery-css', get_template_directory_uri() . '/blocks/lcp-gallery/assets/css/lightgallery-bundle.min.css'); + wp_enqueue_style('lg-transitions-css', get_template_directory_uri() . '/blocks/gallery/assets/css/lg-transitions.css'); + + // Enqueue scripts + wp_enqueue_script('lightgallery-js', get_template_directory_uri() . '/blocks/lcp-gallery/assets/js/lightgallery.min.js', array(), null, true); + wp_enqueue_script('lg-autoplay', get_template_directory_uri() . '/blocks/lcp-gallery/assets/js/lg-autoplay.min.js', array('lightgallery-js'), null, true); + wp_enqueue_script('lg-comment', get_template_directory_uri() . '/blocks/lcp-gallery/assets/js/lg-comment.min.js', array('lightgallery-js'), null, true); + wp_enqueue_script('lg-fullscreen', get_template_directory_uri() . '/blocks/lcp-gallery/assets/js/lg-fullscreen.min.js', array(), null, true); + wp_enqueue_script('lg-hash', get_template_directory_uri() . '/blocks/lcp-gallery/assets/js/lg-hash.min.js', array('lightgallery-js'), null, true); + wp_enqueue_script('lg-medium-zoom', get_template_directory_uri() . '/blocks/lcp-gallery/assets/js/lg-medium-zoom.min.js', array('lightgallery-js'), null, true); + wp_enqueue_script('lg-pager', get_template_directory_uri() . '/blocks/lcp-gallery/assets/js/lg-pager.min.js', array('lightgallery-js'), null, true); + wp_enqueue_script('lg-relative-caption', get_template_directory_uri() . '/blocks/lcp-gallery/assets/js/lg-relative-caption.min.js', array('lightgallery-js'), null, true); + wp_enqueue_script('lg-rotate', get_template_directory_uri() . '/blocks/lcp-gallery/assets/js/lg-rotate.min.js', array('lightgallery-js'), null, true); + wp_enqueue_script('lg-share', get_template_directory_uri() . '/blocks/lcp-gallery/assets/js/lg-share.min.js', array('lightgallery-js'), null, true); + wp_enqueue_script('lg-thumbnail', get_template_directory_uri() . '/blocks/lcp-gallery/assets/js/lg-thumbnail.min.js', array('lightgallery-js'), null, true); + wp_enqueue_script('lg-video', get_template_directory_uri() . '/blocks/lcp-gallery/assets/js/lg-video.min.js', array('lightgallery-js'), null, true); + wp_enqueue_script('lg-zoom', get_template_directory_uri() . '/blocks/lcp-gallery/assets/js/lg-zoom.min.js', array('lightgallery-js'), null, true); + + // Check for plugins and enqueue if necessary + //if ( in_array( 'lg_zoom', $lcp_gallery_enqueue_data['plugins'], true ) ) { + // wp_enqueue_script('lg-zoom', get_template_directory_uri() . '/blocks/lcp-gallery/assets/js/lg-zoom.min.js', array('lightgallery-js'), null, true); + // } + } + + +add_action('wp_enqueue_scripts', 'enqueue_lightgallery_scripts'); + + + + + + +/* REST */ +add_action('rest_api_init', function () { + // Register a custom route + register_rest_route('custom/v1', '/get-gallery-supported-plugins-data', [ + 'methods' => 'GET', + 'callback' => 'get_gallery_supported_plugins_data', + 'permission_callback' => '__return_true', // Publicly accessible + ]); +}); + +// Callback function to get gallery supported plugin data +function get_gallery_supported_plugins_data() { + // Check if Jet Engine is active + if ( ! class_exists( 'Jet_Engine' ) ) { + return rest_ensure_response( [ 'jetengine_active' => false ] ); + } + + global $wpdb; + $post_types = []; + + // Query to get all rows with 'content-type' status + $results = $wpdb->get_results( " + SELECT * FROM {$wpdb->prefix}jet_post_types + + " ); + + // Loop through each row + foreach ( $results as $row ) { + // Unserialize the 'args' column to get the post type details + $args = maybe_unserialize( $row->args ); + $meta_fields = maybe_unserialize( $row->meta_fields ); + + // Get the slug value (used for related_table) + $related_table = isset( $args['slug'] ) ? $args['slug'] : ''; + + // Initialize the post type array + $post_type_data = [ + 'status' => $row->status, + 'args' => $args, + 'gallery_fields' => [], + 'related_table' => $related_table, // Add related_table with slug value + ]; + + // If there are meta_fields, filter out the gallery fields + if ( isset( $meta_fields ) && is_array( $meta_fields ) ) { + foreach ( $meta_fields as $field ) { + if ( isset( $field['type'] ) && $field['type'] === 'gallery' ) { + $post_type_data['meta_fields'][] = $field; + } + } + } + + // Add the post type to the array if gallery fields exist + if ( ! empty( $post_type_data['meta_fields'] ) ) { + $post_types[] = $post_type_data; + } + } + + return rest_ensure_response( [ + 'jetengine_active' => true, + 'post_types' => $post_types, + ] ); +} + +/* GALLERY CPT */ +function create_lcp_gallery_cpt() { + $labels = array( + 'name' => 'Galleries', + 'singular_name' => 'Gallery', + 'menu_name' => 'Galleries', + 'name_admin_bar' => 'Gallery', + 'add_new' => 'Add New', + 'add_new_item' => 'Add New Gallery', + 'new_item' => 'New LCP Gallery', + 'edit_item' => 'Edit LCP Gallery', + 'view_item' => 'View LCP Gallery', + 'all_items' => 'All LCP Galleries', + 'search_items' => 'Search LCP Galleries', + 'parent_item_colon' => 'Parent LCP Galleries:', + 'not_found' => 'No LCP Galleries found.', + 'not_found_in_trash' => 'No LCP Galleries found in Trash.', + ); + + $args = array( + 'labels' => $labels, + 'public' => true, // Makes it public on the front end + 'has_archive' => true, // Enables the archive page + 'show_in_rest' => true, // Enables support for the block editor (Gutenberg) + 'rewrite' => array( 'slug' => 'lcpgallery' ), // Set the custom slug + 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt', 'custom-fields' ), // Post type features + 'menu_icon' => 'dashicons-images-alt2', // Optional icon for admin menu + 'show_in_menu' => true, // Show it in the admin menu + 'show_ui' => true, // Ensure it shows in the WordPress admin + 'hierarchical' => false, // Set to true for hierarchical post type (like Pages) + ); + + // Register the custom post type + register_post_type( 'lcpgallery', $args ); +} + +// Hook into the 'init' action to register the custom post type +add_action( 'init', 'create_lcp_gallery_cpt' ); diff --git a/blocks/lcp-gallery/package.json b/blocks/lcp-gallery/package.json new file mode 100644 index 0000000..64b4470 --- /dev/null +++ b/blocks/lcp-gallery/package.json @@ -0,0 +1,23 @@ +{ + "name": "gallery", + "version": "0.1.0", + "description": "Example block scaffolded with Create Block tool.", + "author": "The WordPress Contributors", + "license": "GPL-2.0-or-later", + "main": "build/index.js", + "scripts": { + "build": "wp-scripts build", + "format": "wp-scripts format", + "lint:css": "wp-scripts lint-style", + "lint:js": "wp-scripts lint-js", + "packages-update": "wp-scripts packages-update", + "plugin-zip": "wp-scripts plugin-zip", + "start": "wp-scripts start" + }, + "devDependencies": { + "@wordpress/scripts": "^30.7.0" + }, + "dependencies": { + "lightgallery": "^2.8.2" + } +} diff --git a/blocks/lcp-gallery/readme.txt b/blocks/lcp-gallery/readme.txt new file mode 100644 index 0000000..010eed6 --- /dev/null +++ b/blocks/lcp-gallery/readme.txt @@ -0,0 +1,55 @@ +=== Gallery === +Contributors: The WordPress Contributors +Tags: block +Tested up to: 6.6 +Stable tag: 0.1.0 +License: GPL-2.0-or-later +License URI: https://www.gnu.org/licenses/gpl-2.0.html + +Example block scaffolded with Create Block tool. + +== Description == + +This is the long description. No limit, and you can use Markdown (as well as in the following sections). + +For backwards compatibility, if this section is missing, the full length of the short description will be used, and +Markdown parsed. + +== Installation == + +This section describes how to install the plugin and get it working. + +e.g. + +1. Upload the plugin files to the `/wp-content/plugins/gallery` directory, or install the plugin through the WordPress plugins screen directly. +1. Activate the plugin through the 'Plugins' screen in WordPress + + +== Frequently Asked Questions == + += A question that someone might have = + +An answer to that question. + += What about foo bar? = + +Answer to foo bar dilemma. + +== Screenshots == + +1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from +the /assets directory or the directory that contains the stable readme.txt (tags or trunk). Screenshots in the /assets +directory take precedence. For example, `/assets/screenshot-1.png` would win over `/tags/4.3/screenshot-1.png` +(or jpg, jpeg, gif). +2. This is the second screen shot + +== Changelog == + += 0.1.0 = +* Release + +== Arbitrary section == + +You may provide arbitrary sections, in the same format as the ones above. This may be of use for extremely complicated +plugins where more information needs to be conveyed that doesn't fit into the categories of "description" or +"installation." Arbitrary sections will be shown below the built-in sections outlined above. diff --git a/blocks/lcp-gallery/src/block.json b/blocks/lcp-gallery/src/block.json new file mode 100644 index 0000000..7d73561 --- /dev/null +++ b/blocks/lcp-gallery/src/block.json @@ -0,0 +1,409 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "lcp/lcp-gallery", + "version": "0.1.0", + "title": "LCP Gallery", + "category": "widgets", + "icon": "", + "description": "A dynamic or static gallery based on the Lightgallery javascript plugin", + "example": {}, + "supports": { + "html": false + }, + "attributes": { + "lgSettingsOld" :{ + "type": "object", + "default": { + "mode": "fade", + "cssEasing": "ease", + "loop": true, + "keyPress": true, + "controls": true, + "thumbs": false, + "zoom": true, + "slideEndAnimatoin": true, + "fullScreen": true, + "autoplay": false, + "slideShowAutoplay": false, + "autoplayControls": true, + "pauseOnHover": false, + "progressBar": false, + "exThumbImage": "data-exthumbimage", + "showThumbByDefault": false, + "currentPagerPosition": "middle", + "addClass": "", + "isMobile": false, + "mobileSettings": { + "controls": false, + "showCloseIcon": true, + "enableTouch": true, + "enableDrag": true + }, + "imageAutoPlay": true, + "slideShowInterval": 5000, + "counter": true, + "closeOnEscape": true, + "showCloseIcon": true, + "swipeThreshold": 50, + "draggable": true, + "slideSpeed": 400, + "hideBarsDelay": 3000, + "dynamic": true, + "dynamicEl": [], + "captionDelay": 0, + "videoMaxWidth": "100%", + "videoAutoplay": true, + "videoJS": false, + "audio": false, + "audioJS": false, + "lightboxWidth": "auto", + "lightboxHeight": "auto", + "videojs": { + "autoplay": true, + "controls": true + }, + "gestureSettings": { + "zoom": true, + "drag": true + }, + "ariaLabelledby": "lightgallery-caption", + "ariaDescribedby": "lightgallery-description", + "thumbnailSelector": ".lg-thumbnail", + "galleryClass": "lg-gallery", + "selectableThumbs": false, + "slideTransition": "ease-in-out", + "share": false, + "hash": false, + "download": false, + "allowMediaOverlap": false, + "responsive": true, + "fullscreenBtn": true, + "prevHtml": "", + "nextHtml": "", + "closeHtml": "", + "playHtml": "", + "pauseHtml": "" + } + }, + "parseElementForItems": { + "type": "boolean", + "default": false + }, + "parsedTargetElement": { + "type": "string", + "default": "" + }, + "parsedExcludedElements": { + "type": "string", + "default": "" + }, + "lgSettings": { + "type": "object", + "default": { + "zoom": false, + "thumbnail": false, + "toggleThumb":false, + "thumbWidth": 120, + "thumbHeight": "80px", + "thumbMargin": 4, + "hash": false, + "galleryId": "1", + "dynamic": false, + "mode": "lg-fade", + "cssEasing": "ease", + "rotate": false, + "fullScreen": false, + "autoplay": false, + "download": false, + "container": "", + "closeable": true, + "zoomFromOrigin": false, + "plugins": [] + } + }, + "hashGalleryId": { + "type": "string", + "default": "" + }, + "source": { + "type": "string", + "default": "manual" + }, + "galleryItems": { + "type": "array" + }, + "sourceMetaField": { + "type": "string", + "default": "" + }, + "sourceTable": { + "type": "string", + "default": "" + }, + "sourceColumn": { + "type": "string", + "default": "" + }, + "includePostThumbnail": { + "type": "boolean", + "default": false + }, + "initialLayout": { + "type": "string", + "default": "grid" + }, + "initialLayoutLarge": { + "type": "string", + "default": "inline" + }, + "initialLayoutSmall": { + "type": "string", + "default": "inline" + }, + "justifiedRowHeightSmall": { + "type": "string", + "default": "150px" + }, + "justifiedRowHeightMedium": { + "type": "string", + "default": "150px" + }, + "justifiedRowHeightLarge": { + "type": "string", + "default": "150px" + }, + "justifiedLastRow": { + "type": "string", + "default": "justify" + }, + "maxInitialItems": { + "type": "number", + "default": 0 + }, + "initialImageSize": { + "type": "string", + "default": "medium-large" + }, + "inlineHeightSmall": { + "type": "string", + "default": "300px" + }, + "inlineHeightMedium": { + "type": "string", + "default": "400px" + }, + "inlineHeightLarge": { + "type": "string", + "default": "500px" + }, + "containerWidthDesktop": { + "type": "string", + "default": "100%" + }, + "containerWidthTablet": { + "type": "string", + "default": "100%" + }, + "containerWidthMobile": { + "type": "string", + "default": "100%" + }, + "itemsAspectRatio": { + "type": "string", + "default": "1-1" + }, + "gridColumns": { + "type": "number", + "default": 4 + }, + "gridColumnsLarge": { + "type": "number", + "default": 4 + }, + "gridColumnsMedium": { + "type": "number", + "default": 3 + }, + "gridColumnsSmall": { + "type": "number", + "default": 2 + }, + "gridGapLarge": { + "type": "number", + "default": 10 + }, + "gridGapMedium": { + "type": "number", + "default": 10 + }, + "gridGapSmall": { + "type": "number", + "default": 10 + }, + "downloadLimitRoles": { + "type": "array", + "default": "" + }, + "allowHideThumbnails": { + "type": "boolean", + "default": false + }, + "thumbnailsStyle": { + "type": "string", + "default": "" + }, + "thumbnailActiveStyle": { + "type": "string", + "default": "" + }, + "thumbnailBorders": { + "type": "object" + }, + "thumbnailBordersSelected": { + "type": "object" + }, + "showCaptions": { + "type": "boolean" + }, + "showItemTitle": { + "type": "boolean" + }, + "showItemDescription": { + "type": "boolean" + }, + "lgMode": { + "type": "string", + "default": "lg-slide" + }, + "downloadSize": { + "type": "string", + "default": "full" + }, + "allowShare": { + "type": "boolean", + "default": true + }, + "lgVideo": { + "type": "boolean", + "default": "true" + }, + "dynamic": { + "type": "boolean", + "default": false + }, + + "loop": { + "type": "boolean", + "default": true + }, + + + "speed": { + "type": "number", + "default": 500 + }, + "slideDelay": { + "type": "number", + "default": 200 + }, + "hash": { + "type": "boolean", + "default": false + }, + "allowZoom": { + "type": "boolean", + "default": false + }, + "closable": { + "type": "boolean", + "default": true + }, + "closeOnTap": { + "type": "boolean", + "default": true + }, + "container": { + "type": "string", + "default": "" + }, + "showControls": { + "type": "boolean", + "default": true + }, + "showCounter": { + "type": "boolean", + "default": true + }, + "showMaximizeIcon": { + "type": "boolean", + "default": true + }, + "easing": { + "type": "string", + "default": "ease" + }, + "download": { + "type": "boolean", + "default": false + }, + "thumbnail": { + "type": "boolean", + "default": true + }, + "appendThumbnailsTo": { + "type": "string", + "default": ".lg-components" + }, + "appendSubHtmlTo": { + "type": "string", + "default": ".lg-item" + }, + "thumbWidth": { + "type": "string", + "default": "80px" + }, + "thumbHeight": { + "type": "string", + "default": "80px" + }, + "thumbnailsBorders": { + "type": "object", + "default": { + "top": { "color": "#000000", "style": "solid", "width": "10px" }, + "right": { "color": "#000000", "style": "solid", "width": "10px" }, + "bottom": { "color": "#000000", "style": "solid", "width": "10px" }, + "left": { "color": "#000000", "style": "solid", "width": "10px" } + } + }, + "thumbnailsBordersSelected": { + "type": "object", + "default": { + "top": { "color": "#000000", "style": "solid", "width": "1px" }, + "right": { "color": "#000000", "style": "solid", "width": "1px" }, + "bottom": { "color": "#000000", "style": "solid", "width": "1px" }, + "left": { "color": "#000000", "style": "solid", "width": "1px" } + } + }, + "thumbMargin": { + "type": "number", + "default": 5 + }, + "toggleThumb": { + "type": "boolean", + "default": false + }, + "numberOfSlideItemsInDom": { + "type": "number", + "default": 10 + } + + }, + "textdomain": "lcp", + "editorScript": "file:./index.js", + "editorStyle": "file:./index.css", + "style": "file:./style-index.css", + "viewScript": ["file:./view.js"], + "viewStyle": [ "file:./lightgallery-bundle.min.css" ] + +} diff --git a/blocks/lcp-gallery/src/edit.js b/blocks/lcp-gallery/src/edit.js new file mode 100644 index 0000000..ca59bf2 --- /dev/null +++ b/blocks/lcp-gallery/src/edit.js @@ -0,0 +1,738 @@ +import { __ } from '@wordpress/i18n'; +import { useBlockProps, InspectorControls, MediaUpload, MediaUploadCheck } from '@wordpress/block-editor'; +import { useState, useEffect } from 'react'; +import { + PanelBody, + SelectControl, + Button, + ToggleControl, + TextControl, + __experimentalNumberControl as NumberControl, + __experimentalUnitControl as UnitControl, + TabPanel, + __experimentalBorderControl as BorderControl +} from '@wordpress/components'; +import metadata from './block.json'; +import './editor.scss'; + +import LightGallery from 'lightgallery/react'; +import 'lightgallery/css/lightgallery.css'; +import 'lightgallery/css/lg-zoom.css'; +import 'lightgallery/css/lg-thumbnail.css'; +import lgThumbnail from 'lightgallery/plugins/thumbnail'; +import lgZoom from 'lightgallery/plugins/zoom'; + + + +// Check if JetEngine or ACF/SCF are activated and get their gallery field data +const { apiFetch } = wp; + +apiFetch({ path: '/custom/v1/get-gallery-supported-plugins-data' }) + .then((data) => { + console.log(data); // Log the entire data object + if (data.jetengine_active) { + console.log('Jet Engine is activated'); + // Other logic here + } + }) + .catch((error) => { + console.error('Error fetching Jet Engine status:', error); + }); + + +const MultiMediaUpload = ({ onSelect }) => { + const [mediaIds, setMediaIds] = useState([]); + + const handleSelectMedia = (media) => { + const selectedMedia = media.map((item) => ({ + id: item.id, + url: item.url, + alt: item.alt || '' + })); + setMediaIds(selectedMedia); + onSelect(selectedMedia); + }; + + return ( + + ( + + {__('Open Media Library')} + + )} + /> + + ); +}; + +export default function Edit(props) { + const { attributes, setAttributes } = props; + const { + galleryItems = [], + source, + sourceMetaField, + sourceTable, + sourceColumn, + includePostThumbnail, + initialLayout, + itemsAspectRatio, + gridColumnsLarge, + gridColumnsMedium, + gridColumnsSmall, + gridGapLarge, + gridGapMedium, + gridGapSmall, + + download, + + downloadSize, + + maxInitialItems, + thumbnail, + inlineHeightLarge, + inlineHeightMedium, + inlineHeightSmall, + justifiedRowHeightSmall, + justifiedRowHeightMedium, + justifiedRowHeightLarge, + justifiedLastRow, + thumbnailsBorders, + thumbnailsBordersSelected, + thumbnailsStyle, + thumbnailActiveStyle, + showCaptions, + zoomFromOrigin, + + lgSettings + } = attributes; + + // Handle Updating LightGallery settings + const [settings, setSettings] = useState(lgSettings); + useEffect(() => { + // Only update state if lgSettings actually change + if (JSON.stringify(settings) !== JSON.stringify(lgSettings)) { + setSettings(lgSettings); + } + }, [lgSettings]); // Runs only when lgSettings change + + const [borders, setBorders] = useState(thumbnailsBorders || { + top: { color: '#000000', style: 'solid', width: '1px' }, + right: { color: '#000000', style: 'solid', width: '1px' }, + bottom: { color: '#000000', style: 'solid', width: '1px' }, + left: { color: '#000000', style: 'solid', width: '1px' } + }); + + const [selectedBorders, setSelectedBorders] = useState(thumbnailsBordersSelected || { + top: { color: '#000000', style: 'solid', width: '1px' }, + right: { color: '#000000', style: 'solid', width: '1px' }, + bottom: { color: '#000000', style: 'solid', width: '1px' }, + left: { color: '#000000', style: 'solid', width: '1px' } + }); + + const handleSelectMedia = (selectedMedia) => { + setAttributes({ galleryItems: selectedMedia }); + }; + + const handleBorderChange = (newBorders) => { + setBorders(newBorders); + setAttributes({ thumbnailsBorders: newBorders }); + }; + + const handleBorderSelectedChange = (newBorders) => { + setSelectedBorders(newBorders); + setAttributes({ thumbnailsBordersSelected: newBorders }); + }; + + + + // lightGallery Transistion Styles + const lgTransitionStyles = [ + { label: 'lg-slide', value: 'lg-slide' }, + { label: 'lg-fade', value: 'lg-fade' }, + { label: 'lg-zoom-in', value: 'lg-zoom-in' }, + { label: 'lg-zoom-in-big', value: 'lg-zoom-in-big' }, + { label: 'lg-zoom-out', value: 'lg-zoom-out' }, + { label: 'lg-zoom-out-big', value: 'lg-zoom-out-big' }, + { label: 'lg-zoom-out-in', value: 'lg-zoom-out-in' }, + { label: 'lg-zoom-in-out', value: 'lg-zoom-in-out' }, + { label: 'lg-soft-zoom', value: 'lg-soft-zoom' }, + { label: 'lg-scale-up', value: 'lg-scale-up' }, + { label: 'lg-slide-circular', value: 'lg-slide-circular' }, + { label: 'lg-slide-circular-vertical', value: 'lg-slide-circular-vertical' }, + { label: 'lg-slide-vertical', value: 'lg-slide-vertical' }, + { label: 'lg-slide-vertical-growth', value: 'lg-slide-vertical-growth' }, + { label: 'lg-slide-skew-only', value: 'lg-slide-skew-only' }, + { label: 'lg-slide-skew-only-rev', value: 'lg-slide-skew-only-rev' }, + { label: 'lg-slide-skew-only-y', value: 'lg-slide-skew-only-y' }, + { label: 'lg-slide-skew-only-y-rev', value: 'lg-slide-skew-only-y-rev' }, + { label: 'lg-slide-skew', value: 'lg-slide-skew' }, + { label: 'lg-slide-skew-rev', value: 'lg-slide-skew-rev' }, + { label: 'lg-slide-skew-cross', value: 'lg-slide-skew-cross' }, + { label: 'lg-slide-skew-cross-rev', value: 'lg-slide-skew-cross-rev' }, + { label: 'lg-slide-skew-ver', value: 'lg-slide-skew-ver' }, + { label: 'lg-slide-skew-ver-rev', value: 'lg-slide-skew-ver-rev' }, + { label: 'lg-slide-skew-ver-cross', value: 'lg-slide-skew-ver-cross' }, + { label: 'lg-slide-skew-ver-cross-rev', value: 'lg-slide-skew-ver-cross-rev' }, + { label: 'lg-lollipop', value: 'lg-lollipop' }, + { label: 'lg-lollipop-rev', value: 'lg-lollipop-rev' }, + { label: 'lg-rotate', value: 'lg-rotate' }, + { label: 'lg-rotate-rev', value: 'lg-rotate-rev' }, + { label: 'lg-tube', value: 'lg-tube' } + ]; + + const galleryClasses = `lcp-gallery ${initialLayout}`; + + + const lgPluginRequirements = [ + { setting: 'zoom', plugin: 'lgZoom' }, + { setting: 'thumbnail', plugin: 'lgThumbnail' }, + { setting: 'rotate', plugin: 'lgRotate' }, + { setting: 'autoplay', plugin: 'lgAutoplay' }, + { setting: 'fullScreen', plugin: 'lgFullScreen' }, + { setting: 'download', plugin: 'lgDownload' }, + // Add more settings and corresponding plugins as needed + ]; + + + useEffect(() => { + // Initialize plugins array + const updatedPlugins = []; + + // Loop through the plugin requirements + lgPluginRequirements.forEach(({ setting, plugin }) => { + // If the setting is enabled, add the corresponding plugin to the plugins array + if (lgSettings[setting]) { + updatedPlugins.push(plugin); + } + }); + + // Use function-based setAttributes to get the latest lgSettings and update plugins array + setAttributes((prevAttributes) => { + const updatedLgSettings = { + ...prevAttributes.lgSettings, + plugins: updatedPlugins, // Updated plugins array + }; + + // Log the lgSettings after update + console.log("Updated lgSettings:", updatedLgSettings); + + return { + ...prevAttributes, + lgSettings: updatedLgSettings, + }; + }); + }, [lgSettings.zoom, lgSettings.thumbnail, lgSettings.rotate, lgSettings.autoplay, lgSettings.fullScreen, lgSettings.download, setAttributes]); + + return ( + <> + + {/* Settings and Style Tabs */} + + {({ name }) => { + if (name === 'settings') { + return ( + <> + {/* Source Settings */} + + setAttributes({ source: newValue })} + options={[ + { value: 'manual', label: __('Manually Select', metadata.textdomain) }, + { value: 'lcp_post_gallery', label: __('Post Gallery', metadata.textdomain) }, + { value: 'meta_field', label: __('Meta field of current post', metadata.textdomain) }, + { value: 'linked_table', label: __('Linked Table', metadata.textdomain) } + ]} + /> + {source === 'manual' && } + {source === 'meta_field' && ( + setAttributes({ sourceMetaField: newValue })} + /> + )} + {source === 'linked_table' && ( + <> + setAttributes({ sourceTable: newValue })} + /> + setAttributes({ sourceColumn: newValue })} + /> + > + )} + {/* Parse an element for gallery items */} + { + setAttributes({ + parseElementForItems: value, // Set as a boolean directly + }); + }} + /> + + {attributes.parseElementForItems && ( + setAttributes({ parsedTargetElement: newValue })} + /> + )} + setAttributes({ includePostThumbnail: isChecked })} + checked={includePostThumbnail} + label={__('Include Post Thumbnail (Featured Image)', metadata.textdomain)} + /> + + + {/* Display Settings */} + + setAttributes({ initialLayout: newValue })} + options={[ + { value: 'inline', label: __('Inline', metadata.textdomain) }, + { value: 'grid', label: __('Grid', metadata.textdomain) }, + { value: 'justified', label: __('Justified', metadata.textdomain) }, + { value: 'button', label: __('Button', metadata.textdomain) } + ]} + /> + {initialLayout === 'button' && ( + setAttributes({ sourceColumn: newValue })} + /> + ) + } + setAttributes({ thumbnail: isChecked })} + checked={thumbnail} + label={__('Show Thumbnails', metadata.textdomain)} + /> + {thumbnail && ( + <> + setAttributes({ itemsAspectRatio: newValue })} + options={[ + { value: 'bottom', label: __('Bottom', metadata.textdomain) }, + { value: 'right', label: __('Right', metadata.textdomain) }, + { value: 'left', label: __('Left', metadata.textdomain) }, + { value: 'hidden', label: __('Hidden', metadata.textdomain) } + ]} + /> + setAttributes({ itemsAspectRatio: newValue })} + options={[ + { value: 'bottom', label: __('Bottom', metadata.textdomain) }, + { value: 'right', label: __('Right', metadata.textdomain) }, + { value: 'left', label: __('Left', metadata.textdomain) }, + { value: 'hidden', label: __('Hidden', metadata.textdomain) } + ]} + /> + setAttributes({ itemsAspectRatio: newValue })} + options={[ + { value: 'bottom', label: __('Bottom', metadata.textdomain) }, + { value: 'right', label: __('Right', metadata.textdomain) }, + { value: 'left', label: __('Left', metadata.textdomain) }, + { value: 'hidden', label: __('Hidden', metadata.textdomain) } + ]} + /> + > + )} + {initialLayout !== 'inline' && initialLayout !== 'justified' && ( + setAttributes({ itemsAspectRatio: newValue })} + options={[ + { value: '1-1', label: __('1:1', metadata.textdomain) }, + { value: '16-9', label: __('16:9', metadata.textdomain) }, + { value: '3-2', label: __('3:2', metadata.textdomain) }, + { value: '3-4', label: __('3:4', metadata.textdomain) }, + { value: '4-5', label: __('4:5', metadata.textdomain) }, + { value: '2-3', label: __('2:3', metadata.textdomain) } + ]} + /> + )} + {initialLayout !== 'inline' && ( + setAttributes({ maxInitialItems: newValue })} + value={maxInitialItems} + isShiftStepEnabled + shiftStep={1} + min={0} + /> + )} + + {/* Gallery Settings */} + + {/* Dynamic Settings */} + { + // Update autoplay + setAttributes({ + lgSettings: { + ...lgSettings, + ['dynamic']: value, + } + }); + }} + /> + {/* Zoom Settings - Zoom requires lgZoom plugin */} + { + setAttributes({ + lgSettings: { + ...lgSettings, + zoom: value, // Update the zoom setting + plugins: value + ? [...lgSettings.plugins, 'lgZoom'] // Add lgZoom plugin if enabled + : lgSettings.plugins.filter(plugin => plugin !== 'lgZoom'), // Remove lgZoom plugin if disabled + }, + }); + }} + /> + {/* Fullscreen Settings - fullScreen requires lgFullscreen plugin */} + { + // Update autoplay + setAttributes({ + lgSettings: { + ...lgSettings, + fullScreen: value, // Update the zoom setting + plugins: value + ? [...lgSettings.plugins, 'lgFullScreen'] // Add lgFullScreen plugin if enabled + : lgSettings.plugins.filter(plugin => plugin !== 'lgFullScreen'), // Remove lgFullScreen plugin if disabled + }, + }); + }} + /> + {/* Sharing Settings - Sharing requires lgShare plugin */} + { + // Update autoplay + setAttributes({ + lgSettings: { + ...lgSettings, + share: value, // Update the zoom setting + plugins: value + ? [...lgSettings.plugins, 'lgShare'] // Add lgShare plugin if enabled + : lgSettings.plugins.filter(plugin => plugin !== 'lgShare'), // Remove lgShare plugin if disabled + }, + }); + }} + /> + {/* Autoplay Settings - Autoplay requires lgAutoplay plugin */} + { + // Update autoplay + setAttributes({ + lgSettings: { + ...lgSettings, + autoplay: value, // Update the zoom setting + plugins: value + ? [...lgSettings.plugins, 'lgAutoplay'] // Add lgAutoplay plugin if enabled + : lgSettings.plugins.filter(plugin => plugin !== 'lgAutoplay'), // Remove lgAutoplay plugin if disabled + }, + }); + }} + /> + + {/* HASH SETTINGS - Hashrequires lghash plugin */} + { + // Update autoplay + setAttributes({ + lgSettings: { + ...lgSettings, + hash: value, // Update the zoom setting + plugins: value + ? [...lgSettings.plugins, 'lgHash'] // Add lgAutoplay plugin if enabled + : lgSettings.plugins.filter(plugin => plugin !== 'lgHash'), // Remove lgAutoplay plugin if disabled + }, + }); + }} + /> + {/* Hash requires a unique id in lgSettings.galleryId */} + {lgSettings.hash && ( + { + setAttributes({ + lgSettings: { + ...lgSettings, + galleryId: newValue, // Update the hashValue based on the text input + } + }); + }} + /> + )} + + { + // Update autoplay + setAttributes({ + lgSettings: { + ...lgSettings, + zoomFromOrigin: value, // Update the zoomFromOrigin setting + }, + }); + }} + /> + {/*Captions Settings */} + setAttributes({ showCaptions: isChecked })} + checked={showCaptions} + label={__('Show Captions', metadata.textdomain)} + /> + + {/*Download Controls - If download is true, show options to set download size */} + { + // Update autoplay + setAttributes({ + lgSettings: { + ...lgSettings, + ['download']: value, + }, + }); + }} + /> + {/* Options to set available download size */} + {download && ( + setAttributes({ downloadSize: newValue })} + options={[ + { value: 'full', label: __('Full', metadata.textdomain) }, + { value: 'medium', label: __('Medium', metadata.textdomain) }, + { value: 'large', label: __('Large', metadata.textdomain) } + ]} + /> + )} + {/* Add the SelectControl for Transition */} + { + // Update autoplay + setAttributes({ + lgSettings: { + ...lgSettings, + ['mode']: value, + } + }); + }} + /> + {/* Add the TextControl for specific container to open the gallery in*/} + {initialLayout != "inline"}{ + setAttributes({ lgSettings: { + ...lgSettings, // spread the current lgSettings object + container: newValue // update only the container property + } })} + /> + } + + > + ); + } + + if (name === 'style') { + return ( + + {initialLayout === 'inline' && ( + <> + setAttributes({ inlineHeightLarge: value })} + value={inlineHeightLarge} + /> + setAttributes({ inlineHeightMedium: value })} + value={inlineHeightMedium} + /> + setAttributes({ inlineHeightSmall: value })} + value={inlineHeightSmall} + /> + > + )} + {initialLayout === 'justified' && ( + <> + setAttributes({ justifiedLastRow: newValue })} + options={[ + { value: 'justify', label: __('Justify', metadata.textdomain) }, + { value: 'nojustify', label: __('Unjustified', metadata.textdomain) }, + { value: 'left', label: __('Align Left', metadata.textdomain) }, + { value: 'center', label: __('Align Center', metadata.textdomain) }, + { value: 'right', label: __('Align Right', metadata.textdomain) }, + { value: 'hide', label: __('Hide', metadata.textdomain) } + ]} + /> + setAttributes({ justifiedRowHeightLarge: value })} + value={justifiedRowHeightLarge} + /> + setAttributes({ justifiedRowHeightMedium: value })} + value={justifiedRowHeightMedium} + /> + setAttributes({ justifiedRowHeightSmall: value })} + value={justifiedRowHeightSmall} + /> + > + )} + {initialLayout === 'grid' && ( + <> + setAttributes({ gridColumnsLarge: newValue })} + value={gridColumnsLarge} + isShiftStepEnabled + shiftStep={1} + min={1} + max={9} + /> + setAttributes({ gridColumnsMedium: newValue })} + value={gridColumnsMedium} + isShiftStepEnabled + shiftStep={1} + min={1} + max={9} + /> + setAttributes({ gridColumnsSmall: newValue })} + value={gridColumnsSmall} + isShiftStepEnabled + shiftStep={1} + min={1} + max={9} + /> + setAttributes({ gridGapLarge: newValue })} + value={gridGapLarge} + isShiftStepEnabled + shiftStep={1} + min={0} + /> + > + )} + {thumbnail && ( + <> + + + setAttributes({ thumbnailsStyle: newValue })} + options={[ + { value: '', label: __('None', metadata.textdomain) }, + { value: 'lg-thumbnail-blur', label: __('Blur', metadata.textdomain) }, + { value: 'lg-thumbnail-grayscale', label: __('Monochrome', metadata.textdomain) } + ]} + /> + setAttributes({ thumbnailActiveStyle: newValue })} + options={[ + { value: '', label: __('None', metadata.textdomain) }, + { value: 'lg-thumbnail-active-grayscale', label: __('Monochrome', metadata.textdomain) }, + { value: 'lg-thumbnail-active-blur', label: __('Blur', metadata.textdomain) } + + ]} + /> + > + )} + + ); + } + }} + + + + + > + ); +} + diff --git a/blocks/lcp-gallery/src/editor.scss b/blocks/lcp-gallery/src/editor.scss new file mode 100644 index 0000000..1dc5a7e --- /dev/null +++ b/blocks/lcp-gallery/src/editor.scss @@ -0,0 +1,171 @@ +/** + * The following styles get applied inside the editor only. + * + * Replace them with your own styles or remove the file completely. + */ + + .wp-block-create-block-lcp-gallery { + background-color: #21759b; + color: #fff; + padding: 2px; +} + + + + +.lcp-gallery.inline { + width: 100%; + height: 500px; + position: relative; + } + +.lcp-gallery.inline .gallery-item { + display:none +} + + +.lcp-gallery .gallery-item,.lcp-gallery .gallery-item > img { + width:100% +} + +.lcp-gallery .gallery-item.last:after {content:"";width:100%;height:100%;background:red;position:absolute;top:0;left:0;opacity:.5} + +// Thumbnails +.lg-thumbnail-grayscale .lg-thumb-item:not(.active) img {filter: grayscale(100%);} +.lg-thumbnail-active-grayscale .lg-thumb-item.active img {filter: grayscale(100%);} +.lg-thumbnail-blur .lg-thumb-item:not(.active) img {filter: blur(1px);} +.lg-thumbnail-active-blur .lg-thumb-item.active img {filter: blur(1px);} + +.lg-outer {background:none} +// Gallery More Images +.lcp-display-none {display:none} +.gallery-item {position:relative} +span.gallery-more {position: absolute; + position: absolute; + left: 50%; + top: 50%; + z-index: 10; + color: #fff; + font-size: 40px; + transform: translate3d(-50%, -50%, 0); + color: white;} + +/* Aspect Ratio */ +.lcp-gallery.aspect-1-1 .gallery-item {aspect-ratio:1/1} +.lcp-gallery.aspect-2-3 .gallery-item {aspect-ratio:2/3} +.lcp-gallery.aspect-3-4 .gallery-item {aspect-ratio:3/4} +.lcp-gallery.aspect-4-5 .gallery-item {aspect-ratio:4/5} +.lcp-gallery.aspect-3-2 .gallery-item {aspect-ratio:3/2} +.lcp-gallery.aspect-16-9 .gallery-item {aspect-ratio:16/9} + +.gallery-item img {object-fit:cover} +/* Container Styles */ + +/* Grid Styles */ +.lcp-gallery.grid { + display:grid +} +.lcp-gallery.grid .gallery-item img{ + height:100%; + object-fit:cover + +} +.lcp-gallery.grid { + gap:1rem; + grid-template-columns: 1fr 1fr 1fr 1fr +} +@media only screen and (min-width: 1167px) { + .lcp-gallery.grid.large-1-columns { + grid-template-columns: 1fr; + } + .lcp-gallery.grid.large-2-columns { + grid-template-columns: 1fr 1fr; + } + .lcp-gallery.grid.large-3-columns { + grid-template-columns: 1fr 1fr 1fr; + } + .lcp-gallery.grid.large-4-columns { + grid-template-columns: 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.large-5-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.large-6-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.large-7-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.large-8-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.large-9-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + } +} + +/* Medium screens (min-width: 768px and max-width: 1166px) */ +@media only screen and (min-width: 768px) and (max-width: 1166px) { + .lcp-gallery.grid.medium-1-columns { + grid-template-columns: 1fr; + } + .lcp-gallery.grid.medium-2-columns { + grid-template-columns: 1fr 1fr; + } + .lcp-gallery.grid.medium-3-columns { + grid-template-columns: 1fr 1fr 1fr; + } + .lcp-gallery.grid.medium-4-columns { + grid-template-columns: 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.medium-5-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.medium-6-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.medium-7-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.medium-8-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.medium-9-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + } +} + +/* Small screens (max-width: 767px) */ +@media only screen and (max-width: 767px) { + .lcp-gallery.grid.small-1-columns { + grid-template-columns: 1fr; + } + .lcp-gallery.grid.small-2-columns { + grid-template-columns: 1fr 1fr; + } + .lcp-gallery.grid.small-3-columns { + grid-template-columns: 1fr 1fr 1fr; + } + .lcp-gallery.grid.small-4-columns { + grid-template-columns: 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.small-5-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.small-6-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.small-7-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.small-8-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.small-9-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + } + +} + + + diff --git a/blocks/lcp-gallery/src/index.js b/blocks/lcp-gallery/src/index.js new file mode 100644 index 0000000..ade1e47 --- /dev/null +++ b/blocks/lcp-gallery/src/index.js @@ -0,0 +1,39 @@ +/** + * Registers a new block provided a unique name and an object defining its behavior. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ + */ +import { registerBlockType } from '@wordpress/blocks'; + +/** + * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. + * All files containing `style` keyword are bundled together. The code used + * gets applied both to the front of your site and to the editor. + * + * @see https://www.npmjs.com/package/@wordpress/scripts#using-css + */ +import './style.scss'; + +/** + * Internal dependencies + */ +import Edit from './edit'; +import save from './save'; +import metadata from './block.json'; + +/** + * Every block starts by registering a new block type definition. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ + */ +registerBlockType( metadata.name, { + /** + * @see ./edit.js + */ + edit: Edit, + + /** + * @see ./save.js + */ + save, +} ); diff --git a/blocks/lcp-gallery/src/save.js b/blocks/lcp-gallery/src/save.js new file mode 100644 index 0000000..da277a8 --- /dev/null +++ b/blocks/lcp-gallery/src/save.js @@ -0,0 +1,22 @@ +/** + * React hook that is used to mark the block wrapper element. + * It provides all the necessary props like the class name. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops + */ +import { useBlockProps } from '@wordpress/block-editor'; + +/** + * The save function defines the way in which the different attributes should + * be combined into the final markup, which is then serialized by the block + * editor into `post_content`. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#save + * + * @return {Element} Element to render. + */ +export default function save() { + return ( + null + ); +} diff --git a/blocks/lcp-gallery/src/style.scss b/blocks/lcp-gallery/src/style.scss new file mode 100644 index 0000000..6e0cce7 --- /dev/null +++ b/blocks/lcp-gallery/src/style.scss @@ -0,0 +1,187 @@ +/** + * The following styles get applied both on the front of your site + * and in the editor. + * + * Replace them with your own styles or remove the file completely. + */ + +.wp-block-create-block-gallery { + background-color: #21759b; + color: #fff; + padding: 2px; +} + + + + + + +.lcp-gallery.inline { + width: 100%; + height: 500px; + position: relative; + } + +.lcp-gallery.inline .gallery-item { + display:none +} + + +.lcp-gallery .gallery-item,.lcp-gallery .gallery-item > img { + width:100% +} + +.lcp-gallery .gallery-item.last:after {content:"";width:100%;height:100%;background:red;position:absolute;top:0;left:0;opacity:.5} + +// Thumbnails +.lg-thumbnail-grayscale .lg-thumb-item:not(.active) img {filter: grayscale(100%);} +.lg-thumbnail-active-grayscale .lg-thumb-item.active img {filter: grayscale(100%);} +.lg-thumbnail-blur .lg-thumb-item:not(.active) img {filter: blur(1px);} +.lg-thumbnail-active-blur .lg-thumb-item.active img {filter: blur(1px);} + +.lg-outer {background:none} +// Gallery More Images +.lcp-display-none {display:none} +.gallery-item {position:relative} +span.gallery-more {position: absolute; + position: absolute; + left: 50%; + top: 50%; + z-index: 10; + color: #fff; + font-size: 40px; + transform: translate3d(-50%, -50%, 0); + color: white;} + +/* Aspect Ratio */ +.lcp-gallery.aspect-1-1 .lcp-gallery-item {aspect-ratio:1/1} +.lcp-gallery.aspect-2-3 .lcp-gallery-item {aspect-ratio:2/3} +.lcp-gallery.aspect-3-4 .lcp-gallery-item {aspect-ratio:3/4} +.lcp-gallery.aspect-4-5 .lcp-gallery-item {aspect-ratio:4/5} +.lcp-gallery.aspect-3-2 .lcp-gallery-item {aspect-ratio:3/2} +.lcp-gallery.aspect-16-9 .lcp-gallery-item {aspect-ratio:16/9} + +.gallery-item img {object-fit:cover} +/* Container Styles */ + +/* Grid Styles */ +.lcp-gallery.grid { + display:grid +} +.lcp-gallery.grid .gallery-item img{ + height:100%; + object-fit:cover + +} +.lcp-gallery.grid { + gap:1rem; + grid-template-columns: 1fr 1fr 1fr 1fr +} +@media only screen and (min-width: 1167px) { + .lcp-gallery.grid.large-1-columns { + grid-template-columns: 1fr; + } + .lcp-gallery.grid.large-2-columns { + grid-template-columns: 1fr 1fr; + } + .lcp-gallery.grid.large-3-columns { + grid-template-columns: 1fr 1fr 1fr; + } + .lcp-gallery.grid.large-4-columns { + grid-template-columns: 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.large-5-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.large-6-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.large-7-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.large-8-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.large-9-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + } +} + +/* Medium screens (min-width: 768px and max-width: 1166px) */ +@media only screen and (min-width: 768px) and (max-width: 1166px) { + .lcp-gallery.grid.medium-1-columns { + grid-template-columns: 1fr; + } + .lcp-gallery.grid.medium-2-columns { + grid-template-columns: 1fr 1fr; + } + .lcp-gallery.grid.medium-3-columns { + grid-template-columns: 1fr 1fr 1fr; + } + .lcp-gallery.grid.medium-4-columns { + grid-template-columns: 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.medium-5-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.medium-6-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.medium-7-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.medium-8-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.medium-9-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + } +} + +/* Small screens (max-width: 767px) */ +@media only screen and (max-width: 767px) { + .lcp-gallery.grid.small-1-columns { + grid-template-columns: 1fr; + } + .lcp-gallery.grid.small-2-columns { + grid-template-columns: 1fr 1fr; + } + .lcp-gallery.grid.small-3-columns { + grid-template-columns: 1fr 1fr 1fr; + } + .lcp-gallery.grid.small-4-columns { + grid-template-columns: 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.small-5-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.small-6-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.small-7-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.small-8-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + } + .lcp-gallery.grid.small-9-columns { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + } + +} + + + +.lcp-gallery.grid > a > img { + width:100%; + height:100%; + object-fit:cover +} + +.lcp-gallery.grid>a>img { + height: 100%; + -o-object-fit: cover; + object-fit: cover; + width: 100%; + display: block; /* Add this */ +} \ No newline at end of file diff --git a/blocks/lcp-gallery/src/view.js b/blocks/lcp-gallery/src/view.js new file mode 100644 index 0000000..0569f22 --- /dev/null +++ b/blocks/lcp-gallery/src/view.js @@ -0,0 +1,71 @@ +document.addEventListener('DOMContentLoaded', () => { + // Check if LightGallery is loaded + if (typeof lightGallery === 'function') { + // Select all elements with the class '.lcp-gallery' + const galleryContainers = document.querySelectorAll('.lcp-gallery'); + + galleryContainers.forEach(galleryContainer => { + // Retrieve the JSON string from the data-lgsettings attribute + const lgSettingsAttr = galleryContainer.getAttribute('data-lgsettings'); + + if (lgSettingsAttr) { + try { + // Parse the JSON string to a JavaScript object + const lgSettings = JSON.parse(lgSettingsAttr); + + // Log the settings to debug + console.log("LightGallery Settings:", lgSettings); + + // Ensure that plugins are mapped to actual functions if available + const availablePlugins = { + lgZoom: lgZoom, + lgThumbnail: lgThumbnail, + lgFullScreen: lgFullscreen, + lgRotate: lgRotate, + lgAutoplay: lgAutoplay, + lgShare: lgShare, + lgComment: lgComment, + lgHash: lgHash, + lgPager: lgPager, + lgVideo: lgVideo, + lgMediumZoom: lgMediumZoom + }; + + // Map the plugin names to actual plugin functions + if (Array.isArray(lgSettings.plugins)) { + lgSettings.plugins = lgSettings.plugins.map(pluginName => availablePlugins[pluginName] || pluginName); + } + + // Initialize LightGallery for the gallery container (only once) + let galleryInstance = null; + + // Initialize the gallery only once per container + if (!galleryContainer.classList.contains('lg-initialized')) { + galleryInstance = lightGallery(galleryContainer, lgSettings); + galleryContainer.classList.add('lg-initialized'); // Mark the gallery as initialized + } + + // Add click event listener to the gallery items + const galleryItems = galleryContainer.querySelectorAll('.lcp-gallery-item'); + galleryItems.forEach((item, index) => { + item.addEventListener('click', () => { + // Check if galleryInstance is valid and open the gallery at the correct index + if (galleryInstance && typeof galleryInstance.openGallery === 'function') { + galleryInstance.openGallery(index); // Pass the index to open the correct image + } else { + console.error('LightGallery instance is not initialized correctly or missing openGallery method.'); + } + }); + }); + + } catch (error) { + console.error('Error parsing data-lgsettings JSON:', error); + } + } else { + console.error('data-lgsettings attribute is missing for a gallery.'); + } + }); + } else { + console.error('LightGallery is not defined'); + } +}); diff --git a/blocks/lcp-header-container/.editorconfig b/blocks/lcp-header-container/.editorconfig new file mode 100644 index 0000000..b5df0fc --- /dev/null +++ b/blocks/lcp-header-container/.editorconfig @@ -0,0 +1,18 @@ +# This file is for unifying the coding style for different editors and IDEs +# editorconfig.org + +# WordPress Coding Standards +# https://make.wordpress.org/core/handbook/coding-standards/ + +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = tab + +[*.{yml,yaml}] +indent_style = space +indent_size = 2 diff --git a/blocks/lcp-header-container/.gitignore b/blocks/lcp-header-container/.gitignore new file mode 100644 index 0000000..f66335e --- /dev/null +++ b/blocks/lcp-header-container/.gitignore @@ -0,0 +1,30 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Coverage directory used by tools like istanbul +coverage + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Output of `npm pack` +*.tgz + +# Output of `wp-scripts plugin-zip` +*.zip + +# dotenv environment variables file +.env diff --git a/blocks/lcp-header-container/header-container.php b/blocks/lcp-header-container/header-container.php new file mode 100644 index 0000000..90c2cf7 --- /dev/null +++ b/blocks/lcp-header-container/header-container.php @@ -0,0 +1,33 @@ + array( 'lcp/viewport', 'lcp/main-area' ), // Only allow this block to be inserted inside the 'lcp/viewport' block + ) + ); +} +add_action( 'init', 'header_container_block_init' ); diff --git a/blocks/lcp-header-container/package.json b/blocks/lcp-header-container/package.json new file mode 100644 index 0000000..75c43b5 --- /dev/null +++ b/blocks/lcp-header-container/package.json @@ -0,0 +1,20 @@ +{ + "name": "lcp-viewport", + "version": "0.1.0", + "description": "Example block scaffolded with Create Block tool.", + "author": "The WordPress Contributors", + "license": "GPL-2.0-or-later", + "main": "build/index.js", + "scripts": { + "build": "wp-scripts build", + "format": "wp-scripts format", + "lint:css": "wp-scripts lint-style", + "lint:js": "wp-scripts lint-js", + "packages-update": "wp-scripts packages-update", + "plugin-zip": "wp-scripts plugin-zip", + "start": "wp-scripts start" + }, + "devDependencies": { + "@wordpress/scripts": "^30.4.0" + } +} diff --git a/blocks/lcp-header-container/readme.txt b/blocks/lcp-header-container/readme.txt new file mode 100644 index 0000000..d7775a0 --- /dev/null +++ b/blocks/lcp-header-container/readme.txt @@ -0,0 +1,55 @@ +=== Lcp Viewport === +Contributors: The WordPress Contributors +Tags: block +Tested up to: 6.6 +Stable tag: 0.1.0 +License: GPL-2.0-or-later +License URI: https://www.gnu.org/licenses/gpl-2.0.html + +Example block scaffolded with Create Block tool. + +== Description == + +This is the long description. No limit, and you can use Markdown (as well as in the following sections). + +For backwards compatibility, if this section is missing, the full length of the short description will be used, and +Markdown parsed. + +== Installation == + +This section describes how to install the plugin and get it working. + +e.g. + +1. Upload the plugin files to the `/wp-content/plugins/lcp-viewport` directory, or install the plugin through the WordPress plugins screen directly. +1. Activate the plugin through the 'Plugins' screen in WordPress + + +== Frequently Asked Questions == + += A question that someone might have = + +An answer to that question. + += What about foo bar? = + +Answer to foo bar dilemma. + +== Screenshots == + +1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from +the /assets directory or the directory that contains the stable readme.txt (tags or trunk). Screenshots in the /assets +directory take precedence. For example, `/assets/screenshot-1.png` would win over `/tags/4.3/screenshot-1.png` +(or jpg, jpeg, gif). +2. This is the second screen shot + +== Changelog == + += 0.1.0 = +* Release + +== Arbitrary section == + +You may provide arbitrary sections, in the same format as the ones above. This may be of use for extremely complicated +plugins where more information needs to be conveyed that doesn't fit into the categories of "description" or +"installation." Arbitrary sections will be shown below the built-in sections outlined above. diff --git a/blocks/lcp-header-container/src/block.json b/blocks/lcp-header-container/src/block.json new file mode 100644 index 0000000..69a8950 --- /dev/null +++ b/blocks/lcp-header-container/src/block.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "lcp/header-container", + "version": "0.1.0", + "title": "Header Container", + "category": "widgets", + "icon": "smiley", + "description": "Viewport container which is designed to be the parent of all other blocks", + "example": {}, + "supports": { + "color": { + "background": true, + "text": false, + "link": false + } + }, + "attributes": { + "sticky": { + "type": "string", + "default": "never" + } + }, + "textdomain": "lcp-viewport", + "editorScript": "file:./index.js", + "editorStyle": "file:./index.css", + "style": "file:./style-index.css", + "viewScript": "file:./view.js" +} diff --git a/blocks/lcp-header-container/src/edit.js b/blocks/lcp-header-container/src/edit.js new file mode 100644 index 0000000..d096b57 --- /dev/null +++ b/blocks/lcp-header-container/src/edit.js @@ -0,0 +1,155 @@ +/** + * Retrieves the translation of text. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/ + */ +import { __ } from '@wordpress/i18n'; + +/** + * React hook that is used to mark the block wrapper element. + * It provides all the necessary props like the class name. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops + */ +import { useBlockProps, InnerBlocks, InspectorControls } from '@wordpress/block-editor'; +import { SelectControl, BaseControl, ToggleControl,__experimentalUnitControl as UnitControl } from '@wordpress/components'; +import { useState, useEffect } from 'react'; +/** + * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. + * Those files can contain any CSS code that gets applied to the editor. + * + * @see https://www.npmjs.com/package/@wordpress/scripts#using-css + */ +import './editor.scss'; + +/** + * The edit function describes the structure of your block in the context of the + * editor. This represents what the editor will render when the block is used. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#edit + * + * @return {Element} Element to render. + */ +export default function Edit({ attributes, setAttributes }) { + + const [isIndependentLarge, setIsIndependentLarge] = useState(false); + + const [paddingTop, setPaddingTop] = useState('10px'); + const [paddingRight, setPaddingRight] = useState('10px'); + const [paddingBottom, setPaddingBottom] = useState('10px'); + const [paddingLeft, setPaddingLeft] = useState('10px'); + + const { sticky } = attributes; + + // Block props for the outer block + const blockProps = useBlockProps(); + + // Handle the change of the sticky attribute + const handleStickyChange = (value) => { + setAttributes({ sticky: value }); + }; + const handleToggleChange = () => { + setIsIndependentLarge(!isIndependentLarge); + }; + + const updatePaddingForAllSizes = (newValue) => { + const newPadding = { + extraLarge: { top: newValue, right: newValue, bottom: newValue, left: newValue }, + large: { top: newValue, right: newValue, bottom: newValue, left: newValue }, + medium: { top: newValue, right: newValue, bottom: newValue, left: newValue }, + small: { top: newValue, right: newValue, bottom: newValue, left: newValue } + }; + + // Update the padding attribute with the new padding object + setAttributes({ padding: newPadding }); + }; + return ( + + {/* Inspector Controls: Add a SelectControl to change the sticky attribute */} + + + + + Padding + + + + {/* Padding controls */} + {isIndependentLarge ? ( + + {/* Padding controls for top, left, right, bottom */} + + Top + { + setPaddingTop(newValue); + setAttributes({ paddingTop: newValue }); + }} + /> + + + Left + { + setPaddingLeft(newValue); + setAttributes({ paddingLeft: newValue }); + }} + /> + + + Right + { + setPaddingRight(newValue); + setAttributes({ paddingRight: newValue }); + }} + /> + + + Bottom + { + setPaddingBottom(newValue); + setAttributes({ paddingBottom: newValue }); + }} + /> + + + ) : ( + + )} + + + + + {__('Lcp Main – hello from the editor!', 'lcp')} + + + + + ); +} diff --git a/blocks/lcp-header-container/src/editor.scss b/blocks/lcp-header-container/src/editor.scss new file mode 100644 index 0000000..6e6850f --- /dev/null +++ b/blocks/lcp-header-container/src/editor.scss @@ -0,0 +1,9 @@ +/** + * The following styles get applied inside the editor only. + * + * Replace them with your own styles or remove the file completely. + */ + +.wp-block-create-block-lcp-viewport { + border: 1px dotted #f00; +} diff --git a/blocks/lcp-header-container/src/index.js b/blocks/lcp-header-container/src/index.js new file mode 100644 index 0000000..ade1e47 --- /dev/null +++ b/blocks/lcp-header-container/src/index.js @@ -0,0 +1,39 @@ +/** + * Registers a new block provided a unique name and an object defining its behavior. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ + */ +import { registerBlockType } from '@wordpress/blocks'; + +/** + * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. + * All files containing `style` keyword are bundled together. The code used + * gets applied both to the front of your site and to the editor. + * + * @see https://www.npmjs.com/package/@wordpress/scripts#using-css + */ +import './style.scss'; + +/** + * Internal dependencies + */ +import Edit from './edit'; +import save from './save'; +import metadata from './block.json'; + +/** + * Every block starts by registering a new block type definition. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ + */ +registerBlockType( metadata.name, { + /** + * @see ./edit.js + */ + edit: Edit, + + /** + * @see ./save.js + */ + save, +} ); diff --git a/blocks/lcp-header-container/src/save.js b/blocks/lcp-header-container/src/save.js new file mode 100644 index 0000000..55a869f --- /dev/null +++ b/blocks/lcp-header-container/src/save.js @@ -0,0 +1,40 @@ +/** + * React hook that is used to mark the block wrapper element. + * It provides all the necessary props like the class name. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops + */ +import { useBlockProps, InnerBlocks } from '@wordpress/block-editor'; + +/** + * The save function defines the way in which the different attributes should + * be combined into the final markup, which is then serialized by the block + * editor into `post_content`. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#save + * + * @return {Element} Element to render. + */ +export default function Save({ attributes }) { + // Destructure the 'sticky' attribute from the block attributes + const { sticky } = attributes; + + // Block props + const blockProps = useBlockProps.save(); + + // Define a class based on the 'sticky' attribute + let stickyClass = ''; + if (sticky === 'onScroll') { + stickyClass = 'lcp-sticky-on-scroll'; + } else if (sticky === 'always') { + stickyClass = 'lcp-sticky'; + } + // Add the dynamic sticky class to the blockProps className + const className = `${blockProps.className} ${stickyClass}`; + + return ( + + + + ); +} diff --git a/blocks/lcp-header-container/src/style.scss b/blocks/lcp-header-container/src/style.scss new file mode 100644 index 0000000..e19fc0b --- /dev/null +++ b/blocks/lcp-header-container/src/style.scss @@ -0,0 +1,12 @@ +/** + * The following styles get applied both on the front of your site + * and in the editor. + * + * Replace them with your own styles or remove the file completely. + */ + +.wp-block-create-block-lcp-viewport { + background-color: #21759b; + color: #fff; + padding: 2px; +} diff --git a/blocks/lcp-header-container/src/view.js b/blocks/lcp-header-container/src/view.js new file mode 100644 index 0000000..e2a7ec6 --- /dev/null +++ b/blocks/lcp-header-container/src/view.js @@ -0,0 +1,25 @@ +/** + * Use this file for JavaScript code that you want to run in the front-end + * on posts/pages that contain this block. + * + * When this file is defined as the value of the `viewScript` property + * in `block.json` it will be enqueued on the front end of the site. + * + * Example: + * + * ```js + * { + * "viewScript": "file:./view.js" + * } + * ``` + * + * If you're not making any changes to this file because your project doesn't need any + * JavaScript running in the front-end, then you should delete this file and remove + * the `viewScript` property from `block.json`. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#view-script + */ + +/* eslint-disable no-console */ +console.log( 'Hello World! (from create-block-lcp-viewport block)' ); +/* eslint-enable no-console */ diff --git a/blocks/lcp-key-points/.editorconfig b/blocks/lcp-key-points/.editorconfig new file mode 100644 index 0000000..b5df0fc --- /dev/null +++ b/blocks/lcp-key-points/.editorconfig @@ -0,0 +1,18 @@ +# This file is for unifying the coding style for different editors and IDEs +# editorconfig.org + +# WordPress Coding Standards +# https://make.wordpress.org/core/handbook/coding-standards/ + +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = tab + +[*.{yml,yaml}] +indent_style = space +indent_size = 2 diff --git a/blocks/lcp-key-points/.gitignore b/blocks/lcp-key-points/.gitignore new file mode 100644 index 0000000..f66335e --- /dev/null +++ b/blocks/lcp-key-points/.gitignore @@ -0,0 +1,30 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Coverage directory used by tools like istanbul +coverage + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Output of `npm pack` +*.tgz + +# Output of `wp-scripts plugin-zip` +*.zip + +# dotenv environment variables file +.env diff --git a/blocks/lcp-key-points/key-points.php b/blocks/lcp-key-points/key-points.php new file mode 100644 index 0000000..f38c8f8 --- /dev/null +++ b/blocks/lcp-key-points/key-points.php @@ -0,0 +1,97 @@ +" . esc_html($attributes['heading']) . "{$heading_tag}>"; + + // Create the list and populate it with the key points + $output = $heading; // Start with the heading + $output .= ''; + foreach ($key_points as $point) { + // Avoid empty points + if (!empty($point)) { + $output .= '' . esc_html($point) . ''; + } + } + $output .= ''; + + return $output; +} + + + +// Register the block +function register_key_points_block() { + register_block_type(__DIR__ . '/build', [ + 'editor_script' => 'key-points-editor-script', // Script for the editor + 'render_callback' => 'render_key_points_block', // PHP callback for frontend rendering + ]); +} +add_action('init', 'register_key_points_block'); diff --git a/blocks/lcp-key-points/package.json b/blocks/lcp-key-points/package.json new file mode 100644 index 0000000..218d0b4 --- /dev/null +++ b/blocks/lcp-key-points/package.json @@ -0,0 +1,20 @@ +{ + "name": "key-points", + "version": "0.1.0", + "description": "Example block scaffolded with Create Block tool.", + "author": "The WordPress Contributors", + "license": "GPL-2.0-or-later", + "main": "build/index.js", + "scripts": { + "build": "wp-scripts build", + "format": "wp-scripts format", + "lint:css": "wp-scripts lint-style", + "lint:js": "wp-scripts lint-js", + "packages-update": "wp-scripts packages-update", + "plugin-zip": "wp-scripts plugin-zip", + "start": "wp-scripts start" + }, + "devDependencies": { + "@wordpress/scripts": "^30.6.0" + } +} diff --git a/blocks/lcp-key-points/readme.txt b/blocks/lcp-key-points/readme.txt new file mode 100644 index 0000000..9bd8954 --- /dev/null +++ b/blocks/lcp-key-points/readme.txt @@ -0,0 +1,55 @@ +=== Key Points === +Contributors: The WordPress Contributors +Tags: block +Tested up to: 6.6 +Stable tag: 0.1.0 +License: GPL-2.0-or-later +License URI: https://www.gnu.org/licenses/gpl-2.0.html + +Example block scaffolded with Create Block tool. + +== Description == + +This is the long description. No limit, and you can use Markdown (as well as in the following sections). + +For backwards compatibility, if this section is missing, the full length of the short description will be used, and +Markdown parsed. + +== Installation == + +This section describes how to install the plugin and get it working. + +e.g. + +1. Upload the plugin files to the `/wp-content/plugins/key-points` directory, or install the plugin through the WordPress plugins screen directly. +1. Activate the plugin through the 'Plugins' screen in WordPress + + +== Frequently Asked Questions == + += A question that someone might have = + +An answer to that question. + += What about foo bar? = + +Answer to foo bar dilemma. + +== Screenshots == + +1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from +the /assets directory or the directory that contains the stable readme.txt (tags or trunk). Screenshots in the /assets +directory take precedence. For example, `/assets/screenshot-1.png` would win over `/tags/4.3/screenshot-1.png` +(or jpg, jpeg, gif). +2. This is the second screen shot + +== Changelog == + += 0.1.0 = +* Release + +== Arbitrary section == + +You may provide arbitrary sections, in the same format as the ones above. This may be of use for extremely complicated +plugins where more information needs to be conveyed that doesn't fit into the categories of "description" or +"installation." Arbitrary sections will be shown below the built-in sections outlined above. diff --git a/blocks/lcp-key-points/src/block.json b/blocks/lcp-key-points/src/block.json new file mode 100644 index 0000000..6ccf957 --- /dev/null +++ b/blocks/lcp-key-points/src/block.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "lcp/key-points", + "version": "0.1.0", + "title": "Key Points", + "category": "widgets", + "icon": "smiley", + "description": "Key points meta field for single posts", + "example": {}, + "supports": { + "html": false + }, + "attributes": { + "heading": { + "type": "string", + "default": "Key Points" + }, + "headingTag": { + "type": "string", + "default": "h3" + }, + "headingFontSizeLarge": { + "type": "string", + "default": "24px" + }, + "pointsFontSizeLarge": { + "type": "string", + "default": "16px" + }, + "listStyleType": { + "type": "string", + "default": "disc" + } + }, + "textdomain": "key-points", + "editorScript": "file:./index.js", + "editorStyle": "file:./index.css", + "style": "file:./style-index.css", + "viewScript": "file:./view.js" +} diff --git a/blocks/lcp-key-points/src/edit.js b/blocks/lcp-key-points/src/edit.js new file mode 100644 index 0000000..1ea27bd --- /dev/null +++ b/blocks/lcp-key-points/src/edit.js @@ -0,0 +1,118 @@ +import { __ } from '@wordpress/i18n'; +import { useBlockProps, InspectorControls } from '@wordpress/block-editor'; +import { SelectControl, FontSizePicker, TextControl } from '@wordpress/components'; +import { useState, useEffect } from 'react'; +import './editor.scss'; + +export default function Edit( { attributes, setAttributes } ) { + const { heading, pointsFontSizeLarge, headingFontSizeLarge, listStyleType } = attributes; + + const fontSizes = [ + { + name: __( 'Small', 'key-points' ), + slug: 'small', + size: '12px', + }, + { + name: __( 'Medium', 'key-points' ), + slug: 'medium', + size: '16px', + }, + { + name: __( 'Large', 'key-points' ), + slug: 'large', + size: '24px', + }, + { + name: __( 'Extra Large', 'key-points' ), + slug: 'x-large', + size: '36px', + }, + ]; + + const listStyleTypeOptions = [ + { label: __( 'Disc', 'lcp' ), value: 'disc' }, + { label: __( 'Circle', 'lcp' ), value: 'circle' }, + { label: __( 'Square', 'lcp' ), value: 'square' }, + { label: __( 'None', 'lcp' ), value: 'none' }, + ]; + + // Static Lorem Ipsum key points (5 unique points) + const loremIpsumPoints = [ + "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", + "Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", + "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", + "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.", + "Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." + ]; + + const [keyPoints, setKeyPoints] = useState(loremIpsumPoints); // Set initial key points to the Lorem Ipsum array + + return ( + <> + {/* Inspector Controls */} + + {/* List Style Dropdown */} + { + setAttributes( { listStyleType: newValue } ); + } } + /> + + {/* Heading Input */} + setAttributes( { heading: newHeading } ) } + /> + + {/* Font Size Picker for Points */} + { + if ( typeof newFontSize === 'string' ) { + setAttributes( { pointsFontSizeLarge: newFontSize } ); + } + } } + fallbackFontSize={ '16px' } + /> + + {/* Font Size Picker for Heading */} + { + if ( typeof newFontSize === 'string' ) { + setAttributes( { headingFontSizeLarge: newFontSize } ); + } + } } + fallbackFontSize={ '24px' } + /> + + + {/* Block Content */} + + { __( 'Key Points – hello from the editor!', 'lcp' ) } + + { heading && { heading } } + + {/* Display key points */} + { keyPoints && keyPoints.length > 0 && ( + + {keyPoints.map((point, index) => ( + + {point} + + ))} + + )} + > + ); +} + diff --git a/blocks/lcp-key-points/src/editor.scss b/blocks/lcp-key-points/src/editor.scss new file mode 100644 index 0000000..91de19b --- /dev/null +++ b/blocks/lcp-key-points/src/editor.scss @@ -0,0 +1,9 @@ +/** + * The following styles get applied inside the editor only. + * + * Replace them with your own styles or remove the file completely. + */ + +.wp-block-create-block-key-points { + border: 1px dotted #f00; +} diff --git a/blocks/lcp-key-points/src/index.js b/blocks/lcp-key-points/src/index.js new file mode 100644 index 0000000..ade1e47 --- /dev/null +++ b/blocks/lcp-key-points/src/index.js @@ -0,0 +1,39 @@ +/** + * Registers a new block provided a unique name and an object defining its behavior. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ + */ +import { registerBlockType } from '@wordpress/blocks'; + +/** + * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. + * All files containing `style` keyword are bundled together. The code used + * gets applied both to the front of your site and to the editor. + * + * @see https://www.npmjs.com/package/@wordpress/scripts#using-css + */ +import './style.scss'; + +/** + * Internal dependencies + */ +import Edit from './edit'; +import save from './save'; +import metadata from './block.json'; + +/** + * Every block starts by registering a new block type definition. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ + */ +registerBlockType( metadata.name, { + /** + * @see ./edit.js + */ + edit: Edit, + + /** + * @see ./save.js + */ + save, +} ); diff --git a/blocks/lcp-key-points/src/save.js b/blocks/lcp-key-points/src/save.js new file mode 100644 index 0000000..da277a8 --- /dev/null +++ b/blocks/lcp-key-points/src/save.js @@ -0,0 +1,22 @@ +/** + * React hook that is used to mark the block wrapper element. + * It provides all the necessary props like the class name. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops + */ +import { useBlockProps } from '@wordpress/block-editor'; + +/** + * The save function defines the way in which the different attributes should + * be combined into the final markup, which is then serialized by the block + * editor into `post_content`. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#save + * + * @return {Element} Element to render. + */ +export default function save() { + return ( + null + ); +} diff --git a/blocks/lcp-key-points/src/style.scss b/blocks/lcp-key-points/src/style.scss new file mode 100644 index 0000000..b065ee1 --- /dev/null +++ b/blocks/lcp-key-points/src/style.scss @@ -0,0 +1,12 @@ +/** + * The following styles get applied both on the front of your site + * and in the editor. + * + * Replace them with your own styles or remove the file completely. + */ + +.wp-block-create-block-key-points { + background-color: #21759b; + color: #fff; + padding: 2px; +} diff --git a/blocks/lcp-key-points/src/view.js b/blocks/lcp-key-points/src/view.js new file mode 100644 index 0000000..e2cf309 --- /dev/null +++ b/blocks/lcp-key-points/src/view.js @@ -0,0 +1,25 @@ +/** + * Use this file for JavaScript code that you want to run in the front-end + * on posts/pages that contain this block. + * + * When this file is defined as the value of the `viewScript` property + * in `block.json` it will be enqueued on the front end of the site. + * + * Example: + * + * ```js + * { + * "viewScript": "file:./view.js" + * } + * ``` + * + * If you're not making any changes to this file because your project doesn't need any + * JavaScript running in the front-end, then you should delete this file and remove + * the `viewScript` property from `block.json`. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#view-script + */ + +/* eslint-disable no-console */ +console.log( 'Hello World! (from create-block-key-points block)' ); +/* eslint-enable no-console */ diff --git a/blocks/main-area/.editorconfig b/blocks/main-area/.editorconfig new file mode 100644 index 0000000..b5df0fc --- /dev/null +++ b/blocks/main-area/.editorconfig @@ -0,0 +1,18 @@ +# This file is for unifying the coding style for different editors and IDEs +# editorconfig.org + +# WordPress Coding Standards +# https://make.wordpress.org/core/handbook/coding-standards/ + +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = tab + +[*.{yml,yaml}] +indent_style = space +indent_size = 2 diff --git a/blocks/main-area/.gitignore b/blocks/main-area/.gitignore new file mode 100644 index 0000000..f66335e --- /dev/null +++ b/blocks/main-area/.gitignore @@ -0,0 +1,30 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Coverage directory used by tools like istanbul +coverage + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Output of `npm pack` +*.tgz + +# Output of `wp-scripts plugin-zip` +*.zip + +# dotenv environment variables file +.env diff --git a/blocks/main-area/main-area.php b/blocks/main-area/main-area.php new file mode 100644 index 0000000..564e070 --- /dev/null +++ b/blocks/main-area/main-area.php @@ -0,0 +1,30 @@ + { + setAttributes({ maxWidth: value }); + }; + + const blockProps = useBlockProps(); // Standard block props for the child block + const innerBlocksProps = useInnerBlocksProps(blockProps); // Using blockProps for inner block props + + // Correctly define style as an object + const style = { + maxWidth: maxWidth, + }; + + return ( + <> + {/* Inspector Controls for maxWidth */} + + + + {/* UnitControl to adjust maxWidth value */} + + + + + + {/* Main block content */} + + + + + + > + ); +} diff --git a/blocks/main-area/src/editor.scss b/blocks/main-area/src/editor.scss new file mode 100644 index 0000000..6e6850f --- /dev/null +++ b/blocks/main-area/src/editor.scss @@ -0,0 +1,9 @@ +/** + * The following styles get applied inside the editor only. + * + * Replace them with your own styles or remove the file completely. + */ + +.wp-block-create-block-lcp-viewport { + border: 1px dotted #f00; +} diff --git a/blocks/main-area/src/index.js b/blocks/main-area/src/index.js new file mode 100644 index 0000000..ade1e47 --- /dev/null +++ b/blocks/main-area/src/index.js @@ -0,0 +1,39 @@ +/** + * Registers a new block provided a unique name and an object defining its behavior. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ + */ +import { registerBlockType } from '@wordpress/blocks'; + +/** + * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. + * All files containing `style` keyword are bundled together. The code used + * gets applied both to the front of your site and to the editor. + * + * @see https://www.npmjs.com/package/@wordpress/scripts#using-css + */ +import './style.scss'; + +/** + * Internal dependencies + */ +import Edit from './edit'; +import save from './save'; +import metadata from './block.json'; + +/** + * Every block starts by registering a new block type definition. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ + */ +registerBlockType( metadata.name, { + /** + * @see ./edit.js + */ + edit: Edit, + + /** + * @see ./save.js + */ + save, +} ); diff --git a/blocks/main-area/src/save.js b/blocks/main-area/src/save.js new file mode 100644 index 0000000..9db314c --- /dev/null +++ b/blocks/main-area/src/save.js @@ -0,0 +1,32 @@ +/** + * React hook that is used to mark the block wrapper element. + * It provides all the necessary props like the class name. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops + */ +import { useBlockProps, InnerBlocks } from '@wordpress/block-editor'; + +/** + * The save function defines the way in which the different attributes should + * be combined into the final markup, which is then serialized by the block + * editor into `post_content`. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#save + * + * @return {Element} Element to render. + */ +export default function Save( {attributes} ) { + const { maxWidth = '100%' } = attributes; // Destructure maxWidth from attributes (with a default value) + + const blockProps = useBlockProps.save(); + const style = { + maxWidth: maxWidth, + }; + return ( + + + + + + ); +} diff --git a/blocks/main-area/src/style.scss b/blocks/main-area/src/style.scss new file mode 100644 index 0000000..e19fc0b --- /dev/null +++ b/blocks/main-area/src/style.scss @@ -0,0 +1,12 @@ +/** + * The following styles get applied both on the front of your site + * and in the editor. + * + * Replace them with your own styles or remove the file completely. + */ + +.wp-block-create-block-lcp-viewport { + background-color: #21759b; + color: #fff; + padding: 2px; +} diff --git a/blocks/main-area/src/view.js b/blocks/main-area/src/view.js new file mode 100644 index 0000000..e2a7ec6 --- /dev/null +++ b/blocks/main-area/src/view.js @@ -0,0 +1,25 @@ +/** + * Use this file for JavaScript code that you want to run in the front-end + * on posts/pages that contain this block. + * + * When this file is defined as the value of the `viewScript` property + * in `block.json` it will be enqueued on the front end of the site. + * + * Example: + * + * ```js + * { + * "viewScript": "file:./view.js" + * } + * ``` + * + * If you're not making any changes to this file because your project doesn't need any + * JavaScript running in the front-end, then you should delete this file and remove + * the `viewScript` property from `block.json`. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#view-script + */ + +/* eslint-disable no-console */ +console.log( 'Hello World! (from create-block-lcp-viewport block)' ); +/* eslint-enable no-console */ diff --git a/blocks/sidecontent/.editorconfig b/blocks/sidecontent/.editorconfig new file mode 100644 index 0000000..b5df0fc --- /dev/null +++ b/blocks/sidecontent/.editorconfig @@ -0,0 +1,18 @@ +# This file is for unifying the coding style for different editors and IDEs +# editorconfig.org + +# WordPress Coding Standards +# https://make.wordpress.org/core/handbook/coding-standards/ + +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = tab + +[*.{yml,yaml}] +indent_style = space +indent_size = 2 diff --git a/blocks/sidecontent/.gitignore b/blocks/sidecontent/.gitignore new file mode 100644 index 0000000..f66335e --- /dev/null +++ b/blocks/sidecontent/.gitignore @@ -0,0 +1,30 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Coverage directory used by tools like istanbul +coverage + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Output of `npm pack` +*.tgz + +# Output of `wp-scripts plugin-zip` +*.zip + +# dotenv environment variables file +.env diff --git a/blocks/sidecontent/lcp-sidecontent.php b/blocks/sidecontent/lcp-sidecontent.php new file mode 100644 index 0000000..5a9f87c --- /dev/null +++ b/blocks/sidecontent/lcp-sidecontent.php @@ -0,0 +1,30 @@ + + + { __( 'Lcp Sidecontent – hello from the editor!', 'lcp' ) } + + + + ); +} diff --git a/blocks/sidecontent/src/editor.scss b/blocks/sidecontent/src/editor.scss new file mode 100644 index 0000000..40805c6 --- /dev/null +++ b/blocks/sidecontent/src/editor.scss @@ -0,0 +1,9 @@ +/** + * The following styles get applied inside the editor only. + * + * Replace them with your own styles or remove the file completely. + */ + +.wp-block-create-block-lcp-sidecontent { + border: 1px dotted #f00; +} diff --git a/blocks/sidecontent/src/index.js b/blocks/sidecontent/src/index.js new file mode 100644 index 0000000..ade1e47 --- /dev/null +++ b/blocks/sidecontent/src/index.js @@ -0,0 +1,39 @@ +/** + * Registers a new block provided a unique name and an object defining its behavior. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ + */ +import { registerBlockType } from '@wordpress/blocks'; + +/** + * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. + * All files containing `style` keyword are bundled together. The code used + * gets applied both to the front of your site and to the editor. + * + * @see https://www.npmjs.com/package/@wordpress/scripts#using-css + */ +import './style.scss'; + +/** + * Internal dependencies + */ +import Edit from './edit'; +import save from './save'; +import metadata from './block.json'; + +/** + * Every block starts by registering a new block type definition. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ + */ +registerBlockType( metadata.name, { + /** + * @see ./edit.js + */ + edit: Edit, + + /** + * @see ./save.js + */ + save, +} ); diff --git a/blocks/sidecontent/src/save.js b/blocks/sidecontent/src/save.js new file mode 100644 index 0000000..9458626 --- /dev/null +++ b/blocks/sidecontent/src/save.js @@ -0,0 +1,28 @@ +/** + * React hook that is used to mark the block wrapper element. + * It provides all the necessary props like the class name. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops + */ +import { useBlockProps, InnerBlocks } from '@wordpress/block-editor'; + +/** + * The save function defines the way in which the different attributes should + * be combined into the final markup, which is then serialized by the block + * editor into `post_content`. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#save + * + * @return {Element} Element to render. + */ +export default function Save() { + const blockProps = useBlockProps.save(); + + return ( + + + + + + ); +} diff --git a/blocks/sidecontent/src/style.scss b/blocks/sidecontent/src/style.scss new file mode 100644 index 0000000..832c96d --- /dev/null +++ b/blocks/sidecontent/src/style.scss @@ -0,0 +1,12 @@ +/** + * The following styles get applied both on the front of your site + * and in the editor. + * + * Replace them with your own styles or remove the file completely. + */ + +.wp-block-create-block-lcp-sidecontent { + background-color: #21759b; + color: #fff; + padding: 2px; +} diff --git a/blocks/sidecontent/src/view.js b/blocks/sidecontent/src/view.js new file mode 100644 index 0000000..87fd95d --- /dev/null +++ b/blocks/sidecontent/src/view.js @@ -0,0 +1,25 @@ +/** + * Use this file for JavaScript code that you want to run in the front-end + * on posts/pages that contain this block. + * + * When this file is defined as the value of the `viewScript` property + * in `block.json` it will be enqueued on the front end of the site. + * + * Example: + * + * ```js + * { + * "viewScript": "file:./view.js" + * } + * ``` + * + * If you're not making any changes to this file because your project doesn't need any + * JavaScript running in the front-end, then you should delete this file and remove + * the `viewScript` property from `block.json`. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#view-script + */ + +/* eslint-disable no-console */ +console.log( 'Hello World! (from create-block-lcp-sidecontent block)' ); +/* eslint-enable no-console */ diff --git a/blocks/viewport/.editorconfig b/blocks/viewport/.editorconfig new file mode 100644 index 0000000..b5df0fc --- /dev/null +++ b/blocks/viewport/.editorconfig @@ -0,0 +1,18 @@ +# This file is for unifying the coding style for different editors and IDEs +# editorconfig.org + +# WordPress Coding Standards +# https://make.wordpress.org/core/handbook/coding-standards/ + +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = tab + +[*.{yml,yaml}] +indent_style = space +indent_size = 2 diff --git a/blocks/viewport/.gitignore b/blocks/viewport/.gitignore new file mode 100644 index 0000000..f66335e --- /dev/null +++ b/blocks/viewport/.gitignore @@ -0,0 +1,30 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Coverage directory used by tools like istanbul +coverage + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Output of `npm pack` +*.tgz + +# Output of `wp-scripts plugin-zip` +*.zip + +# dotenv environment variables file +.env diff --git a/blocks/viewport/lcp-viewport.php b/blocks/viewport/lcp-viewport.php new file mode 100644 index 0000000..111424a --- /dev/null +++ b/blocks/viewport/lcp-viewport.php @@ -0,0 +1,30 @@ + { + return ; + }; + + return ( + + {/* Inspector Controls: Add a toggle for the `hasSidecontent` attribute */} + + setAttributes({ hasSidecontent: value })} + /> + + + + {__('Lcp Viewport – hello from the editor!', 'lcp-viewport')} + + + {/* Render the InnerBlocks with conditional template */} + + + ); +} diff --git a/blocks/viewport/src/editor.scss b/blocks/viewport/src/editor.scss new file mode 100644 index 0000000..6e6850f --- /dev/null +++ b/blocks/viewport/src/editor.scss @@ -0,0 +1,9 @@ +/** + * The following styles get applied inside the editor only. + * + * Replace them with your own styles or remove the file completely. + */ + +.wp-block-create-block-lcp-viewport { + border: 1px dotted #f00; +} diff --git a/blocks/viewport/src/index.js b/blocks/viewport/src/index.js new file mode 100644 index 0000000..ade1e47 --- /dev/null +++ b/blocks/viewport/src/index.js @@ -0,0 +1,39 @@ +/** + * Registers a new block provided a unique name and an object defining its behavior. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ + */ +import { registerBlockType } from '@wordpress/blocks'; + +/** + * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. + * All files containing `style` keyword are bundled together. The code used + * gets applied both to the front of your site and to the editor. + * + * @see https://www.npmjs.com/package/@wordpress/scripts#using-css + */ +import './style.scss'; + +/** + * Internal dependencies + */ +import Edit from './edit'; +import save from './save'; +import metadata from './block.json'; + +/** + * Every block starts by registering a new block type definition. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ + */ +registerBlockType( metadata.name, { + /** + * @see ./edit.js + */ + edit: Edit, + + /** + * @see ./save.js + */ + save, +} ); diff --git a/blocks/viewport/src/save.js b/blocks/viewport/src/save.js new file mode 100644 index 0000000..60fd583 --- /dev/null +++ b/blocks/viewport/src/save.js @@ -0,0 +1,26 @@ +import { useBlockProps, InnerBlocks } from '@wordpress/block-editor'; + +/** + * The save function defines the way in which the different attributes should + * be combined into the final markup, which is then serialized by the block + * editor into `post_content`. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#save + * + * @return {Element} Element to render. + */ +export default function Save({ attributes }) { + const { hasSidecontent } = attributes; // Retrieve the hasSidecontent attribute + const blockProps = useBlockProps.save(); + + // Conditionally add the .lcp-has-sidecontent class if hasSidecontent is true + const hasSidecontentClass = hasSidecontent ? 'class="lcp-has-sidecontent"' : null; + + return ( + + + + + + ); +} diff --git a/blocks/viewport/src/style.scss b/blocks/viewport/src/style.scss new file mode 100644 index 0000000..9bee04d --- /dev/null +++ b/blocks/viewport/src/style.scss @@ -0,0 +1,7 @@ +/** + * The following styles get applied both on the front of your site + * and in the editor. + * + * Replace them with your own styles or remove the file completely. + */ + diff --git a/blocks/viewport/src/view.js b/blocks/viewport/src/view.js new file mode 100644 index 0000000..e2a7ec6 --- /dev/null +++ b/blocks/viewport/src/view.js @@ -0,0 +1,25 @@ +/** + * Use this file for JavaScript code that you want to run in the front-end + * on posts/pages that contain this block. + * + * When this file is defined as the value of the `viewScript` property + * in `block.json` it will be enqueued on the front end of the site. + * + * Example: + * + * ```js + * { + * "viewScript": "file:./view.js" + * } + * ``` + * + * If you're not making any changes to this file because your project doesn't need any + * JavaScript running in the front-end, then you should delete this file and remove + * the `viewScript` property from `block.json`. + * + * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#view-script + */ + +/* eslint-disable no-console */ +console.log( 'Hello World! (from create-block-lcp-viewport block)' ); +/* eslint-enable no-console */ diff --git a/functions.php b/functions.php index 218f6b0..adbf516 100644 --- a/functions.php +++ b/functions.php @@ -1,5 +1,455 @@ 'Drawers', + 'singular_name' => 'Drawer', + 'menu_name' => 'Drawers', + 'name_admin_bar' => 'Drawer', + 'add_new' => 'Add New', + 'add_new_item' => 'Add New Drawer', + 'new_item' => 'New Drawer', + 'edit_item' => 'Edit Drawer', + 'view_item' => 'View Drawer', + 'all_items' => 'All Drawers', + 'search_items' => 'Search Drawers', + 'parent_item_colon' => 'Parent Drawers:', + 'not_found' => 'No drawers found.', + 'not_found_in_trash' => 'No drawers found in Trash.', + 'featured_image' => 'Drawer Image', + 'set_featured_image' => 'Set drawer image', + 'remove_featured_image' => 'Remove drawer image', + 'use_featured_image' => 'Use as drawer image', + 'archives' => 'Drawer Archives', + 'insert_into_item' => 'Insert into drawer', + 'uploaded_to_this_item' => 'Uploaded to this drawer', + 'filter_items_list' => 'Filter drawers list', + ); + + // Set up the arguments for the Drawer CPT + $args = array( + 'labels' => $labels, + 'public' => true, // Set this to false if you want it private + 'publicly_queryable' => true, + 'show_ui' => true, + 'show_in_menu' => true, + 'query_var' => true, + 'rewrite' => array( 'slug' => 'drawer' ), + 'capability_type' => 'post', + 'has_archive' => true, + 'hierarchical' => false, // Set to true if you want the CPT to behave like pages + 'menu_position' => 5, + 'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields' ), + 'taxonomies' => array(), // Optionally add taxonomies if needed + 'show_in_rest' => true, // Enable for Gutenberg editor + ); + + // Register the Drawer CPT + register_post_type( 'drawer', $args ); +} + +// Hook into the 'init' action to register the CPT +add_action( 'init', 'register_drawer_cpt' ); + + +/* KEY POINTS */ +function add_key_points_meta_box() { + add_meta_box( + 'key_points_meta_box', // ID of the meta box + 'Key Points', // Title of the meta box + 'render_key_points_meta_box', // Callback function to display the meta box + 'post', // Post type (you can change it to other post types) + 'normal', // Context (normal, side, advanced) + 'default' // Priority + ); +} +add_action('add_meta_boxes', 'add_key_points_meta_box'); + +// Callback function to render the meta box +function render_key_points_meta_box($post) { + // Retrieve the stored key points (serialized data) + $key_points_serialized = get_post_meta($post->ID, '_key_points', true); + $key_points = !empty($key_points_serialized) ? unserialize($key_points_serialized) : []; + ?> + + + $point) : ?> + + + Remove + + + + Add Key Point + + + + + Custom Code Settings + + + + + JavaScript in Header + + + + + JavaScript in Footer + + + + + CSS in Header + + + + + CSS in Footer + + + + + + + ' . $custom_code['js_header'] . ''; + } + + // Check and output CSS for header + if ( isset( $custom_code['css_header'] ) && ! empty( $custom_code['css_header'] ) ) { + echo ''; + } + } + + // Check if the hook is for the footer + if ($hook == "footer") { + // Check and output JS for footer + if ( isset( $custom_code['js_footer'] ) && ! empty( $custom_code['js_footer'] ) ) { + echo ''; + } + + // Check and output CSS for footer + if ( isset( $custom_code['css_footer'] ) && ! empty( $custom_code['css_footer'] ) ) { + echo ''; + } + } +} + +// Attach to wp_head and wp_footer, passing the location as a parameter +add_action( 'wp_head', function() { + lcp_custom_code_output('header'); +}); + +add_action( 'wp_footer', function() { + lcp_custom_code_output('footer'); +}); + + + + + +/* ------------------------ POPUPS ------------------------------- */ + + +/** + * Register the Custom Post Type (CPT) 'lcp-popups' + */ +function lcp_popups_custom_post_type() { + $labels = array( + 'name' => 'LCP Popups', + 'singular_name' => 'LCP Popup', + 'menu_name' => 'LCP Popups', + 'name_admin_bar' => 'LCP Popup', + 'add_new' => 'Add New', + 'add_new_item' => 'Add New Popup', + 'new_item' => 'New Popup', + 'edit_item' => 'Edit Popup', + 'view_item' => 'View Popup', + 'all_items' => 'All Popups', + 'search_items' => 'Search Popups', + 'not_found' => 'No popups found.', + 'not_found_in_trash' => 'No popups found in Trash.', + 'parent_item_colon' => '', + 'menu_icon' => 'dashicons-lightbulb', // Optional: Set an icon + ); + + $args = array( + 'labels' => $labels, + 'public' => true, + 'show_ui' => true, + 'show_in_menu' => true, + 'show_in_admin_bar' => true, + 'menu_position' => 20, + 'supports' => array( 'title', 'editor' ), // You can add other supports like 'thumbnail', 'excerpt', etc. + 'has_archive' => true, + 'rewrite' => array( 'slug' => 'lcp-popups' ), + 'show_in_rest' => true, + ); + + register_post_type( 'lcp-popup', $args ); +} +add_action( 'init', 'lcp_popups_custom_post_type' ); + +/** + * Add a meta box with a toggle switch for "Show on All Pages" + */ +function lcp_popups_add_meta_box() { + add_meta_box( + 'lcp_popups_toggle_meta_box', // Meta box ID + 'Popup Settings', // Meta box title + 'lcp_popups_meta_box_callback', // Callback function + 'lcp_popups', // Post type + 'side', // Context (normal, side, etc.) + 'high' // Priority (default, low, high) + ); +} +add_action( 'add_meta_boxes', 'lcp_popups_add_meta_box' ); + +/** + * Callback function to display the meta box content + */ +function lcp_popups_meta_box_callback( $post ) { + // Add a nonce for security + wp_nonce_field( 'lcp_popups_nonce_action', 'lcp_popups_nonce' ); + + // Get the current value of the toggle (default to false) + $show_on_all_pages = get_post_meta( $post->ID, '_lcp_popups_show_on_all_pages', true ); + + // Display the toggle switch (checkbox) + ?> + + + /> + Show on All Pages + + + ' . $content . ''; + // Get the array of post IDs from the wp_option + $post_ids = get_option('lcp_popups_every_page'); + + if (!empty($post_ids) && is_array($post_ids)) { + // Loop through the post IDs and get the content for each post + foreach ($post_ids as $post_id) { + // Make sure the post exists and get its content + $post = get_post($post_id); + if ($post) { + // Get the content and wrap it with a class + $content = apply_filters('the_content', $post->post_content); + + // Output the popup content in the footer + echo '' . $content . ''; + } + } + } +} +add_action('wp_footer', 'lcp_display_popups_on_every_page'); + + +// Hook into wp_footer to add the login form in the footer +function add_login_form_to_footer() { + ?> + + + + + + + + + + | + + + + + + handleScroll(header, sideContent, adminBarHeight), 10); // 10ms debounce delay + + // Add the scroll event listener + window.addEventListener('scroll', debouncedScroll); + + // Add the resize event listener + window.addEventListener('resize', debounce(function() { + updateSideContentPosition(header, sideContent, adminBarHeight); + adjustMainContentMargin(header, mainContent, adminBarHeight); + }, 0)); // 0ms debounce delay + + + + // Optional: Popup auto-open after a delay (e.g., 2 seconds) + setTimeout(function() { + var popups = document.querySelectorAll('.lcp-popup'); + popups.forEach(function(popup) { + // Uncomment the line below if you want the popup to auto-open + // popup.classList.add('open'); + }); + }, 2000); // 2 seconds delay + +}); + +// Function to get the height of the admin bar if it's visible +function getAdminBarHeight() { + const adminBar = document.getElementById('wpadminbar'); + return adminBar ? adminBar.offsetHeight : 0; // Returns 32px if admin bar is present, 0 if not +} + +// Function to update the position of side content +function updateSideContentPosition(header, sideContent, adminBarHeight) { + const headerHeight = header.offsetHeight; + // If the header has the 'lcp-sticky' or 'lcp-sticky-on-scroll' class, position side content below it, considering the admin bar height + if (header.classList.contains('lcp-sticky') || header.classList.contains('lcp-sticky-on-scroll')) { + sideContent.style.top = (headerHeight + adminBarHeight) + 'px'; // Update side content position + } +} + +// Function to adjust margin-top of the main content +function adjustMainContentMargin(header, mainContent, adminBarHeight) { + if (header.classList.contains('lcp-sticky')) { + const headerHeight = header.offsetHeight; + mainContent.style.marginTop = (headerHeight + adminBarHeight) + 'px'; // Set margin-top to header + admin bar height + } +} + +// Debounce function to limit the frequency of function calls +function debounce(func, delay) { + let timeout; + return function (...args) { + clearTimeout(timeout); + timeout = setTimeout(() => { + func.apply(this, args); + }, delay); + }; +} + +// Scroll handler function to update the 'scrolled' variable and toggle the lcp-sticky class +function handleScroll(header, sideContent, adminBarHeight) { + const scrolled = window.scrollY || document.documentElement.scrollTop; + const headerHeight = header.offsetHeight; + + // Add 'lcp-fixed' class to side content if scrolled beyond the header height + admin bar height + if (scrolled > (headerHeight + adminBarHeight)) { + sideContent.classList.add('lcp-fixed'); + } else { + sideContent.classList.remove('lcp-fixed'); + } + + // Check if the header has the 'lcp-sticky-on-scroll' class and toggle the lcp-sticky class + if (header.classList.contains('lcp-sticky-on-scroll')) { + if (scrolled > (headerHeight + adminBarHeight)) { + header.classList.add('lcp-stuck'); // Slide the header down + } else { + header.classList.remove('lcp-stuck'); // Hide the header if scrolling back up + } + } +} + +// Function to handle the initial page load position for both header and side content +function handleInitialPageLoad(header, sideContent, adminBarHeight) { + const scrolled = window.scrollY || document.documentElement.scrollTop; + const headerHeight = header.offsetHeight; + + // Ensure the side content is properly positioned below the header + admin bar on page load + sideContent.style.top = (headerHeight + adminBarHeight) + 'px'; + + // If the page is loaded with a scroll position greater than header + admin bar height, apply the 'lcp-fixed' class + if (scrolled > (headerHeight + adminBarHeight)) { + sideContent.classList.add('lcp-fixed'); + } else { + sideContent.classList.remove('lcp-fixed'); + } + + // If the page is loaded with a scroll position greater than header + admin bar height, apply the 'lcp-stuck' class + if (header.classList.contains('lcp-sticky-on-scroll') && scrolled > (headerHeight + adminBarHeight)) { + header.classList.add('lcp-stuck'); + } + + const openLoginButtons = document.querySelectorAll('.lcpOpenLoginPopup'); + + + + +} + +// Highlight to share + +document.addEventListener('mouseup', function() { + // Get the selected text + const selectedText = window.getSelection().toString(); + + // Check if the selected text is at least 100 characters + if (selectedText.length >= 100) { + // Get the position of the selection + const range = window.getSelection().getRangeAt(0); + const rect = range.getBoundingClientRect(); + + // Ensure the tooltip exists before trying to manipulate its style + const tooltip = document.getElementById('share-tooltip'); + if (tooltip) { + // Show the tooltip at the position of the selection + tooltip.style.display = 'block'; + tooltip.style.left = `${rect.left + window.scrollX}px`; + tooltip.style.top = `${rect.top + window.scrollY + window.getSelection().anchorNode.offsetHeight + 5}px`; + } + } else { + // Hide the tooltip if selection is less than 100 characters + const tooltip = document.getElementById('share-tooltip'); + if (tooltip) { + tooltip.style.display = 'none'; + } + } + }); + + // Share to Facebook + document.getElementById('facebook-share')?.addEventListener('click', function() { + const selectedText = window.getSelection().toString(); + const facebookUrl = `https://www.facebook.com/sharer/sharer.php?u="e=${encodeURIComponent(selectedText)}`; + window.open(facebookUrl, '_blank'); + }); + + // Share to Twitter + document.getElementById('twitter-share')?.addEventListener('click', function() { + const selectedText = window.getSelection().toString(); + const twitterUrl = `https://twitter.com/intent/tweet?text=${encodeURIComponent(selectedText)}`; + window.open(twitterUrl, '_blank'); + }); + + // Close the tooltip when clicked elsewhere + document.addEventListener('click', function(e) { + if (!e.target.closest('#share-tooltip') && !e.target.closest('.share-btn')) { + const tooltip = document.getElementById('share-tooltip'); + if (tooltip) { + tooltip.style.display = 'none'; + } + } + }); + + \ No newline at end of file diff --git a/style.css b/style.css index 3f2c20f..67d2537 100644 --- a/style.css +++ b/style.css @@ -4,3 +4,99 @@ Theme URI: https://localcontentpro.com Description: A simple Block Theme for local content publishers. Version: 1.0 */ + +/* Main viewport container */ +#lcp-viewport-outer { + overflow: hidden; /* Hide overflow */ + margin: 0 auto; /* Center the viewport container */ + min-height:100vh +} + +.admin-bar #lcp-viewport-outer { + min-height:calc(100vh - 32px) +} +/* Wrapper for side content and main content */ +#lcp-viewport-inner { + display: block; /* Arrange the side content and main content side-by-side */ + width: 100%; + position: relative; /* To ensure side content stays in place */ + +} + +/* Side content - absolute or fixed position */ +#lcp-sidecontent { + position: absolute; /* or fixed depending on your JS logic */ + left: 0; + background: #fff; + width: 340px; /* Fixed width of 340px */ + height: 100%; + overflow: scroll; + z-index: 2; + border-right: 2px solid #eee; + outline: 0; + top: var(--my-top); /* Dynamically controlled top position via JS */ +} + +/* Main content */ +.lcp-viewport.has-sidecontent #lcp-main-content { + flex: 1; /* Main content takes up the rest of the space */ + margin-left: 340px; /* Space for side content */ + padding: 20px; +} + +/* Sticky header styles (if applicable) */ +#lcp-header-container { + z-index: 3; + width: 100% +} + +#lcp-header-container.lcp-sticky { + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 3; +} + +#lcp-header-container.lcp-sticky-on-scroll.lcp-stuck { + position: fixed; + top: 32px; /* Adjusted for admin bar, if present */ + left: 0; + right: 0; + z-index: 3; +} + +.admin-bar #lcp-header-container.lcp-sticky, +.admin-bar #lcp-header-container.lcp-sticky-on-scroll, +.admin-bar #lcp-header-container.lcp-sticky-on-scroll.lcp-stuck { + top: 32px; /* Adjust for admin bar visibility */ +} + +#lcp-header-container.lcp-sticky-on-scroll { + position: absolute; + top: 0; + left: 0; + right: 0; +} + +#lcp-header-container.lcp-sticky-on-scroll.lcp-stuck { + position: fixed; + top: 32px; /* Adjusted if admin bar is visible */ +} + + +/* ---- POPUPS ----- */ +.lcp-popup:not(.open) { + display:none +} + +.lcp-popup.open { + position:fixed; + top:0; + left:0; + height:100vh; + width:100vw; + z-index: 999; + background: red; +} + diff --git a/templates/single.html b/templates/single.html new file mode 100644 index 0000000..90b7fb2 --- /dev/null +++ b/templates/single.html @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/theme.json b/theme.json index f36a3df..62d97b7 100644 --- a/theme.json +++ b/theme.json @@ -1,16 +1,738 @@ { - "version": 2, - "settings": { - "color": { - "custom": true, - "palette": [] - }, - "typography": { - "customFontSize": true - }, - "layout": { - "contentSize": "1200px", - "wideSize": "1600px" - } - } + "$schema": "https://schemas.wp.org/trunk/theme.json", + "version": 3, + "settings": { + "appearanceTools": true, + "color": { + "defaultDuotone": false, + "defaultGradients": false, + "defaultPalette": false, + "palette": [ + { + "color": "#FFFFFF", + "name": "Base", + "slug": "base" + }, + { + "color": "#0E2A3E", + "name": "Color 1", + "slug": "color-1" + }, + { + "color": "#2D3F4E", + "name": "Color 2", + "slug": "color-2" + }, + { + "color": "#0B1F2F", + "name": "Color 3", + "slug": "color-3" + }, + { + "color": "#F8F8F8", + "name": "Light Gray 1", + "slug": "light-gray-1" + }, + { + "color": "#F1F1F1", + "name": "Light Gray 2", + "slug": "light-gray-2" + }, + { + "color": "#00F089", + "name": "Accent", + "slug": "accent" + }, + { + "color": "#FBFAF3", + "name": "Accent 5", + "slug": "accent-5" + }, + { + "color": "color-mix(in srgb, currentColor 20%, transparent)", + "name": "Accent 6", + "slug": "accent-6" + } + ] + }, + "layout": { + "contentSize": "645px", + "wideSize": "1340px" + }, + "spacing": { + "defaultSpacingSizes": false, + "spacingSizes": [ + { + "name": "Tiny", + "size": "10px", + "slug": "20" + }, + { + "name": "X-Small", + "size": "20px", + "slug": "30" + }, + { + "name": "Small", + "size": "30px", + "slug": "40" + }, + { + "name": "Regular", + "size": "clamp(30px, 5vw, 50px)", + "slug": "50" + }, + { + "name": "Large", + "size": "clamp(30px, 7vw, 70px)", + "slug": "60" + }, + { + "name": "X-Large", + "size": "clamp(50px, 7vw, 90px)", + "slug": "70" + }, + { + "name": "XX-Large", + "size": "clamp(70px, 10vw, 140px)", + "slug": "80" + } + ], + "units": [ + "%", + "px", + "em", + "rem", + "vh", + "vw" + ] + }, + "typography": { + "writingMode": true, + "defaultFontSizes": false, + "fluid": true, + "fontSizes": [ + { + "fluid": false, + "name": "Small", + "size": "0.875rem", + "slug": "small" + }, + { + "fluid": { + "max": "1.125rem", + "min": "1rem" + }, + "name": "Medium", + "size": "1rem", + "slug": "medium" + }, + { + "fluid": { + "max": "1.375rem", + "min": "1.125rem" + }, + "name": "Large", + "size": "1.38rem", + "slug": "large" + }, + { + "fluid": { + "max": "2rem", + "min": "1.75rem" + }, + "name": "Extra Large", + "size": "1.75rem", + "slug": "x-large" + }, + { + "fluid": { + "max": "3rem", + "min": "2.15rem" + }, + "name": "Extra Extra Large", + "size": "2.15rem", + "slug": "xx-large" + } + ], + "fontFamilies": [ + { + "name": "Manrope", + "slug": "manrope", + "fontFamily": "Manrope, sans-serif", + "fontFace": [ + { + "src": [ + "file:./assets/fonts/manrope/Manrope-VariableFont_wght.woff2" + ], + "fontWeight": "200 800", + "fontStyle": "normal", + "fontFamily": "Manrope" + } + ] + }, + { + "name": "Fira Code", + "slug": "fira-code", + "fontFamily": "\"Fira Code\", monospace", + "fontFace": [ + { + "src": [ + "file:./assets/fonts/fira-code/FiraCode-VariableFont_wght.woff2" + ], + "fontWeight": "300 700", + "fontStyle": "normal", + "fontFamily": "\"Fira Code\"" + } + ] + } + ] + }, + "useRootPaddingAwareAlignments": true + }, + "styles": { + "color": { + "background": "var:preset|color|base", + "text": "var:preset|color|contrast" + }, + "spacing": { + "blockGap": "1.2rem", + "padding": { + "left": "var:preset|spacing|50", + "right": "var:preset|spacing|50" + } + }, + "typography": { + "fontFamily": "var:preset|font-family|manrope", + "fontSize": "var:preset|font-size|large", + "fontWeight": "300", + "letterSpacing": "-0.1px", + "lineHeight": "1.4" + }, + "blocks": { + "core/avatar": { + "border": { + "radius": "100px" + } + }, + "core/button": { + "variations": { + "outline": { + "border": { + "color": "currentColor", + "width": "1px" + }, + "css": ".wp-block-button__link:not(.has-background):hover {background-color:color-mix(in srgb, var(--wp--preset--color--contrast) 5%, transparent);}", + "spacing": { + "padding": { + "bottom": "calc(1rem - 1px)", + "left": "calc(2.25rem - 1px)", + "right": "calc(2.25rem - 1px)", + "top": "calc(1rem - 1px)" + } + } + } + } + }, + "core/columns": { + "spacing": { + "blockGap": "var:preset|spacing|50" + } + }, + "core/buttons": { + "spacing": { + "blockGap": "16px" + } + }, + "core/code": { + "typography": { + "fontFamily": "var:preset|font-family|fira-code", + "fontSize": "var:preset|font-size|medium", + "fontWeight": "300" + }, + "color": { + "background": "var:preset|color|accent-5", + "text": "var:preset|color|contrast" + }, + "spacing": { + "padding": { + "right": "var:preset|spacing|40", + "bottom": "var:preset|spacing|40", + "left": "var:preset|spacing|40", + "top": "var:preset|spacing|40" + } + } + }, + "core/comment-author-name": { + "color": { + "text": "var:preset|color|accent-4" + }, + "elements": { + "link": { + "color": { + "text": "var:preset|color|accent-4" + }, + "typography": { + "textDecoration": "none" + }, + ":hover": { + "typography": { + "textDecoration": "underline" + } + } + } + }, + "typography": { + "fontSize": "var:preset|font-size|small" + }, + "spacing": { + "margin": { + "top": "5px", + "bottom": "0px" + } + } + }, + "core/comment-content": { + "typography": { + "fontSize": "var:preset|font-size|medium" + }, + "spacing": { + "margin": { + "top": "var:preset|spacing|30", + "bottom": "var:preset|spacing|30" + } + } + }, + "core/comment-date": { + "typography": { + "fontSize": "var:preset|font-size|small" + }, + "color": { + "text": "var:preset|color|contrast" + }, + "elements": { + "link": { + "color": { + "text": "var:preset|color|contrast" + } + } + } + }, + "core/comment-edit-link": { + "elements": { + "link": { + "color": { + "text": "var:preset|color|contrast" + } + } + }, + "typography": { + "fontSize": "var:preset|font-size|small" + } + }, + "core/comment-reply-link": { + "elements": { + "link": { + "color": { + "text": "var:preset|color|contrast" + } + } + }, + "typography": { + "fontSize": "var:preset|font-size|small" + } + }, + "core/post-comments-form": { + "css": "& textarea, input:not([type=submit]){border-radius:.25rem; border-color: var(--wp--preset--color--accent-6) !important;} & input[type=checkbox]{margin:0 .2rem 0 0 !important;} & label {font-size: var(--wp--preset--font-size--small); }", + "typography": { + "fontSize": "var:preset|font-size|medium" + }, + "spacing": { + "padding": { + "top": "var:preset|spacing|40", + "bottom": "var:preset|spacing|40" + } + } + }, + "core/comments-pagination": { + "typography": { + "fontSize": "var:preset|font-size|medium" + }, + "spacing": { + "margin": { + "top": "var:preset|spacing|40", + "bottom": "var:preset|spacing|40" + } + } + }, + "core/comments-pagination-next": { + "typography": { + "fontSize": "var:preset|font-size|medium" + } + }, + "core/comments-pagination-numbers": { + "typography": { + "fontSize": "var:preset|font-size|medium" + } + }, + "core/comments-pagination-previous": { + "typography": { + "fontSize": "var:preset|font-size|medium" + } + }, + "core/post-date": { + "color":{ + "text": "var:preset|color|accent-4" + }, + "elements": { + "link": { + "color" : { + "text": "var:preset|color|accent-4" + }, + ":hover": { + "typography": { + "textDecoration": "underline" + } + }, + "typography": { + "textDecoration": "none" + } + } + }, + "typography": { + "fontSize": "var:preset|font-size|small" + } + }, + "core/post-navigation-link": { + "typography": { + "fontSize": "var:preset|font-size|medium" + } + }, + "core/post-terms": { + "css": "& a { white-space: nowrap; }", + "typography": { + "fontSize": "var:preset|font-size|small", + "fontWeight": "600" + } + }, + "core/post-title": { + "elements": { + "link": { + ":hover": { + "typography": { + "textDecoration": "underline" + } + }, + "typography": { + "textDecoration": "none" + } + } + } + }, + "core/quote": { + "border": { + "style": "solid", + "width": "0 0 0 2px", + "color": "currentColor" + }, + "spacing": { + "blockGap": "var:preset|spacing|30", + "margin": { + "left": "0", + "right": "0" + }, + "padding": { + "top": "var:preset|spacing|30", + "right": "var:preset|spacing|40", + "bottom": "var:preset|spacing|30", + "left": "var:preset|spacing|40" + } + }, + "typography": { + "fontSize": "var:preset|font-size|large", + "fontWeight": "300" + }, + "elements": { + "cite": { + "typography": { + "fontSize": "var:preset|font-size|small", + "fontStyle": "normal", + "fontWeight": "300" + }, + "css": "& sub { font-size: 0.65em }" + } + }, + "css": "&.has-text-align-right { border-width: 0 2px 0 0; } &.has-text-align-center { border-width: 0;border-inline: 0; padding-inline: 0; }", + "variations": { + "plain": { + "border": { + "color": "transparent", + "style": "none", + "width": "0", + "radius": "0" + }, + "spacing": { + "padding": { + "top": "0", + "right": "0", + "bottom": "0", + "left": "0" + } + } + } + } + }, + "core/pullquote": { + "typography": { + "fontSize": "var:preset|font-size|xx-large", + "fontWeight": "300", + "lineHeight": "1.2" + }, + "elements": { + "cite": { + "typography": { + "fontSize": "var:preset|font-size|small", + "fontStyle": "normal" + } + } + }, + "spacing": { + "padding": { + "bottom": "var:preset|spacing|30", + "top": "var:preset|spacing|30" + } + }, + "css": "& p:last-of-type {margin-bottom: var(--wp--preset--spacing--30);}" + }, + "core/query-pagination": { + "typography": { + "fontSize": "var:preset|font-size|medium", + "fontWeight": "500" + } + }, + "core/search": { + "css": "& .wp-block-search__input{border-radius:3.125rem;padding-left:1.5625rem;padding-right:1.5625rem;border-color:var(--wp--preset--color--accent-6);}", + "typography": { + "fontSize": "var:preset|font-size|medium", + "lineHeight": "1.6" + }, + "elements": { + "button": { + "border": { + "radius": "3.125rem" + }, + "spacing": { + "margin": { + "left": "1.125rem" + } + }, + ":hover" : { + "border": { + "color": "transparent" + } + } + } + } + }, + "core/separator": { + "border": { + "color": "currentColor", + "style": "solid", + "width": "0 0 1px 0" + }, + "color": { + "text": "var:preset|color|accent-6" + }, + "variations": { + "wide": { + "css": " &:not(.alignfull){max-width: var(--wp--style--global--wide-size) !important;}" + } + } + }, + "core/site-tagline": { + "typography": { + "fontSize": "var:preset|font-size|medium" + } + }, + "core/site-title": { + "typography": { + "fontWeight": "700", + "letterSpacing": "-.5px" + }, + "elements": { + "link": { + "typography": { + "textDecoration": "none" + }, + ":hover": { + "typography": { + "textDecoration": "underline" + } + } + } + } + }, + "core/term-description": { + "typography": { + "fontSize": "var:preset|font-size|medium" + } + }, + "core/navigation": { + "typography": { + "fontSize": "var:preset|font-size|medium" + }, + "elements": { + "link": { + ":hover": { + "typography": { + "textDecoration": "underline" + } + }, + "typography": { + "textDecoration": "none" + } + } + } + }, + "core/list": { + "css": "& li{margin-top: 0.5rem;}" + } + }, + "elements": { + "button": { + "color": { + "background": "var:preset|color|contrast", + "text": "var:preset|color|base" + }, + ":focus": { + "outline": { + "color": "var:preset|color|accent-4", + "offset": "2px" + } + }, + ":hover": { + "color": { + "background": "color-mix(in srgb, var(--wp--preset--color--contrast) 85%, transparent)", + "text": "var:preset|color|base" + }, + "border": { + "color": "transparent" + } + }, + "spacing": { + "padding": { + "bottom": "1rem", + "left": "2.25rem", + "right": "2.25rem", + "top": "1rem" + } + }, + "typography": { + "fontSize": "var:preset|font-size|medium" + } + }, + "caption": { + "typography": { + "fontSize": "var:preset|font-size|small", + "lineHeight": "1.4" + } + }, + "h1": { + "typography": { + "fontSize": "var:preset|font-size|xx-large" + } + }, + "h2": { + "typography": { + "fontSize": "var:preset|font-size|x-large" + } + }, + "h3": { + "typography": { + "fontSize": "var:preset|font-size|large" + } + }, + "h4": { + "typography": { + "fontSize": "var:preset|font-size|medium" + } + }, + "h5": { + "typography": { + "fontSize": "var:preset|font-size|small", + "letterSpacing": "0.5px" + } + }, + "h6": { + "typography": { + "fontSize": "var:preset|font-size|small", + "fontWeight": "700", + "letterSpacing": "1.4px", + "textTransform": "uppercase" + } + }, + "heading": { + "typography": { + "fontWeight": "400", + "lineHeight": "1.125", + "letterSpacing": "-0.1px" + } + }, + "link": { + "color": { + "text": "currentColor" + }, + ":hover": { + "typography": { + "textDecoration": "none" + } + } + } + } + }, + "templateParts": [ + { + "area": "header", + "name": "header", + "title": "Header" + }, + { + "area": "header", + "name": "vertical-header", + "title": "Vertical Header" + }, + { + "area": "header", + "name": "header-large-title", + "title": "Header with large title" + + }, + { + "area": "footer", + "name": "footer", + "title": "Footer" + }, + { + "area": "footer", + "name": "footer-columns", + "title": "Footer Columns" + }, + { + "area": "footer", + "name": "footer-newsletter", + "title": "Footer Newsletter" + }, + { + "area": "uncategorized", + "name": "sidebar", + "title": "Sidebar" + } + ], + "customTemplates": [ + { + "name": "page-no-title", + "postTypes": ["page"], + "title": "Page No Title" + } + ] }
' . esc_html($caption) . '
' . esc_html($subHtml) . '
+ {__('Lcp Main – hello from the editor!', 'lcp')} +
+ { __( 'Key Points – hello from the editor!', 'lcp' ) } +
+ { __( 'Lcp Sidecontent – hello from the editor!', 'lcp' ) } +
+ {__('Lcp Viewport – hello from the editor!', 'lcp-viewport')} +
+ + /> + Show on All Pages + +
+ | + +
Leave a comment.