File manager - Edit - /home/opticamezl/www/newok/builder.tar
Back
elements/grid/element.php 0000644 00000004257 15175623007 0011465 0 ustar 00 <?php namespace YOOtheme; return [ 'transforms' => [ 'render' => function ($node) { $node->tags = []; // Filter tags if (!empty($node->props['filter'])) { foreach ($node->children as $child) { $child->tags = []; foreach (explode(',', $child->props['tags'] ?? '') as $tag) { // Strip tags as precaution if tags are mapped dynamically $tag = strip_tags($tag); if ($key = str_replace(' ', '-', trim($tag))) { $child->tags[$key] = trim($tag); } } $node->tags += $child->tags; } if ( $node->props['filter_order'] === 'manual' && $node->props['filter_order_manual'] ) { $order = array_map( 'strtolower', array_map('trim', explode(',', $node->props['filter_order_manual'])), ); uasort($node->tags, function ($a, $b) use ($order) { $iA = array_search(strtolower($a), $order); $iB = array_search(strtolower($b), $order); return $iA !== false && $iB !== false ? $iA - $iB : ($iA !== false ? -1 : ($iB !== false ? 1 : strnatcmp($a, $b))); }); } else { natsort($node->tags); } if ($node->props['filter_reverse']) { $node->tags = array_reverse($node->tags, true); } } if ($node->props['panel_style'] === 'tile-checked') { app(Metadata::class)->set('script:builder-grid', [ 'src' => Path::get('./app/grid.min.js', __DIR__), 'defer' => true, ]); } }, ], ]; elements/grid/images/icon.svg 0000644 00000000713 15175623007 0012232 0 ustar 00 <svg width="30" height="30" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg"> <rect width="10" height="10" fill="none" stroke="#444" stroke-width="2" x="3" y="3" /> <rect width="10" height="10" fill="none" stroke="#444" stroke-width="2" x="17" y="3" /> <rect width="10" height="10" fill="none" stroke="#444" stroke-width="2" x="17" y="17" /> <rect width="10" height="10" fill="none" stroke="#444" stroke-width="2" x="3" y="17" /> </svg> elements/grid/images/iconSmall.svg 0000644 00000000617 15175623007 0013226 0 ustar 00 <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect width="6" height="6" fill="none" stroke="#444" x="2.5" y="2.5" /> <rect width="6" height="6" fill="none" stroke="#444" x="11.5" y="2.5" /> <rect width="6" height="6" fill="none" stroke="#444" x="11.5" y="11.5" /> <rect width="6" height="6" fill="none" stroke="#444" x="2.5" y="11.5" /> </svg> elements/grid/templates/template.php 0000644 00000007523 15175623007 0013644 0 ustar 00 <?php // Resets if ($props['panel_link']) { $props['title_link'] = ''; $props['image_link'] = ''; } // Override default settings if (!$props['grid_parallax'] && $props['grid_parallax_justify']) { $props['grid_parallax'] = '0'; } $el = $this->el('div', [ 'uk-filter' => $tags ? [ 'target: .js-filter;', 'animation: {filter_animation};', ] : false, ]); // Grid $grid = $this->el('div', [ 'class' => [ 'uk-grid', 'js-filter' => $tags, 'uk-child-width-[1-{@!grid_default: auto}]{grid_default}', 'uk-child-width-[1-{@!grid_small: auto}]{grid_small}@s', 'uk-child-width-[1-{@!grid_medium: auto}]{grid_medium}@m', 'uk-child-width-[1-{@!grid_large: auto}]{grid_large}@l', 'uk-child-width-[1-{@!grid_xlarge: auto}]{grid_xlarge}@xl', 'uk-flex-center {@grid_column_align} {@!grid_masonry}', 'uk-flex-middle {@grid_row_align} {@!grid_masonry}', $props['grid_column_gap'] == $props['grid_row_gap'] ? 'uk-grid-{grid_column_gap}' : '[uk-grid-column-{grid_column_gap}] [uk-grid-row-{grid_row_gap}]', 'uk-grid-divider {@grid_divider} {@!grid_column_gap: collapse} {@!grid_row_gap: collapse}' => count($children) > 1, 'uk-grid-match {@!grid_masonry}', ], 'uk-grid' => $this->expr([ 'masonry: {grid_masonry};', 'parallax: {grid_parallax};', 'parallax-justify: true; {@grid_parallax_justify}', 'parallax-start: {grid_parallax_start};' => $props['grid_parallax'] || $props['grid_parallax_justify'], 'parallax-end: {grid_parallax_end};' => $props['grid_parallax'] || $props['grid_parallax_justify'], ], $props) ?: count($children) > 1, 'uk-grid-checked' => $props['panel_style'] === 'tile-checked' ? 'uk-tile-default,uk-tile-muted' : false, 'uk-lightbox' => $props['lightbox'] ? [ 'toggle: a[data-type];', 'animation: {lightbox_animation};', 'nav: {lightbox_nav}; slidenav: false;', 'delay-controls: 0;' => $props['lightbox_controls'], 'counter: true;' => $props['lightbox_counter'], 'bg-close: false;' => !$props['lightbox_bg_close'], 'video-autoplay: {lightbox_video_autoplay};', ] : false, ]); $cell = $this->el('div'); // Filter $filter_grid = $this->el('div', [ 'class' => [ 'uk-grid', 'uk-child-width-expand', $props['filter_grid_column_gap'] == $props['filter_grid_row_gap'] ? 'uk-grid-{filter_grid_column_gap}' : '[uk-grid-column-{filter_grid_column_gap}] [uk-grid-row-{filter_grid_row_gap}]', ], 'uk-grid' => count($children) > 1, ]); $filter_cell = $this->el('div', [ 'class' => [ 'uk-width-{filter_grid_width}@{filter_grid_breakpoint}', 'uk-flex-last@{filter_grid_breakpoint} {@filter_position: right}', ], ]); ?> <?= $el($props, $attrs) ?> <?php if ($tags) : ?> <?php if ($filter_horizontal = in_array($props['filter_position'], ['left', 'right'])) : ?> <?= $filter_grid($props) ?> <?= $filter_cell($props) ?> <?php endif ?> <?= $this->render("{$__dir}/template-nav", compact('props')) ?> <?php if ($filter_horizontal) : ?> </div> <div> <?php endif ?> <?= $grid($props) ?> <?php foreach ($children as $child) : ?> <?= $cell($props, ['data-tag' => $child->tags], $builder->render($child, ['element' => $props])) ?> <?php endforeach ?> <?= $grid->end() ?> <?php if ($filter_horizontal) : ?> </div> </div> <?php endif ?> <?php else : ?> <?= $grid($props) ?> <?php foreach ($children as $child) : ?> <div><?= $builder->render($child, ['element' => $props]) ?></div> <?php endforeach ?> <?= $grid->end() ?> <?php endif ?> <?= $el->end() ?> elements/grid/templates/template-nav.php 0000644 00000003607 15175623007 0014425 0 ustar 00 <?php // => gallery $nav = $this->el('ul', [ 'class' => [ 'el-nav', 'uk-{filter_style} {@filter_style: tab}', 'uk-margin[-{filter_margin}] {@filter_position: top}', ], 'uk-scrollspy-class' => in_array($props['animation'], ['none', 'parallax']) || !$props['item_animation'] ? false : (!empty($props['animation']) ? ['uk-animation-{0}' => $props['animation']] : true), ]); $nav_horizontal = [ 'uk-subnav {@filter_style: subnav.*}', 'uk-{filter_style} {@filter_style: subnav-.*}', 'uk-flex-{filter_align: right|center}', 'uk-child-width-expand {@filter_align: justify}', ]; $nav_vertical = [ 'uk-nav uk-nav-{0} [uk-text-left {@text_align}] {@filter_style: subnav.*}' => $props['filter_style_primary'] ? 'primary' : 'default', 'uk-tab-{filter_position} {@filter_style: tab}', ]; $nav_attrs = $props['filter_position'] === 'top' ? [ 'class' => $nav_horizontal, 'uk-margin' => (bool) preg_match('/^subnav/', $props['filter_style']), ] : [ 'class' => $nav_vertical, 'uk-toggle' => [ "cls: {$this->expr(array_merge($nav_vertical, $nav_horizontal), $props)};", 'mode: media;', 'media: @{filter_grid_breakpoint};', ], ]; ?> <?= $nav($props, $nav_attrs) ?> <?php if ($props['filter_all']) : ?> <li class="uk-active" uk-filter-control><a href><?= $this->trans($props['filter_all_label'] ?: 'All') ?></a></li> <?php endif ?> <?php foreach ($tags as $tag => $name) : ?> <li <?= $this->attrs([ 'class' => ['uk-active' => $tag === array_key_first($tags) && !$props['filter_all']], 'uk-filter-control' => json_encode(['filter' => '[data-tag~="' . str_replace('"', '\"', $tag) . '"]']), ]) ?>> <a href><?= $name ?></a> </li> <?php endforeach ?> <?= $nav->end() ?> elements/grid/templates/content.php 0000644 00000000522 15175623007 0013473 0 ustar 00 <?php if (count($children) > 1) : ?> <ul> <?php foreach ($children as $child) : ?> <li> <?= $builder->render($child, ['element' => $props]) ?> </li> <?php endforeach ?> </ul> <?php elseif (count($children) == 1) : ?> <div> <?= $builder->render($children[0], ['element' => $props]) ?> </div> <?php endif ?> elements/grid/element.json 0000644 00000172312 15175623007 0011645 0 ustar 00 { "@import": "./element.php", "name": "grid", "title": "Grid", "group": "multiple items", "icon": "${url:images/icon.svg}", "iconSmall": "${url:images/iconSmall.svg}", "element": true, "container": true, "width": 500, "defaults": { "show_title": true, "show_meta": true, "show_content": true, "show_image": true, "show_video": true, "show_link": true, "show_hover_image": true, "show_hover_video": true, "grid_default": "1", "grid_medium": "3", "filter_style": "tab", "filter_all": true, "filter_position": "top", "filter_align": "left", "filter_grid_width": "auto", "filter_grid_breakpoint": "m", "lightbox_bg_close": true, "title_hover_style": "reset", "title_element": "h3", "title_align": "top", "title_grid_width": "1-2", "title_grid_breakpoint": "m", "meta_style": "text-meta", "meta_align": "below-title", "meta_element": "div", "content_column_breakpoint": "m", "icon_width": 80, "image_align": "top", "image_grid_width": "1-2", "image_grid_breakpoint": "m", "image_svg_color": "emphasis", "link_text": "Read more", "link_style": "default", "margin": "default", "item_animation": true }, "placeholder": { "children": [ { "type": "grid_item", "props": {} }, { "type": "grid_item", "props": {} }, { "type": "grid_item", "props": {} } ] }, "updates": "./updates.php", "templates": { "render": "./templates/template.php", "content": "./templates/content.php" }, "fields": { "content": { "label": "Items", "type": "content-items", "item": "grid_item", "media": [ { "type": "image", "item": { "title": "title", "image": "src" } }, { "type": "video", "item": { "title": "title", "video": "src" } } ] }, "show_title": { "label": "Display", "type": "checkbox", "text": "Show the title" }, "show_meta": { "type": "checkbox", "text": "Show the meta text" }, "show_content": { "type": "checkbox", "text": "Show the content" }, "show_image": { "type": "checkbox", "text": "Show the image" }, "show_video": { "type": "checkbox", "text": "Show the video" }, "show_link": { "type": "checkbox", "text": "Show the link" }, "show_hover_image": { "type": "checkbox", "text": "Show the hover image" }, "show_hover_video": { "description": "Show or hide content fields without the need to delete the content itself.", "type": "checkbox", "text": "Show the hover video" }, "grid_masonry": { "label": "Masonry", "description": "Create a gap-free masonry layout if grid items have different heights. Pack items into columns with the most room or show them in their natural order. Optionally, use a parallax animation to move columns while scrolling until they justify at the bottom.", "type": "select", "options": { "None": "", "Pack": "pack", "Next": "next" } }, "grid_parallax": { "label": "Parallax", "description": "The parallax animation moves single grid columns at different speeds while scrolling. Define the vertical parallax offset in pixels. Alternatively, move columns with different heights until they justify at the bottom.", "type": "range", "attrs": { "min": 0, "max": 600, "step": 10 } }, "grid_parallax_justify": { "type": "checkbox", "text": "Justify columns at the bottom" }, "grid_parallax_start": { "enable": "grid_parallax || grid_parallax_justify" }, "grid_parallax_end": { "enable": "grid_parallax || grid_parallax_justify" }, "grid_column_gap": { "label": "Column Gap", "description": "Set the size of the gap between the grid columns.", "type": "select", "options": { "Small": "small", "Medium": "medium", "Default": "", "Large": "large", "None": "collapse" } }, "grid_row_gap": { "label": "Row Gap", "description": "Set the size of the gap between the grid rows.", "type": "select", "options": { "Small": "small", "Medium": "medium", "Default": "", "Large": "large", "None": "collapse" } }, "grid_divider": { "label": "Divider", "description": "Show a divider between grid columns.", "type": "checkbox", "text": "Show dividers", "enable": "grid_column_gap != 'collapse' && grid_row_gap != 'collapse'" }, "grid_column_align": { "label": "Alignment", "type": "checkbox", "text": "Center columns", "enable": "!grid_masonry" }, "grid_row_align": { "description": "Center grid columns horizontally and rows vertically.", "type": "checkbox", "text": "Center rows", "enable": "!grid_masonry" }, "grid_default": { "label": "Phone Portrait", "description": "Set the number of grid columns for each breakpoint. <i>Inherit</i> refers to the number of columns on the next smaller screen size. <i>Auto</i> expands the columns to the width of their items filling the rows accordingly.", "type": "select", "options": { "1 Column": "1", "2 Columns": "2", "3 Columns": "3", "4 Columns": "4", "5 Columns": "5", "6 Columns": "6", "Auto": "auto" } }, "grid_small": { "label": "Phone Landscape", "description": "Set the number of grid columns for each breakpoint. <i>Inherit</i> refers to the number of columns on the next smaller screen size. <i>Auto</i> expands the columns to the width of their items filling the rows accordingly.", "type": "select", "options": { "Inherit": "", "1 Column": "1", "2 Columns": "2", "3 Columns": "3", "4 Columns": "4", "5 Columns": "5", "6 Columns": "6", "Auto": "auto" } }, "grid_medium": { "label": "Tablet Landscape", "description": "Set the number of grid columns for each breakpoint. <i>Inherit</i> refers to the number of columns on the next smaller screen size. <i>Auto</i> expands the columns to the width of their items filling the rows accordingly.", "type": "select", "options": { "Inherit": "", "1 Column": "1", "2 Columns": "2", "3 Columns": "3", "4 Columns": "4", "5 Columns": "5", "6 Columns": "6", "Auto": "auto" } }, "grid_large": { "label": "Desktop", "description": "Set the number of grid columns for each breakpoint. <i>Inherit</i> refers to the number of columns on the next smaller screen size. <i>Auto</i> expands the columns to the width of their items filling the rows accordingly.", "type": "select", "options": { "Inherit": "", "1 Column": "1", "2 Columns": "2", "3 Columns": "3", "4 Columns": "4", "5 Columns": "5", "6 Columns": "6", "Auto": "auto" } }, "grid_xlarge": { "label": "Large Screens", "description": "Set the number of grid columns for each breakpoint. <i>Inherit</i> refers to the number of columns on the next smaller screen size. <i>Auto</i> expands the columns to the width of their items filling the rows accordingly.", "type": "select", "options": { "Inherit": "", "1 Column": "1", "2 Columns": "2", "3 Columns": "3", "4 Columns": "4", "5 Columns": "5", "6 Columns": "6", "Auto": "auto" } }, "filter": { "label": "Filter", "type": "checkbox", "text": "Enable filter navigation" }, "filter_animation": { "label": "Animation", "description": "Select an animation that will be applied to the content items when filtering between them.", "type": "select", "options": { "None": "false", "Slide": "", "Fade": "fade", "Delayed Fade": "delayed-fade" }, "enable": "filter" }, "filter_order": { "label": "Navigation Order", "description": "Order the filter navigation alphabetically or by defining the order manually.", "type": "select", "options": { "Alphabetical": "", "Manual": "manual" }, "enable": "filter" }, "filter_reverse": { "type": "checkbox", "text": "Reverse order", "enable": "filter" }, "filter_order_manual": { "label": "Manual Order", "description": "Enter a comma-separated list of tags to manually order the filter navigation.", "enable": "filter && filter_order == 'manual'" }, "filter_style": { "label": "Style", "description": "Select the filter navigation style. The pill and divider styles are only available for horizontal Subnavs.", "type": "select", "options": { "Tabs": "tab", "Subnav (Nav)": "subnav", "Subnav Divider (Nav)": "subnav-divider", "Subnav Pill (Nav)": "subnav-pill" }, "enable": "filter" }, "filter_all": { "label": "All Items", "type": "checkbox", "text": "Show filter control for all items", "enable": "filter" }, "filter_all_label": { "attrs": { "placeholder": "All" }, "enable": "filter && filter_all" }, "filter_position": { "label": "Position", "description": "Position the filter navigation at the top, left or right. A larger style can be applied to left and right navigation.", "type": "select", "options": { "Top": "top", "Left": "left", "Right": "right" }, "enable": "filter" }, "filter_style_primary": { "type": "checkbox", "text": "Primary navigation", "enable": "filter && $match(filter_position, 'left|right') && $match(filter_style, '^subnav')" }, "filter_align": { "label": "Alignment", "description": "Align the filter controls.", "type": "select", "options": { "Left": "left", "Right": "right", "Center": "center", "Justify": "justify" }, "enable": "filter && filter_position == 'top'" }, "filter_margin": { "label": "Margin", "description": "Set the vertical margin.", "type": "select", "options": { "Small": "small", "Default": "", "Medium": "medium", "Large": "large", "X-Large": "xlarge" }, "enable": "filter && filter_position == 'top'" }, "filter_grid_width": { "label": "Grid Width", "description": "Define the width of the filter navigation. Choose between percent and fixed widths or expand columns to the width of their content.", "type": "select", "options": { "Auto": "auto", "50%": "1-2", "33%": "1-3", "25%": "1-4", "20%": "1-5", "Small": "small", "Medium": "medium", "Large": "large" }, "enable": "filter && $match(filter_position, 'left|right')" }, "filter_grid_column_gap": { "label": "Grid Column Gap", "description": "Set the size of the gap between between the filter navigation and the content.", "type": "select", "options": { "Small": "small", "Medium": "medium", "Default": "", "Large": "large", "None": "collapse" }, "enable": "filter && $match(filter_position, 'left|right')" }, "filter_grid_row_gap": { "label": "Grid Row Gap", "description": "Set the size of the gap if the grid items stack.", "type": "select", "options": { "Small": "small", "Medium": "medium", "Default": "", "Large": "large", "None": "collapse" }, "enable": "filter && $match(filter_position, 'left|right')" }, "filter_grid_breakpoint": { "label": "Grid Breakpoint", "description": "Set the breakpoint from which grid items will stack.", "type": "select", "options": { "Small (Phone Landscape)": "s", "Medium (Tablet Landscape)": "m", "Large (Desktop)": "l", "X-Large (Large Screens)": "xl" }, "enable": "filter && $match(filter_position, 'left|right')" }, "lightbox": { "label": "Lightbox", "type": "checkbox", "text": "Enable lightbox gallery" }, "lightbox_controls": { "type": "checkbox", "text": "Show controls always", "enable": "lightbox" }, "lightbox_counter": { "type": "checkbox", "text": "Show counter", "enable": "lightbox" }, "lightbox_bg_close": { "type": "checkbox", "text": "Close on background click", "enable": "lightbox" }, "lightbox_animation": { "label": "Animation", "description": "Select the transition between two slides.", "type": "select", "options": { "Slide": "", "Fade": "fade", "Scale": "scale" }, "enable": "lightbox" }, "lightbox_nav": { "label": "Navigation", "description": "Select the navigation type.", "type": "select", "options": { "Slidenav": "", "Dotnav": "dotnav", "Thumbnav": "thumbnav" }, "enable": "lightbox" }, "lightbox_image_width": { "attrs": { "placeholder": "auto" }, "enable": "lightbox" }, "lightbox_image_height": { "attrs": { "placeholder": "auto" }, "enable": "lightbox" }, "lightbox_image_orientation": { "label": "Image Orientation", "description": "Width and height will be flipped accordingly, if the image is in portrait or landscape format.", "type": "checkbox", "text": "Allow mixed image orientations", "enable": "lightbox" }, "lightbox_video_autoplay": { "label": "Video Autoplay", "description": "Enable autoplay or play a muted inline video without controls.", "type": "select", "options": { "None": "", "Autoplay": "true", "Inline": "inline" }, "enable": "lightbox" }, "lightbox_text_color": { "label": "Text Color", "description": "Set light or dark color mode for text, buttons and controls.", "type": "select", "options": { "None": "", "Light": "light", "Dark": "dark" }, "source": true, "enable": "lightbox" }, "title_display": { "label": "Show Title", "description": "Display the title inside the panel, as the lightbox caption or both.", "type": "select", "options": { "Panel + Lightbox": "", "Panel only": "item", "Lightbox only": "lightbox" }, "enable": "show_title && lightbox" }, "content_display": { "label": "Show Content", "description": "Display the content inside the panel, as the lightbox caption or both.", "type": "select", "options": { "Panel + Lightbox": "", "Panel only": "item", "Lightbox only": "lightbox" }, "enable": "show_content && lightbox" }, "panel_style": { "label": "Style", "description": "Select one of the boxed card or tile styles or a blank panel.", "type": "select", "options": { "None": "", "Card Default": "card-default", "Card Primary": "card-primary", "Card Secondary": "card-secondary", "Card Hover": "card-hover", "Tile Default": "tile-default", "Tile Muted": "tile-muted", "Tile Primary": "tile-primary", "Tile Secondary": "tile-secondary", "Tile Checked": "tile-checked" } }, "panel_link": { "label": "Link", "description": "Link the whole panel if a link exists. Optionally, add a hover style.", "type": "checkbox", "text": "Link panel", "enable": "show_link" }, "panel_link_hover": { "type": "checkbox", "text": "Add hover style", "enable": "show_link && panel_link && $match(panel_style, 'card-(default|primary|secondary)|tile-')" }, "panel_padding": { "label": "Padding", "description": "Set the padding.", "type": "select", "options": { "None": "", "Small": "small", "Default": "default", "Large": "large" }, "enable": "panel_style || (!panel_style && (show_image || show_video) && image_align != 'between')" }, "panel_image_no_padding": { "description": "Top, left or right aligned images can be attached to the panel edge. If the image is aligned to the left or right, it will also extend to cover the whole space.", "type": "checkbox", "text": "Align image without padding", "show": "panel_style", "enable": "(show_image || show_video) && image_align != 'between'" }, "item_maxwidth": { "type": "select", "label": "Max Width", "description": "Set the maximum width.", "options": { "None": "", "Small": "small", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "2X-Large": "2xlarge" } }, "panel_content_width": { "label": "1 Column Content Width", "description": "Set an optional content width which doesn't affect the image if there is just one column.", "type": "select", "options": { "Auto": "", "X-Small": "xsmall", "Small": "small" }, "show": "!panel_style", "enable": "(show_image || show_video) && image_align == 'top' && !panel_padding && !item_maxwidth && (!grid_default || grid_default == '1') && (!grid_small || grid_small == '1') && (!grid_medium || grid_medium == '1') && (!grid_large || grid_large == '1') && (!grid_xlarge || grid_xlarge == '1')" }, "panel_expand": { "label": "Expand Content", "description": "Expand the height of the content to fill the available space in the panel and push the link to the bottom.", "type": "select", "options": { "None": "", "Image": "image", "Content": "content", "Image and Content": "both" }, "enable": "!grid_masonry" }, "title_style": { "label": "Style", "description": "Title styles differ in font-size but may also come with a predefined color, size and font.", "type": "select", "options": { "None": "", "Heading 3X-Large": "heading-3xlarge", "Heading 2X-Large": "heading-2xlarge", "Heading X-Large": "heading-xlarge", "Heading Large": "heading-large", "Heading Medium": "heading-medium", "Heading Small": "heading-small", "Heading H1": "h1", "Heading H2": "h2", "Heading H3": "h3", "Heading H4": "h4", "Heading H5": "h5", "Heading H6": "h6", "Text Meta": "text-meta", "Text Lead": "text-lead", "Text Small": "text-small", "Text Large": "text-large" }, "enable": "show_title && (title_display != 'lightbox' && lightbox || !lightbox)" }, "title_link": { "label": "Link", "description": "Link the title if a link exists.", "type": "checkbox", "text": "Link title", "enable": "show_title && (title_display != 'lightbox' && lightbox || !lightbox) && show_link" }, "title_hover_style": { "label": "Hover Style", "description": "Set the hover style for a linked title.", "type": "select", "options": { "None": "reset", "Heading Link": "heading", "Default Link": "" }, "enable": "show_title && (title_display != 'lightbox' && lightbox || !lightbox) && show_link && (title_link || panel_link)" }, "title_decoration": { "label": "Decoration", "description": "Decorate the title with a divider, bullet or a line that is vertically centered to the heading.", "type": "select", "options": { "None": "", "Divider": "divider", "Bullet": "bullet", "Line": "line" }, "enable": "show_title && (title_display != 'lightbox' && lightbox || !lightbox)" }, "title_font_family": { "label": "Font Family", "description": "Select an alternative font family. Mind that not all styles have different font families.", "type": "select", "options": { "None": "", "Default": "default", "Primary": "primary", "Secondary": "secondary", "Tertiary": "tertiary" }, "enable": "show_title && (title_display != 'lightbox' && lightbox || !lightbox)" }, "title_color": { "label": "Color", "description": "Select the text color. If the Background option is selected, styles that don't apply a background image use the primary color instead.", "type": "select", "options": { "None": "", "Muted": "muted", "Emphasis": "emphasis", "Primary": "primary", "Secondary": "secondary", "Success": "success", "Warning": "warning", "Danger": "danger", "Background": "background" }, "enable": "show_title && (title_display != 'lightbox' && lightbox || !lightbox)" }, "title_element": { "label": "HTML Element", "description": "Set the level for the section heading or give it no semantic meaning.", "type": "select", "options": { "h1": "h1", "h2": "h2", "h3": "h3", "h4": "h4", "h5": "h5", "h6": "h6", "div": "div" }, "enable": "show_title && (title_display != 'lightbox' && lightbox || !lightbox)" }, "title_align": { "label": "Alignment", "description": "Align the title to the top or left in regards to the content.", "type": "select", "options": { "Top": "top", "Left": "left" }, "enable": "show_title && (title_display != 'lightbox' && lightbox || !lightbox)" }, "title_grid_width": { "label": "Grid Width", "description": "Define the width of the title within the grid. Choose between percent and fixed widths or expand columns to the width of their content.", "type": "select", "options": { "Auto": "auto", "Expand": "expand", "80%": "4-5", "75%": "3-4", "66%": "2-3", "60%": "3-5", "50%": "1-2", "40%": "2-5", "33%": "1-3", "25%": "1-4", "20%": "1-5", "Small": "small", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "2X-Large": "2xlarge" }, "enable": "show_title && (title_display != 'lightbox' && lightbox || !lightbox) && title_align == 'left'" }, "title_grid_column_gap": { "label": "Grid Column Gap", "description": "Set the size of the gap between the title and the content.", "type": "select", "options": { "Small": "small", "Medium": "medium", "Default": "", "Large": "large", "None": "collapse" }, "enable": "show_title && (title_display != 'lightbox' && lightbox || !lightbox) && title_align == 'left'" }, "title_grid_row_gap": { "label": "Grid Row Gap", "description": "Set the size of the gap if the grid items stack.", "type": "select", "options": { "Small": "small", "Medium": "medium", "Default": "", "Large": "large", "None": "collapse" }, "enable": "show_title && (title_display != 'lightbox' && lightbox || !lightbox) && title_align == 'left'" }, "title_grid_breakpoint": { "label": "Grid Breakpoint", "description": "Set the breakpoint from which grid items will stack.", "type": "select", "options": { "Always": "", "Small (Phone Landscape)": "s", "Medium (Tablet Landscape)": "m", "Large (Desktop)": "l", "X-Large (Large Screens)": "xl" }, "enable": "show_title && (title_display != 'lightbox' && lightbox || !lightbox) && title_align == 'left'" }, "title_margin": { "label": "Margin Top", "description": "Set the top margin. Note that the margin will only apply if the content field immediately follows another content field.", "type": "select", "options": { "Small": "small", "Default": "", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "None": "remove" }, "enable": "show_title && (title_display != 'lightbox' && lightbox || !lightbox)" }, "meta_style": { "label": "Style", "description": "Select a predefined meta text style, including color, size and font-family.", "type": "select", "options": { "None": "", "Text Meta": "text-meta", "Text Lead": "text-lead", "Text Small": "text-small", "Text Large": "text-large", "Heading 3X-Large": "heading-3xlarge", "Heading 2X-Large": "heading-2xlarge", "Heading X-Large": "heading-xlarge", "Heading Large": "heading-large", "Heading Medium": "heading-medium", "Heading Small": "heading-small", "Heading H1": "h1", "Heading H2": "h2", "Heading H3": "h3", "Heading H4": "h4", "Heading H5": "h5", "Heading H6": "h6" }, "enable": "show_meta" }, "meta_color": { "label": "Color", "description": "Select the text color.", "type": "select", "options": { "None": "", "Muted": "muted", "Emphasis": "emphasis", "Primary": "primary", "Secondary": "secondary", "Success": "success", "Warning": "warning", "Danger": "danger" }, "enable": "show_meta" }, "meta_align": { "label": "Alignment", "description": "Align the meta text.", "type": "select", "options": { "Above Title": "above-title", "Below Title": "below-title", "Above Content": "above-content", "Below Content": "below-content" }, "enable": "show_meta" }, "meta_element": { "label": "HTML Element", "description": "Set the level for the section heading or give it no semantic meaning.", "type": "select", "options": { "h1": "h1", "h2": "h2", "h3": "h3", "h4": "h4", "h5": "h5", "h6": "h6", "div": "div" }, "enable": "show_meta" }, "meta_margin": { "label": "Margin Top", "description": "Set the top margin. Note that the margin will only apply if the content field immediately follows another content field.", "type": "select", "options": { "Small": "small", "Default": "", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "None": "remove" }, "enable": "show_meta" }, "content_style": { "label": "Style", "description": "Select a predefined text style, including color, size and font-family.", "type": "select", "options": { "None": "", "Text Meta": "text-meta", "Text Lead": "text-lead", "Text Small": "text-small", "Text Large": "text-large", "Heading 3X-Large": "heading-3xlarge", "Heading 2X-Large": "heading-2xlarge", "Heading X-Large": "heading-xlarge", "Heading Large": "heading-large", "Heading Medium": "heading-medium", "Heading Small": "heading-small", "Heading H1": "h1", "Heading H2": "h2", "Heading H3": "h3", "Heading H4": "h4", "Heading H5": "h5", "Heading H6": "h6" }, "enable": "show_content && (content_display != 'lightbox' && lightbox || !lightbox)" }, "content_align": { "label": "Alignment", "type": "checkbox", "text": "Force left alignment", "enable": "show_content && (content_display != 'lightbox' && lightbox || !lightbox)" }, "content_dropcap": { "label": "Drop Cap", "description": "Display the first letter of the paragraph as a large initial.", "type": "checkbox", "text": "Enable drop cap", "enable": "show_content && (content_display != 'lightbox' && lightbox || !lightbox)" }, "content_column": { "label": "Columns", "description": "Set the number of text columns.", "type": "select", "options": { "None": "", "Halves": "1-2", "Thirds": "1-3", "Quarters": "1-4", "Fifths": "1-5", "Sixths": "1-6" }, "enable": "show_content && (content_display != 'lightbox' && lightbox || !lightbox)" }, "content_column_divider": { "description": "Show a divider between text columns.", "type": "checkbox", "text": "Show dividers", "enable": "show_content && (content_display != 'lightbox' && lightbox || !lightbox) && content_column" }, "content_column_breakpoint": { "label": "Columns Breakpoint", "description": "Set the device width from which the text columns should apply.", "type": "select", "options": { "Always": "", "Small (Phone Landscape)": "s", "Medium (Tablet Landscape)": "m", "Large (Desktop)": "l", "X-Large (Large Screens)": "xl" }, "enable": "show_content && (content_display != 'lightbox' && lightbox || !lightbox) && content_column" }, "content_margin": { "label": "Margin Top", "description": "Set the top margin. Note that the margin will only apply if the content field immediately follows another content field.", "type": "select", "options": { "Small": "small", "Default": "", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "None": "remove" }, "enable": "show_content && (content_display != 'lightbox' && lightbox || !lightbox)" }, "image_width": { "type": "number", "attrs": { "placeholder": "auto" }, "enable": "show_image || show_video" }, "image_height": { "type": "number", "attrs": { "placeholder": "auto" }, "enable": "show_image || show_video" }, "image_loading": { "label": "Loading", "description": "By default, images are loaded lazy. Enable eager loading for images in the initial viewport.", "type": "checkbox", "text": "Load image eagerly", "enable": "show_image || show_video" }, "image_border": { "label": "Border", "description": "Select the image border style.", "type": "select", "options": { "None": "", "Rounded": "rounded", "Circle": "circle", "Pill": "pill" }, "enable": "(show_image || show_video) && (!panel_style || (panel_style && (!panel_image_no_padding || image_align == 'between')))" }, "image_box_shadow": { "label": "Box Shadow", "description": "Select the image box shadow size.", "type": "select", "options": { "None": "", "Small": "small", "Medium": "medium", "Large": "large", "X-Large": "xlarge" }, "enable": "(show_image || show_video) && !panel_style" }, "image_box_decoration": { "label": "Box Decoration", "description": "Select the image box decoration style.", "type": "select", "options": { "None": "", "Default": "default", "Primary": "primary", "Secondary": "secondary", "Floating Shadow": "shadow", "Mask": "mask" }, "enable": "(show_image || show_video) && !panel_style" }, "image_box_decoration_inverse": { "type": "checkbox", "text": "Inverse style", "enable": "(show_image || show_video) && !panel_style && $match(image_box_decoration, '^(default|primary|secondary)$')" }, "image_link": { "label": "Link", "description": "Link the image if a link exists.", "type": "checkbox", "text": "Link image", "enable": "(show_image || show_video) && show_link" }, "image_transition": { "label": "Hover Transition", "description": "Set the hover transition for a linked image.", "type": "select", "options": { "None": "", "Scale Up": "scale-up", "Scale Down": "scale-down" }, "enable": "(show_image || show_video) && show_link && (image_link || panel_link)" }, "image_transition_border": { "type": "checkbox", "text": "Border", "enable": "(show_image || show_video) && show_link && (image_link || panel_link)" }, "image_hover_box_shadow": { "label": "Hover Box Shadow", "description": "Select the image box shadow size on hover.", "type": "select", "options": { "None": "", "Small": "small", "Medium": "medium", "Large": "large", "X-Large": "xlarge" }, "enable": "show_link && (show_image || show_video) && !panel_style && (image_link || panel_link)" }, "icon_width": { "label": "Icon Width", "description": "Set the icon width.", "enable": "show_image" }, "icon_color": { "label": "Icon Color", "description": "Set the icon color.", "type": "select", "options": { "None": "", "Muted": "muted", "Emphasis": "emphasis", "Primary": "primary", "Secondary": "secondary", "Success": "success", "Warning": "warning", "Danger": "danger" }, "enable": "show_image" }, "image_align": { "label": "Alignment", "description": "Align the image to the top, left, right or place it between the title and the content.", "type": "select", "options": { "Top": "top", "Bottom": "bottom", "Left": "left", "Right": "right", "Between": "between" }, "enable": "show_image || show_video" }, "image_grid_width": { "label": "Grid Width", "description": "Define the width of the image within the grid. Choose between percent and fixed widths or expand columns to the width of their content.", "type": "select", "options": { "Auto": "auto", "80%": "4-5", "75%": "3-4", "66%": "2-3", "60%": "3-5", "50%": "1-2", "40%": "2-5", "33%": "1-3", "25%": "1-4", "20%": "1-5", "Small": "small", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "2X-Large": "2xlarge" }, "enable": "(show_image || show_video) && $match(image_align, 'left|right')" }, "image_grid_column_gap": { "label": "Grid Column Gap", "description": "Set the size of the gap between the image and the content.", "type": "select", "options": { "Small": "small", "Medium": "medium", "Default": "", "Large": "large", "None": "collapse" }, "enable": "(show_image || show_video) && $match(image_align, 'left|right') && !(panel_image_no_padding && panel_style)" }, "image_grid_row_gap": { "label": "Grid Row Gap", "description": "Set the size of the gap if the grid items stack.", "type": "select", "options": { "Small": "small", "Medium": "medium", "Default": "", "Large": "large", "None": "collapse" }, "enable": "(show_image || show_video) && $match(image_align, 'left|right') && !(panel_image_no_padding && panel_style)" }, "image_grid_breakpoint": { "label": "Grid Breakpoint", "description": "Set the breakpoint from which grid items will stack.", "type": "select", "options": { "Always": "", "Small (Phone Landscape)": "s", "Medium (Tablet Landscape)": "m", "Large (Desktop)": "l", "X-Large (Large Screens)": "xl" }, "enable": "(show_image || show_video) && $match(image_align, 'left|right')" }, "image_vertical_align": { "label": "Vertical Alignment", "description": "Vertically center grid items.", "type": "checkbox", "text": "Center", "enable": "(show_image || show_video) && $match(image_align, 'left|right')" }, "image_margin": { "label": "Margin Top", "description": "Set the top margin. Note that the margin will only apply if the content field immediately follows another content field.", "type": "select", "options": { "Small": "small", "Default": "", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "None": "remove" }, "enable": "(show_image || show_video) && (image_align == 'between' || (image_align == 'bottom' && !(panel_style && panel_image_no_padding)))" }, "image_svg_inline": { "label": "Inline SVG", "description": "Inject SVG images into the page markup so that they can easily be styled with CSS.", "type": "checkbox", "text": "Make SVG stylable with CSS", "enable": "show_image" }, "image_svg_animate": { "type": "checkbox", "text": "Animate strokes", "enable": "show_image && image_svg_inline" }, "image_svg_color": { "label": "SVG Color", "description": "Select the SVG color. It will only apply to supported elements defined in the SVG.", "type": "select", "options": { "None": "", "Muted": "muted", "Emphasis": "emphasis", "Primary": "primary", "Secondary": "secondary", "Success": "success", "Warning": "warning", "Danger": "danger" }, "enable": "show_image && image_svg_inline" }, "image_text_color": { "label": "Text Color", "description": "Set light or dark color mode for text, buttons and controls if a sticky transparent navbar is displayed above.", "type": "select", "options": { "None": "", "Light": "light", "Dark": "dark" }, "source": true, "enable": "show_image || show_video" }, "link_target": { "label": "Target", "type": "checkbox", "text": "Open in a new window", "enable": "show_link && !lightbox" }, "link_text": { "label": "Text", "description": "Enter the text for the link.", "enable": "show_link" }, "link_aria_label": { "label": "ARIA Label", "description": "Enter a descriptive text label to make it accessible if the link has no visible text.", "enable": "show_link" }, "link_style": { "label": "Style", "description": "Set the link style.", "type": "select", "options": { "Button Default": "default", "Button Primary": "primary", "Button Secondary": "secondary", "Button Danger": "danger", "Button Text": "text", "Link": "", "Link Muted": "link-muted", "Link Text": "link-text" }, "enable": "show_link" }, "link_size": { "label": "Button Size", "description": "Set the button size.", "type": "select", "options": { "Small": "small", "Default": "", "Large": "large" }, "enable": "show_link && link_style && !$match(link_style, 'link-(muted|text)')" }, "link_fullwidth": { "type": "checkbox", "text": "Full width button", "enable": "show_link && link_style && !$match(link_style, 'link-(muted|text)')" }, "link_margin": { "label": "Margin Top", "description": "Set the top margin. Note that the margin will only apply if the content field immediately follows another content field.", "type": "select", "options": { "Small": "small", "Default": "", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "None": "remove" }, "enable": "show_link" }, "position": "${builder.position}", "position_left": "${builder.position_left}", "position_right": "${builder.position_right}", "position_top": "${builder.position_top}", "position_bottom": "${builder.position_bottom}", "position_z_index": "${builder.position_z_index}", "blend": "${builder.blend}", "margin": "${builder.margin}", "margin_remove_top": "${builder.margin_remove_top}", "margin_remove_bottom": "${builder.margin_remove_bottom}", "maxwidth": "${builder.maxwidth}", "maxwidth_breakpoint": "${builder.maxwidth_breakpoint}", "block_align": "${builder.block_align}", "block_align_breakpoint": "${builder.block_align_breakpoint}", "block_align_fallback": "${builder.block_align_fallback}", "text_align": "${builder.text_align_justify}", "text_align_breakpoint": "${builder.text_align_breakpoint}", "text_align_fallback": "${builder.text_align_justify_fallback}", "animation": "${builder.animation}", "item_animation": "${builder.item_animation}", "_parallax_button": "${builder._parallax_button}", "visibility": "${builder.visibility}", "container_padding_remove": "${builder.container_padding_remove}", "name": "${builder.name}", "status": "${builder.status}", "source": "${builder.source}", "id": "${builder.id}", "class": "${builder.cls}", "attributes": "${builder.attrs}", "css": { "label": "CSS", "description": "Enter your own custom CSS. The following selectors will be prefixed automatically for this element: <code>.el-element</code>, <code>.el-nav</code>, <code>.el-item</code>, <code>.el-title</code>, <code>.el-meta</code>, <code>.el-content</code>, <code>.el-image</code>, <code>.el-link</code>, <code>.el-hover-image</code>", "type": "editor", "editor": "code", "mode": "css", "attrs": { "debounce": 500, "hints": [ ".el-element", ".el-nav", ".el-item", ".el-title", ".el-meta", ".el-content", ".el-image", ".el-link", ".el-hover-image" ] } }, "transform": "${builder.transform}" }, "fieldset": { "default": { "type": "tabs", "fields": [ { "title": "Content", "fields": [ "content", "show_title", "show_meta", "show_content", "show_image", "show_video", "show_link", "show_hover_image", "show_hover_video" ] }, { "title": "Settings", "fields": [ { "label": "Grid", "type": "group", "divider": true, "fields": [ "grid_masonry", "grid_parallax", "grid_parallax_justify", { "label": "Parallax Start/End", "description": "The animation starts when the element enters the viewport and ends when it leaves the viewport. Optionally, set a start and end offset, e.g. <code>100px</code>, <code>50vh</code> or <code>50vh + 50%</code>. Percent relates to the element's height.", "type": "grid", "width": "1-2", "fields": ["grid_parallax_start", "grid_parallax_end"] }, "grid_column_gap", "grid_row_gap", "grid_divider", "grid_column_align", "grid_row_align" ] }, { "label": "Columns", "type": "group", "divider": true, "fields": [ "grid_default", "grid_small", "grid_medium", "grid_large", "grid_xlarge" ] }, { "label": "Filter", "type": "group", "divider": true, "fields": [ "filter", "filter_animation", "filter_order", "filter_reverse", "filter_order_manual", "filter_style", "filter_all", "filter_all_label", "filter_position", "filter_style_primary", "filter_align", "filter_margin", "filter_grid_width", "filter_grid_column_gap", "filter_grid_row_gap", "filter_grid_breakpoint" ] }, { "label": "Lightbox", "type": "group", "divider": true, "fields": [ "lightbox", "lightbox_controls", "lightbox_counter", "lightbox_bg_close", "lightbox_animation", "lightbox_nav", { "label": "Image Width/Height", "description": "Setting just one value preserves the original proportions. The image will be resized and cropped automatically, and where possible, high resolution images will be auto-generated.", "type": "grid", "width": "1-2", "fields": ["lightbox_image_width", "lightbox_image_height"] }, "lightbox_image_orientation", "lightbox_video_autoplay", "lightbox_text_color", "title_display", "content_display" ] }, { "label": "Panel", "type": "group", "divider": true, "fields": [ "panel_style", "panel_link", "panel_link_hover", "panel_padding", "panel_image_no_padding", "item_maxwidth", "panel_content_width", "panel_expand" ] }, { "label": "Title", "type": "group", "divider": true, "fields": [ "title_style", "title_link", "title_hover_style", "title_decoration", "title_font_family", "title_color", "title_element", "title_align", "title_grid_width", "title_grid_column_gap", "title_grid_row_gap", "title_grid_breakpoint", "title_margin" ] }, { "label": "Meta", "type": "group", "divider": true, "fields": [ "meta_style", "meta_color", "meta_align", "meta_element", "meta_margin" ] }, { "label": "Content", "type": "group", "divider": true, "fields": [ "content_style", "content_align", "content_dropcap", "content_column", "content_column_divider", "content_column_breakpoint", "content_margin" ] }, { "label": "Image", "type": "group", "divider": true, "fields": [ { "label": "Width/Height", "description": "Setting just one value preserves the original proportions. The image will be resized and cropped automatically, and where possible, high resolution images will be auto-generated.", "type": "grid", "width": "1-2", "fields": ["image_width", "image_height"] }, "image_loading", "image_border", "image_box_shadow", "image_box_decoration", "image_box_decoration_inverse", "image_link", "image_transition", "image_transition_border", "image_hover_box_shadow", "icon_width", "icon_color", "image_align", "image_grid_width", "image_grid_column_gap", "image_grid_row_gap", "image_grid_breakpoint", "image_vertical_align", "image_margin", "image_svg_inline", "image_svg_animate", "image_svg_color", "image_text_color" ] }, { "label": "Link", "type": "group", "divider": true, "fields": [ "link_target", "link_text", "link_aria_label", "link_style", "link_size", "link_fullwidth", "link_margin" ] }, { "label": "General", "type": "group", "fields": [ "position", "position_left", "position_right", "position_top", "position_bottom", "position_z_index", "blend", "margin", "margin_remove_top", "margin_remove_bottom", "maxwidth", "maxwidth_breakpoint", "block_align", "block_align_breakpoint", "block_align_fallback", "text_align", "text_align_breakpoint", "text_align_fallback", "animation", "item_animation", "_parallax_button", "visibility", "container_padding_remove" ] } ] }, "${builder.advanced}" ] } } } elements/grid/app/grid.min.js 0000644 00000001061 15175623007 0012136 0 ustar 00 /*! YOOtheme Pro v4.5.33 | https://yootheme.com */ (function(i,l){"use strict";i.component("GridChecked",{args:"classes",extends:i.component("margin"),props:{classes:"list"},data:{classes:"",margin:"",firstColumn:""},update:{write({rows:n}){var a;for(let e=0;e<n.length;e++)for(let t=0;t<n[0].length;t++){const r=e%2^t%2;let s=(a=n[e][t])==null?void 0:a.firstElementChild;l.isTag(s==null?void 0:s.firstElementChild,"a")&&(s=s.firstElementChild),l.toggleClass(s,this.classes[0],!r),l.toggleClass(s,this.classes[1],r)}},events:["resize"]}})})(UIkit,UIkit.util); elements/grid/updates.php 0000644 00000025664 15175623007 0011506 0 ustar 00 <?php namespace YOOtheme; return [ '4.5.0-beta.0.3' => function ($node) { if (Arr::get($node->props, 'show_link') && Arr::get($node->props, 'panel_link') && preg_match('/^card-(default|primary|secondary)|tile-/', Arr::get($node->props, 'panel_style', ''))) { $node->props['panel_link_hover'] = 'true'; } // Remove obsolete props unset( $node->props['icon_ratio'], $node->props['grid_mode'], $node->props['panel_card_size'] ); }, '4.4.0-beta.0.2' => function ($node) { if (str_starts_with(Arr::get($node->props, 'panel_style', ''), 'card-') && Arr::get($node->props, 'panel_image_no_padding') && in_array(Arr::get($node->props, 'image_align'), ['left', 'right'])) { $node->props['panel_expand'] = 'image'; } }, '4.3.4.1' => function ($node) { if (Arr::get($node->props, 'panel_expand')) { $node->props['panel_expand'] = 'content'; } }, '4.3.1' => function ($node) { if (!Arr::get($node->props, 'grid_masonry')) { unset($node->props['grid_masonry']); } }, '4.1.0-beta.0.1' => function ($node) { if (Arr::get($node->props, 'grid_masonry')) { $node->props['grid_masonry'] = 'next'; } }, '4.0.0-beta.9' => function ($node) { if (Arr::get($node->props, 'panel_link') && Arr::get($node->props, 'css')) { $node->props['css'] = str_replace('.el-item', '.el-item > *', $node->props['css']); } }, '2.8.0-beta.0.13' => function ($node) { foreach (['title_style', 'meta_style', 'content_style'] as $prop) { if (in_array(Arr::get($node->props, $prop), ['meta', 'lead'])) { $node->props[$prop] = 'text-' . Arr::get($node->props, $prop); } } }, '2.7.3.1' => function ($node) { if (empty($node->props['panel_style']) && empty($node->props['panel_padding'])) { foreach ($node->children as $child) { if (str_starts_with($child->props->panel_style ?? '', 'card-')) { $node->props['panel_padding'] = 'default'; break; } } } }, '2.7.0-beta.0.5' => function ($node) { if (str_starts_with($node->props['panel_style'] ?? '', 'card-')) { if (empty($node->props['panel_card_size'])) { $node->props['panel_card_size'] = 'default'; } $node->props['panel_padding'] = $node->props['panel_card_size']; } unset($node->props['panel_card_size']); }, '2.7.0-beta.0.1' => function ($node) { Arr::updateKeys($node->props, [ 'panel_content_padding' => 'panel_padding', 'panel_size' => 'panel_card_size', 'panel_card_image' => 'panel_image_no_padding', ]); }, '2.4.14.2' => function ($node) { $node->props['animation'] = Arr::get($node->props, 'item_animation'); $node->props['item_animation'] = true; }, '2.1.0-beta.0.1' => function ($node) { if (Arr::get($node->props, 'item_maxwidth') === 'xxlarge') { $node->props['item_maxwidth'] = '2xlarge'; } if (Arr::get($node->props, 'title_grid_width') === 'xxlarge') { $node->props['title_grid_width'] = '2xlarge'; } if (Arr::get($node->props, 'image_grid_width') === 'xxlarge') { $node->props['image_grid_width'] = '2xlarge'; } if (!empty($node->props['icon_ratio'])) { $node->props['icon_width'] = round(20 * $node->props['icon_ratio']); unset($node->props['icon_ratio']); } }, '2.0.0-beta.8.1' => function ($node) { Arr::updateKeys($node->props, ['grid_align' => 'grid_column_align']); }, '2.0.0-beta.5.1' => function ($node) { Arr::updateKeys($node->props, [ 'link_type' => function ($value) { if ($value === 'content') { return [ 'title_link' => true, 'image_link' => true, 'link_text' => '', ]; } elseif ($value === 'element') { return [ 'panel_link' => true, 'link_text' => '', ]; } }, ]); }, '1.22.0-beta.0.1' => function ($node) { Arr::updateKeys($node->props, [ 'divider' => 'grid_divider', 'filter_breakpoint' => 'filter_grid_breakpoint', 'title_breakpoint' => 'title_grid_breakpoint', 'image_breakpoint' => 'image_grid_breakpoint', 'gutter' => fn($value) => ['grid_column_gap' => $value, 'grid_row_gap' => $value], 'filter_gutter' => fn($value) => [ 'filter_grid_column_gap' => $value, 'filter_grid_row_gap' => $value, ], 'title_gutter' => fn($value) => [ 'title_grid_column_gap' => $value, 'title_grid_row_gap' => $value, ], 'image_gutter' => fn($value) => [ 'image_grid_column_gap' => $value, 'image_grid_row_gap' => $value, ], ]); }, '1.20.0-beta.1.1' => function ($node) { Arr::updateKeys($node->props, ['maxwidth_align' => 'block_align']); }, '1.20.0-beta.0.1' => function ($node) { if (Arr::get($node->props, 'title_style') === 'heading-hero') { $node->props['title_style'] = 'heading-xlarge'; } if (Arr::get($node->props, 'title_style') === 'heading-primary') { $node->props['title_style'] = 'heading-medium'; } /** @var Config $config */ $config = app(Config::class); [$style] = explode(':', $config('~theme.style')); if ( in_array($style, [ 'craft', 'district', 'jack-backer', 'tomsen-brody', 'vision', 'florence', 'max', 'nioh-studio', 'sonic', 'summit', 'trek', ]) ) { if ( Arr::get($node->props, 'title_style') === 'h1' || (empty($node->props['title_style']) && Arr::get($node->props, 'title_element') === 'h1') ) { $node->props['title_style'] = 'heading-small'; } } if (in_array($style, ['florence', 'max', 'nioh-studio', 'sonic', 'summit', 'trek'])) { if (Arr::get($node->props, 'title_style') === 'h2') { $node->props['title_style'] = Arr::get($node->props, 'title_element') === 'h1' ? '' : 'h1'; } elseif ( empty($node->props['title_style']) && Arr::get($node->props, 'title_element') === 'h2' ) { $node->props['title_style'] = 'h1'; } } if (in_array($style, ['fuse', 'horizon', 'joline', 'juno', 'lilian', 'vibe', 'yard'])) { if (Arr::get($node->props, 'title_style') === 'heading-medium') { $node->props['title_style'] = 'heading-small'; } } if ($style == 'copper-hill') { if (Arr::get($node->props, 'title_style') === 'heading-medium') { $node->props['title_style'] = Arr::get($node->props, 'title_element') === 'h1' ? '' : 'h1'; } elseif (Arr::get($node->props, 'title_style') === 'h1') { $node->props['title_style'] = Arr::get($node->props, 'title_element') === 'h2' ? '' : 'h2'; } elseif ( empty($node->props['title_style']) && Arr::get($node->props, 'title_element') === 'h1' ) { $node->props['title_style'] = 'h2'; } } if (in_array($style, ['trek', 'fjord'])) { if (Arr::get($node->props, 'title_style') === 'heading-medium') { $node->props['title_style'] = 'heading-large'; } } if (in_array($style, ['juno', 'vibe', 'yard'])) { if (Arr::get($node->props, 'title_style') === 'heading-xlarge') { $node->props['title_style'] = 'heading-medium'; } } if ( in_array($style, [ 'district', 'florence', 'flow', 'nioh-studio', 'summit', 'vision', ]) ) { if (Arr::get($node->props, 'title_style') === 'heading-xlarge') { $node->props['title_style'] = 'heading-large'; } } if ($style == 'lilian') { if (Arr::get($node->props, 'title_style') === 'heading-xlarge') { $node->props['title_style'] = 'heading-2xlarge'; } } }, '1.19.0-beta.0.1' => function ($node) { if (Arr::get($node->props, 'meta_align') === 'top') { $node->props['meta_align'] = 'above-title'; } if (Arr::get($node->props, 'meta_align') === 'bottom') { $node->props['meta_align'] = 'below-title'; } if (Arr::get($node->props, 'link_style') === 'panel') { if (Arr::get($node->props, 'panel_style')) { $node->props['link_type'] = 'element'; } else { $node->props['link_type'] = 'content'; } $node->props['link_style'] = 'default'; } Arr::updateKeys($node->props, ['image_card' => 'panel_image_no_padding']); }, '1.18.10.3' => function ($node) { if (Arr::get($node->props, 'meta_align') === 'top') { if (!empty($node->props['meta_margin'])) { $node->props['title_margin'] = $node->props['meta_margin']; } $node->props['meta_margin'] = ''; } }, '1.18.10.1' => function ($node) { Arr::updateKeys($node->props, [ 'image_inline_svg' => 'image_svg_inline', 'image_animate_svg' => 'image_svg_animate', ]); }, '1.18.0' => function ($node) { if ( !isset($node->props['grid_parallax']) && Arr::get($node->props, 'grid_mode') === 'parallax' ) { $node->props['grid_parallax'] = Arr::get($node->props, 'grid_parallax_y'); } if ( !isset($node->props['image_box_decoration']) && Arr::get($node->props, 'image_box_shadow_bottom') === true ) { $node->props['image_box_decoration'] = 'shadow'; } if ( !isset($node->props['meta_color']) && Arr::get($node->props, 'meta_style') === 'muted' ) { $node->props['meta_color'] = 'muted'; $node->props['meta_style'] = ''; } }, ]; elements/overlay-slider_item/templates/content.php 0000644 00000002270 15175623007 0016527 0 ustar 00 <?php if ($props['image']) : ?> <img src="<?= $props['image'] ?>" alt="<?= $props['image_alt'] ?>"> <?php endif ?> <?php if ($props['video']) : ?> <?php if ($this->iframeVideo($props['video'], [], false)) : ?> <iframe src="<?= $props['video'] ?>"></iframe> <?php else : ?> <video src="<?= $props['video'] ?>"></video> <?php endif ?> <?php endif ?> <?php if ($props['hover_image']) : ?> <img src="<?= $props['hover_image'] ?>" alt> <?php endif ?> <?php if ($props['hover_video']) : ?> <?php if ($this->iframeVideo($props['hover_video'], [], false)) : ?> <iframe src="<?= $props['hover_video'] ?>"></iframe> <?php else : ?> <video src="<?= $props['hover_video'] ?>"></video> <?php endif ?> <?php endif ?> <?php if ($props['title'] != '') : ?> <<?= $element['title_element'] ?>><?= $props['title'] ?></<?= $element['title_element'] ?>> <?php endif ?> <?php if ($props['meta'] != '') : ?> <p><?= $props['meta'] ?></p> <?php endif ?> <?php if ($props['content'] != '') : ?> <div><?= $props['content'] ?></div> <?php endif ?> <?php if ($props['link']) : ?> <p><a href="<?= $props['link'] ?>"><?= $props['link_text'] ?: $element['link_text'] ?></a></p> <?php endif ?> elements/overlay-slider_item/templates/template-content.php 0000644 00000006464 15175623007 0020351 0 ustar 00 <?php // Title $title = $this->el($element['title_element'], [ 'class' => [ 'el-title', 'uk-{title_style}', 'uk-heading-{title_decoration}', 'uk-font-{title_font_family}', 'uk-text-{title_color} {@!title_color: background}', 'uk-link-{title_hover_style} {@title_link}', // Set here to style links which already come with dynamic content (WP taxonomy links) 'uk-transition-{title_transition} {@overlay_display}', 'uk-margin[-{title_margin}]-top {@!title_margin: remove}', 'uk-margin-remove-top {@title_margin: remove}', 'uk-margin-remove-bottom', 'uk-flex-1 {@content_expand}' => !$props['content'] && (!$props['meta'] || $element['meta_align'] == 'above-title'), ], ]); // Meta $meta = $this->el($element['meta_element'], [ 'class' => [ 'el-meta', 'uk-transition-{meta_transition} {@overlay_display}', 'uk-{meta_style}', 'uk-text-{meta_color}', 'uk-margin[-{meta_margin}]-top {@!meta_margin: remove}', 'uk-margin-remove-bottom [uk-margin-{meta_margin: remove}-top]' => !in_array($element['meta_style'], ['', 'text-meta', 'text-lead', 'text-small', 'text-large']) || $element['meta_element'] != 'div', 'uk-flex-1 {@content_expand}' => $element['meta_align'] == 'below-content' || (!$props['content'] && ($element['meta_align'] == 'above-content' || ($element['meta_align'] == 'below-title' ))), ], ]); // Content $content = $this->el('div', [ 'class' => [ 'el-content uk-panel', 'uk-transition-{content_transition} {@overlay_display}', 'uk-{content_style}', 'uk-margin[-{content_margin}]-top {@!content_margin: remove}', 'uk-margin-remove-bottom [uk-margin-{content_margin: remove}-top]' => !in_array($element['content_style'], ['', 'text-meta', 'text-lead', 'text-small', 'text-large']), 'uk-flex-1 {@content_expand}' => !($props['meta'] && $element['meta_align'] == 'below-content'), ], ]); // Link $link_container = $this->el('div', [ 'class' => [ 'uk-margin[-{link_margin}]-top {@!link_margin: remove}', 'uk-transition-{link_transition} {@overlay_display}', // Not on link element to prevent conflicts with link style ], ]); ?> <?php if ($props['meta'] != '' && $element['meta_align'] == 'above-title') : ?> <?= $meta($element, $props['meta']) ?> <?php endif ?> <?php if ($props['title'] != '') : ?> <?= $title($element) ?> <?php if ($element['title_color'] == 'background') : ?> <span class="uk-text-background"><?= $props['title'] ?></span> <?php elseif ($element['title_decoration'] == 'line') : ?> <span><?= $props['title'] ?></span> <?php else : ?> <?= $props['title'] ?> <?php endif ?> <?= $title->end() ?> <?php endif ?> <?php if ($props['meta'] != '' && $element['meta_align'] == 'below-title') : ?> <?= $meta($element, $props['meta']) ?> <?php endif ?> <?php if ($props['content'] != '') : ?> <?= $content($element, $props['content']) ?> <?php endif ?> <?php if ($props['meta'] != '' && $element['meta_align'] == 'below-content') : ?> <?= $meta($element, $props['meta']) ?> <?php endif ?> <?php if ($props['link'] && ($props['link_text'] || $element['link_text'])) : ?> <?= $link_container($element, $link($element, $props['link_text'] ?: $element['link_text'])) ?> <?php endif ?> elements/overlay-slider_item/templates/template-link.php 0000644 00000003267 15175623007 0017632 0 ustar 00 <?php $link = $props['link'] ? $this->el('a', [ 'href' => $props['link'], 'aria-label' => $props['link_aria_label'] ?: $element['link_aria_label'], 'target' => ['_blank {@link_target}'], 'uk-scroll' => str_contains((string) $props['link'], '#'), ]) : null; if ($link && $element['overlay_link']) { $link_container->attr($link->attrs + [ 'class' => [ // Needs to be child of `uk-light` or `uk-dark` 'uk-link-toggle', ], ]); $props['title'] = $this->striptags($props['title']); $props['meta'] = $this->striptags($props['meta']); $props['content'] = $this->striptags($props['content']); if ($props['title'] != '' && $element['title_hover_style'] != 'reset') { $props['title'] = $this->el('span', [ 'class' => [ 'uk-link-{title_hover_style: heading}', 'uk-link {!title_hover_style}', ], ], $props['title'])->render($element); } } if ($link && $props['title'] != '' && $element['title_link']) { $props['title'] = $link($element, [], $this->striptags($props['title'])); // title_hover_style is set on title } if ($link && ($props['link_text'] || $element['link_text'])) { if ($element['overlay_link']) { $link = $this->el('div'); } $link->attr('class', [ 'el-link', 'uk-{link_style: link-(muted|text)}', 'uk-button uk-button-{!link_style: |link-muted|link-text} [uk-button-{link_size}] [uk-width-1-1 {@link_fullwidth}]', // Keep link style if overlay link 'uk-link {@link_style:} {@overlay_link}', 'uk-text-muted {@link_style: link-muted} {@overlay_link}', ]); } return $link; elements/overlay-slider_item/templates/template-media.php 0000644 00000005110 15175623007 0017741 0 ustar 00 <?php if ($props['video']) { $src = $props['video']; $focal = $props['image_focal_point']; $media = include "{$__dir}/template-video.php"; } elseif ($props['image']) { $src = $props['image']; $focal = $props['image_focal_point']; $media = include "{$__dir}/template-image.php"; } elseif ($props['hover_video']) { $src = $props['hover_video']; $focal = $props['hover_image_focal_point']; $media = include "{$__dir}/template-video.php"; } elseif ($props['hover_image']) { $src = $props['hover_image']; $focal = $props['hover_image_focal_point']; $media = include "{$__dir}/template-image.php"; } // Media $media->attr([ 'class' => [ 'el-image', 'uk-blend-{0}' => $props['media_blend_mode'], 'uk-transition-{image_transition}', 'uk-transition-opaque' => $props['image'] || $props['video'], 'uk-transition-fade {@!image_transition}' => ($props['hover_image'] || $props['hover_video']) && !($props['image'] || $props['video']), 'uk-flex-1 {@image_expand}' ], ]); if ($element['image_expand'] || ($media->name == 'video' && $element['image_width'] && $element['image_height'])) { $media->attr([ 'class' => [ 'uk-object-cover', 'uk-object-{0}' => $focal, ], 'style' => [ // Keep video responsiveness but with new proportions (because video isn't cropped like an image) 'aspect-ratio: {image_width} / {image_height};' => $media->name == 'video', ], ]); } // Hover Media $hover_media = ''; if (($props['hover_image'] || $props['hover_video']) && ($props['image'] || $props['video'])) { if ($props['hover_video']) { $src = $props['hover_video']; $hover_media = include "{$__dir}/template-video.php"; } elseif ($props['hover_image']) { $src = $props['hover_image']; $focal = $props['hover_image_focal_point']; $hover_media = include "{$__dir}/template-image.php"; } $hover_media->attr([ 'class' => [ 'el-hover-image', 'uk-transition-{image_transition}', 'uk-transition-fade {@!image_transition}', 'uk-object-{0}' => $props['hover_image_focal_point'], // `uk-cover` already sets object-fit to cover ], 'uk-cover' => true, 'uk-video' => false, // Resets 'alt' => true, // Image 'loading' => false, // Image + Iframe 'preload' => false, // Video ]); } ?> <?= $media($element, '') ?> <?php if ($hover_media) : ?> <?= $hover_media($element, '') ?> <?php endif ?> elements/overlay-slider_item/templates/template-image.php 0000644 00000000463 15175623007 0017752 0 ustar 00 <?php $image = $this->el('image', [ 'src' => $src, 'alt' => $props['image_alt'], 'loading' => $element['image_loading'] ? false : null, 'width' => $element['image_width'], 'height' => $element['image_height'], 'focal_point' => $focal, 'thumbnail' => true, ]); return $image; elements/overlay-slider_item/templates/template.php 0000644 00000010324 15175623007 0016667 0 ustar 00 <?php // Override default settings $element['text_color'] = $props['text_color'] ?: $element['text_color']; // New logic shortcuts $element['has_transition'] = $element['overlay_display'] || $element['image_transition'] || $props['hover_image'] || $props['hover_video']; $element['text_color_inverse'] = $element['text_color'] === 'light' ? 'dark' : 'light'; $el = $this->el($props['item_element'] ?: 'div', [ 'class' => [ 'el-item', // Can't use `uk-grid-item-match` because `flex-wrap: warp` creates a multi-line flex container which doesn't shrink the child height if its content is larger 'uk-flex uk-flex-column {@image_expand}', // Needs to be parent of `uk-link-toggle` 'uk-{0}' => !$element['overlay_style'] || $element['overlay_cover'] ? $element['text_color'] : false, // Only for transparent navbar 'uk-inverse-{0}' => $element['overlay_style'] && !$element['overlay_cover'] ? $element['text_color'] : false, ], ]); // Link Container $link_container = $props['link'] && $element['overlay_link'] ? $this->el('a', [ 'class' => [ 'uk-flex-1 uk-flex uk-flex-column {@image_expand}', ], ]) : null; ($link_container ?: $el)->attr([ 'class' => [ 'uk-inline-clip', 'uk-transition-toggle {@has_transition}', ], 'style' => [ "background-color: {$props['media_background']};" => $props['media_background'], ], 'tabindex' => $element['has_transition'] && !($props['link'] && $element['overlay_link']) ? 0 : null, // Needs to be on anchor to have just one focusable toggle when using keyboard navigation 'uk-toggle' => ($props['text_color_hover'] || $element['text_color_hover']) && ((!$element['overlay_style'] && ($props['hover_image'] || $props['hover_video'])) || ($element['overlay_cover'] && $element['overlay_display'] && $element['overlay_transition_background'])) ? [ 'cls: uk-{text_color_inverse} [uk-{text_color}];', 'mode: hover;', 'target: !*; {@overlay_link}' => $props['link'], ] : false, ]); $overlay = $this->el('div', [ 'class' => [ 'uk-{overlay_style}', 'uk-transition-{overlay_transition} {@overlay_display} {@overlay_cover}', 'uk-position-cover {@overlay_cover}', 'uk-position-{overlay_margin} {@overlay_cover}', ], ]); $position = $this->el('div', [ 'class' => [ 'uk-position-{overlay_position} [uk-position-{overlay_margin} {@overlay_style}]', 'uk-transition-{overlay_transition} {@overlay_display}' => !$element['overlay_transition_background'] || !$element['overlay_cover'], 'uk-blend-difference {@text_blend} {@!overlay_style}', 'uk-flex uk-flex-column {@content_expand}' ], ]); $content = $this->el('div', [ 'class' => [ $element['overlay_style'] ? 'uk-overlay' : 'uk-panel', 'uk-padding {@!overlay_padding} {@!overlay_style}', 'uk-padding-{!overlay_padding: |none}', 'uk-padding-remove {@overlay_padding: none} {@overlay_style}', 'uk-width-{overlay_maxwidth} {@!overlay_position: top|bottom}', 'uk-margin-remove-first-child', 'uk-flex-1 uk-flex uk-flex-column {@content_expand}' ], ]); if (!$element['overlay_cover']) { $position->attr($overlay->attrs); } // Link $link = include "{$__dir}/template-link.php"; ?> <?= $el($element, $attrs) ?> <?php if ($link_container) : ?> <?= $link_container($element) ?> <?php endif ?> <?= $this->render("{$__dir}/template-media", compact('props', 'element')) ?> <?php if ($props['media_overlay']) : ?> <div class="uk-position-cover" style="background-color:<?= $props['media_overlay'] ?>"></div> <?php endif ?> <?php if ($element['overlay_cover']) : ?> <?= $overlay($element, '') ?> <?php endif ?> <?php if ($props['title'] != '' || $props['meta'] != '' || $props['content'] != '' || ($props['link'] && ($props['link_text'] || $element['link_text']))) : ?> <?= $position($element, $content($element, $this->render("{$__dir}/template-content", compact('props', 'element', 'link')))) ?> <?php endif ?> <?php if ($link_container) : ?> <?= $link_container->end() ?> <?php endif ?> <?= $el->end() ?> elements/overlay-slider_item/templates/template-video.php 0000644 00000001422 15175623007 0017772 0 ustar 00 <?php if ($iframe = $this->iframeVideo($src)) { $video = $this->el('iframe', [ 'src' => $iframe, 'uk-responsive' => true, 'loading' => ['lazy {@image_loading}'], 'title' => $props['video_title'], 'class' => [ 'uk-disabled', ], 'uk-video' => [ 'automute: true;', ], ]); } else { $video = $this->el('video', [ 'src' => $src, 'controls' => false, 'loop' => true, 'autoplay' => true, 'muted' => true, 'playsinline' => true, 'preload' => ['none {@image_loading}'], 'uk-video' => true, ]); } $video->attr([ 'width' => $element['image_width'], 'height' => $element['image_height'], ]); return $video; elements/overlay-slider_item/element.php 0000644 00000002507 15175623007 0014513 0 ustar 00 <?php namespace YOOtheme; return [ 'transforms' => [ 'render' => function ($node, $params) { // Display foreach (['title', 'meta', 'content', 'link', 'hover_image', 'hover_video'] as $key) { if (!$params['parent']->props["show_{$key}"]) { $node->props[$key] = ''; } } /** * Auto-correct media rendering for dynamic content * * @var View $view */ $view = app(View::class); foreach (['', 'hover_'] as $prefix) { if ($node->props["{$prefix}image"] && $view->isVideo($node->props["{$prefix}image"])) { $node->props["{$prefix}video"] = $node->props["{$prefix}image"]; $node->props["{$prefix}image"] = null; } elseif ($node->props["{$prefix}video"] && $view->isImage($node->props["{$prefix}video"])) { $node->props["{$prefix}image"] = $node->props["{$prefix}video"]; $node->props["{$prefix}video"] = null; } } // Don't render element if content fields are empty return $node->props['image'] || $node->props['video'] || $node->props['hover_image'] || $node->props['hover_video']; }, ], ]; elements/overlay-slider_item/element.json 0000644 00000020762 15175623007 0014700 0 ustar 00 { "@import": "./element.php", "name": "overlay-slider_item", "title": "Item", "width": 500, "placeholder": { "props": { "image": "${url:~yootheme/theme/assets/images/element-image-placeholder.png}", "video": "", "title": "Title", "meta": "", "content": "", "hover_image": "", "hover_video": "" } }, "updates": "./updates.php", "templates": { "render": "./templates/template.php", "content": "./templates/content.php" }, "fields": { "image": { "label": "Image", "type": "image", "source": true, "show": "!video", "altRef": "%name%_alt" }, "video": { "label": "Video", "description": "Select a video file or enter a link from <a href=\"https://www.youtube.com\" target=\"_blank\">YouTube</a> or <a href=\"https://vimeo.com\" target=\"_blank\">Vimeo</a>.", "type": "video", "source": true, "show": "!image" }, "_media": { "type": "button-panel", "panel": "builder-overlay-slider-item-media", "text": "Edit Settings", "show": "image || video" }, "video_title": { "label": "Video Title", "source": true, "show": "video && $match(video, '(youtube\\.com|youtube-nocookie\\.com|youtu\\.be|vimeo\\.com)', 'i')" }, "image_alt": { "label": "Image Alt", "source": true, "show": "image && !video" }, "title": { "label": "Title", "source": true }, "meta": { "label": "Meta", "source": true }, "content": { "label": "Content", "type": "editor", "source": true }, "link": "${builder.link}", "link_text": { "label": "Link Text", "description": "Set a different link text for this item.", "source": true, "enable": "link" }, "link_aria_label": { "label": "Link ARIA Label", "description": "Set a different link ARIA label for this item.", "source": true, "enable": "link" }, "hover_image": { "label": "Hover Image", "description": "Select an optional image that appears on hover.", "type": "image", "source": true, "show": "!hover_video" }, "hover_video": { "label": "Hover Video", "description": "Select an optional video that appears on hover.", "type": "video", "source": true, "show": "!hover_image" }, "item_element": "${builder.html_element_item}", "text_color": { "label": "Text Color", "description": "Set a different text color for this item.", "type": "select", "options": { "None": "", "Light": "light", "Dark": "dark" }, "source": true }, "text_color_hover": { "type": "checkbox", "text": "Inverse the text color on hover" }, "image_focal_point": { "label": "Focal Point", "description": "Set a focal point to adjust the image focus when cropping.", "type": "select", "options": { "Top Left": "top-left", "Top Center": "top-center", "Top Right": "top-right", "Center Left": "center-left", "Center Center": "", "Center Right": "center-right", "Bottom Left": "bottom-left", "Bottom Center": "bottom-center", "Bottom Right": "bottom-right" }, "source": true }, "hover_image_focal_point": { "label": "Focal Point", "description": "Set a focal point to adjust the image focus when cropping.", "type": "select", "options": { "Top Left": "top-left", "Top Center": "top-center", "Top Right": "top-right", "Center Left": "center-left", "Center Center": "", "Center Right": "center-right", "Bottom Left": "bottom-left", "Bottom Center": "bottom-center", "Bottom Right": "bottom-right" }, "source": true }, "status": "${builder.statusItem}", "source": "${builder.source}" }, "fieldset": { "default": { "type": "tabs", "fields": [ { "title": "Content", "fields": [ "image", "video", "_media", "video_title", "image_alt", "title", "meta", "content", "link", "link_text", "link_aria_label", "hover_image", "hover_video" ] }, { "title": "Settings", "fields": [ { "label": "Item", "type": "group", "divider": true, "fields": [ "item_element" ] }, { "label": "Overlay", "type": "group", "divider": true, "fields": ["text_color", "text_color_hover"] }, { "label": "Image", "type": "group", "divider": true, "fields": ["image_focal_point"] }, { "label": "Hover Image", "type": "group", "fields": ["hover_image_focal_point"] } ] }, "${builder.advancedItem}" ] } }, "panels": { "builder-overlay-slider-item-media": { "title": "Media", "width": 500, "fields": { "media_background": { "label": "Background Color", "description": "Use the background color in combination with blend modes.", "type": "color" }, "media_blend_mode": { "label": "Blend Mode", "description": "Determine how the image or video will blend with the background color.", "type": "select", "options": { "Normal": "", "Multiply": "multiply", "Screen": "screen", "Overlay": "overlay", "Darken": "darken", "Lighten": "lighten", "Color-dodge": "color-dodge", "Color-burn": "color-burn", "Hard-light": "hard-light", "Soft-light": "soft-light", "Difference": "difference", "Exclusion": "exclusion", "Hue": "hue", "Saturation": "saturation", "Color": "color", "Luminosity": "luminosity" }, "enable": "media_background" }, "media_overlay": { "label": "Overlay Color", "description": "Set an additional transparent overlay to soften the image or video.", "type": "color" } }, "fieldset": { "default": { "fields": ["media_background", "media_blend_mode", "media_overlay"] } } } } } elements/overlay-slider_item/updates.php 0000644 00000000340 15175623007 0014520 0 ustar 00 <?php namespace YOOtheme; return [ '4.5.0-beta.0.1' => function ($node) { if (Arr::get($node->props, 'image') && Arr::get($node->props, 'video')) { unset($node->props['video']); } }, ]; elements/html/images/icon.svg 0000644 00000000573 15175623007 0012255 0 ustar 00 <svg width="30" height="30" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg"> <rect width="24" height="27" fill="none" stroke="#444" stroke-width="2" x="3" y="2" /> <polyline fill="none" stroke="#444" stroke-width="2" points="18.2,10.6 23.1,15.5 18.2,20.4" /> <polyline fill="none" stroke="#444" stroke-width="2" points="12.1,10.6 7.2,15.5 12.1,20.4" /> </svg> elements/html/images/iconSmall.svg 0000644 00000000530 15175623007 0013237 0 ustar 00 <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polyline fill="none" stroke="#444" stroke-width="1.01" points="12,7 15,10 12,13" /> <polyline fill="none" stroke="#444" stroke-width="1.01" points="8,7 5,10 8,13" /> <rect width="15" height="18" fill="none" stroke="#444" x="2.5" y="0.5" /> </svg> elements/html/templates/content.php 0000644 00000000143 15175623007 0013511 0 ustar 00 <?php if ($props['content'] != '') : ?> <div> <?= $props['content'] ?> </div> <?php endif ?> elements/html/templates/template.php 0000644 00000000115 15175623007 0013651 0 ustar 00 <?php $el = $this->el('div'); echo $el($props, $attrs, $props['content']); elements/html/element.json 0000644 00000003426 15175623007 0011663 0 ustar 00 { "@import": "./element.php", "name": "html", "title": "Html", "icon": "${url:images/icon.svg}", "group": "basic", "iconSmall": "${url:images/iconSmall.svg}", "element": true, "width": 500, "placeholder": { "props": { "content": "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." } }, "templates": { "render": "./templates/template.php", "content": "./templates/content.php" }, "fields": { "content": { "label": "Content", "type": "editor", "editor": "code", "mode": "text/html", "source": true }, "name": "${builder.name}", "source": "${builder.source}", "id": "${builder.id}", "status": "${builder.status}", "class": "${builder.cls}", "attributes": "${builder.attrs}", "css": { "type": "editor", "label": "CSS", "description": "Enter your own custom CSS. The following selectors will be prefixed automatically for this element: <code>.el-element</code>", "editor": "code", "mode": "css", "attrs": { "debounce": 500, "hints": [".el-element"] } }, "transform": "${builder.transform}" }, "fieldset": { "default": { "type": "tabs", "fields": [ { "title": "Content", "fields": ["content"] }, "${builder.advanced}" ] } } } elements/html/element.php 0000644 00000000351 15175623007 0011473 0 ustar 00 <?php namespace YOOtheme; return [ 'transforms' => [ 'render' => function ($node) { // Don't render element if content fields are empty return $node->props['content'] != ''; }, ], ]; elements/layout/element.json 0000644 00000000334 15175623007 0012227 0 ustar 00 { "name": "layout", "title": "Layout", "container": true, "updates": "./updates.php", "templates": { "render": "./templates/template.php", "content": "./templates/content.php" } } elements/layout/templates/content.php 0000644 00000000051 15175623007 0014060 0 ustar 00 <?php echo $builder->render($children); elements/layout/templates/template.php 0000644 00000000635 15175623007 0014231 0 ustar 00 <?php if (isset($prefix)) { echo "<!-- Builder #{$prefix} -->"; } // Add elements inline css above the content to ensure css is present when rendered if (!empty($props['css'])) { echo $this->el('style', [ 'class' => 'uk-margin-remove-adjacent', 'data-id' => !empty($attrs['data-id']) ? "{$attrs['data-id']}-style" : false, ])([], $props['css']); } echo $builder->render($children); elements/layout/updates.php 0000644 00000002265 15175623007 0012066 0 ustar 00 <?php namespace YOOtheme; return [ '2.4.0-beta.0.3' => function ($node) { $rename = [ 'slider' => 'overlay-slider', 'slider_item' => 'overlay-slider_item', 'map_marker' => 'map_item', ]; $apply = function ($node) use (&$apply, $rename) { if (isset($node->type) && !empty($rename[$node->type])) { $node->type = $rename[$node->type]; } if (!empty($node->children)) { array_map($apply, $node->children); } }; $apply($node); }, '2.3.0-beta.0.1' => function ($node) { $rename = [ 'joomla_module' => 'module', 'wordpress_widget' => 'module', 'joomla_position' => 'module_position', 'wordpress_area' => 'module_position', ]; $apply = function ($node) use (&$apply, $rename) { if (isset($node->type) && !empty($rename[$node->type])) { $node->type = $rename[$node->type]; } if (!empty($node->children)) { array_map($apply, $node->children); } }; $apply($node); }, ]; elements/text/updates.php 0000644 00000000667 15175623007 0011541 0 ustar 00 <?php namespace YOOtheme; return [ '2.8.0-beta.0.13' => function ($node) { if (Arr::get($node->props, 'text_size') && !Arr::get($node->props, 'text_style')) { $node->props['text_style'] = Arr::get($node->props, 'text_size'); } unset($node->props['text_size']); }, '1.20.0-beta.4' => function ($node) { Arr::updateKeys($node->props, ['maxwidth_align' => 'block_align']); }, ]; elements/text/templates/content.php 0000644 00000000133 15175623007 0013530 0 ustar 00 <?php if ($props['content'] != '') : ?> <div><?= $props['content'] ?></div> <?php endif ?> elements/text/templates/template.php 0000644 00000001452 15175623007 0013676 0 ustar 00 <?php $el = $this->el($props['html_element'] ?: 'div', [ 'class' => [ 'uk-panel', 'uk-text-{text_style}', 'uk-text-{text_color}', 'uk-dropcap {@dropcap}', 'uk-column-{column}[@{column_breakpoint}]', 'uk-column-divider {@column} {@column_divider}', ], ]); // Column $breakpoints = ['xl', 'l', 'm', 's', '']; if ($props['column'] && false !== $index = array_search($props['column_breakpoint'], $breakpoints)) { [, $columns] = explode('-', $props['column']); foreach (array_splice($breakpoints, $index + 1, 4) as $breakpoint) { if ($columns < 2) { break; } $el->attr('class', ['uk-column-1-' . (--$columns) . ($breakpoint ? "@{$breakpoint}" : '')]); } } echo $el($props, $attrs, $props['content']); elements/text/element.json 0000644 00000017040 15175623007 0011700 0 ustar 00 { "@import": "./element.php", "name": "text", "title": "Text", "group": "basic", "icon": "${url:images/icon.svg}", "iconSmall": "${url:images/iconSmall.svg}", "element": true, "width": 500, "defaults": { "margin": "default", "column_breakpoint": "m" }, "placeholder": { "props": { "content": "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." } }, "updates": "./updates.php", "templates": { "render": "./templates/template.php", "content": "./templates/content.php" }, "fields": { "content": { "label": "Content", "type": "editor", "source": true }, "dropcap": { "label": "Drop Cap", "description": "Display the first letter of the paragraph as a large initial.", "type": "checkbox", "text": "Enable drop cap" }, "text_style": { "label": "Text Style", "description": "Select a predefined text style, including color, size and font-family.", "type": "select", "options": { "None": "", "Meta": "meta", "Lead": "lead", "Small": "small", "Large": "large" } }, "text_color": { "label": "Text Color", "description": "Select the text color. If the Background option is selected, styles that don't apply a background image use the primary color instead.", "type": "select", "options": { "None": "", "Muted": "muted", "Emphasis": "emphasis", "Primary": "primary", "Secondary": "secondary", "Success": "success", "Warning": "warning", "Danger": "danger" } }, "column": { "label": "Columns", "description": "Set the number of text columns.", "type": "select", "options": { "None": "", "Halves": "1-2", "Thirds": "1-3", "Quarters": "1-4", "Fifths": "1-5", "Sixths": "1-6" } }, "column_divider": { "description": "Show a divider between text columns.", "type": "checkbox", "text": "Show dividers", "enable": "column" }, "column_breakpoint": { "label": "Columns Breakpoint", "description": "Set the device width from which the text columns should apply.", "type": "select", "options": { "Always": "", "Small (Phone Landscape)": "s", "Medium (Tablet Landscape)": "m", "Large (Desktop)": "l", "X-Large (Large Screens)": "xl" }, "enable": "column" }, "html_element": { "label": "HTML Element", "description": "Define the purpose and structure of the content or give it no semantic meaning.", "type": "select", "options": { "div": "", "address": "address", "aside": "aside", "footer": "footer" } }, "position": "${builder.position}", "position_left": "${builder.position_left}", "position_right": "${builder.position_right}", "position_top": "${builder.position_top}", "position_bottom": "${builder.position_bottom}", "position_z_index": "${builder.position_z_index}", "blend": "${builder.blend}", "margin": "${builder.margin}", "margin_remove_top": "${builder.margin_remove_top}", "margin_remove_bottom": "${builder.margin_remove_bottom}", "maxwidth": "${builder.maxwidth}", "maxwidth_breakpoint": "${builder.maxwidth_breakpoint}", "block_align": "${builder.block_align}", "block_align_breakpoint": "${builder.block_align_breakpoint}", "block_align_fallback": "${builder.block_align_fallback}", "text_align": "${builder.text_align_justify}", "text_align_breakpoint": "${builder.text_align_breakpoint}", "text_align_fallback": "${builder.text_align_justify_fallback}", "animation": "${builder.animation}", "_parallax_button": "${builder._parallax_button}", "visibility": "${builder.visibility}", "name": "${builder.name}", "status": "${builder.status}", "source": "${builder.source}", "id": "${builder.id}", "class": "${builder.cls}", "attributes": "${builder.attrs}", "css": { "label": "CSS", "description": "Enter your own custom CSS. The following selectors will be prefixed automatically for this element: <code>.el-element</code>", "type": "editor", "editor": "code", "mode": "css", "attrs": { "debounce": 500, "hints": [".el-element"] } }, "transform": "${builder.transform}" }, "fieldset": { "default": { "type": "tabs", "fields": [ { "title": "Content", "fields": ["content"] }, { "title": "Settings", "fields": [ { "label": "Text", "type": "group", "divider": true, "fields": [ "dropcap", "text_style", "text_color", "column", "column_divider", "column_breakpoint", "html_element" ] }, { "label": "General", "type": "group", "fields": [ "position", "position_left", "position_right", "position_top", "position_bottom", "position_z_index", "blend", "margin", "margin_remove_top", "margin_remove_bottom", "maxwidth", "maxwidth_breakpoint", "block_align", "block_align_breakpoint", "block_align_fallback", "text_align", "text_align_breakpoint", "text_align_fallback", "animation", "_parallax_button", "visibility" ] } ] }, "${builder.advanced}" ] } } } elements/text/images/icon.svg 0000644 00000000512 15175623007 0012266 0 ustar 00 <svg width="30" height="30" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg"> <rect width="26" height="2" fill="#444" x="2" y="8" /> <rect width="26" height="2" fill="#444" x="2" y="12" /> <rect width="26" height="2" fill="#444" x="2" y="16" /> <rect width="20" height="2" fill="#444" x="2" y="20" /> </svg> elements/text/images/iconSmall.svg 0000644 00000000511 15175623007 0013256 0 ustar 00 <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect width="18" height="1" fill="#444" x="1" y="5" /> <rect width="18" height="1" fill="#444" x="1" y="8" /> <rect width="18" height="1" fill="#444" x="1" y="11" /> <rect width="14" height="1" fill="#444" x="1" y="14" /> </svg> elements/text/element.php 0000644 00000000351 15175623007 0011513 0 ustar 00 <?php namespace YOOtheme; return [ 'transforms' => [ 'render' => function ($node) { // Don't render element if content fields are empty return $node->props['content'] != ''; }, ], ]; elements/gallery/element.json 0000644 00000160566 15175623007 0012367 0 ustar 00 { "@import": "./element.php", "name": "gallery", "title": "Gallery", "group": "multiple items", "icon": "${url:images/icon.svg}", "iconSmall": "${url:images/iconSmall.svg}", "element": true, "container": true, "width": 500, "defaults": { "show_title": true, "show_meta": true, "show_content": true, "show_link": true, "show_hover_image": true, "show_hover_video": true, "grid_default": "1", "grid_medium": "3", "filter_style": "tab", "filter_all": true, "filter_position": "top", "filter_align": "left", "filter_grid_width": "auto", "filter_grid_breakpoint": "m", "lightbox_bg_close": true, "overlay_mode": "cover", "overlay_hover": true, "overlay_style": "overlay-primary", "overlay_position": "center", "text_color": "light", "overlay_transition": "fade", "title_hover_style": "reset", "title_element": "h3", "meta_style": "text-meta", "meta_align": "below-title", "meta_element": "div", "link_text": "Read more", "link_style": "default", "text_align": "center", "margin": "default", "item_animation": true }, "placeholder": { "children": [ { "type": "gallery_item", "props": {} }, { "type": "gallery_item", "props": {} }, { "type": "gallery_item", "props": {} } ] }, "updates": "./updates.php", "templates": { "render": "./templates/template.php", "content": "./templates/content.php" }, "fields": { "content": { "label": "Items", "type": "content-items", "item": "gallery_item", "media": [ { "type": "image", "item": { "title": "title", "image": "src" } }, { "type": "video", "item": { "title": "title", "video": "src" } } ] }, "show_title": { "label": "Display", "type": "checkbox", "text": "Show the title" }, "show_meta": { "type": "checkbox", "text": "Show the meta text" }, "show_content": { "type": "checkbox", "text": "Show the content" }, "show_link": { "type": "checkbox", "text": "Show the link" }, "show_hover_image": { "type": "checkbox", "text": "Show the hover image" }, "show_hover_video": { "description": "Show or hide content fields without the need to delete the content itself.", "type": "checkbox", "text": "Show the hover video" }, "grid_masonry": { "label": "Masonry", "description": "Create a gap-free masonry layout if grid items have different heights. Pack items into columns with the most room or show them in their natural order. Optionally, use a parallax animation to move columns while scrolling until they justify at the bottom.", "type": "select", "options": { "None": "", "Pack": "pack", "Next": "next" } }, "grid_parallax": { "label": "Parallax", "description": "The parallax animation moves single grid columns at different speeds while scrolling. Define the vertical parallax offset in pixels. Alternatively, move columns with different heights until they justify at the bottom.", "type": "range", "attrs": { "min": 0, "max": 600, "step": 10 } }, "grid_parallax_justify": { "type": "checkbox", "text": "Justify columns at the bottom" }, "grid_parallax_start": { "enable": "grid_parallax || grid_parallax_justify" }, "grid_parallax_end": { "enable": "grid_parallax || grid_parallax_justify" }, "grid_column_gap": { "label": "Column Gap", "description": "Set the size of the gap between the grid columns.", "type": "select", "options": { "Small": "small", "Medium": "medium", "Default": "", "Large": "large", "None": "collapse" } }, "grid_row_gap": { "label": "Row Gap", "description": "Set the size of the gap between the grid rows.", "type": "select", "options": { "Small": "small", "Medium": "medium", "Default": "", "Large": "large", "None": "collapse" } }, "grid_divider": { "label": "Divider", "description": "Show a divider between grid columns.", "type": "checkbox", "text": "Show dividers", "enable": "grid_column_gap != 'collapse' && grid_row_gap != 'collapse'" }, "grid_column_align": { "label": "Alignment", "description": "Center grid columns horizontally and rows vertically.", "type": "checkbox", "text": "Center columns", "enable": "!grid_masonry" }, "grid_row_align": { "type": "checkbox", "text": "Center rows", "enable": "!grid_masonry" }, "grid_default": { "label": "Phone Portrait", "description": "Set the number of grid columns for each breakpoint. <i>Inherit</i> refers to the number of columns on the next smaller screen size. <i>Auto</i> expands the columns to the width of their items filling the rows accordingly.", "type": "select", "options": { "1 Column": "1", "2 Columns": "2", "3 Columns": "3", "4 Columns": "4", "5 Columns": "5", "6 Columns": "6", "Auto": "auto" } }, "grid_small": { "label": "Phone Landscape", "description": "Set the number of grid columns for each breakpoint. <i>Inherit</i> refers to the number of columns on the next smaller screen size. <i>Auto</i> expands the columns to the width of their items filling the rows accordingly.", "type": "select", "options": { "Inherit": "", "1 Column": "1", "2 Columns": "2", "3 Columns": "3", "4 Columns": "4", "5 Columns": "5", "6 Columns": "6", "Auto": "auto" } }, "grid_medium": { "label": "Tablet Landscape", "description": "Set the number of grid columns for each breakpoint. <i>Inherit</i> refers to the number of columns on the next smaller screen size. <i>Auto</i> expands the columns to the width of their items filling the rows accordingly.", "type": "select", "options": { "Inherit": "", "1 Column": "1", "2 Columns": "2", "3 Columns": "3", "4 Columns": "4", "5 Columns": "5", "6 Columns": "6", "Auto": "auto" } }, "grid_large": { "label": "Desktop", "description": "Set the number of grid columns for each breakpoint. <i>Inherit</i> refers to the number of columns on the next smaller screen size. <i>Auto</i> expands the columns to the width of their items filling the rows accordingly.", "type": "select", "options": { "Inherit": "", "1 Column": "1", "2 Columns": "2", "3 Columns": "3", "4 Columns": "4", "5 Columns": "5", "6 Columns": "6", "Auto": "auto" } }, "grid_xlarge": { "label": "Large Screens", "description": "Set the number of grid columns for each breakpoint. <i>Inherit</i> refers to the number of columns on the next smaller screen size. <i>Auto</i> expands the columns to the width of their items filling the rows accordingly.", "type": "select", "options": { "Inherit": "", "1 Column": "1", "2 Columns": "2", "3 Columns": "3", "4 Columns": "4", "5 Columns": "5", "6 Columns": "6", "Auto": "auto" } }, "filter": { "label": "Filter", "type": "checkbox", "text": "Enable filter navigation" }, "filter_animation": { "label": "Animation", "description": "Select an animation that will be applied to the content items when filtering between them.", "type": "select", "options": { "None": "false", "Slide": "", "Fade": "fade", "Delayed Fade": "delayed-fade" }, "enable": "filter" }, "filter_order": { "label": "Navigation Order", "description": "Order the filter navigation alphabetically or by defining the order manually.", "type": "select", "options": { "Alphabetical": "", "Manual": "manual" }, "enable": "filter" }, "filter_reverse": { "type": "checkbox", "text": "Reverse order", "enable": "filter" }, "filter_order_manual": { "label": "Manual Order", "description": "Enter a comma-separated list of tags to manually order the filter navigation.", "enable": "filter && filter_order == 'manual'" }, "filter_style": { "label": "Style", "description": "Select the filter navigation style. The pill and divider styles are only available for horizontal Subnavs.", "type": "select", "options": { "Tabs": "tab", "Subnav (Nav)": "subnav", "Subnav Divider (Nav)": "subnav-divider", "Subnav Pill (Nav)": "subnav-pill" }, "enable": "filter" }, "filter_all": { "label": "All Items", "type": "checkbox", "text": "Show filter control for all items", "enable": "filter" }, "filter_all_label": { "attrs": { "placeholder": "All" }, "enable": "filter && filter_all" }, "filter_position": { "label": "Position", "description": "Position the filter navigation at the top, left or right. A larger style can be applied to left and right navigation.", "type": "select", "options": { "Top": "top", "Left": "left", "Right": "right" }, "enable": "filter" }, "filter_style_primary": { "type": "checkbox", "text": "Primary navigation", "enable": "filter && $match(filter_position, 'left|right') && $match(filter_style, '^subnav')" }, "filter_align": { "label": "Alignment", "description": "Align the filter controls.", "type": "select", "options": { "Left": "left", "Right": "right", "Center": "center", "Justify": "justify" }, "enable": "filter && filter_position == 'top'" }, "filter_margin": { "label": "Margin", "description": "Set the vertical margin.", "type": "select", "options": { "Small": "small", "Default": "", "Medium": "medium", "Large": "large", "X-Large": "xlarge" }, "enable": "filter && filter_position == 'top'" }, "filter_grid_width": { "label": "Grid Width", "description": "Define the width of the filter navigation. Choose between percent and fixed widths or expand columns to the width of their content.", "type": "select", "options": { "Auto": "auto", "50%": "1-2", "33%": "1-3", "25%": "1-4", "20%": "1-5", "Small": "small", "Medium": "medium", "Large": "large" }, "enable": "filter && $match(filter_position, 'left|right')" }, "filter_grid_column_gap": { "label": "Grid Column Gap", "description": "Set the size of the gap between between the filter navigation and the content.", "type": "select", "options": { "Small": "small", "Medium": "medium", "Default": "", "Large": "large", "None": "collapse" }, "enable": "filter && $match(filter_position, 'left|right')" }, "filter_grid_row_gap": { "label": "Grid Row Gap", "description": "Set the size of the gap if the grid items stack.", "type": "select", "options": { "Small": "small", "Medium": "medium", "Default": "", "Large": "large", "None": "collapse" }, "enable": "filter && $match(filter_position, 'left|right')" }, "filter_grid_breakpoint": { "label": "Grid Breakpoint", "description": "Set the breakpoint from which grid items will stack.", "type": "select", "options": { "Small (Phone Landscape)": "s", "Medium (Tablet Landscape)": "m", "Large (Desktop)": "l", "X-Large (Large Screens)": "xl" }, "enable": "filter && $match(filter_position, 'left|right')" }, "lightbox": { "label": "Lightbox", "type": "checkbox", "text": "Enable lightbox gallery" }, "lightbox_controls": { "type": "checkbox", "text": "Show controls always", "enable": "lightbox" }, "lightbox_counter": { "type": "checkbox", "text": "Show counter", "enable": "lightbox" }, "lightbox_bg_close": { "type": "checkbox", "text": "Close on background click", "enable": "lightbox" }, "lightbox_animation": { "label": "Animation", "description": "Select the transition between two slides.", "type": "select", "options": { "Slide": "", "Fade": "fade", "Scale": "scale" }, "enable": "lightbox" }, "lightbox_nav": { "label": "Navigation", "description": "Select the navigation type.", "type": "select", "options": { "Slidenav": "", "Dotnav": "dotnav", "Thumbnav": "thumbnav" }, "enable": "lightbox" }, "lightbox_image_width": { "attrs": { "placeholder": "auto" }, "enable": "lightbox" }, "lightbox_image_height": { "attrs": { "placeholder": "auto" }, "enable": "lightbox" }, "lightbox_image_orientation": { "label": "Image Orientation", "description": "Width and height will be flipped accordingly, if the image is in portrait or landscape format.", "type": "checkbox", "text": "Allow mixed image orientations", "enable": "lightbox" }, "lightbox_video_autoplay": { "label": "Video Autoplay", "description": "Enable autoplay or play a muted inline video without controls.", "type": "select", "options": { "None": "", "Autoplay": "true", "Inline": "inline" }, "enable": "lightbox" }, "lightbox_text_color": { "label": "Text Color", "description": "Set light or dark color mode for text, buttons and controls.", "type": "select", "options": { "None": "", "Light": "light", "Dark": "dark" }, "source": true, "enable": "lightbox" }, "title_display": { "label": "Show Title", "description": "Display the title inside the overlay, as the lightbox caption or both.", "type": "select", "options": { "Overlay + Lightbox": "", "Overlay only": "item", "Lightbox only": "lightbox" }, "enable": "show_title && lightbox" }, "content_display": { "label": "Show Content", "description": "Display the content inside the overlay, as the lightbox caption or both.", "type": "select", "options": { "Overlay + Lightbox": "", "Overlay only": "item", "Lightbox only": "lightbox" }, "enable": "show_content && lightbox" }, "image_expand": { "label": "Height", "description": "Expand the height of the image to fill the available space in the item.", "type": "checkbox", "text": "Expand image", "enable": "!grid_masonry" }, "overlay_link": { "label": "Link", "description": "Link the whole overlay if a link exists.", "type": "checkbox", "text": "Link overlay", "enable": "show_link" }, "item_maxwidth": { "type": "select", "label": "Max Width", "description": "Set the maximum width.", "options": { "None": "", "Small": "small", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "2X-Large": "2xlarge" } }, "overlay_mode": { "label": "Mode", "description": "When using cover mode, you need to set the text color manually.", "type": "select", "options": { "Cover": "cover", "Caption": "caption" } }, "overlay_hover": { "type": "checkbox", "text": "Display overlay on hover" }, "overlay_transition_background": { "type": "checkbox", "text": "Animate background only", "enable": "overlay_hover && overlay_mode == 'cover' && overlay_style" }, "overlay_style": { "label": "Style", "description": "Select the style for the overlay.", "type": "select", "options": { "None": "", "Overlay Default": "overlay-default", "Overlay Primary": "overlay-primary", "Tile Default": "tile-default", "Tile Muted": "tile-muted", "Tile Primary": "tile-primary", "Tile Secondary": "tile-secondary" } }, "overlay_position": { "label": "Position", "description": "Select the overlay or content position.", "type": "select", "options": { "Top": "top", "Bottom": "bottom", "Left": "left", "Right": "right", "Top Left": "top-left", "Top Center": "top-center", "Top Right": "top-right", "Bottom Left": "bottom-left", "Bottom Center": "bottom-center", "Bottom Right": "bottom-right", "Center": "center", "Center Left": "center-left", "Center Right": "center-right" } }, "overlay_margin": { "label": "Margin", "description": "Apply a margin between the overlay and the image container.", "type": "select", "options": { "None": "", "Small": "small", "Medium": "medium", "Large": "large" }, "enable": "overlay_style" }, "overlay_padding": { "label": "Padding", "description": "Set the padding between the overlay and its content.", "type": "select", "options": { "Default": "", "Small": "small", "Large": "large", "None": "none" } }, "content_expand": { "label": "Height", "description": "Expand the height of the content to fill the available space in the overlay and push the link to the bottom.", "type": "checkbox", "text": "Expand content" }, "overlay_maxwidth": { "label": "Max Width", "description": "Set the maximum content width.", "type": "select", "options": { "None": "", "Small": "small", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "2X-Large": "2xlarge" }, "enable": "!$match(overlay_position, '^(top|bottom)$')" }, "text_color": { "label": "Text Color", "description": "Set light or dark color mode for text, buttons and controls.", "type": "select", "options": { "None": "", "Light": "light", "Dark": "dark" } }, "text_color_hover": { "type": "checkbox", "text": "Inverse the text color on hover", "enable": "!overlay_style && (show_hover_image || show_hover_video) || overlay_style && overlay_mode == 'cover' && overlay_hover && overlay_transition_background" }, "text_blend": { "type": "checkbox", "text": "Blend with image", "enable": "!overlay_style" }, "overlay_transition": { "label": "Transition", "description": "Select a transition for the overlay when it appears on hover.", "type": "select", "options": { "Fade": "fade", "Scale Up": "scale-up", "Scale Down": "scale-down", "Slide Top Small": "slide-top-small", "Slide Bottom Small": "slide-bottom-small", "Slide Left Small": "slide-left-small", "Slide Right Small": "slide-right-small", "Slide Top Medium": "slide-top-medium", "Slide Bottom Medium": "slide-bottom-medium", "Slide Left Medium": "slide-left-medium", "Slide Right Medium": "slide-right-medium", "Slide Top 100%": "slide-top", "Slide Bottom 100%": "slide-bottom", "Slide Left 100%": "slide-left", "Slide Right 100%": "slide-right" }, "enable": "overlay_hover" }, "image_width": { "type": "number", "attrs": { "placeholder": "auto" } }, "image_height": { "type": "number", "attrs": { "placeholder": "auto" } }, "image_orientation": { "label": "Image Orientation", "description": "Landscape and portrait images are centered within the grid cells. Width and height will be flipped when images are resized.", "type": "checkbox", "text": "Allow mixed image orientations" }, "image_loading": { "label": "Loading", "description": "By default, images are loaded lazy. Enable eager loading for images in the initial viewport.", "type": "checkbox", "text": "Load image eagerly" }, "image_transition": { "label": "Transition", "description": "Select an image transition. If the hover image is set, the transition takes place between the two images. If <i>None</i> is selected, the hover image fades in.", "type": "select", "options": { "None (Fade if hover image)": "", "Scale Up": "scale-up", "Scale Down": "scale-down" } }, "image_transition_border": { "type": "checkbox", "text": "Border" }, "image_min_height": { "label": "Min Height", "description": "Use an optional minimum height to prevent images from becoming smaller than the content on small devices.", "type": "range", "attrs": { "min": 200, "max": 500, "step": 20 } }, "image_border": { "label": "Border", "description": "Select the image border style.", "type": "select", "options": { "None": "", "Rounded": "rounded", "Circle": "circle", "Pill": "pill" }, "enable": "!image_transition_border && !image_box_decoration" }, "image_box_shadow": { "label": "Box Shadow", "description": "Select the image box shadow size.", "type": "select", "options": { "None": "", "Small": "small", "Medium": "medium", "Large": "large", "X-Large": "xlarge" } }, "image_hover_box_shadow": { "label": "Hover Box Shadow", "description": "Select the image box shadow size on hover.", "type": "select", "options": { "None": "", "Small": "small", "Medium": "medium", "Large": "large", "X-Large": "xlarge" } }, "image_box_decoration": { "label": "Box Decoration", "description": "Select the image box decoration style.", "type": "select", "options": { "None": "", "Default": "default", "Primary": "primary", "Secondary": "secondary", "Floating Shadow": "shadow", "Mask": "mask" } }, "image_box_decoration_inverse": { "type": "checkbox", "text": "Inverse style", "enable": "$match(image_box_decoration, '^(default|primary|secondary)$')" }, "title_transition": { "label": "Transition", "description": "Select a transition for the title when the overlay appears on hover.", "type": "select", "options": { "None": "", "Fade": "fade", "Scale Up": "scale-up", "Scale Down": "scale-down", "Slide Top Small": "slide-top-small", "Slide Bottom Small": "slide-bottom-small", "Slide Left Small": "slide-left-small", "Slide Right Small": "slide-right-small", "Slide Top Medium": "slide-top-medium", "Slide Bottom Medium": "slide-bottom-medium", "Slide Left Medium": "slide-left-medium", "Slide Right Medium": "slide-right-medium", "Slide Top 100%": "slide-top", "Slide Bottom 100%": "slide-bottom", "Slide Left 100%": "slide-left", "Slide Right 100%": "slide-right" }, "enable": "show_title && overlay_hover && (title_display != 'lightbox' && lightbox || !lightbox)" }, "title_style": { "label": "Style", "description": "Title styles differ in font-size but may also come with a predefined color, size and font.", "type": "select", "options": { "None": "", "Heading 3X-Large": "heading-3xlarge", "Heading 2X-Large": "heading-2xlarge", "Heading X-Large": "heading-xlarge", "Heading Large": "heading-large", "Heading Medium": "heading-medium", "Heading Small": "heading-small", "Heading H1": "h1", "Heading H2": "h2", "Heading H3": "h3", "Heading H4": "h4", "Heading H5": "h5", "Heading H6": "h6", "Text Meta": "text-meta", "Text Lead": "text-lead", "Text Small": "text-small", "Text Large": "text-large" }, "enable": "show_title && (title_display != 'lightbox' && lightbox || !lightbox)" }, "title_link": { "label": "Link", "description": "Link the title if a link exists.", "type": "checkbox", "text": "Link title", "enable": "show_title && (title_display != 'lightbox' && lightbox || !lightbox) && show_link" }, "title_hover_style": { "label": "Hover Style", "description": "Set the hover style for a linked title.", "type": "select", "options": { "None": "reset", "Heading Link": "heading", "Default Link": "" }, "enable": "show_title && (title_display != 'lightbox' && lightbox || !lightbox) && show_link && (title_link || overlay_link)" }, "title_decoration": { "label": "Decoration", "description": "Decorate the title with a divider, bullet or a line that is vertically centered to the heading.", "type": "select", "options": { "None": "", "Divider": "divider", "Bullet": "bullet", "Line": "line" }, "enable": "show_title && (title_display != 'lightbox' && lightbox || !lightbox)" }, "title_font_family": { "label": "Font Family", "description": "Select an alternative font family. Mind that not all styles have different font families.", "type": "select", "options": { "None": "", "Default": "default", "Primary": "primary", "Secondary": "secondary", "Tertiary": "tertiary" }, "enable": "show_title && (title_display != 'lightbox' && lightbox || !lightbox)" }, "title_color": { "label": "Color", "description": "Select the text color. If the Background option is selected, styles that don't apply a background image use the primary color instead.", "type": "select", "options": { "None": "", "Muted": "muted", "Emphasis": "emphasis", "Primary": "primary", "Secondary": "secondary", "Success": "success", "Warning": "warning", "Danger": "danger", "Background": "background" }, "enable": "show_title && (title_display != 'lightbox' && lightbox || !lightbox)" }, "title_element": { "label": "HTML Element", "description": "Set the level for the section heading or give it no semantic meaning.", "type": "select", "options": { "h1": "h1", "h2": "h2", "h3": "h3", "h4": "h4", "h5": "h5", "h6": "h6", "div": "div" }, "enable": "show_title && (title_display != 'lightbox' && lightbox || !lightbox)" }, "title_margin": { "label": "Margin Top", "description": "Set the top margin. Note that the margin will only apply if the content field immediately follows another content field.", "type": "select", "options": { "Small": "small", "Default": "", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "None": "remove" }, "enable": "show_title && (title_display != 'lightbox' && lightbox || !lightbox)" }, "meta_transition": { "label": "Transition", "description": "Select a transition for the meta text when the overlay appears on hover.", "type": "select", "options": { "None": "", "Fade": "fade", "Scale Up": "scale-up", "Scale Down": "scale-down", "Slide Top Small": "slide-top-small", "Slide Bottom Small": "slide-bottom-small", "Slide Left Small": "slide-left-small", "Slide Right Small": "slide-right-small", "Slide Top Medium": "slide-top-medium", "Slide Bottom Medium": "slide-bottom-medium", "Slide Left Medium": "slide-left-medium", "Slide Right Medium": "slide-right-medium", "Slide Top 100%": "slide-top", "Slide Bottom 100%": "slide-bottom", "Slide Left 100%": "slide-left", "Slide Right 100%": "slide-right" }, "enable": "show_meta && overlay_hover" }, "meta_style": { "label": "Style", "description": "Select a predefined meta text style, including color, size and font-family.", "type": "select", "options": { "None": "", "Text Meta": "text-meta", "Text Lead": "text-lead", "Text Small": "text-small", "Text Large": "text-large", "Heading 3X-Large": "heading-3xlarge", "Heading 2X-Large": "heading-2xlarge", "Heading X-Large": "heading-xlarge", "Heading Large": "heading-large", "Heading Medium": "heading-medium", "Heading Small": "heading-small", "Heading H1": "h1", "Heading H2": "h2", "Heading H3": "h3", "Heading H4": "h4", "Heading H5": "h5", "Heading H6": "h6" }, "enable": "show_meta" }, "meta_color": { "label": "Color", "description": "Select the text color.", "type": "select", "options": { "None": "", "Muted": "muted", "Emphasis": "emphasis", "Primary": "primary", "Secondary": "secondary", "Success": "success", "Warning": "warning", "Danger": "danger" }, "enable": "show_meta" }, "meta_align": { "label": "Alignment", "description": "Align the meta text.", "type": "select", "options": { "Above Title": "above-title", "Below Title": "below-title", "Below Content": "below-content" }, "enable": "show_meta" }, "meta_element": { "label": "HTML Element", "description": "Set the level for the section heading or give it no semantic meaning.", "type": "select", "options": { "h1": "h1", "h2": "h2", "h3": "h3", "h4": "h4", "h5": "h5", "h6": "h6", "div": "div" }, "enable": "show_meta" }, "meta_margin": { "label": "Margin Top", "description": "Set the top margin. Note that the margin will only apply if the content field immediately follows another content field.", "type": "select", "options": { "Small": "small", "Default": "", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "None": "remove" }, "enable": "show_meta" }, "content_transition": { "label": "Transition", "description": "Select a transition for the content when the overlay appears on hover.", "type": "select", "options": { "None": "", "Fade": "fade", "Scale Up": "scale-up", "Scale Down": "scale-down", "Slide Top Small": "slide-top-small", "Slide Bottom Small": "slide-bottom-small", "Slide Left Small": "slide-left-small", "Slide Right Small": "slide-right-small", "Slide Top Medium": "slide-top-medium", "Slide Bottom Medium": "slide-bottom-medium", "Slide Left Medium": "slide-left-medium", "Slide Right Medium": "slide-right-medium", "Slide Top 100%": "slide-top", "Slide Bottom 100%": "slide-bottom", "Slide Left 100%": "slide-left", "Slide Right 100%": "slide-right" }, "enable": "show_content && overlay_hover && (content_display != 'lightbox' && lightbox || !lightbox)" }, "content_style": { "label": "Style", "description": "Select a predefined text style, including color, size and font-family.", "type": "select", "options": { "None": "", "Text Meta": "text-meta", "Text Lead": "text-lead", "Text Small": "text-small", "Text Large": "text-large", "Heading 3X-Large": "heading-3xlarge", "Heading 2X-Large": "heading-2xlarge", "Heading X-Large": "heading-xlarge", "Heading Large": "heading-large", "Heading Medium": "heading-medium", "Heading Small": "heading-small", "Heading H1": "h1", "Heading H2": "h2", "Heading H3": "h3", "Heading H4": "h4", "Heading H5": "h5", "Heading H6": "h6" }, "enable": "show_content && (content_display != 'lightbox' && lightbox || !lightbox)" }, "content_margin": { "label": "Margin Top", "description": "Set the top margin. Note that the margin will only apply if the content field immediately follows another content field.", "type": "select", "options": { "Small": "small", "Default": "", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "None": "remove" }, "enable": "show_content && (content_display != 'lightbox' && lightbox || !lightbox)" }, "link_target": { "label": "Target", "type": "checkbox", "text": "Open in a new window", "enable": "show_link && !lightbox" }, "link_text": { "label": "Text", "description": "Enter the text for the link.", "enable": "show_link" }, "link_aria_label": { "label": "ARIA Label", "description": "Enter a descriptive text label to make it accessible if the link has no visible text.", "enable": "show_link" }, "link_transition": { "label": "Transition", "description": "Select a transition for the link when the overlay appears on hover.", "type": "select", "options": { "None": "", "Fade": "fade", "Scale Up": "scale-up", "Scale Down": "scale-down", "Slide Top Small": "slide-top-small", "Slide Bottom Small": "slide-bottom-small", "Slide Left Small": "slide-left-small", "Slide Right Small": "slide-right-small", "Slide Top Medium": "slide-top-medium", "Slide Bottom Medium": "slide-bottom-medium", "Slide Left Medium": "slide-left-medium", "Slide Right Medium": "slide-right-medium", "Slide Top 100%": "slide-top", "Slide Bottom 100%": "slide-bottom", "Slide Left 100%": "slide-left", "Slide Right 100%": "slide-right" }, "enable": "show_link && overlay_hover" }, "link_style": { "label": "Style", "description": "Set the link style.", "type": "select", "options": { "Button Default": "default", "Button Primary": "primary", "Button Secondary": "secondary", "Button Danger": "danger", "Button Text": "text", "Link": "", "Link Muted": "link-muted", "Link Text": "link-text" }, "enable": "show_link" }, "link_size": { "label": "Button Size", "description": "Set the button size.", "type": "select", "options": { "Small": "small", "Default": "", "Large": "large" }, "enable": "show_link && link_style && !$match(link_style, 'link-(muted|text)')" }, "link_fullwidth": { "type": "checkbox", "text": "Full width button", "enable": "show_link && link_style && !$match(link_style, 'link-(muted|text)')" }, "link_margin": { "label": "Margin Top", "description": "Set the top margin. Note that the margin will only apply if the content field immediately follows another content field.", "type": "select", "options": { "Small": "small", "Default": "", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "None": "remove" }, "enable": "show_link" }, "position": "${builder.position}", "position_left": "${builder.position_left}", "position_right": "${builder.position_right}", "position_top": "${builder.position_top}", "position_bottom": "${builder.position_bottom}", "position_z_index": "${builder.position_z_index}", "blend": "${builder.blend}", "margin": "${builder.margin}", "margin_remove_top": "${builder.margin_remove_top}", "margin_remove_bottom": "${builder.margin_remove_bottom}", "maxwidth": "${builder.maxwidth}", "maxwidth_breakpoint": "${builder.maxwidth_breakpoint}", "block_align": "${builder.block_align}", "block_align_breakpoint": "${builder.block_align_breakpoint}", "block_align_fallback": "${builder.block_align_fallback}", "text_align": "${builder.text_align_justify}", "text_align_breakpoint": "${builder.text_align_breakpoint}", "text_align_fallback": "${builder.text_align_justify_fallback}", "animation": "${builder.animation}", "item_animation": "${builder.item_animation}", "_parallax_button": "${builder._parallax_button}", "visibility": "${builder.visibility}", "container_padding_remove": "${builder.container_padding_remove}", "name": "${builder.name}", "status": "${builder.status}", "source": "${builder.source}", "id": "${builder.id}", "class": "${builder.cls}", "attributes": "${builder.attrs}", "css": { "label": "CSS", "description": "Enter your own custom CSS. The following selectors will be prefixed automatically for this element: <code>.el-element</code>, <code>.el-nav</code>, <code>.el-item</code>, <code>.el-image</code>, <code>.el-title</code>, <code>.el-meta</code>, <code>.el-content</code>, <code>.el-link</code>, <code>.el-hover-image</code>", "type": "editor", "editor": "code", "mode": "css", "attrs": { "debounce": 500, "hints": [ ".el-element", ".el-nav", ".el-item", ".el-image", ".el-title", ".el-meta", ".el-content", ".el-link", ".el-hover-image" ] } }, "transform": "${builder.transform}" }, "fieldset": { "default": { "type": "tabs", "fields": [ { "title": "Content", "fields": [ "content", "show_title", "show_meta", "show_content", "show_link", "show_hover_image", "show_hover_video" ] }, { "title": "Settings", "fields": [ { "label": "Gallery", "type": "group", "divider": true, "fields": [ "grid_masonry", "grid_parallax", "grid_parallax_justify", { "label": "Parallax Start/End", "description": "The animation starts when the element enters the viewport and ends when it leaves the viewport. Optionally, set a start and end offset, e.g. <code>100px</code>, <code>50vh</code> or <code>50vh + 50%</code>. Percent relates to the element's height.", "type": "grid", "width": "1-2", "fields": ["grid_parallax_start", "grid_parallax_end"] }, "grid_column_gap", "grid_row_gap", "grid_divider", "grid_column_align", "grid_row_align" ] }, { "label": "Columns", "type": "group", "divider": true, "fields": [ "grid_default", "grid_small", "grid_medium", "grid_large", "grid_xlarge" ] }, { "label": "Filter", "type": "group", "divider": true, "fields": [ "filter", "filter_animation", "filter_order", "filter_reverse", "filter_order_manual", "filter_style", "filter_all", "filter_all_label", "filter_position", "filter_style_primary", "filter_align", "filter_margin", "filter_grid_width", "filter_grid_column_gap", "filter_grid_row_gap", "filter_grid_breakpoint" ] }, { "label": "Lightbox", "type": "group", "divider": true, "fields": [ "lightbox", "lightbox_controls", "lightbox_counter", "lightbox_bg_close", "lightbox_animation", "lightbox_nav", { "label": "Image Width/Height", "description": "Setting just one value preserves the original proportions. The image will be resized and cropped automatically, and where possible, high resolution images will be auto-generated.", "type": "grid", "width": "1-2", "fields": ["lightbox_image_width", "lightbox_image_height"] }, "lightbox_image_orientation", "lightbox_video_autoplay", "lightbox_text_color", "title_display", "content_display" ] }, { "label": "Item", "type": "group", "divider": true, "fields": [ "image_expand", "overlay_link", "item_maxwidth" ] }, { "label": "Overlay", "type": "group", "divider": true, "fields": [ "overlay_mode", "overlay_hover", "overlay_transition_background", "overlay_style", "overlay_position", "overlay_margin", "overlay_padding", "content_expand", "overlay_maxwidth", "text_color", "text_color_hover", "text_blend", "overlay_transition" ] }, { "label": "Image", "type": "group", "divider": true, "fields": [ { "label": "Width/Height", "description": "Setting just one value preserves the original proportions. The image will be resized and cropped automatically, and where possible, high resolution images will be auto-generated.", "type": "grid", "width": "1-2", "fields": ["image_width", "image_height"] }, "image_orientation", "image_loading", "image_transition", "image_transition_border", "image_min_height", "image_border", "image_box_shadow", "image_hover_box_shadow", "image_box_decoration", "image_box_decoration_inverse" ] }, { "label": "Title", "type": "group", "divider": true, "fields": [ "title_transition", "title_style", "title_link", "title_hover_style", "title_decoration", "title_font_family", "title_color", "title_element", "title_margin" ] }, { "label": "Meta", "type": "group", "divider": true, "fields": [ "meta_transition", "meta_style", "meta_color", "meta_align", "meta_element", "meta_margin" ] }, { "label": "Content", "type": "group", "divider": true, "fields": ["content_transition", "content_style", "content_margin"] }, { "label": "Link", "type": "group", "divider": true, "fields": [ "link_target", "link_text", "link_aria_label", "link_transition", "link_style", "link_size", "link_fullwidth", "link_margin" ] }, { "label": "General", "type": "group", "fields": [ "position", "position_left", "position_right", "position_top", "position_bottom", "position_z_index", "blend", "margin", "margin_remove_top", "margin_remove_bottom", "maxwidth", "maxwidth_breakpoint", "block_align", "block_align_breakpoint", "block_align_fallback", "text_align", "text_align_breakpoint", "text_align_fallback", "animation", "item_animation", "_parallax_button", "visibility", "container_padding_remove" ] } ] }, "${builder.advanced}" ] } } } elements/gallery/images/icon.svg 0000644 00000001347 15175623007 0012750 0 ustar 00 <svg width="30" height="30" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg"> <rect width="10" height="10" fill="none" stroke="#444" stroke-width="2" x="3" y="3" /> <rect width="10" height="10" fill="none" stroke="#444" stroke-width="2" x="17" y="3" /> <rect width="10" height="10" fill="none" stroke="#444" stroke-width="2" x="3" y="17" /> <rect width="10" height="10" fill="none" stroke="#444" stroke-width="2" x="17" y="17" /> <path fill="none" stroke="#444" stroke-width="2" d="M10,6H6v4" /> <path fill="none" stroke="#444" stroke-width="2" d="M24,10V6H20" /> <path fill="none" stroke="#444" stroke-width="2" d="M20,24h4V20" /> <path fill="none" stroke="#444" stroke-width="2" d="M6,20v4h4" /> </svg> elements/gallery/images/iconSmall.svg 0000644 00000001167 15175623007 0013741 0 ustar 00 <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#444" d="M6.5 4.5h-2v2" /> <path fill="none" stroke="#444" d="M6.5 15.5h-2v-2" /> <path fill="none" stroke="#444" d="M13.5 15.5h2v-2" /> <path fill="none" stroke="#444" d="M13.5 4.5h2v2" /> <rect width="6" height="6" fill="none" stroke="#444" x="2.5" y="2.5" /> <rect width="6" height="6" fill="none" stroke="#444" x="11.5" y="2.5" /> <rect width="6" height="6" fill="none" stroke="#444" x="11.5" y="11.5" /> <rect width="6" height="6" fill="none" stroke="#444" x="2.5" y="11.5" /> </svg> elements/gallery/element.php 0000644 00000003634 15175623007 0012175 0 ustar 00 <?php namespace YOOtheme; return [ 'transforms' => [ 'render' => function ($node) { $node->tags = []; // Filter tags if (!empty($node->props['filter'])) { foreach ($node->children as $child) { $child->tags = []; foreach (explode(',', $child->props['tags'] ?? '') as $tag) { // Strip tags as precaution if tags are mapped dynamically $tag = strip_tags($tag); if ($key = str_replace(' ', '-', trim($tag))) { $child->tags[$key] = trim($tag); } } $node->tags += $child->tags; } if ( $node->props['filter_order'] === 'manual' && $node->props['filter_order_manual'] ) { $order = array_map( 'strtolower', array_map('trim', explode(',', $node->props['filter_order_manual'])), ); uasort($node->tags, function ($a, $b) use ($order) { $iA = array_search(strtolower($a), $order); $iB = array_search(strtolower($b), $order); return $iA !== false && $iB !== false ? $iA - $iB : ($iA !== false ? -1 : ($iB !== false ? 1 : strnatcmp($a, $b))); }); } else { natsort($node->tags); } if ($node->props['filter_reverse']) { $node->tags = array_reverse($node->tags, true); } } }, ], ]; elements/gallery/updates.php 0000644 00000015312 15175623007 0012205 0 ustar 00 <?php namespace YOOtheme; return [ // Remove obsolete props '4.5.0-beta.0.4' => function ($node) { unset( $node->props['grid_mode'], $node->props['image_box_shadow_bottom'] ); }, '4.1.0-beta.0.1' => function ($node) { if (Arr::get($node->props, 'grid_masonry')) { $node->props['grid_masonry'] = 'next'; } }, '4.0.0-beta.9' => function ($node) { if (Arr::get($node->props, 'overlay_link') && Arr::get($node->props, 'css')) { $node->props['css'] = str_replace('.el-item', '.el-item > *', $node->props['css']); } }, '2.8.0-beta.0.13' => function ($node) { foreach (['title_style', 'meta_style', 'content_style'] as $prop) { if (in_array(Arr::get($node->props, $prop), ['meta', 'lead'])) { $node->props[$prop] = 'text-' . Arr::get($node->props, $prop); } } }, '2.4.14.2' => function ($node) { $node->props['animation'] = Arr::get($node->props, 'item_animation'); $node->props['item_animation'] = true; }, '2.1.0-beta.0.1' => function ($node) { if (Arr::get($node->props, 'item_maxwidth') === 'xxlarge') { $node->props['item_maxwidth'] = '2xlarge'; } }, '2.0.0-beta.8.1' => function ($node) { Arr::updateKeys($node->props, ['grid_align' => 'grid_column_align']); }, '2.0.0-beta.5.1' => function ($node) { Arr::updateKeys($node->props, [ 'link_type' => function ($value) { if ($value === 'content') { return [ 'title_link' => true, 'link_text' => '', ]; } elseif ($value === 'element') { return [ 'overlay_link' => true, 'link_text' => '', ]; } }, ]); }, '1.22.0-beta.0.1' => function ($node) { Arr::updateKeys($node->props, [ 'divider' => 'grid_divider', 'filter_breakpoint' => 'filter_grid_breakpoint', 'gutter' => fn($value) => ['grid_column_gap' => $value, 'grid_row_gap' => $value], 'filter_gutter' => fn($value) => [ 'filter_grid_column_gap' => $value, 'filter_grid_row_gap' => $value, ], ]); }, '1.20.0-beta.1.1' => function ($node) { Arr::updateKeys($node->props, ['maxwidth_align' => 'block_align']); }, '1.20.0-beta.0.1' => function ($node) { if (Arr::get($node->props, 'title_style') === 'heading-primary') { $node->props['title_style'] = 'heading-medium'; } /** @var Config $config */ $config = app(Config::class); [$style] = explode(':', $config('~theme.style')); if ( in_array($style, [ 'craft', 'district', 'jack-backer', 'tomsen-brody', 'vision', 'florence', 'max', 'nioh-studio', 'sonic', 'summit', 'trek', ]) ) { if ( Arr::get($node->props, 'title_style') === 'h1' || (empty($node->props['title_style']) && Arr::get($node->props, 'title_element') === 'h1') ) { $node->props['title_style'] = 'heading-small'; } } if (in_array($style, ['florence', 'max', 'nioh-studio', 'sonic', 'summit', 'trek'])) { if (Arr::get($node->props, 'title_style') === 'h2') { $node->props['title_style'] = Arr::get($node->props, 'title_element') === 'h1' ? '' : 'h1'; } elseif ( empty($node->props['title_style']) && Arr::get($node->props, 'title_element') === 'h2' ) { $node->props['title_style'] = 'h1'; } } if (in_array($style, ['fuse', 'horizon', 'joline', 'juno', 'lilian', 'vibe', 'yard'])) { if (Arr::get($node->props, 'title_style') === 'heading-medium') { $node->props['title_style'] = 'heading-small'; } } if ($style == 'copper-hill') { if (Arr::get($node->props, 'title_style') === 'heading-medium') { $node->props['title_style'] = Arr::get($node->props, 'title_element') === 'h1' ? '' : 'h1'; } elseif (Arr::get($node->props, 'title_style') === 'h1') { $node->props['title_style'] = Arr::get($node->props, 'title_element') === 'h2' ? '' : 'h2'; } elseif ( empty($node->props['title_style']) && Arr::get($node->props, 'title_element') === 'h1' ) { $node->props['title_style'] = 'h2'; } } if (in_array($style, ['trek', 'fjord'])) { if (Arr::get($node->props, 'title_style') === 'heading-medium') { $node->props['title_style'] = 'heading-large'; } } }, '1.19.0-beta.0.1' => function ($node) { if (Arr::get($node->props, 'meta_align') === 'top') { $node->props['meta_align'] = 'above-title'; } if (Arr::get($node->props, 'meta_align') === 'bottom') { $node->props['meta_align'] = 'below-title'; } $node->props['link_type'] = 'element'; }, '1.18.10.3' => function ($node) { if (Arr::get($node->props, 'meta_align') === 'top') { if (!empty($node->props['meta_margin'])) { $node->props['title_margin'] = $node->props['meta_margin']; } $node->props['meta_margin'] = ''; } }, '1.18.0' => function ($node) { if ( !isset($node->props['grid_parallax']) && Arr::get($node->props, 'grid_mode') === 'parallax' ) { $node->props['grid_parallax'] = Arr::get($node->props, 'grid_parallax_y'); } if (!isset($node->props['show_hover_image'])) { $node->props['show_hover_image'] = Arr::get($node->props, 'show_image2'); } if ( !isset($node->props['image_box_decoration']) && Arr::get($node->props, 'image_box_shadow_bottom') === true ) { $node->props['image_box_decoration'] = 'shadow'; } if ( !isset($node->props['meta_color']) && Arr::get($node->props, 'meta_style') === 'muted' ) { $node->props['meta_color'] = 'muted'; $node->props['meta_style'] = ''; } }, ]; elements/gallery/templates/template.php 0000644 00000011427 15175623007 0014354 0 ustar 00 <?php // Resets if ($props['overlay_link']) { $props['title_link'] = ''; } // Override default settings if (!$props['grid_parallax'] && $props['grid_parallax_justify']) { $props['grid_parallax'] = '0'; } if ($props['content_expand']) { if (in_array($props['overlay_position'], ['top', 'bottom'])) { $props['overlay_position'] = 'cover'; } if (in_array($props['overlay_position'], ['top-center', 'center', 'bottom-center'])) { $props['overlay_position'] = 'center-horizontal'; } if (in_array($props['overlay_position'], ['top-left', 'center-left', 'bottom-left'])) { $props['overlay_position'] = 'left'; } if (in_array($props['overlay_position'], ['top-right', 'center-right', 'bottom-right'])) { $props['overlay_position'] = 'right'; } } // New logic shortcuts $props['overlay_cover'] = $props['overlay_style'] && $props['overlay_mode'] == 'cover'; $el = $this->el('div', [ 'uk-filter' => $tags ? [ 'target: .js-filter;', 'animation: {filter_animation};', ] : false, ]); // Grid $grid = $this->el('div', [ 'class' => [ 'uk-grid', 'js-filter' => $tags, 'uk-child-width-[1-{@!grid_default: auto}]{grid_default}', 'uk-child-width-[1-{@!grid_small: auto}]{grid_small}@s', 'uk-child-width-[1-{@!grid_medium: auto}]{grid_medium}@m', 'uk-child-width-[1-{@!grid_large: auto}]{grid_large}@l', 'uk-child-width-[1-{@!grid_xlarge: auto}]{grid_xlarge}@xl', 'uk-flex-center {@grid_column_align} {@!grid_masonry}', 'uk-flex-middle {@grid_row_align} {@!grid_masonry}', $props['grid_column_gap'] == $props['grid_row_gap'] ? 'uk-grid-{grid_column_gap}' : '[uk-grid-column-{grid_column_gap}] [uk-grid-row-{grid_row_gap}]', 'uk-grid-divider {@grid_divider} {@!grid_column_gap: collapse} {@!grid_row_gap:collapse}' => count($children) > 1, ], 'uk-grid' => $this->expr([ 'masonry: {grid_masonry};', 'parallax: {grid_parallax};', 'parallax-justify: true; {@grid_parallax_justify}', 'parallax-start: {grid_parallax_start};' => $props['grid_parallax'] || $props['grid_parallax_justify'], 'parallax-end: {grid_parallax_end};' => $props['grid_parallax'] || $props['grid_parallax_justify'], ], $props) ?: count($children) > 1, 'uk-lightbox' => $props['lightbox'] ? [ 'toggle: a[data-type];', 'animation: {lightbox_animation};', 'nav: {lightbox_nav}; slidenav: false;', 'delay-controls: 0;' => $props['lightbox_controls'], 'counter: true;' => $props['lightbox_counter'], 'bg-close: false;' => !$props['lightbox_bg_close'], 'video-autoplay: {lightbox_video_autoplay};', ] : false, ]); $cell = $this->el('div', [ 'class' => [ 'uk-flex uk-flex-center uk-flex-middle {@image_orientation}', // Can't use `uk-grid-match` on the parent because `flex-wrap: warp` creates a multi-line flex container which doesn't shrink the child height if its content is larger 'uk-flex {@!grid_masonry} {@image_expand}', 'uk-flex-{text_align}[@{text_align_breakpoint} [uk-flex-{text_align_fallback}]] {@!grid_masonry} {@image_expand}', ], ]); // Filter $filter_grid = $this->el('div', [ 'class' => [ 'uk-grid', 'uk-child-width-expand', $props['filter_grid_column_gap'] == $props['filter_grid_row_gap'] ? 'uk-grid-{filter_grid_column_gap}' : '[uk-grid-column-{filter_grid_column_gap}] [uk-grid-row-{filter_grid_row_gap}]', ], 'uk-grid' => count($children) > 1, ]); $filter_cell = $this->el('div', [ 'class' => [ 'uk-width-{filter_grid_width}@{filter_grid_breakpoint}', 'uk-flex-last@{filter_grid_breakpoint} {@filter_position: right}', ], ]); ?> <?= $el($props, $attrs) ?> <?php if ($tags) : ?> <?php if ($filter_horizontal = in_array($props['filter_position'], ['left', 'right'])) : ?> <?= $filter_grid($props) ?> <?= $filter_cell($props) ?> <?php endif ?> <?= $this->render("{$__dir}/template-nav", compact('props')) ?> <?php if ($filter_horizontal) : ?> </div> <div> <?php endif ?> <?= $grid($props) ?> <?php foreach ($children as $child) : ?> <?= $cell($props, ['data-tag' => $child->tags], $builder->render($child, ['element' => $props])) ?> <?php endforeach ?> <?= $grid->end() ?> <?php if ($filter_horizontal) : ?> </div> </div> <?php endif ?> <?php else : ?> <?= $grid($props) ?> <?php foreach ($children as $child) : ?> <?= $cell($props, $builder->render($child, ['element' => $props])) ?> <?php endforeach ?> <?= $grid->end() ?> <?php endif ?> <?= $el->end() ?> elements/gallery/templates/template-nav.php 0000644 00000003604 15175623007 0015134 0 ustar 00 <?php // => grid $nav = $this->el('ul', [ 'class' => [ 'el-nav', 'uk-{filter_style} {@filter_style: tab}', 'uk-margin[-{filter_margin}] {@filter_position: top}', ], 'uk-scrollspy-class' => in_array($props['animation'], ['none', 'parallax']) || !$props['item_animation'] ? false : (!empty($props['animation']) ? ['uk-animation-{0}' => $props['animation']] : true), ]); $nav_horizontal = [ 'uk-subnav {@filter_style: subnav.*}', 'uk-{filter_style} {@filter_style: subnav-.*}', 'uk-flex-{filter_align: right|center}', 'uk-child-width-expand {@filter_align: justify}', ]; $nav_vertical = [ 'uk-nav uk-nav-{0} [uk-text-left {@text_align}] {@filter_style: subnav.*}' => $props['filter_style_primary'] ? 'primary' : 'default', 'uk-tab-{filter_position} {@filter_style: tab}', ]; $nav_attrs = $props['filter_position'] === 'top' ? [ 'class' => $nav_horizontal, 'uk-margin' => (bool) preg_match('/^subnav/', $props['filter_style']), ] : [ 'class' => $nav_vertical, 'uk-toggle' => [ "cls: {$this->expr(array_merge($nav_vertical, $nav_horizontal), $props)};", 'mode: media;', 'media: @{filter_grid_breakpoint};', ], ]; ?> <?= $nav($props, $nav_attrs) ?> <?php if ($props['filter_all']) : ?> <li class="uk-active" uk-filter-control><a href><?= $this->trans($props['filter_all_label'] ?: 'All') ?></a></li> <?php endif ?> <?php foreach ($tags as $tag => $name) : ?> <li <?= $this->attrs([ 'class' => ['uk-active' => $tag === array_key_first($tags) && !$props['filter_all']], 'uk-filter-control' => json_encode(['filter' => '[data-tag~="' . str_replace('"', '\"', $tag) . '"]']), ]) ?>> <a href><?= $name ?></a> </li> <?php endforeach ?> <?= $nav->end() ?> elements/gallery/templates/content.php 0000644 00000000522 15175623007 0014205 0 ustar 00 <?php if (count($children) > 1) : ?> <ul> <?php foreach ($children as $child) : ?> <li> <?= $builder->render($child, ['element' => $props]) ?> </li> <?php endforeach ?> </ul> <?php elseif (count($children) == 1) : ?> <div> <?= $builder->render($children[0], ['element' => $props]) ?> </div> <?php endif ?> elements/column/element.json 0000644 00000037561 15175623007 0012223 0 ustar 00 { "@import": "./element.php", "name": "column", "title": "Column", "container": true, "width": 500, "defaults": { "position_sticky_breakpoint": "m", "image_position": "center-center" }, "updates": "./updates.php", "templates": { "render": "./templates/template.php", "content": "./templates/content.php" }, "fields": { "image": { "label": "Image", "description": "Upload a background image.", "type": "image", "source": true, "show": "!video" }, "video": { "label": "Video", "description": "Select a video file or enter a link from <a href=\"https://www.youtube.com\" target=\"_blank\">YouTube</a> or <a href=\"https://vimeo.com\" target=\"_blank\">Vimeo</a>.", "type": "video", "source": true, "show": "!image" }, "_media": { "type": "button-panel", "panel": "builder-column-media", "text": "Edit Settings", "show": "image || video" }, "video_title": { "label": "Video Title", "source": true, "show": "video && $match(video, '(youtube\\.com|youtube-nocookie\\.com|youtu\\.be|vimeo\\.com)', 'i')" }, "vertical_align": { "label": "Vertical Alignment", "description": "Vertically align the elements in the column.", "type": "select", "options": { "Top": "", "Middle": "middle", "Bottom": "bottom" } }, "style": { "label": "Style", "type": "select", "options": { "None": "", "Card Default": "card-default", "Card Primary": "card-primary", "Card Secondary": "card-secondary", "Card Hover": "card-hover", "Tile Default": "tile-default", "Tile Muted": "tile-muted", "Tile Primary": "tile-primary", "Tile Secondary": "tile-secondary" } }, "preserve_color": { "type": "checkbox", "text": "Preserve text color", "enable": "$match(style, 'tile-')" }, "background_color": { "label": "Background Color", "type": "color", "enable": "!style && !background_parallax_background" }, "_background_parallax_button": { "description": "Define a custom background color or a color parallax animation instead of using a predefined style.", "type": "button-panel", "text": "Edit Parallax", "panel": "background-parallax", "enable": "!style" }, "text_color": { "label": "Text Color", "description": "Force a light or dark color for text, buttons and controls on the image or video background.", "type": "select", "options": { "None": "", "Light": "light", "Dark": "dark" }, "source": true, "enable": "!style || ($match(style, 'tile-') && (image || video))" }, "padding": { "label": "Padding", "description": "Set the padding.", "type": "select", "options": { "Default": "", "X-Small": "xsmall", "Small": "small", "Large": "large", "X-Large": "xlarge", "None": "none" }, "enable": "style || background_color || background_parallax_background || image || video" }, "html_element": "${builder.html_element}", "position_sticky": { "label": "Position Sticky", "type": "select", "options": { "None": "", "Elements within Column": "column", "Column within Row": "row", "Column within Section": "section" } }, "position_blend": { "description": "Stick the column or its elements to the top of the viewport while scrolling down. They will stop being sticky when they reach the bottom of the containing column, row or section. Optionally, blend all elements with the page content.", "type": "checkbox", "text": "Blend with page content", "enable": "position_sticky" }, "position_sticky_offset": { "label": "Top Offset", "attrs": { "placeholder": "0" }, "enable": "position_sticky" }, "position_sticky_offset_end": { "label": "Bottom Offset", "attrs": { "placeholder": "0" }, "enable": "position_sticky" }, "position_sticky_breakpoint": { "label": "Position Sticky Breakpoint", "description": "Make the column or its elements sticky only from this device width and larger.", "type": "select", "options": { "Always": "", "Small (Phone Landscape)": "s", "Medium (Tablet Landscape)": "m", "Large (Desktop)": "l", "X-Large (Large Screens)": "xl" }, "enable": "position_sticky" }, "prevent_collapse": { "label": "Empty Dynamic Content", "description": "Don't collapse the column if dynamically loaded content is empty.", "type": "checkbox", "text": "Don't collapse column" }, "source": "${builder.source}", "id": "${builder.id}", "class": "${builder.cls}", "attributes": "${builder.attrs}", "css": { "label": "CSS", "description": "Enter your own custom CSS. The following selectors will be prefixed automatically for this element: <code>.el-column</code>", "type": "editor", "editor": "code", "mode": "css", "attrs": { "debounce": 500, "hints": [".el-column"] } } }, "fieldset": { "default": { "type": "tabs", "fields": [ { "title": "Content", "fields": ["image", "video", "_media", "video_title"] }, { "title": "Settings", "fields": [ "vertical_align", "style", "preserve_color", "text_color", "padding", "html_element", "position_sticky", "position_blend", { "description": "Set the sticky top offset, e.g. <code>100px</code>, <code>50vh</code> or <code>50vh - 50%</code>. Percent relates to the column's height. Set a bottom offset if the sticky content is larger than the viewport.", "name": "_position_sticky_offset", "type": "grid", "width": "1-2", "fields": ["position_sticky_offset", "position_sticky_offset_end"] }, "position_sticky_breakpoint", "prevent_collapse" ] }, { "title": "Advanced", "fields": ["source", "id", "class", "attributes", "css"] } ] } }, "panels": { "builder-column-media": { "title": "Image/Video", "width": 500, "fields": { "image_width": { "label": "Width", "type": "number", "attrs": { "placeholder": "auto" } }, "image_height": { "label": "Height", "type": "number", "attrs": { "placeholder": "auto" } }, "video_width": { "label": "Width", "type": "number" }, "video_height": { "label": "Height", "type": "number" }, "media_focal_point": { "label": "Focal Point", "description": "Set a focal point to adjust the image focus when cropping.", "type": "select", "options": { "Top Left": "top-left", "Top Center": "top-center", "Top Right": "top-right", "Center Left": "center-left", "Center Center": "", "Center Right": "center-right", "Bottom Left": "bottom-left", "Bottom Center": "bottom-center", "Bottom Right": "bottom-right" }, "source": true }, "image_loading": { "label": "Loading", "description": "By default, images are loaded lazy. Enable eager loading for images in the initial viewport.", "type": "checkbox", "text": "Load image eagerly", "show": "image && !video" }, "image_size": { "label": "Image Size", "description": "Determine whether the image will fit the section dimensions by clipping it or by filling the empty areas with the background color.", "type": "select", "options": { "Auto": "", "Cover": "cover", "Contain": "contain", "Width 100%": "width-1-1", "Height 100%": "height-1-1" }, "show": "image && !video" }, "image_position": { "label": "Image Position", "description": "Set the initial background position, relative to the section layer.", "type": "select", "options": { "Top Left": "top-left", "Top Center": "top-center", "Top Right": "top-right", "Center Left": "center-left", "Center Center": "center-center", "Center Right": "center-right", "Bottom Left": "bottom-left", "Bottom Center": "bottom-center", "Bottom Right": "bottom-right" }, "show": "image && !video" }, "image_effect": { "label": "Image Effect", "type": "select", "options": { "None": "", "Parallax": "parallax", "Fixed": "fixed" }, "show": "image && !video" }, "_image_parallax_button": { "description": "Add a parallax effect or fix the background with regard to the viewport while scrolling.", "type": "button-panel", "text": "Edit Parallax", "panel": "image-parallax", "show": "image && !video", "enable": "image_effect == 'parallax'" }, "media_visibility": { "label": "Visibility", "description": "Display the image or video only on this device width and larger.", "type": "select", "options": { "Always": "", "Small (Phone Landscape)": "s", "Medium (Tablet Landscape)": "m", "Large (Desktop)": "l", "X-Large (Large Screens)": "xl" } }, "media_background": { "label": "Background Color", "description": "Use the background color in combination with blend modes, a transparent image or to fill the area, if the image doesn't cover the whole section.", "type": "color" }, "media_blend_mode": { "label": "Blend Mode", "description": "Determine how the image or video will blend with the background color.", "type": "select", "options": { "Normal": "", "Multiply": "multiply", "Screen": "screen", "Overlay": "overlay", "Darken": "darken", "Lighten": "lighten", "Color-dodge": "color-dodge", "Color-burn": "color-burn", "Hard-light": "hard-light", "Soft-light": "soft-light", "Difference": "difference", "Exclusion": "exclusion", "Hue": "hue", "Saturation": "saturation", "Color": "color", "Luminosity": "luminosity" } }, "media_overlay": { "label": "Overlay Color", "type": "gradient", "internal": "media_overlay_gradient" }, "_media_overlay_parallax_button": { "description": "Set an additional transparent overlay to soften the image or video.", "type": "button-panel", "text": "Edit Parallax", "panel": "media-overlay-parallax", "enable": "media_overlay" } }, "fieldset": { "default": { "fields": [ { "description": "Set the width and height in pixels. Setting just one value preserves the original proportions. The image will be resized and cropped automatically.", "name": "_image_dimension", "type": "grid", "width": "1-2", "show": "image && !video", "fields": ["image_width", "image_height"] }, { "description": "Set the video dimensions.", "name": "_video_dimension", "type": "grid", "width": "1-2", "show": "video && !image", "fields": ["video_width", "video_height"] }, "media_focal_point", "image_loading", "image_size", "image_position", "image_effect", "_image_parallax_button", "media_visibility", "media_background", "media_blend_mode", "media_overlay", "_media_overlay_parallax_button" ] } } } } } elements/column/templates/template.php 0000644 00000022607 15175623007 0014214 0 ustar 00 <?php // Initialize prop if not set $props += [ 'media_overlay_gradient' => null, 'background_parallax_background' => null, ]; // Resets if (str_starts_with($props['style'] ?? '', 'card-')) { if ($props['padding'] == 'xsmall') { $props['padding'] = 'small'; } if ($props['padding'] == 'xlarge') { $props['padding'] = 'large'; } } if ($props['row_height'] != 'viewport' || $props['row_height_viewport'] > 100) { $props['row_height_offset_top'] = false; } if ($props['image']) { $props['video'] = false; } // New logic shortcuts $props['has_panel'] = $props['style'] || $props['background_color'] || $props['background_parallax_background'] || $props['image'] || $props['video'] || in_array($props['position_sticky'], ['row', 'section']) || $props['row_height']; $props['has_overlay'] = ($props['image'] || $props['video']) && ($props['media_overlay'] || $props['media_overlay_gradient']); // Cell $el = $this->el($props['html_element'] ?: 'div', [ 'class' => [ // Match child height 'uk-grid-item-match' => ($props['vertical_align'] || $props['style'] || $props['background_color'] || $props['background_parallax_background'] || $props['image'] || $props['video'] || !empty($props['element_absolute'])) && !in_array($props['position_sticky'], ['row', 'section']) && !$props['row_height'], // Vertical alignment 'uk-flex-{vertical_align} {@!has_panel}', // Child expand to column height 'uk-flex uk-flex-column {@child_height_expand} {@!has_panel}', // Sticky 'js-sticky {@position_sticky: column} {@!has_panel}', // Text color 'uk-{text_color}' => !$props['style'] || (preg_match('/^tile-/', $props['style']) && ($props['image'] || $props['video'])), // Breakpoint widths 'uk-width-1-1 {@!width_default} {@!width_small} {@!width_medium} {@!width_large} {@!width_xlarge}', // Make sure at least one `uk-width` is set 'uk-width-{width_default}', 'uk-width-{width_small}@s', 'uk-width-{width_medium}@m', 'uk-width-{width_large}@l', 'uk-width-{width_xlarge}@xl', // Order first 'uk-flex-first {@order_first: xs}', 'uk-flex-first@{order_first} {@!order_first: xs}', ], // Row parallax 'style' => [ 'align-self: stretch; {@row_parallax} {@position_sticky}', ], ]); // Panel: Style / Background / Image / Video / Sticky / Row Height $panel = $props['has_panel'] ? $this->el('div', [ 'class' => [ 'uk-{style} [uk-card {@style: card-.*}] [uk-card-{!padding: |none} {@style: card-.*}]', // Match child height 'uk-flex {@image}', // Clip video 'uk-position-relative {@video} {@!image}' => !$this->iframeVideo($props['video']), 'uk-cover-container {@video} {@!image}' => $this->iframeVideo($props['video']), // Preserve color 'uk-preserve-color {@style: tile-.*}' => $props['preserve_color'] || ($props['text_color'] && ($props['image'] || $props['video'])), // Height Viewport 'uk-height-viewport {@row_height: viewport} {@!row_height_offset_top} {@row_height_viewport: |100}', 'uk-height-viewport-{0} {@row_height: viewport} {@!row_height_offset_top} {@row_height_viewport: 200|300|400}' => (int) $props['row_height_viewport'] / 100, ], 'style' => [ // Video Background 'background-color: {media_background}; {@video}', 'background-color: {background_color}; {@!media_background} {@!video} {@!style}', // Height Viewport 'min-height: {!row_height_viewport: |100|200|300|400}vh {@row_height: viewport} {@!row_height_offset_top}', 'min-height: {0}px {@row_height: pixels}' => $props['row_height_viewport'] ?: 100, ], // Height Viewport 'uk-height-viewport' => $props['row_height'] == 'viewport' && $props['row_height_offset_top'] ? [ 'offset-top: {0};' => in_array($props['position_sticky'], ['row', 'section']) ? '!*' : 'true', 'offset-bottom: {0};' => $props['row_height_viewport'] && $props['row_height_viewport'] < 100 ? 100 - (int) $props['row_height_viewport'] : false, ] : false, ]) : null; if (!$props['style'] && $bgParallax = $this->parallaxOptions($props, 'background_', ['background'])) { $panel->attr('uk-parallax', $bgParallax); } if (in_array($props['position_sticky'], ['row', 'section'])) { $panel->attr([ 'class' => [ // Force sticky below sticky navbar 'uk-position-z-index', 'uk-blend-difference {@position_blend}', ], 'uk-sticky' => $this->expr([ 'offset: {position_sticky_offset};', 'offset-end: {position_sticky_offset_end};', 'end: !.tm-grid-expand; {@position_sticky: row}', 'end: !.uk-section; {@position_sticky: section}', 'media: @{position_sticky_breakpoint};', ], $props) ?: true, ]); } // Image $image = $props['image'] ? $this->el('div', $this->bgImage($props['image'], [ 'width' => $props['image_width'], 'height' => $props['image_height'], 'focal_point' => $props['media_focal_point'], 'loading' => $props['image_loading'] ? 'eager' : null, 'size' => $props['image_size'], 'position' => $props['image_position'], 'visibility' => $props['media_visibility'], 'blend_mode' => $props['media_blend_mode'], 'background' => $props['media_background'], 'effect' => $props['image_effect'] != 'parallax' ? $props['image_effect'] : '', ])) : null; if ($image && $props['image_effect'] == 'parallax' && $imageParallax = $this->parallaxOptions($props, 'image_', ['bgx', 'bgy'])) { $image->attr('uk-parallax', $imageParallax); } // `has_panel` with padding if ($props['style'] || $props['background_color'] || $props['background_parallax_background'] || $props['image'] || $props['video']) { ($props['image'] ? $image : $panel)->attr('class', [ // Padding and position context for the overlay 'uk-tile {@!style: card-.*} [uk-tile-{!padding: |none}]', // Also padding if no style 'uk-card-body {@style: card-.*}', // Needed if height matches parent 'uk-width-1-1 {@image}', // Padding 'uk-padding-remove {@padding: none}', ]); // `has_panel` without padding } elseif (in_array($props['position_sticky'], ['row', 'section']) || $props['row_height']) { $panel->attr('class', [ // Remove child margin && position context for the overlay 'uk-panel', ]); } if ($props['has_panel']) { ($props['image'] ? $image : $panel)->attr('class', [ 'js-sticky {@position_sticky: column}', // Vertical alignment 'uk-flex uk-flex-{vertical_align}', // Child expand to column height 'uk-flex uk-flex-column {@child_height_expand}', ]); } // Video $video = $props['video'] ? include "{$__dir}/template-video.php" : null; // Overlay $overlay = $props['has_overlay'] ? $this->el('div', [ 'class' => ['uk-position-cover'], 'style' => [ 'background-color: {media_overlay};', // `background-clip` fixes sub-pixel issue 'background-image: {media_overlay_gradient}; background-clip: padding-box;', ], ]) : null; if (($props['media_overlay'] || $props['media_overlay_gradient']) && ($props['image'] || $props['video']) && $mediaOverlayParallax = $this->parallaxOptions($props, 'media_overlay_', ['opacity'])) { $overlay->attr('uk-parallax', $mediaOverlayParallax); } // Align elements as block. // Make sure overlay or video are always below content. // Add position context considering any tile padding. $container = $props['vertical_align'] || $props['has_overlay'] || $props['video'] || !empty($props['element_absolute']) ? $this->el('div', [ 'class' => [ 'uk-panel uk-width-1-1', // Child expand to column height 'uk-flex-1 uk-flex uk-flex-column {@child_height_expand}', ], ]) : null; // Sticky $sticky = $props['position_sticky'] == 'column' ? $this->el('div', [ 'class' => [ 'uk-panel uk-position-z-index', // Force sticky below sticky navbar 'uk-blend-difference {@position_blend}', ], 'uk-sticky' => $this->expr([ 'offset: {position_sticky_offset};', 'offset-end: {position_sticky_offset_end};', 'end: !.js-sticky;', // Selects panel, so tile padding is considered 'media: @{position_sticky_breakpoint};', ], $props) ?: true, ]) : null; ?> <?= $el($props, $attrs) ?> <?php if ($panel) : ?> <?= $panel($props) ?> <?php endif ?> <?php if ($image) : ?> <?= $image($props) ?> <?php endif ?> <?php if ($video) : ?> <?= $video($props, '') ?> <?php endif ?> <?php if ($overlay) : ?> <?= $overlay($props, '') ?> <?php endif ?> <?php if ($container) : ?> <?= $container($props) ?> <?php endif ?> <?php if ($sticky) : ?> <?= $sticky($props) ?> <?php endif ?> <?= $builder->render($children) ?> <?php if ($sticky) : ?> <?= $sticky->end() ?> <?php endif ?> <?php if ($container) : ?> <?= $container->end() ?> <?php endif ?> <?php if ($image) : ?> <?= $image->end() ?> <?php endif ?> <?php if ($panel) : ?> <?= $panel->end() ?> <?php endif ?> <?= $el->end() ?> elements/column/templates/template-video.php 0000644 00000001423 15175623007 0015311 0 ustar 00 <?php if ($iframe = $this->iframeVideo($props['video'])) { $video = $this->el('iframe', [ 'class' => [ 'uk-disabled', ], 'src' => $iframe, 'title' => $props['video_title'], ]); } else { $video = $this->el('video', [ 'src' => $props['video'], 'controls' => false, 'loop' => true, 'autoplay' => true, 'muted' => true, 'playsinline' => true, 'class' => [ 'uk-object-{media_focal_point}', ], ]); } $video->attr([ 'width' => $props['video_width'], 'height' => $props['video_height'], 'class' => [ 'uk-blend-{media_blend_mode}', 'uk-visible@{media_visibility}', ], 'uk-cover' => true, ]); return $video; elements/column/templates/content.php 0000644 00000000051 15175623007 0014040 0 ustar 00 <?php echo $builder->render($children); elements/column/element.php 0000644 00000001537 15175623007 0012033 0 ustar 00 <?php namespace YOOtheme; return [ 'transforms' => [ 'render' => function ($node, $params) { foreach (['height', 'height_viewport', 'height_offset_top', 'parallax'] as $prop) { $node->props["row_{$prop}"] = $params['parent']->props[$prop] ?? null; } foreach ($node->children as $child) { if ( !empty($child->props['height_expand']) && (!$node->props['position_sticky'] || (in_array($node->props['position_sticky'], ['row', 'section']) && $node->props['row_height'])) ) { $node->props['child_height_expand'] = true; $node->props['vertical_align'] = ''; break; } } }, ], ]; elements/column/updates.php 0000644 00000004630 15175623007 0012044 0 ustar 00 <?php namespace YOOtheme; return [ // Remove obsolete props '4.5.0-beta.0.4' => function ($node) { unset($node->props['widths']); }, '4.3.0-beta.0.3' => function ($node, $params) { Arr::updateKeys($node->props, ['image_focal_point' => 'media_focal_point']); }, '4.0.0-beta.9.1' => function ($node) { $style = Arr::get($node->props, 'style') ?: ''; if (preg_match('/^tile-(tile|card)-/', $style)) { $node->props['style'] = substr($style, 5); } }, '4.0.0-beta.9' => function ($node) { if (Arr::get($node->props, 'style')) { $node->props['style'] = "tile-{$node->props['style']}"; } }, '3.0.5.1' => function ($node) { if ( Arr::get($node->props, 'image_effect') == 'parallax' && !is_numeric(Arr::get($node->props, 'image_parallax_easing')) ) { Arr::set($node->props, 'image_parallax_easing', '1'); } }, '2.8.0-beta.0.3' => function ($node) { foreach (['bgx', 'bgy'] as $prop) { $key = "image_parallax_{$prop}"; $start = Arr::get($node->props, "{$key}_start", ''); $end = Arr::get($node->props, "{$key}_end", ''); if ($start != '' || $end != '') { Arr::set( $node->props, $key, implode(',', [$start != '' ? $start : 0, $end != '' ? $end : 0]), ); } Arr::del($node->props, "{$key}_start"); Arr::del($node->props, "{$key}_end"); } }, '2.8.0-beta.0.1' => function ($node) { if (isset($node->props['position_sticky'])) { $node->props['position_sticky'] = 'column'; } }, '2.4.0-beta.0.2' => function ($node) { Arr::updateKeys($node->props, ['image_visibility' => 'media_visibility']); }, '2.1.0-beta.2.1' => function ($node) { if (in_array(Arr::get($node->props, 'style'), ['primary', 'secondary'])) { $node->props['text_color'] = ''; } }, '1.22.0-beta.0.1' => function ($node) { unset($node->props['widths']); }, '1.18.0' => function ($node) { if ( !isset($node->props['vertical_align']) && Arr::get($node->props, 'vertical_align') === true ) { $node->props['vertical_align'] = 'middle'; } }, ]; elements/overlay/templates/template-video.php 0000644 00000001416 15175623007 0015477 0 ustar 00 <?php if ($iframe = $this->iframeVideo($src)) { $video = $this->el('iframe', [ 'src' => $iframe, 'uk-responsive' => true, 'loading' => ['lazy {@image_loading}'], 'title' => $props['video_title'], 'class' => [ 'uk-disabled', ], 'uk-video' => [ 'automute: true;', ], ]); } else { $video = $this->el('video', [ 'src' => $src, 'controls' => false, 'loop' => true, 'autoplay' => true, 'muted' => true, 'playsinline' => true, 'preload' => ['none {@image_loading}'], 'uk-video' => true, ]); } $video->attr([ 'width' => $props['image_width'], 'height' => $props['image_height'], ]); return $video; elements/overlay/templates/template-image.php 0000644 00000000455 15175623007 0015455 0 ustar 00 <?php $image = $this->el('image', [ 'src' => $src, 'alt' => $props['image_alt'], 'loading' => $props['image_loading'] ? false : null, 'width' => $props['image_width'], 'height' => $props['image_height'], 'focal_point' => $focal, 'thumbnail' => true, ]); return $image; elements/overlay/templates/content.php 0000644 00000002774 15175623007 0014242 0 ustar 00 <?php if ($props['image'] || $props['video'] || $props['hover_image'] || $props['hover_video'] || $props['title'] != '' || $props['meta'] != '' || $props['content'] != '' || $props['link']) : ?> <div> <?php if ($props['image']) : ?> <img src="<?= $props['image'] ?>" alt="<?= $props['image_alt'] ?>"> <?php endif ?> <?php if ($props['video']) : ?> <?php if ($this->iframeVideo($props['video'], [], false)) : ?> <iframe src="<?= $props['video'] ?>"></iframe> <?php else : ?> <video src="<?= $props['video'] ?>"></video> <?php endif ?> <?php endif ?> <?php if ($props['hover_image']) : ?> <img src="<?= $props['hover_image'] ?>" alt> <?php endif ?> <?php if ($props['hover_video']) : ?> <?php if ($this->iframeVideo($props['hover_video'], [], false)) : ?> <iframe src="<?= $props['hover_video'] ?>"></iframe> <?php else : ?> <video src="<?= $props['hover_video'] ?>"></video> <?php endif ?> <?php endif ?> <?php if ($props['title'] != '') : ?> <<?= $props['title_element'] ?>><?= $props['title'] ?></<?= $props['title_element'] ?>> <?php endif ?> <?php if ($props['meta'] != '') : ?> <p><?= $props['meta'] ?></p> <?php endif ?> <?php if ($props['content'] != '') : ?> <div><?= $props['content'] ?></div> <?php endif ?> <?php if ($props['link']) : ?> <p><a href="<?= $props['link'] ?>"><?= $props['link_text'] ?></a></p> <?php endif ?> </div> <?php endif ?> elements/overlay/templates/template-media.php 0000644 00000005223 15175623007 0015450 0 ustar 00 <?php if ($props['video']) { $src = $props['video']; $focal = $props['image_focal_point']; $media = include "{$__dir}/template-video.php"; } elseif ($props['image']) { $src = $props['image']; $focal = $props['image_focal_point']; $media = include "{$__dir}/template-image.php"; } elseif ($props['hover_video']) { $src = $props['hover_video']; $focal = $props['hover_image_focal_point']; $media = include "{$__dir}/template-video.php"; } elseif ($props['hover_image']) { $src = $props['hover_image']; $focal = $props['hover_image_focal_point']; $media = include "{$__dir}/template-image.php"; } // Media $media->attr([ 'class' => [ 'el-image', 'uk-blend-{0}' => $props['media_blend_mode'], 'uk-transition-{image_transition}', 'uk-transition-opaque' => $props['image'] || $props['video'], 'uk-transition-fade {@!image_transition}' => ($props['hover_image'] || $props['hover_video']) && !($props['image'] || $props['video']), 'uk-flex-1 {@image_expand}' ], 'style' => [ 'min-height: {image_min_height}px;', ], ]); if ($props['image_expand'] || $props['image_min_height'] || ($media->name == 'video' && $props['image_width'] && $props['image_height'])) { $media->attr([ 'class' => [ 'uk-object-cover', 'uk-object-{0}' => $focal, ], 'style' => [ // Keep video responsiveness but with new proportions (because video isn't cropped like an image) 'aspect-ratio: {image_width} / {image_height};' => $media->name == 'video', ], ]); } // Hover Media $hover_media = ''; if (($props['hover_image'] || $props['hover_video']) && ($props['image'] || $props['video'])) { if ($props['hover_video']) { $src = $props['hover_video']; $hover_media = include "{$__dir}/template-video.php"; } elseif ($props['hover_image']) { $src = $props['hover_image']; $focal = $props['hover_image_focal_point']; $hover_media = include "{$__dir}/template-image.php"; } $hover_media->attr([ 'class' => [ 'el-hover-image', 'uk-transition-{image_transition}', 'uk-transition-fade {@!image_transition}', 'uk-object-{hover_image_focal_point}', // `uk-cover` already sets object-fit to cover ], 'uk-cover' => true, 'uk-video' => false, // Resets 'alt' => true, // Image 'loading' => false, // Image + Iframe 'preload' => false, // Video ]); } ?> <?= $media($props, '') ?> <?php if ($hover_media) : ?> <?= $hover_media($props, '') ?> <?php endif ?> elements/overlay/templates/template-content.php 0000644 00000006314 15175623007 0016045 0 ustar 00 <?php // Title $title = $this->el($props['title_element'], [ 'class' => [ 'el-title', 'uk-{title_style}', 'uk-heading-{title_decoration}', 'uk-font-{title_font_family}', 'uk-text-{title_color} {@!title_color: background}', 'uk-link-{title_hover_style} {@title_link}', // Set here to style links which already come with dynamic content (WP taxonomy links) 'uk-transition-{title_transition} {@overlay_hover}', 'uk-margin[-{title_margin}]-top {@!title_margin: remove}', 'uk-margin-remove-top {@title_margin: remove}', 'uk-margin-remove-bottom', 'uk-flex-1 {@content_expand}' => !$props['content'] && (!$props['meta'] || $props['meta_align'] == 'above-title'), ], ]); // Meta $meta = $this->el($props['meta_element'], [ 'class' => [ 'el-meta', 'uk-transition-{meta_transition} {@overlay_hover}', 'uk-{meta_style}', 'uk-text-{meta_color}', 'uk-margin[-{meta_margin}]-top {@!meta_margin: remove}', 'uk-margin-remove-bottom [uk-margin-{meta_margin: remove}-top]' => !in_array($props['meta_style'], ['', 'text-meta', 'text-lead', 'text-small', 'text-large']) || $props['meta_element'] != 'div', 'uk-flex-1 {@content_expand}' => $props['meta_align'] == 'below-content' || (!$props['content'] && ($props['meta_align'] == 'above-content' || ($props['meta_align'] == 'below-title' ))), ], ]); // Content $content = $this->el('div', [ 'class' => [ 'el-content uk-panel', 'uk-transition-{content_transition} {@overlay_hover}', 'uk-{content_style}', 'uk-margin[-{content_margin}]-top {@!content_margin: remove}', 'uk-margin-remove-bottom [uk-margin-{content_margin: remove}-top]' => !in_array($props['content_style'], ['', 'text-meta', 'text-lead', 'text-small', 'text-large']), 'uk-flex-1 {@content_expand}' => !($props['meta'] && $props['meta_align'] == 'below-content'), ], ]); // Link $link_container = $this->el('div', [ 'class' => [ 'uk-margin[-{link_margin}]-top {@!link_margin: remove}', 'uk-transition-{link_transition} {@overlay_hover}', // Not on link element to prevent conflicts with link style ], ]); ?> <?php if ($props['meta'] != '' && $props['meta_align'] == 'above-title') : ?> <?= $meta($props, $props['meta']) ?> <?php endif ?> <?php if ($props['title'] != '') : ?> <?= $title($props) ?> <?php if ($props['title_color'] == 'background') : ?> <span class="uk-text-background"><?= $props['title'] ?></span> <?php elseif ($props['title_decoration'] == 'line') : ?> <span><?= $props['title'] ?></span> <?php else : ?> <?= $props['title'] ?> <?php endif ?> <?= $title->end() ?> <?php endif ?> <?php if ($props['meta'] != '' && $props['meta_align'] == 'below-title') : ?> <?= $meta($props, $props['meta']) ?> <?php endif ?> <?php if ($props['content'] != '') : ?> <?= $content($props, $props['content']) ?> <?php endif ?> <?php if ($props['meta'] != '' && $props['meta_align'] == 'below-content') : ?> <?= $meta($props, $props['meta']) ?> <?php endif ?> <?php if ($props['link'] && $props['link_text']) : ?> <?= $link_container($props, $link($props, $props['link_text'])) ?> <?php endif ?> elements/overlay/templates/template.php 0000644 00000014322 15175623007 0014373 0 ustar 00 <?php // Resets if ($props['overlay_link']) { $props['title_link'] = ''; } if ($props['content_expand']) { if (in_array($props['overlay_position'], ['top', 'bottom'])) { $props['overlay_position'] = 'cover'; } if (in_array($props['overlay_position'], ['top-center', 'center', 'bottom-center'])) { $props['overlay_position'] = 'center-horizontal'; } if (in_array($props['overlay_position'], ['top-left', 'center-left', 'bottom-left'])) { $props['overlay_position'] = 'left'; } if (in_array($props['overlay_position'], ['top-right', 'center-right', 'bottom-right'])) { $props['overlay_position'] = 'right'; } } // New logic shortcuts $props['image_expand'] = $props['height_expand']; // Keep code same as other overlay elements $props['overlay_cover'] = $props['overlay_style'] && $props['overlay_mode'] == 'cover'; $props['has_transition'] = $props['overlay_hover'] || $props['image_transition'] || $props['image_transition_border'] || $props['hover_image'] || $props['hover_video']; $props['text_color_inverse'] = $props['text_color'] === 'light' ? 'dark' : 'light'; $props['flex_column_align'] = ''; $props['flex_column_align_fallback'] = ''; if ($props['image_expand']) { $horizontal = ['left', 'center', 'right']; $vertical = ['top', 'middle', 'bottom']; $props['flex_column_align'] = str_replace($horizontal, $vertical, $props['text_align'] ?? ''); $props['flex_column_align_fallback'] = str_replace($horizontal, $vertical, $props['text_align_fallback'] ?? ''); } $el = $this->el($props['html_element'] ?: 'div', [ 'class' => [ // Expand to column height 'uk-flex-1 {@height_expand}', 'uk-flex uk-flex-column {@image_expand}', 'uk-flex-{flex_column_align}[@{text_align_breakpoint} [uk-flex-{flex_column_align_fallback}]] {@image_expand}', // Needs to be parent of `uk-link-toggle` 'uk-{text_color}' => !$props['overlay_style'] || $props['overlay_cover'], // Only for transparent navbar 'uk-inverse-{text_color}' => $props['overlay_style'] && !$props['overlay_cover'], ], ]); // Container (Needed for link and to make text alignment work set on parent) $container = $this->el($props['link'] && $props['overlay_link'] ? 'a' : 'div', [ 'class' => [ 'uk-box-shadow-{image_box_shadow}', 'uk-box-shadow-hover-{image_hover_box_shadow}', 'uk-border-{image_border} {@!image_box_decoration} {@!image_transition_border}', 'uk-box-shadow-bottom {@image_box_decoration: shadow}', 'tm-mask-default {@image_box_decoration: mask}', 'tm-box-decoration-{image_box_decoration: default|primary|secondary}', 'tm-box-decoration-inverse {@image_box_decoration_inverse} {@image_box_decoration: default|primary|secondary}', 'tm-transition-border {@image_transition_border}', 'uk-inline' => $props['image_box_decoration'] || $props['image_transition_border'], 'uk-transition-toggle {@has_transition}', 'uk-flex-1 uk-flex uk-flex-column {@image_expand}', ], 'style' => [ "background-color: {$props['media_background']};" => $props['media_background'], ], 'tabindex' => $props['has_transition'] && !($props['link'] && $props['overlay_link']) ? 0 : null, // Needs to be on anchor to have just one focusable toggle when using keyboard navigation 'uk-toggle' => $props['text_color_hover'] && ((!$props['overlay_style'] && ($props['hover_image'] || $props['hover_video'])) || ($props['overlay_cover'] && $props['overlay_hover'] && $props['overlay_transition_background'])) ? [ 'cls: uk-{text_color_inverse} [uk-{text_color}];', 'mode: hover;', 'target: !*;', ] : false, ]); // Box Decoration / Transition Border $image_container = $props['image_box_decoration'] || $props['image_transition_border'] ? $this->el('div', [ 'class' => [ 'uk-flex-1 uk-flex uk-flex-column {@image_expand}', ], ]) : null; ($image_container ?: $container)->attr('class', [ 'uk-inline-clip', ]); $overlay = $this->el('div', [ 'class' => [ 'uk-{overlay_style}', 'uk-transition-{overlay_transition} {@overlay_hover} {@overlay_cover}', 'uk-position-cover {@overlay_cover}', 'uk-position-{overlay_margin} {@overlay_cover}', ], ]); $position = $this->el('div', [ 'class' => [ 'uk-position-{overlay_position} [uk-position-{overlay_margin} {@overlay_style}]', 'uk-transition-{overlay_transition} {@overlay_hover}' => !($props['overlay_transition_background'] && $props['overlay_cover']), 'uk-blend-difference {@text_blend} {@!overlay_style}', 'uk-flex {@content_expand}' ], ]); $content = $this->el('div', [ 'class' => [ $props['overlay_style'] ? 'uk-overlay' : 'uk-panel', 'uk-padding {@!overlay_padding} {@!overlay_style}', 'uk-padding-{!overlay_padding: |none}', 'uk-padding-remove {@overlay_padding: none} {@overlay_style}', 'uk-width-{overlay_maxwidth} {@!overlay_position: top|bottom}', 'uk-margin-remove-first-child', 'uk-flex-1 uk-flex uk-flex-column {@content_expand}' ], ]); if (!$props['overlay_cover']) { $position->attr($overlay->attrs); } // Link $link = include "{$__dir}/template-link.php"; ?> <?= $el($props, $attrs) ?> <?= $container($props) ?> <?php if ($image_container) : ?> <?= $image_container($props) ?> <?php endif ?> <?= $this->render("{$__dir}/template-media", compact('props')) ?> <?php if ($props['media_overlay']) : ?> <div class="uk-position-cover" style="background-color:<?= $props['media_overlay'] ?>"></div> <?php endif ?> <?php if ($props['overlay_cover']) : ?> <?= $overlay($props, '') ?> <?php endif ?> <?php if ($props['title'] != '' || $props['meta'] != '' || $props['content'] != '' || ($props['link'] && $props['link_text'])) : ?> <?= $position($props, $content($props, $this->render("{$__dir}/template-content", compact('props', 'link')))) ?> <?php endif ?> <?php if ($image_container) : ?> <?= $image_container->end() ?> <?php endif ?> <?= $container->end() ?> <?= $el->end() ?> elements/overlay/templates/template-link.php 0000644 00000003144 15175623007 0015326 0 ustar 00 <?php $link = $props['link'] ? $this->el('a', [ 'href' => ['{link}'], 'aria-label' => ['{link_aria_label}'], 'target' => ['_blank {@link_target}'], 'uk-scroll' => str_contains((string) $props['link'], '#'), ]) : null; if ($link && $props['overlay_link']) { $container->attr($link->attrs + [ 'class' => [ // Needs to be child of `uk-light` or `uk-dark` 'uk-link-toggle', ], ]); $props['title'] = $this->striptags($props['title']); $props['meta'] = $this->striptags($props['meta']); $props['content'] = $this->striptags($props['content']); if ($props['title'] != '' && $props['title_hover_style'] != 'reset') { $props['title'] = $this->el('span', [ 'class' => [ 'uk-link-{title_hover_style: heading}', 'uk-link {!title_hover_style}', ], ], $props['title'])->render($props); } } if ($link && $props['title'] != '' && $props['title_link']) { $props['title'] = $link($props, [], $this->striptags($props['title'])); // title_hover_style is set on title } if ($link && $props['link_text']) { if ($props['overlay_link']) { $link = $this->el('div'); } $link->attr('class', [ 'el-link', 'uk-{link_style: link-(muted|text)}', 'uk-button uk-button-{!link_style: |link-muted|link-text} [uk-button-{link_size}] [uk-width-1-1 {@link_fullwidth}]', // Keep link style if overlay link 'uk-link {@link_style:} {@overlay_link}', 'uk-text-muted {@link_style: link-muted} {@overlay_link}', ]); } return $link; elements/overlay/element.php 0000644 00000002066 15175623007 0012215 0 ustar 00 <?php namespace YOOtheme; return [ 'transforms' => [ 'render' => function ($node) { /** * Auto-correct media rendering for dynamic content * * @var View $view */ $view = app(View::class); foreach (['', 'hover_'] as $prefix) { if ($node->props["{$prefix}image"] && $view->isVideo($node->props["{$prefix}image"])) { $node->props["{$prefix}video"] = $node->props["{$prefix}image"]; $node->props["{$prefix}image"] = null; } elseif ($node->props["{$prefix}video"] && $view->isImage($node->props["{$prefix}video"])) { $node->props["{$prefix}image"] = $node->props["{$prefix}video"]; $node->props["{$prefix}video"] = null; } } // Don't render element if content fields are empty return $node->props['image'] || $node->props['video'] || $node->props['hover_image'] || $node->props['hover_video']; }, ], ]; elements/overlay/element.json 0000644 00000116611 15175623007 0012401 0 ustar 00 { "@import": "./element.php", "name": "overlay", "title": "Overlay", "group": "basic", "icon": "${url:images/icon.svg}", "iconSmall": "${url:images/iconSmall.svg}", "element": true, "width": 500, "defaults": { "link_text": "Read more", "overlay_mode": "cover", "overlay_hover": true, "overlay_style": "overlay-primary", "overlay_position": "center", "text_color": "light", "overlay_transition": "fade", "title_hover_style": "reset", "title_element": "h3", "meta_style": "text-meta", "meta_align": "below-title", "meta_element": "div", "link_style": "default", "text_align": "center", "margin": "default" }, "placeholder": { "props": { "image": "${url:~yootheme/theme/assets/images/element-image-placeholder.png}", "video": "", "title": "Title", "meta": "", "content": "", "hover_image": "", "hover_video": "" } }, "updates": "./updates.php", "templates": { "render": "./templates/template.php", "content": "./templates/content.php" }, "fields": { "image": { "label": "Image", "type": "image", "source": true, "show": "!video", "altRef": "%name%_alt" }, "video": { "label": "Video", "description": "Select a video file or enter a link from <a href=\"https://www.youtube.com\" target=\"_blank\">YouTube</a> or <a href=\"https://vimeo.com\" target=\"_blank\">Vimeo</a>.", "type": "video", "source": true, "show": "!image" }, "_media": { "type": "button-panel", "panel": "builder-overlay-media", "text": "Edit Settings", "show": "image || video" }, "video_title": { "label": "Video Title", "source": true, "show": "video && $match(video, '(youtube\\.com|youtube-nocookie\\.com|youtu\\.be|vimeo\\.com)', 'i')" }, "image_width": { "label": "Width", "type": "number", "attrs": { "placeholder": "auto" } }, "image_height": { "label": "Height", "type": "number", "attrs": { "placeholder": "auto" } }, "image_alt": { "label": "Image Alt", "source": true, "show": "image && !video" }, "title": { "label": "Title", "source": true }, "meta": { "label": "Meta", "source": true }, "content": { "label": "Content", "type": "editor", "source": true }, "link": "${builder.link}", "link_target": "${builder.link_target}", "link_text": { "label": "Link Text", "description": "Enter the text for the link.", "source": true, "enable": "link" }, "link_aria_label": { "label": "Link ARIA Label", "description": "Enter a descriptive text label to make it accessible if the link has no visible text.", "source": true, "enable": "link" }, "hover_image": { "label": "Hover Image", "description": "Select an optional image that appears on hover.", "type": "image", "source": true, "show": "!hover_video" }, "hover_video": { "label": "Hover Video", "description": "Select an optional video that appears on hover.", "type": "video", "source": true, "show": "!hover_image" }, "height_expand": { "label": "Height", "description": "Expand the height of the element to fill the available space in the column.", "type": "checkbox", "text": "Fill the available column space" }, "overlay_link": { "label": "Link", "description": "Link the whole overlay if a link exists.", "type": "checkbox", "text": "Link overlay", "enable": "link" }, "html_element": "${builder.html_element}", "overlay_mode": { "label": "Mode", "description": "When using cover mode, you need to set the text color manually.", "type": "select", "options": { "Cover": "cover", "Caption": "caption" } }, "overlay_hover": { "type": "checkbox", "text": "Display overlay on hover" }, "overlay_transition_background": { "type": "checkbox", "text": "Animate background only", "enable": "overlay_hover && overlay_mode == 'cover' && overlay_style" }, "overlay_style": { "label": "Style", "description": "Select a style for the overlay.", "type": "select", "options": { "None": "", "Overlay Default": "overlay-default", "Overlay Primary": "overlay-primary", "Tile Default": "tile-default", "Tile Muted": "tile-muted", "Tile Primary": "tile-primary", "Tile Secondary": "tile-secondary" } }, "overlay_position": { "label": "Position", "description": "Select the overlay or content position.", "type": "select", "options": { "Top": "top", "Bottom": "bottom", "Left": "left", "Right": "right", "Top Left": "top-left", "Top Center": "top-center", "Top Right": "top-right", "Bottom Left": "bottom-left", "Bottom Center": "bottom-center", "Bottom Right": "bottom-right", "Center": "center", "Center Left": "center-left", "Center Right": "center-right" } }, "overlay_margin": { "label": "Margin", "description": "Apply a margin between the overlay and the image container.", "type": "select", "options": { "None": "", "Small": "small", "Medium": "medium", "Large": "large" }, "enable": "overlay_style" }, "overlay_padding": { "label": "Padding", "description": "Set the padding between the overlay and its content.", "type": "select", "options": { "Default": "", "Small": "small", "Large": "large", "None": "none" } }, "content_expand": { "label": "Height", "description": "Expand the height of the content to fill the available space in the overlay and push the link to the bottom.", "type": "checkbox", "text": "Expand content" }, "overlay_maxwidth": { "label": "Max Width", "description": "Set the maximum content width.", "type": "select", "options": { "None": "", "Small": "small", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "2X-Large": "2xlarge" }, "enable": "!$match(overlay_position, '^(top|bottom)$')" }, "text_color": { "label": "Text Color", "description": "Set light or dark color mode for text, buttons and controls.", "type": "select", "options": { "None": "", "Light": "light", "Dark": "dark" }, "source": true }, "text_color_hover": { "type": "checkbox", "text": "Inverse the text color on hover", "enable": "!overlay_style && (hover_image || hover_video) || overlay_style && overlay_mode == 'cover' && overlay_hover && overlay_transition_background" }, "text_blend": { "type": "checkbox", "text": "Blend with image", "enable": "!overlay_style" }, "overlay_transition": { "label": "Transition", "description": "Select a transition for the overlay when it appears on hover.", "type": "select", "options": { "Fade": "fade", "Scale Up": "scale-up", "Scale Down": "scale-down", "Slide Top Small": "slide-top-small", "Slide Bottom Small": "slide-bottom-small", "Slide Left Small": "slide-left-small", "Slide Right Small": "slide-right-small", "Slide Top Medium": "slide-top-medium", "Slide Bottom Medium": "slide-bottom-medium", "Slide Left Medium": "slide-left-medium", "Slide Right Medium": "slide-right-medium", "Slide Top 100%": "slide-top", "Slide Bottom 100%": "slide-bottom", "Slide Left 100%": "slide-left", "Slide Right 100%": "slide-right" }, "enable": "overlay_hover" }, "image_focal_point": { "label": "Focal Point", "description": "Set a focal point to adjust the image focus when cropping.", "type": "select", "options": { "Top Left": "top-left", "Top Center": "top-center", "Top Right": "top-right", "Center Left": "center-left", "Center Center": "", "Center Right": "center-right", "Bottom Left": "bottom-left", "Bottom Center": "bottom-center", "Bottom Right": "bottom-right" }, "source": true }, "image_loading": { "label": "Loading", "description": "By default, images are loaded lazy. Enable eager loading for images in the initial viewport.", "type": "checkbox", "text": "Load image eagerly" }, "image_transition": { "label": "Transition", "description": "Select an image transition. If the hover image is set, the transition takes place between the two images. If <i>None</i> is selected, the hover image fades in.", "type": "select", "options": { "None (Fade if hover image)": "", "Scale Up": "scale-up", "Scale Down": "scale-down" } }, "image_transition_border": { "type": "checkbox", "text": "Border" }, "image_min_height": { "label": "Min Height", "description": "Use an optional minimum height to prevent images from becoming smaller than the content on small devices.", "type": "range", "attrs": { "min": 200, "max": 500, "step": 20 } }, "image_border": { "label": "Border", "description": "Select the image border style.", "type": "select", "options": { "None": "", "Rounded": "rounded", "Circle": "circle", "Pill": "pill" }, "enable": "!image_transition_border && !image_box_decoration" }, "image_box_shadow": { "label": "Box Shadow", "description": "Select the image box shadow size.", "type": "select", "options": { "None": "", "Small": "small", "Medium": "medium", "Large": "large", "X-Large": "xlarge" } }, "image_hover_box_shadow": { "label": "Hover Box Shadow", "description": "Select the image box shadow size on hover.", "type": "select", "options": { "None": "", "Small": "small", "Medium": "medium", "Large": "large", "X-Large": "xlarge" } }, "image_box_decoration": { "label": "Box Decoration", "description": "Select the image box decoration style.", "type": "select", "options": { "None": "", "Default": "default", "Primary": "primary", "Secondary": "secondary", "Floating Shadow": "shadow", "Mask": "mask" } }, "image_box_decoration_inverse": { "type": "checkbox", "text": "Inverse style", "enable": "$match(image_box_decoration, '^(default|primary|secondary)$')" }, "hover_image_focal_point": { "label": "Focal Point", "description": "Set a focal point to adjust the image focus when cropping.", "type": "select", "options": { "Top Left": "top-left", "Top Center": "top-center", "Top Right": "top-right", "Center Left": "center-left", "Center Center": "", "Center Right": "center-right", "Bottom Left": "bottom-left", "Bottom Center": "bottom-center", "Bottom Right": "bottom-right" }, "source": true }, "title_transition": { "label": "Transition", "description": "Select a transition for the title when the overlay appears on hover.", "type": "select", "options": { "None": "", "Fade": "fade", "Scale Up": "scale-up", "Scale Down": "scale-down", "Slide Top Small": "slide-top-small", "Slide Bottom Small": "slide-bottom-small", "Slide Left Small": "slide-left-small", "Slide Right Small": "slide-right-small", "Slide Top Medium": "slide-top-medium", "Slide Bottom Medium": "slide-bottom-medium", "Slide Left Medium": "slide-left-medium", "Slide Right Medium": "slide-right-medium", "Slide Top 100%": "slide-top", "Slide Bottom 100%": "slide-bottom", "Slide Left 100%": "slide-left", "Slide Right 100%": "slide-right" }, "enable": "title && overlay_hover" }, "title_style": { "label": "Style", "description": "Title styles differ in font-size but may also come with a predefined color, size and font.", "type": "select", "options": { "None": "", "Heading 3X-Large": "heading-3xlarge", "Heading 2X-Large": "heading-2xlarge", "Heading X-Large": "heading-xlarge", "Heading Large": "heading-large", "Heading Medium": "heading-medium", "Heading Small": "heading-small", "Heading H1": "h1", "Heading H2": "h2", "Heading H3": "h3", "Heading H4": "h4", "Heading H5": "h5", "Heading H6": "h6", "Text Meta": "text-meta", "Text Lead": "text-lead", "Text Small": "text-small", "Text Large": "text-large" }, "enable": "title" }, "title_link": { "label": "Link", "description": "Link the title if a link exists.", "type": "checkbox", "text": "Link title", "enable": "title && link" }, "title_hover_style": { "label": "Hover Style", "description": "Set the hover style for a linked title.", "type": "select", "options": { "None": "reset", "Heading Link": "heading", "Default Link": "" }, "enable": "title && link && (title_link || overlay_link)" }, "title_decoration": { "label": "Decoration", "description": "Decorate the title with a divider, bullet or a line that is vertically centered to the heading.", "type": "select", "options": { "None": "", "Divider": "divider", "Bullet": "bullet", "Line": "line" }, "enable": "title" }, "title_font_family": { "label": "Font Family", "description": "Select an alternative font family. Mind that not all styles have different font families.", "type": "select", "options": { "None": "", "Default": "default", "Primary": "primary", "Secondary": "secondary", "Tertiary": "tertiary" }, "enable": "title" }, "title_color": { "label": "Color", "description": "Select the text color. If the Background option is selected, styles that don't apply a background image use the primary color instead.", "type": "select", "options": { "None": "", "Muted": "muted", "Emphasis": "emphasis", "Primary": "primary", "Secondary": "secondary", "Success": "success", "Warning": "warning", "Danger": "danger", "Background": "background" }, "enable": "title" }, "title_element": { "label": "HTML Element", "description": "Set the level for the section heading or give it no semantic meaning.", "type": "select", "options": { "h1": "h1", "h2": "h2", "h3": "h3", "h4": "h4", "h5": "h5", "h6": "h6", "div": "div" }, "enable": "title" }, "title_margin": { "label": "Margin Top", "description": "Set the top margin. Note that the margin will only apply if the content field immediately follows another content field.", "type": "select", "options": { "Small": "small", "Default": "", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "None": "remove" }, "enable": "title" }, "meta_transition": { "label": "Transition", "description": "Select a transition for the meta text when the overlay appears on hover.", "type": "select", "options": { "None": "", "Fade": "fade", "Scale Up": "scale-up", "Scale Down": "scale-down", "Slide Top Small": "slide-top-small", "Slide Bottom Small": "slide-bottom-small", "Slide Left Small": "slide-left-small", "Slide Right Small": "slide-right-small", "Slide Top Medium": "slide-top-medium", "Slide Bottom Medium": "slide-bottom-medium", "Slide Left Medium": "slide-left-medium", "Slide Right Medium": "slide-right-medium", "Slide Top 100%": "slide-top", "Slide Bottom 100%": "slide-bottom", "Slide Left 100%": "slide-left", "Slide Right 100%": "slide-right" }, "enable": "meta && overlay_hover" }, "meta_style": { "label": "Style", "description": "Select a predefined meta text style, including color, size and font-family.", "type": "select", "options": { "None": "", "Text Meta": "text-meta", "Text Lead": "text-lead", "Text Small": "text-small", "Text Large": "text-large", "Heading 3X-Large": "heading-3xlarge", "Heading 2X-Large": "heading-2xlarge", "Heading X-Large": "heading-xlarge", "Heading Large": "heading-large", "Heading Medium": "heading-medium", "Heading Small": "heading-small", "Heading H1": "h1", "Heading H2": "h2", "Heading H3": "h3", "Heading H4": "h4", "Heading H5": "h5", "Heading H6": "h6" }, "enable": "meta" }, "meta_color": { "label": "Color", "description": "Select the text color.", "type": "select", "options": { "None": "", "Muted": "muted", "Emphasis": "emphasis", "Primary": "primary", "Secondary": "secondary", "Success": "success", "Warning": "warning", "Danger": "danger" }, "enable": "meta" }, "meta_align": { "label": "Alignment", "description": "Align the meta text.", "type": "select", "options": { "Above Title": "above-title", "Below Title": "below-title", "Below Content": "below-content" }, "enable": "meta" }, "meta_element": { "label": "HTML Element", "description": "Set the level for the section heading or give it no semantic meaning.", "type": "select", "options": { "h1": "h1", "h2": "h2", "h3": "h3", "h4": "h4", "h5": "h5", "h6": "h6", "div": "div" }, "enable": "meta" }, "meta_margin": { "label": "Margin Top", "description": "Set the top margin. Note that the margin will only apply if the content field immediately follows another content field.", "type": "select", "options": { "Small": "small", "Default": "", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "None": "remove" }, "enable": "meta" }, "content_transition": { "label": "Transition", "description": "Select a transition for the content when the overlay appears on hover.", "type": "select", "options": { "None": "", "Fade": "fade", "Scale Up": "scale-up", "Scale Down": "scale-down", "Slide Top Small": "slide-top-small", "Slide Bottom Small": "slide-bottom-small", "Slide Left Small": "slide-left-small", "Slide Right Small": "slide-right-small", "Slide Top Medium": "slide-top-medium", "Slide Bottom Medium": "slide-bottom-medium", "Slide Left Medium": "slide-left-medium", "Slide Right Medium": "slide-right-medium", "Slide Top 100%": "slide-top", "Slide Bottom 100%": "slide-bottom", "Slide Left 100%": "slide-left", "Slide Right 100%": "slide-right" }, "enable": "content && overlay_hover" }, "content_style": { "label": "Style", "description": "Select a predefined text style, including color, size and font-family.", "type": "select", "options": { "None": "", "Text Meta": "text-meta", "Text Lead": "text-lead", "Text Small": "text-small", "Text Large": "text-large", "Heading 3X-Large": "heading-3xlarge", "Heading 2X-Large": "heading-2xlarge", "Heading X-Large": "heading-xlarge", "Heading Large": "heading-large", "Heading Medium": "heading-medium", "Heading Small": "heading-small", "Heading H1": "h1", "Heading H2": "h2", "Heading H3": "h3", "Heading H4": "h4", "Heading H5": "h5", "Heading H6": "h6" }, "enable": "content" }, "content_margin": { "label": "Margin Top", "description": "Set the top margin. Note that the margin will only apply if the content field immediately follows another content field.", "type": "select", "options": { "Small": "small", "Default": "", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "None": "remove" }, "enable": "content" }, "link_transition": { "label": "Transition", "description": "Select a transition for the link when the overlay appears on hover.", "type": "select", "options": { "None": "", "Fade": "fade", "Scale Up": "scale-up", "Scale Down": "scale-down", "Slide Top Small": "slide-top-small", "Slide Bottom Small": "slide-bottom-small", "Slide Left Small": "slide-left-small", "Slide Right Small": "slide-right-small", "Slide Top Medium": "slide-top-medium", "Slide Bottom Medium": "slide-bottom-medium", "Slide Left Medium": "slide-left-medium", "Slide Right Medium": "slide-right-medium", "Slide Top 100%": "slide-top", "Slide Bottom 100%": "slide-bottom", "Slide Left 100%": "slide-left", "Slide Right 100%": "slide-right" }, "enable": "link && link_text && overlay_hover" }, "link_style": { "label": "Style", "description": "Set the link style.", "type": "select", "options": { "Button Default": "default", "Button Primary": "primary", "Button Secondary": "secondary", "Button Danger": "danger", "Button Text": "text", "Link": "", "Link Muted": "link-muted", "Link Text": "link-text" }, "enable": "link && link_text" }, "link_size": { "label": "Button Size", "description": "Set the button size.", "type": "select", "options": { "Small": "small", "Default": "", "Large": "large" }, "enable": "link && link_text && link_style && !$match(link_style, 'link-(muted|text)')" }, "link_fullwidth": { "type": "checkbox", "text": "Full width button", "enable": "link && link_text && link_style && !$match(link_style, 'link-(muted|text)')" }, "link_margin": { "label": "Margin Top", "description": "Set the top margin. Note that the margin will only apply if the content field immediately follows another content field.", "type": "select", "options": { "Small": "small", "Default": "", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "None": "remove" }, "enable": "link && link_text" }, "position": "${builder.position}", "position_left": "${builder.position_left}", "position_right": "${builder.position_right}", "position_top": "${builder.position_top}", "position_bottom": "${builder.position_bottom}", "position_z_index": "${builder.position_z_index}", "blend": "${builder.blend}", "margin": "${builder.margin}", "margin_remove_top": "${builder.margin_remove_top}", "margin_remove_bottom": "${builder.margin_remove_bottom}", "maxwidth": "${builder.maxwidth}", "maxwidth_breakpoint": "${builder.maxwidth_breakpoint}", "block_align": "${builder.block_align}", "block_align_breakpoint": "${builder.block_align_breakpoint}", "block_align_fallback": "${builder.block_align_fallback}", "text_align": "${builder.text_align}", "text_align_breakpoint": "${builder.text_align_breakpoint}", "text_align_fallback": "${builder.text_align_fallback}", "animation": "${builder.animation}", "_parallax_button": "${builder._parallax_button}", "visibility": "${builder.visibility}", "container_padding_remove": "${builder.container_padding_remove}", "name": "${builder.name}", "status": "${builder.status}", "source": "${builder.source}", "id": "${builder.id}", "class": "${builder.cls}", "attributes": "${builder.attrs}", "css": { "label": "CSS", "description": "Enter your own custom CSS. The following selectors will be prefixed automatically for this element: <code>.el-element</code>, <code>.el-image</code>, <code>.el-title</code>, <code>.el-meta</code>, <code>.el-content</code>, <code>.el-link</code>, <code>.el-hover-image</code>", "type": "editor", "editor": "code", "mode": "css", "attrs": { "debounce": 500, "hints": [ ".el-element", ".el-image", ".el-title", ".el-meta", ".el-content", ".el-link", ".el-hover-image" ] } }, "transform": "${builder.transform}" }, "fieldset": { "default": { "type": "tabs", "fields": [ { "title": "Content", "fields": [ "image", "video", "_media", "video_title", { "description": "Setting just one value preserves the original proportions. The image will be resized and cropped automatically, and where possible, high resolution images will be auto-generated.", "name": "_image_dimension", "type": "grid", "width": "1-2", "fields": ["image_width", "image_height"] }, "image_alt", "title", "meta", "content", "link", "link_target", "link_text", "link_aria_label", "hover_image", "hover_video" ] }, { "title": "Settings", "fields": [ { "label": "Container", "type": "group", "divider": true, "fields": [ "height_expand", "overlay_link", "html_element" ] }, { "label": "Overlay", "type": "group", "divider": true, "fields": [ "overlay_mode", "overlay_hover", "overlay_transition_background", "overlay_style", "overlay_position", "overlay_margin", "overlay_padding", "content_expand", "overlay_maxwidth", "text_color", "text_color_hover", "text_blend", "overlay_transition" ] }, { "label": "Image", "type": "group", "divider": true, "fields": [ "image_focal_point", "image_loading", "image_transition", "image_transition_border", "image_min_height", "image_border", "image_box_shadow", "image_hover_box_shadow", "image_box_decoration", "image_box_decoration_inverse" ] }, { "label": "Hover Image", "type": "group", "divider": true, "fields": [ "hover_image_focal_point" ] }, { "label": "Title", "type": "group", "divider": true, "fields": [ "title_transition", "title_style", "title_link", "title_hover_style", "title_decoration", "title_font_family", "title_color", "title_element", "title_margin" ] }, { "label": "Meta", "type": "group", "divider": true, "fields": [ "meta_transition", "meta_style", "meta_color", "meta_align", "meta_element", "meta_margin" ] }, { "label": "Content", "type": "group", "divider": true, "fields": ["content_transition", "content_style", "content_margin"] }, { "label": "Link", "type": "group", "divider": true, "fields": [ "link_transition", "link_style", "link_size", "link_fullwidth", "link_margin" ] }, { "label": "General", "type": "group", "fields": [ "position", "position_left", "position_right", "position_top", "position_bottom", "position_z_index", "blend", "margin", "margin_remove_top", "margin_remove_bottom", "maxwidth", "maxwidth_breakpoint", "block_align", "block_align_breakpoint", "block_align_fallback", "text_align", "text_align_breakpoint", "text_align_fallback", "animation", "_parallax_button", "visibility", "container_padding_remove" ] } ] }, "${builder.advanced}" ] } }, "panels": { "builder-overlay-media": { "title": "Media", "width": 500, "fields": { "media_background": { "label": "Background Color", "description": "Use the background color in combination with blend modes.", "type": "color" }, "media_blend_mode": { "label": "Blend Mode", "description": "Determine how the image or video will blend with the background color.", "type": "select", "options": { "Normal": "", "Multiply": "multiply", "Screen": "screen", "Overlay": "overlay", "Darken": "darken", "Lighten": "lighten", "Color-dodge": "color-dodge", "Color-burn": "color-burn", "Hard-light": "hard-light", "Soft-light": "soft-light", "Difference": "difference", "Exclusion": "exclusion", "Hue": "hue", "Saturation": "saturation", "Color": "color", "Luminosity": "luminosity" }, "enable": "media_background" }, "media_overlay": { "label": "Overlay Color", "description": "Set an additional transparent overlay to soften the image or video.", "type": "color" } }, "fieldset": { "default": { "fields": ["media_background", "media_blend_mode", "media_overlay"] } } } } } elements/overlay/images/icon.svg 0000644 00000000705 15175623007 0012767 0 ustar 00 <svg width="30" height="30" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg"> <rect width="30" height="30" fill="none" /> <rect width="12" height="2" fill="#444" x="8.971" y="13" /> <rect width="8" height="2" fill="#444" x="10.971" y="16" /> <rect width="28" height="22" fill="none" stroke="#444" stroke-width="2px" x="1" y="4" /> <rect width="20" height="14" fill="none" stroke="#444" stroke-width="2px" x="5" y="8" /> </svg> elements/overlay/images/iconSmall.svg 0000644 00000000554 15175623007 0013762 0 ustar 00 <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect width="19" height="15" fill="none" stroke="#444" x="0.5" y="2.5" /> <rect width="15" height="11" fill="none" stroke="#444" x="2.5" y="4.5" /> <rect width="8" height="1" fill="#444" x="6" y="9" /> <rect width="6" height="1" fill="#444" x="7" y="11" /> </svg> elements/overlay/updates.php 0000644 00000013326 15175623007 0012232 0 ustar 00 <?php namespace YOOtheme; return [ '4.5.0-beta.0.1' => function ($node) { if (Arr::get($node->props, 'image') && Arr::get($node->props, 'video')) { unset($node->props['video']); } }, '4.0.0-beta.9' => function ($node) { if (Arr::get($node->props, 'overlay_link') && Arr::get($node->props, 'css')) { $node->props['css'] = str_replace( '.el-element', '.el-element > *', $node->props['css'], ); } }, '3.0.0-beta.5.1' => function ($node) { if (Arr::get($node->props, 'image_box_decoration') === 'border-hover') { $node->props['image_transition_border'] = true; unset($node->props['image_box_decoration']); } }, '2.8.0-beta.0.13' => function ($node) { foreach (['title_style', 'meta_style', 'content_style'] as $prop) { if (in_array(Arr::get($node->props, $prop), ['meta', 'lead'])) { $node->props[$prop] = 'text-' . Arr::get($node->props, $prop); } } }, '2.0.0-beta.5.1' => function ($node) { Arr::updateKeys($node->props, [ 'link_type' => function ($value) { if ($value === 'content') { return [ 'title_link' => true, 'link_text' => '', ]; } elseif ($value === 'element') { return [ 'overlay_link' => true, 'link_text' => '', ]; } }, ]); }, '1.20.0-beta.1.1' => function ($node) { Arr::updateKeys($node->props, ['maxwidth_align' => 'block_align']); }, '1.20.0-beta.0.1' => function ($node) { if (Arr::get($node->props, 'title_style') === 'heading-primary') { $node->props['title_style'] = 'heading-medium'; } /** @var Config $config */ $config = app(Config::class); [$style] = explode(':', $config('~theme.style')); if ( in_array($style, [ 'craft', 'district', 'jack-backer', 'tomsen-brody', 'vision', 'florence', 'max', 'nioh-studio', 'sonic', 'summit', 'trek', ]) ) { if ( Arr::get($node->props, 'title_style') === 'h1' || (empty($node->props['title_style']) && Arr::get($node->props, 'title_element') === 'h1') ) { $node->props['title_style'] = 'heading-small'; } } if (in_array($style, ['florence', 'max', 'nioh-studio', 'sonic', 'summit', 'trek'])) { if (Arr::get($node->props, 'title_style') === 'h2') { $node->props['title_style'] = Arr::get($node->props, 'title_element') === 'h1' ? '' : 'h1'; } elseif ( empty($node->props['title_style']) && Arr::get($node->props, 'title_element') === 'h2' ) { $node->props['title_style'] = 'h1'; } } if (in_array($style, ['fuse', 'horizon', 'joline', 'juno', 'lilian', 'vibe', 'yard'])) { if (Arr::get($node->props, 'title_style') === 'heading-medium') { $node->props['title_style'] = 'heading-small'; } } if ($style == 'copper-hill') { if (Arr::get($node->props, 'title_style') === 'heading-medium') { $node->props['title_style'] = Arr::get($node->props, 'title_element') === 'h1' ? '' : 'h1'; } elseif (Arr::get($node->props, 'title_style') === 'h1') { $node->props['title_style'] = Arr::get($node->props, 'title_element') === 'h2' ? '' : 'h2'; } elseif ( empty($node->props['title_style']) && Arr::get($node->props, 'title_element') === 'h1' ) { $node->props['title_style'] = 'h2'; } } if (in_array($style, ['trek', 'fjord'])) { if (Arr::get($node->props, 'title_style') === 'heading-medium') { $node->props['title_style'] = 'heading-large'; } } }, '1.19.0-beta.0.1' => function ($node) { if (Arr::get($node->props, 'meta_align') === 'top') { $node->props['meta_align'] = 'above-title'; } if (Arr::get($node->props, 'meta_align') === 'bottom') { $node->props['meta_align'] = 'below-title'; } $node->props['link_type'] = 'element'; }, '1.18.10.3' => function ($node) { if (Arr::get($node->props, 'meta_align') === 'top') { if (!empty($node->props['meta_margin'])) { $node->props['title_margin'] = $node->props['meta_margin']; } $node->props['meta_margin'] = ''; } }, '1.18.0' => function ($node) { if (!isset($node->props['overlay_image']) && Arr::get($node->props, 'image2')) { $node->props['overlay_image'] = Arr::get($node->props, 'image2'); } if ( !isset($node->props['image_box_decoration']) && Arr::get($node->props, 'image_box_shadow_bottom') === true ) { $node->props['image_box_decoration'] = 'shadow'; } if ( !isset($node->props['meta_color']) && Arr::get($node->props, 'meta_style') === 'muted' ) { $node->props['meta_color'] = 'muted'; $node->props['meta_style'] = ''; } }, ]; elements/accordion/templates/content.php 0000644 00000000522 15175623007 0014507 0 ustar 00 <?php if (count($children) > 1) : ?> <ul> <?php foreach ($children as $child) : ?> <li> <?= $builder->render($child, ['element' => $props]) ?> </li> <?php endforeach ?> </ul> <?php elseif (count($children) == 1) : ?> <div> <?= $builder->render($children[0], ['element' => $props]) ?> </div> <?php endif ?> elements/accordion/templates/template.php 0000644 00000000543 15175623007 0014653 0 ustar 00 <?php $el = $this->el('div', [ 'uk-accordion' => [ 'multiple: {multiple};', 'collapsible: {0};' => $props['collapsible'] ? 'true' : 'false', ], ]); ?> <?= $el($props, $attrs) ?> <?php foreach ($children as $child) : ?> <?= $builder->render($child, ['element' => $props]) ?> <?php endforeach ?> <?= $el->end() ?> elements/accordion/element.json 0000644 00000043314 15175623007 0012660 0 ustar 00 { "name": "accordion", "title": "Accordion", "group": "multiple items", "icon": "${url:images/icon.svg}", "iconSmall": "${url:images/iconSmall.svg}", "element": true, "container": true, "width": 500, "defaults": { "show_image": true, "show_link": true, "collapsible": true, "content_column_breakpoint": "m", "image_svg_color": "emphasis", "image_align": "top", "image_grid_width": "1-2", "image_grid_breakpoint": "m", "link_text": "Read more", "link_style": "default" }, "placeholder": { "children": [ { "type": "accordion_item", "props": {} }, { "type": "accordion_item", "props": {} }, { "type": "accordion_item", "props": {} } ] }, "updates": "./updates.php", "templates": { "render": "./templates/template.php", "content": "./templates/content.php" }, "fields": { "content": { "label": "Items", "type": "content-items", "item": "accordion_item", "media": { "type": "image", "item": { "title": "title", "image": "src" } } }, "show_image": { "type": "checkbox", "text": "Show the image" }, "show_link": { "description": "Show or hide content fields without the need to delete the content itself.", "type": "checkbox", "text": "Show the link" }, "multiple": { "label": "Behavior", "type": "checkbox", "text": "Allow multiple open items" }, "collapsible": { "type": "checkbox", "text": "Start with all items closed" }, "content_style": { "label": "Style", "description": "Select a predefined text style, including color, size and font-family.", "type": "select", "options": { "None": "", "Lead": "lead", "Meta": "meta" } }, "content_dropcap": { "label": "Drop Cap", "description": "Display the first letter of the paragraph as a large initial.", "type": "checkbox", "text": "Enable drop cap" }, "content_column": { "label": "Columns", "description": "Set the number of text columns.", "type": "select", "options": { "None": "", "Halves": "1-2", "Thirds": "1-3", "Quarters": "1-4", "Fifths": "1-5", "Sixths": "1-6" } }, "content_column_divider": { "description": "Show a divider between text columns.", "type": "checkbox", "text": "Show dividers", "enable": "content_column" }, "content_column_breakpoint": { "label": "Columns Breakpoint", "description": "Set the device width from which the text columns should apply.", "type": "select", "options": { "Always": "", "Small (Phone Landscape)": "s", "Medium (Tablet Landscape)": "m", "Large (Desktop)": "l", "X-Large (Large Screens)": "xl" }, "enable": "content_column" }, "content_margin": { "label": "Margin Top", "description": "Set the top margin. Note that the margin will only apply if the content field immediately follows another content field.", "type": "select", "options": { "Small": "small", "Default": "", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "None": "remove" } }, "image_width": { "type": "number", "attrs": { "placeholder": "auto" }, "enable": "show_image" }, "image_height": { "type": "number", "attrs": { "placeholder": "auto" }, "enable": "show_image" }, "image_loading": { "label": "Loading", "description": "By default, images are loaded lazy. Enable eager loading for images in the initial viewport.", "type": "checkbox", "text": "Load image eagerly", "enable": "show_image" }, "image_border": { "label": "Border", "description": "Select the image border style.", "type": "select", "options": { "None": "", "Rounded": "rounded", "Circle": "circle", "Pill": "pill" }, "enable": "show_image" }, "image_align": { "label": "Alignment", "description": "Align the image to the top, left, right or place it between the title and the content.", "type": "select", "options": { "Top": "top", "Bottom": "bottom", "Left": "left", "Right": "right" }, "enable": "show_image" }, "image_grid_width": { "label": "Grid Width", "description": "Define the width of the image within the grid. Choose between percent and fixed widths or expand columns to the width of their content.", "type": "select", "options": { "Auto": "auto", "80%": "4-5", "75%": "3-4", "66%": "2-3", "60%": "3-5", "50%": "1-2", "40%": "2-5", "33%": "1-3", "25%": "1-4", "20%": "1-5", "Small": "small", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "2X-Large": "2xlarge" }, "enable": "show_image && $match(image_align, 'left|right')" }, "image_grid_column_gap": { "label": "Grid Column Gap", "description": "Set the size of the gap between the image and the content.", "type": "select", "options": { "Small": "small", "Medium": "medium", "Default": "", "Large": "large", "None": "collapse" }, "enable": "show_image && $match(image_align, 'left|right')" }, "image_grid_row_gap": { "label": "Grid Row Gap", "description": "Set the size of the gap if the grid items stack.", "type": "select", "options": { "Small": "small", "Medium": "medium", "Default": "", "Large": "large", "None": "collapse" }, "enable": "show_image && $match(image_align, 'left|right')" }, "image_grid_breakpoint": { "label": "Grid Breakpoint", "description": "Set the breakpoint from which grid items will stack.", "type": "select", "options": { "Small (Phone Landscape)": "s", "Medium (Tablet Landscape)": "m", "Large (Desktop)": "l", "X-Large (Large Screens)": "xl" }, "enable": "show_image && $match(image_align, 'left|right')" }, "image_vertical_align": { "label": "Vertical Alignment", "description": "Vertically center grid items.", "type": "checkbox", "text": "Center", "enable": "show_image && $match(image_align, 'left|right')" }, "image_margin": { "label": "Margin Top", "description": "Set the top margin. Note that the margin will only apply if the content field immediately follows another content field.", "type": "select", "options": { "Small": "small", "Default": "", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "None": "remove" }, "enable": "show_image && image_align == 'bottom'" }, "image_svg_inline": { "label": "Inline SVG", "description": "Inject SVG images into the page markup so that they can easily be styled with CSS.", "type": "checkbox", "text": "Make SVG stylable with CSS", "enable": "show_image" }, "image_svg_color": { "label": "SVG Color", "description": "Select the SVG color. It will only apply to supported elements defined in the SVG.", "type": "select", "options": { "None": "", "Muted": "muted", "Emphasis": "emphasis", "Primary": "primary", "Secondary": "secondary", "Success": "success", "Warning": "warning", "Danger": "danger" }, "enable": "show_image && image_svg_inline" }, "link_text": { "label": "Text", "description": "Enter the text for the link.", "enable": "show_link" }, "link_target": { "type": "checkbox", "text": "Open in a new window", "enable": "show_link" }, "link_style": { "label": "Style", "description": "Set the link style.", "type": "select", "options": { "Button Default": "default", "Button Primary": "primary", "Button Secondary": "secondary", "Button Danger": "danger", "Button Text": "text", "Link": "", "Link Muted": "link-muted", "Link Text": "link-text" }, "enable": "show_link" }, "link_size": { "label": "Button Size", "description": "Set the button size.", "type": "select", "options": { "Small": "small", "Default": "", "Large": "large" }, "enable": "show_link && link_style && !$match(link_style, 'link-(muted|text)')" }, "link_fullwidth": { "type": "checkbox", "text": "Full width button", "enable": "show_link && link_style && !$match(link_style, 'link-(muted|text)')" }, "link_margin": { "label": "Margin Top", "description": "Set the top margin. Note that the margin will only apply if the content field immediately follows another content field.", "type": "select", "options": { "Small": "small", "Default": "", "Medium": "medium", "Large": "large", "X-Large": "xlarge", "None": "remove" }, "enable": "show_link" }, "position": "${builder.position}", "position_left": "${builder.position_left}", "position_right": "${builder.position_right}", "position_top": "${builder.position_top}", "position_bottom": "${builder.position_bottom}", "position_z_index": "${builder.position_z_index}", "blend": "${builder.blend}", "margin": "${builder.margin}", "margin_remove_top": "${builder.margin_remove_top}", "margin_remove_bottom": "${builder.margin_remove_bottom}", "maxwidth": "${builder.maxwidth}", "maxwidth_breakpoint": "${builder.maxwidth_breakpoint}", "block_align": "${builder.block_align}", "block_align_breakpoint": "${builder.block_align_breakpoint}", "block_align_fallback": "${builder.block_align_fallback}", "text_align": "${builder.text_align_justify}", "text_align_breakpoint": "${builder.text_align_breakpoint}", "text_align_fallback": "${builder.text_align_justify_fallback}", "animation": "${builder.animation}", "_parallax_button": "${builder._parallax_button}", "visibility": "${builder.visibility}", "name": "${builder.name}", "status": "${builder.status}", "source": "${builder.source}", "id": "${builder.id}", "class": "${builder.cls}", "attributes": "${builder.attrs}", "css": { "label": "CSS", "description": "Enter your own custom CSS. The following selectors will be prefixed automatically for this element: <code>.el-element</code>, <code>.el-item</code>, <code>.el-title</code>, <code>.el-content</code>, <code>.el-image</code>, <code>.el-link</code>", "type": "editor", "editor": "code", "mode": "css", "attrs": { "debounce": 500, "hints": [ ".el-element", ".el-item", ".el-title", ".el-content", ".el-image", ".el-link" ] } }, "transform": "${builder.transform}" }, "fieldset": { "default": { "type": "tabs", "fields": [ { "title": "Content", "fields": ["content", "show_image", "show_link"] }, { "title": "Settings", "fields": [ { "label": "Accordion", "type": "group", "divider": true, "fields": ["multiple", "collapsible"] }, { "label": "Content", "type": "group", "divider": true, "fields": [ "content_style", "content_dropcap", "content_column", "content_column_divider", "content_column_breakpoint", "content_margin" ] }, { "label": "Image", "type": "group", "divider": true, "fields": [ { "label": "Width/Height", "description": "Setting just one value preserves the original proportions. The image will be resized and cropped automatically, and where possible, high resolution images will be auto-generated.", "type": "grid", "width": "1-2", "fields": ["image_width", "image_height"] }, "image_loading", "image_border", "image_align", "image_grid_width", "image_grid_column_gap", "image_grid_row_gap", "image_grid_breakpoint", "image_vertical_align", "image_margin", "image_svg_inline", "image_svg_color" ] }, { "label": "Link", "type": "group", "divider": true, "fields": [ "link_text", "link_target", "link_style", "link_size", "link_fullwidth", "link_margin" ] }, { "label": "General", "type": "group", "fields": [ "position", "position_left", "position_right", "position_top", "position_bottom", "position_z_index", "blend", "margin", "margin_remove_top", "margin_remove_bottom", "maxwidth", "maxwidth_breakpoint", "block_align", "block_align_breakpoint", "block_align_fallback", "text_align", "text_align_breakpoint", "text_align_fallback", "animation", "_parallax_button", "visibility" ] } ] }, "${builder.advanced}" ] } } } elements/accordion/images/iconSmall.svg 0000644 00000000547 15175623007 0014244 0 ustar 00 <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect width="17" height="8" fill="none" stroke="#575656" x="1.5" y="4.5" /> <rect width="18" height="1" fill="#575656" x="1" y="2" /> <rect width="18" height="1" fill="#575656" x="1" y="14" /> <rect width="18" height="1" fill="#575656" x="1" y="16" /> </svg> elements/accordion/images/icon.svg 0000644 00000000671 15175623007 0013251 0 ustar 00 <svg width="30" height="30" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg"> <rect width="28" height="13" fill="none" stroke="#444" stroke-width="2" x="1" y="6" /> <line fill="none" stroke="#444" stroke-width="2" x1="0" y1="2" x2="30" y2="2" /> <line fill="none" stroke="#444" stroke-width="2" x1="0" y1="23" x2="30" y2="23" /> <line fill="none" stroke="#444" stroke-width="2" x1="0" y1="27" x2="30" y2="27" /> </svg> elements/accordion/updates.php 0000644 00000001613 15175623007 0012506 0 ustar 00 <?php namespace YOOtheme; return [ '4.5.0-beta.0.4' => function ($node) { unset($node->props['title_element']); }, '2.1.0-beta.0.1' => function ($node) { if (Arr::get($node->props, 'image_grid_width') === 'xxlarge') { $node->props['image_grid_width'] = '2xlarge'; } }, '1.22.0-beta.0.1' => function ($node) { Arr::updateKeys($node->props, [ 'image_breakpoint' => 'image_grid_breakpoint', 'image_gutter' => fn($value) => [ 'image_grid_column_gap' => $value, 'image_grid_row_gap' => $value, ], ]); }, '1.20.0-beta.1.1' => function ($node) { Arr::updateKeys($node->props, ['maxwidth_align' => 'block_align']); }, '1.18.10.1' => function ($node) { Arr::updateKeys($node->props, ['image_inline_svg' => 'image_svg_inline']); }, ]; elements/code/templates/template.php 0000644 00000000343 15175623007 0013622 0 ustar 00 <?php $el = $this->el('pre', [ 'class' => [ 'uk-margin-remove {@position: absolute}', ], ]); ?> <?= $el($props, $attrs) ?><code class="el-content"><?= $this->e($props['content']) ?></code><?= $el->end() ?> elements/code/templates/content.php 0000644 00000000162 15175623007 0013460 0 ustar 00 <?php if ($props['content'] != '') : ?> <pre><code><?= $this->e($props['content']) ?></code></pre> <?php endif ?> elements/code/element.json 0000644 00000006467 15175623007 0011641 0 ustar 00 { "@import": "./element.php", "name": "code", "title": "Code", "group": "basic", "icon": "${url:images/icon.svg}", "iconSmall": "${url:images/iconSmall.svg}", "element": true, "width": 500, "placeholder": { "props": { "content": "// Code example\n <div id=\"myid\" class=\"myclass\" hidden> \nLorem ipsum <strong>dolor</strong> sit amet, consectetur adipiscing elit.\n</div>" } }, "templates": { "render": "./templates/template.php", "content": "./templates/content.php" }, "fields": { "content": { "label": "Content", "type": "editor", "editor": "code", "source": true }, "position": "${builder.position}", "position_left": "${builder.position_left}", "position_right": "${builder.position_right}", "position_top": "${builder.position_top}", "position_bottom": "${builder.position_bottom}", "position_z_index": "${builder.position_z_index}", "blend": "${builder.blend}", "margin": "${builder.margin}", "margin_remove_top": "${builder.margin_remove_top}", "margin_remove_bottom": "${builder.margin_remove_bottom}", "animation": "${builder.animation}", "_parallax_button": "${builder._parallax_button}", "visibility": "${builder.visibility}", "name": "${builder.name}", "status": "${builder.status}", "source": "${builder.source}", "id": "${builder.id}", "class": "${builder.cls}", "attributes": "${builder.attrs}", "css": { "label": "CSS", "description": "Enter your own custom CSS. The following selectors will be prefixed automatically for this element: <code>.el-element</code>, <code>.el-content</code>", "type": "editor", "editor": "code", "mode": "css", "attrs": { "debounce": 500, "hints": [".el-element", ".el-content"] } }, "transform": "${builder.transform}" }, "fieldset": { "default": { "type": "tabs", "fields": [ { "title": "Content", "fields": ["content"] }, { "title": "Settings", "fields": [ { "label": "General", "type": "group", "fields": [ "position", "position_left", "position_right", "position_top", "position_bottom", "position_z_index", "blend", "margin", "margin_remove_top", "margin_remove_bottom", "animation", "_parallax_button", "visibility" ] } ] }, "${builder.advanced}" ] } } } elements/code/images/icon.svg 0000644 00000000406 15175623007 0012216 0 ustar 00 <svg width="30" height="30" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg"> <polyline fill="none" stroke="#444" stroke-width="2" points="20,7 28,15 20,23" /> <polyline fill="none" stroke="#444" stroke-width="2" points="10,7 2,15 10,23" /> </svg> elements/code/images/iconSmall.svg 0000644 00000000412 15175623007 0013204 0 ustar 00 <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polyline fill="none" stroke="#444" stroke-width="1.01" points="13,4 19,10 13,16" /> <polyline fill="none" stroke="#444" stroke-width="1.01" points="7,4 1,10 7,16" /> </svg> elements/code/element.php 0000644 00000000351 15175623007 0011441 0 ustar 00 <?php namespace YOOtheme; return [ 'transforms' => [ 'render' => function ($node) { // Don't render element if content fields are empty return $node->props['content'] != ''; }, ], ]; elements/icon/images/icon.svg 0000644 00000000470 15175623007 0012235 0 ustar 00 <svg width="30" height="30" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#444" stroke-width="2" d="M15,19.39,20,22,19,16.48l4-3.9-5.57-.81L15,6.76l-2.48,5L7,12.58l4,3.9L10.05,22Z" /> <circle fill="none" stroke="#444" stroke-width="2" cx="15" cy="15" r="13" /> </svg> elements/icon/images/iconSmall.svg 0000644 00000000436 15175623007 0013230 0 ustar 00 <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#444" d="M10,13l3.46,1.81L12.77,11l2.77-2.7-3.86-.56L10,4.3,8.28,7.76l-3.82.56L7.23,11l-.66,3.83Z" /> <circle fill="none" stroke="#444" cx="10" cy="10" r="9" /> </svg> elements/icon/element.php 0000644 00000000347 15175623007 0011464 0 ustar 00 <?php namespace YOOtheme; return [ 'transforms' => [ 'render' => function ($node) { // Don't render element if content fields are empty return (bool) $node->props['icon']; }, ], ]; elements/icon/templates/content.php 0000644 00000000267 15175623007 0013504 0 ustar 00 <?php if ($props['icon'] && $props['link']) : ?> <a href="<?= $props['link'] ?>">[<?= $props['icon'] ?>]</a> <?php elseif ($props['icon']) : ?> [<?= $props['icon'] ?>] <?php endif ?> elements/icon/templates/template.php 0000644 00000001507 15175623007 0013643 0 ustar 00 <?php $el = $this->el('div'); // Icon $icon = $this->el('span', [ 'class' => [ 'uk-text-{icon_color} {@!link}', ], 'uk-icon' => [ 'icon: {icon};', 'width: {icon_width}; height: {icon_width}; {@!link_style: button}', ], ], ''); // Link $link = $this->el('a', [ 'class' => [ 'uk-icon-link {@!link_style}', 'uk-icon-button {@link_style: button}', 'uk-link-{link_style: muted|text|reset}', ], 'href' => ['{link}'], 'aria-label' => ['{link_aria_label}'], 'target' => ['_blank {@link_target}'], 'uk-scroll' => str_contains((string) $props['link'], '#'), ]); ?> <?= $el($props, $attrs) ?> <?php if ($props['link']) : ?> <?= $link($props, $icon($props)) ?> <?php else : ?> <?= $icon($props) ?> <?php endif ?> <?= $el->end() ?> elements/icon/element.json 0000644 00000013633 15175623007 0011650 0 ustar 00 { "@import": "./element.php", "name": "icon", "title": "Icon", "group": "basic", "icon": "${url:images/icon.svg}", "iconSmall": "${url:images/iconSmall.svg}", "element": true, "width": 500, "defaults": { "icon_width": 60, "margin": "default" }, "placeholder": { "props": { "icon": "star" } }, "updates": "./updates.php", "templates": { "render": "./templates/template.php", "content": "./templates/content.php" }, "fields": { "icon": { "label": "Icon", "description": "Click on the pencil to pick an icon from the icon library.", "type": "icon", "source": true }, "link": "${builder.link}", "link_target": "${builder.link_target}", "link_aria_label": "${builder.link_aria_label}", "icon_color": { "label": "Color", "description": "Select the icon color.", "type": "select", "options": { "None": "", "Muted": "muted", "Emphasis": "emphasis", "Primary": "primary", "Secondary": "secondary", "Success": "success", "Warning": "warning", "Danger": "danger" }, "enable": "!link" }, "icon_width": { "label": "Icon Width", "description": "Set the icon width.", "enable": "link_style != 'button'" }, "link_style": { "label": "Style", "description": "Set the link style.", "type": "select", "options": { "Icon Link": "", "Icon Button": "button", "Link": "link", "Link Muted": "muted", "Link Text": "text", "Link Reset": "reset" }, "enable": "link" }, "position": "${builder.position}", "position_left": "${builder.position_left}", "position_right": "${builder.position_right}", "position_top": "${builder.position_top}", "position_bottom": "${builder.position_bottom}", "position_z_index": "${builder.position_z_index}", "blend": "${builder.blend}", "margin": "${builder.margin}", "margin_remove_top": "${builder.margin_remove_top}", "margin_remove_bottom": "${builder.margin_remove_bottom}", "maxwidth": "${builder.maxwidth}", "maxwidth_breakpoint": "${builder.maxwidth_breakpoint}", "block_align": "${builder.block_align}", "block_align_breakpoint": "${builder.block_align_breakpoint}", "block_align_fallback": "${builder.block_align_fallback}", "text_align": "${builder.text_align}", "text_align_breakpoint": "${builder.text_align_breakpoint}", "text_align_fallback": "${builder.text_align_fallback}", "animation": "${builder.animation}", "_parallax_button": "${builder._parallax_button}", "visibility": "${builder.visibility}", "name": "${builder.name}", "status": "${builder.status}", "source": "${builder.source}", "id": "${builder.id}", "class": "${builder.cls}", "attributes": "${builder.attrs}", "css": { "label": "CSS", "description": "Enter your own custom CSS. The following selectors will be prefixed automatically for this element: <code>.el-element</code>", "type": "editor", "editor": "code", "mode": "css", "attrs": { "debounce": 500, "hints": [".el-element"] } }, "transform": "${builder.transform}" }, "fieldset": { "default": { "type": "tabs", "fields": [ { "title": "Content", "fields": ["icon", "link", "link_target", "link_aria_label"] }, { "title": "Settings", "fields": [ { "label": "Icon", "type": "group", "divider": true, "fields": ["icon_color", "icon_width"] }, { "label": "Link", "type": "group", "divider": true, "fields": ["link_style"] }, { "label": "General", "type": "group", "fields": [ "position", "position_left", "position_right", "position_top", "position_bottom", "position_z_index", "blend", "margin", "margin_remove_top", "margin_remove_bottom", "maxwidth", "maxwidth_breakpoint", "block_align", "block_align_breakpoint", "block_align_fallback", "text_align", "text_align_breakpoint", "text_align_fallback", "animation", "_parallax_button", "visibility" ] } ] }, "${builder.advanced}" ] } } } elements/icon/updates.php 0000644 00000000624 15175623007 0011476 0 ustar 00 <?php namespace YOOtheme; return [ '2.1.0-beta.0.1' => function ($node) { if (!empty($node->props['icon_ratio'])) { $node->props['icon_width'] = round(20 * $node->props['icon_ratio']); unset($node->props['icon_ratio']); } }, '1.20.0-beta.4' => function ($node) { Arr::updateKeys($node->props, ['maxwidth_align' => 'block_align']); }, ]; elements/button/updates.php 0000644 00000000751 15175623007 0012062 0 ustar 00 <?php namespace YOOtheme; return [ // Remove obsolete props '4.5.0-beta.0.4' => function ($node) { unset($node->props['inline_align']); }, '1.22.0-beta.0.1' => function ($node) { Arr::updateKeys($node->props, [ 'gutter' => fn($value) => ['grid_column_gap' => $value, 'grid_row_gap' => $value], ]); }, '1.20.0-beta.4' => function ($node) { Arr::updateKeys($node->props, ['maxwidth_align' => 'block_align']); }, ]; elements/button/images/icon.svg 0000644 00000000524 15175623007 0012620 0 ustar 00 <svg width="30" height="30" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#444" stroke-width="1.8" d="M11,8l10.882,8.611l-2.902,1.681l3.209,5.965 l-3.98,2.146l-3.207-5.965l-2.9,1.681L11,8z" /> <polyline fill="none" stroke="#444" stroke-width="2" points="8,18 2,18 2,3 28,3 28,18 25,18" /> </svg> elements/button/images/iconSmall.svg 0000644 00000000456 15175623007 0013615 0 ustar 00 <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#444" d="M7.1,6.4l7.4,6l-1.9,1.1l2.1,3.9l-2.6,1.4L10,14.9L8.1,16L7.1,6.4z" /> <polyline fill="none" stroke="#444" points="6,12.5 1.5,12.5 1.5,3.5 18.5,3.5 18.5,12.5 16,12.5" /> </svg> elements/button/element.json 0000644 00000013652 15175623007 0012234 0 ustar 00 { "name": "button", "title": "Button", "group": "multiple items", "icon": "${url:images/icon.svg}", "iconSmall": "${url:images/iconSmall.svg}", "element": true, "container": true, "width": 500, "defaults": { "grid_column_gap": "small", "grid_row_gap": "small", "margin": "default" }, "placeholder": { "children": [{ "type": "button_item", "props": {} }] }, "updates": "./updates.php", "templates": { "render": "./templates/template.php", "content": "./templates/content.php" }, "fields": { "content": { "label": "Items", "type": "content-items", "title": "content", "item": "button_item", "media": { "type": "", "item": { "link_title": "title", "link": "src" } } }, "button_size": { "label": "Size", "type": "select", "options": { "Small": "small", "Default": "", "Large": "large" } }, "fullwidth": { "type": "checkbox", "text": "Full width button" }, "grid_column_gap": { "label": "Column Gap", "description": "Set the size of the column gap between multiple buttons.", "type": "select", "options": { "Small": "small", "Medium": "medium", "Default": "", "Large": "large", "None": "collapse" } }, "grid_row_gap": { "label": "Row Gap", "description": "Set the size of the row gap between multiple buttons.", "type": "select", "options": { "Small": "small", "Medium": "medium", "Default": "", "Large": "large", "None": "collapse" } }, "position": "${builder.position}", "position_left": "${builder.position_left}", "position_right": "${builder.position_right}", "position_top": "${builder.position_top}", "position_bottom": "${builder.position_bottom}", "position_z_index": "${builder.position_z_index}", "blend": "${builder.blend}", "margin": "${builder.margin}", "margin_remove_top": "${builder.margin_remove_top}", "margin_remove_bottom": "${builder.margin_remove_bottom}", "maxwidth": "${builder.maxwidth}", "maxwidth_breakpoint": "${builder.maxwidth_breakpoint}", "block_align": "${builder.block_align}", "block_align_breakpoint": "${builder.block_align_breakpoint}", "block_align_fallback": "${builder.block_align_fallback}", "text_align": "${builder.text_align}", "text_align_breakpoint": "${builder.text_align_breakpoint}", "text_align_fallback": "${builder.text_align_fallback}", "animation": "${builder.animation}", "_parallax_button": "${builder._parallax_button}", "visibility": "${builder.visibility}", "name": "${builder.name}", "status": "${builder.status}", "source": "${builder.source}", "id": "${builder.id}", "class": "${builder.cls}", "attributes": "${builder.attrs}", "css": { "label": "CSS", "description": "Enter your own custom CSS. The following selectors will be prefixed automatically for this element: <code>.el-element</code>, <code>.el-item</code>, <code>.el-content</code>", "type": "editor", "editor": "code", "mode": "css", "attrs": { "debounce": 500, "hints": [".el-element", ".el-item", ".el-content"] } }, "transform": "${builder.transform}" }, "fieldset": { "default": { "type": "tabs", "fields": [ { "title": "Content", "fields": ["content"] }, { "title": "Settings", "fields": [ { "label": "Button", "type": "group", "divider": true, "fields": [ "button_size", "fullwidth", "grid_column_gap", "grid_row_gap" ] }, { "label": "General", "type": "group", "fields": [ "position", "position_left", "position_right", "position_top", "position_bottom", "position_z_index", "blend", "margin", "margin_remove_top", "margin_remove_bottom", "maxwidth", "maxwidth_breakpoint", "block_align", "block_align_breakpoint", "block_align_fallback", "text_align", "text_align_breakpoint", "text_align_fallback", "animation", "_parallax_button", "visibility" ] } ] }, "${builder.advanced}" ] } } } elements/button/templates/template.php 0000644 00000001760 15175623007 0014227 0 ustar 00 <?php $el = $this->el('div'); // Grid $grid = $this->el('div', [ 'class' => [ 'uk-flex-middle', $props['grid_column_gap'] == $props['grid_row_gap'] ? 'uk-grid-{grid_column_gap}' : '[uk-grid-column-{grid_column_gap}] [uk-grid-row-{grid_row_gap}]', 'uk-child-width-{0}' => $props['fullwidth'] ? '1-1' : 'auto', 'uk-flex-{text_align}[@{text_align_breakpoint} [uk-flex-{text_align_fallback}]] {@!fullwidth}', ], 'uk-grid' => true, ]); ?> <?= $el($props, $attrs) ?> <?php if (count($children) > 1) : ?> <?= $grid($props) ?> <?php endif ?> <?php foreach ($children as $child) : ?> <?php if (count($children) > 1) : ?> <div class="el-item"> <?php endif ?> <?= $builder->render($child, ['element' => $props]) ?> <?php if (count($children) > 1) : ?> </div> <?php endif ?> <?php endforeach ?> <?php if (count($children) > 1) : ?> <?= $grid->end() ?> <?php endif ?> </div> elements/button/templates/content.php 0000644 00000000434 15175623007 0014063 0 ustar 00 <?php if (count($children) > 1) : ?> <ul> <?php foreach ($children as $child) : ?> <li> <?= $builder->render($child) ?> </li> <?php endforeach ?> </ul> <?php elseif (count($children) == 1) : ?> <p> <?= $builder->render($children[0]) ?> </p> <?php endif ?> elements/subnav/updates.php 0000644 00000000442 15175623007 0012042 0 ustar 00 <?php namespace YOOtheme; return [ // Remove obsolete props '4.5.0-beta.0.4' => function ($node) { unset($node->props['inline_align']); }, '1.20.0-beta.4' => function ($node) { Arr::updateKeys($node->props, ['maxwidth_align' => 'block_align']); }, ]; elements/subnav/images/iconSmall.svg 0000644 00000000416 15175623007 0013574 0 ustar 00 <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect width="4" height="1" fill="#444" x="16" y="10" /> <rect width="4" height="1" fill="#444" x="10" y="10" /> <path fill="#444" d="M0,8v5h8V8H0z M7,12H1V9h6V12z" /> </svg> elements/subnav/images/icon.svg 0000644 00000000444 15175623007 0012604 0 ustar 00 <svg width="30" height="30" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg"> <rect width="6" height="2" fill="#444" x="24" y="14" /> <rect width="6" height="2" fill="#444" x="15" y="14" /> <path fill="#444" d="M0,12v6h11.999L12,12H0z M9.999,16h-8L2,14h7.999V16z" /> </svg> elements/subnav/element.json 0000644 00000012205 15175623007 0012210 0 ustar 00 { "name": "subnav", "title": "Subnav", "group": "multiple items", "icon": "${url:images/icon.svg}", "iconSmall": "${url:images/iconSmall.svg}", "element": true, "container": true, "width": 500, "placeholder": { "children": [ { "type": "subnav_item", "props": {} }, { "type": "subnav_item", "props": {} }, { "type": "subnav_item", "props": {} } ] }, "updates": "./updates.php", "templates": { "render": "./templates/template.php", "content": "./templates/content.php" }, "fields": { "content": { "label": "Items", "type": "content-items", "title": "content", "item": "subnav_item" }, "subnav_style": { "label": "Style", "description": "Select the subnav style.", "type": "select", "options": { "Default": "", "Divider": "divider", "Pill": "pill", "Tab": "tab" } }, "html_element": { "label": "HTML Element", "description": "Define a navigation menu or give it no semantic meaning.", "type": "select", "options": { "div": "", "nav": "nav" } }, "position": "${builder.position}", "position_left": "${builder.position_left}", "position_right": "${builder.position_right}", "position_top": "${builder.position_top}", "position_bottom": "${builder.position_bottom}", "position_z_index": "${builder.position_z_index}", "blend": "${builder.blend}", "margin": "${builder.margin}", "margin_remove_top": "${builder.margin_remove_top}", "margin_remove_bottom": "${builder.margin_remove_bottom}", "maxwidth": "${builder.maxwidth}", "maxwidth_breakpoint": "${builder.maxwidth_breakpoint}", "block_align": "${builder.block_align}", "block_align_breakpoint": "${builder.block_align_breakpoint}", "block_align_fallback": "${builder.block_align_fallback}", "text_align": "${builder.text_align}", "text_align_breakpoint": "${builder.text_align_breakpoint}", "text_align_fallback": "${builder.text_align_fallback}", "animation": "${builder.animation}", "_parallax_button": "${builder._parallax_button}", "visibility": "${builder.visibility}", "name": "${builder.name}", "status": "${builder.status}", "source": "${builder.source}", "id": "${builder.id}", "class": "${builder.cls}", "attributes": "${builder.attrs}", "css": { "label": "CSS", "description": "Enter your own custom CSS. The following selectors will be prefixed automatically for this element: <code>.el-element</code>, <code>.el-item</code>, <code>.el-content</code>, <code>.el-link</code>", "type": "editor", "editor": "code", "mode": "css", "attrs": { "debounce": 500, "hints": [".el-element", ".el-item", ".el-content", ".el-link"] } }, "transform": "${builder.transform}" }, "fieldset": { "default": { "type": "tabs", "fields": [ { "title": "Content", "fields": ["content"] }, { "title": "Settings", "fields": [ { "label": "Subnav", "type": "group", "divider": true, "fields": ["subnav_style", "html_element"] }, { "label": "General", "type": "group", "fields": [ "position", "position_left", "position_right", "position_top", "position_bottom", "position_z_index", "blend", "margin", "margin_remove_top", "margin_remove_bottom", "maxwidth", "maxwidth_breakpoint", "block_align", "block_align_breakpoint", "block_align_fallback", "text_align", "text_align_breakpoint", "text_align_fallback", "animation", "_parallax_button", "visibility" ] } ] }, "${builder.advanced}" ] } } } elements/subnav/templates/template.php 0000644 00000001334 15175623007 0014207 0 ustar 00 <?php $el = $this->el($props['html_element'] ?: 'div'); // Subnav $subnav = $this->el('ul', [ 'class' => [ 'uk-margin-remove-bottom', 'uk-subnav {@subnav_style: |divider|pill} [uk-subnav-{subnav_style: divider|pill}]', 'uk-tab {@subnav_style: tab}', 'uk-flex-{text_align}[@{text_align_breakpoint} [uk-flex-{text_align_fallback}]]', ], 'uk-margin' => count($children) > 1, ]); ?> <?= $el($props, $attrs) ?> <?= $subnav($props) ?> <?php foreach ($children as $child) : ?> <li class="el-item <?= $child->props['active'] ? 'uk-active' : '' ?>"><?= $builder->render($child, ['element' => $props]) ?></li> <?php endforeach ?> <?= $subnav->end() ?> <?= $el->end() ?> elements/subnav/templates/content.php 0000644 00000000512 15175623007 0014043 0 ustar 00 <?php if (count($children) > 1) : ?> <ul> <?php foreach ($children as $child) : ?> <li> <?= $builder->render($child, ['element' => $props]) ?> </li> <?php endforeach ?> </ul> <?php elseif (count($children) == 1) : ?> <p> <?= $builder->render($children[0], ['element' => $props]) ?> </p> <?php endif ?> elements/quotation/images/iconSmall.svg 0000644 00000000475 15175623007 0014326 0 ustar 00 <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#444" d="M9.5,5.5v5c0,3.4-2.5,5-5,5v-1.3c1.8-0.3,2.6-1.7,2.5-3.7H4.5v-5H9.5z" /> <path fill="none" stroke="#444" d="M16.5,5.5v5c0,3.4-2.5,5-5,5v-1.3c1.8-0.3,2.6-1.7,2.5-3.7h-2.5v-5 H16.5z" /> </svg> elements/quotation/images/icon.svg 0000644 00000000510 15175623007 0013323 0 ustar 00 <svg width="30" height="30" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#444" stroke-width="2" d="M13,7v8c0,5.4-4,9-8,9v-3.1c2.9-0.5,4.2-2.7,4-5.9 H5V7H13z" /> <path fill="none" stroke="#444" stroke-width="2" d="M25,7v8c0,5.4-4,9-8,9v-3.1c2.9-0.5,4.2-2.7,4-5.9 h-4V7H25z" /> </svg> elements/quotation/templates/content.php 0000644 00000000771 15175623007 0014577 0 ustar 00 <?php if ($props['content'] != '') : ?> <blockquote> <?= $props['content'] ?> <?php if ($props['footer'] || $props['author']) : ?> <footer> <?= $props['footer'] ?> <?php if ($props['author'] && $props['link']) : ?> <cite><a href="<?= $props['link'] ?>"><?= $props['author'] ?></a></cite> <?php elseif ($props['author']) : ?> <cite><?= $props['author'] ?></cite> <?php endif ?> </footer> <?php endif ?> </blockquote> <?php endif ?> elements/quotation/templates/template.php 0000644 00000001274 15175623007 0014737 0 ustar 00 <?php $el = $this->el('blockquote', [ 'class' => [ 'uk-margin-remove {@position: absolute}', ], ]); // Link $link = $this->el('a', [ 'class' => [ 'uk-link-{link_style}', ], 'href' => ['{link}'], 'target' => ['_blank {@link_target}'], ]); ?> <?= $el($props, $attrs) ?> <?= $props['content'] ?> <?php if ($props['footer'] || $props['author']) : ?> <footer class="el-footer"> <?= $props['footer'] ?> <?php if ($props['author']) : ?> <cite class="el-author"><?= $props['link'] ? $link($props, $props['author']) : $props['author'] ?></cite> <?php endif ?> </footer> <?php endif ?> <?= $el->end() ?> elements/quotation/updates.php 0000644 00000000245 15175623007 0012570 0 ustar 00 <?php namespace YOOtheme; return [ '1.20.0-beta.4' => function ($node) { Arr::updateKeys($node->props, ['maxwidth_align' => 'block_align']); }, ]; elements/quotation/element.json 0000644 00000013121 15175623007 0012733 0 ustar 00 { "@import": "./element.php", "name": "quotation", "title": "Quotation", "group": "basic", "icon": "${url:images/icon.svg}", "iconSmall": "${url:images/iconSmall.svg}", "element": true, "width": 500, "placeholder": { "props": { "content": "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." } }, "updates": "./updates.php", "templates": { "render": "./templates/template.php", "content": "./templates/content.php" }, "fields": { "content": { "label": "Content", "type": "editor", "source": true }, "author": { "label": "Author", "description": "Enter the author name.", "source": true }, "link": { "label": "Author Link", "attrs": { "placeholder": "http://" }, "source": true, "enable": "author" }, "link_target": { "type": "checkbox", "text": "Open in a new window", "enable": "author && link" }, "footer": { "label": "Footer", "description": "Enter an optional footer text.", "source": true }, "link_style": { "label": "Style", "description": "Select the link style.", "type": "select", "options": { "None": "", "Muted": "muted", "Text": "text", "Reset": "reset" }, "enable": "author && link" }, "position": "${builder.position}", "position_left": "${builder.position_left}", "position_right": "${builder.position_right}", "position_top": "${builder.position_top}", "position_bottom": "${builder.position_bottom}", "position_z_index": "${builder.position_z_index}", "blend": "${builder.blend}", "margin": "${builder.margin}", "margin_remove_top": "${builder.margin_remove_top}", "margin_remove_bottom": "${builder.margin_remove_bottom}", "maxwidth": "${builder.maxwidth}", "maxwidth_breakpoint": "${builder.maxwidth_breakpoint}", "block_align": "${builder.block_align}", "block_align_breakpoint": "${builder.block_align_breakpoint}", "block_align_fallback": "${builder.block_align_fallback}", "text_align": "${builder.text_align_justify}", "text_align_breakpoint": "${builder.text_align_breakpoint}", "text_align_fallback": "${builder.text_align_justify_fallback}", "animation": "${builder.animation}", "_parallax_button": "${builder._parallax_button}", "visibility": "${builder.visibility}", "name": "${builder.name}", "status": "${builder.status}", "source": "${builder.source}", "id": "${builder.id}", "class": "${builder.cls}", "attributes": "${builder.attrs}", "css": { "label": "CSS", "description": "Enter your own custom CSS. The following selectors will be prefixed automatically for this element: <code>.el-element</code>, <code>.el-footer</code>, <code>.el-author</code>", "type": "editor", "editor": "code", "mode": "css", "attrs": { "debounce": 500, "hints": [".el-element", ".el-footer", ".el-author"] } }, "transform": "${builder.transform}" }, "fieldset": { "default": { "type": "tabs", "fields": [ { "title": "Content", "fields": ["content", "author", "link", "link_target", "footer"] }, { "title": "Settings", "fields": [ { "label": "Link", "type": "group", "divider": true, "fields": ["link_style"] }, { "label": "General", "type": "group", "fields": [ "position", "position_left", "position_right", "position_top", "position_bottom", "position_z_index", "blend", "margin", "margin_remove_top", "margin_remove_bottom", "maxwidth", "maxwidth_breakpoint", "block_align", "block_align_breakpoint", "block_align_fallback", "text_align", "text_align_breakpoint", "text_align_fallback", "animation", "_parallax_button", "visibility" ] } ] }, "${builder.advanced}" ] } } } elements/quotation/element.php 0000644 00000000352 15175623007 0012553 0 ustar 00 <?php namespace YOOtheme; return [ 'transforms' => [ 'render' => function ($node) { // Don't render element if content fields are empty return (bool) $node->props['content']; }, ], ]; elements/slideshow/updates.php 0000644 00000021373 15175623007 0012553 0 ustar 00 <?php namespace YOOtheme; return [ '4.5.0-beta.0.1' => function ($node) { unset($node->props['nav_color']); unset($node->props['slidenav_outside_color']); }, '4.3.0-beta.0.5' => function ($node, $params) { if ($height = Arr::get($node->props, 'slideshow_height')) { if ($height === 'full' || $height === 'percent') { $node->props['slideshow_height'] = 'viewport'; } if ($height === 'percent') { $node->props['slideshow_height_viewport'] = 80; } if ( ($params['updateContext']['sectionIndex'] ?? 0) < 2 && empty($params['updateContext']['height']) ) { $node->props['slideshow_height_offset_top'] = true; } $params['updateContext']['height'] = true; } }, '2.8.0-beta.0.13' => function ($node) { foreach (['title_style', 'meta_style', 'content_style'] as $prop) { if (in_array(Arr::get($node->props, $prop), ['meta', 'lead'])) { $node->props[$prop] = 'text-' . Arr::get($node->props, $prop); } } }, '2.8.0-beta.0.3' => function ($node) { foreach (['overlay', 'title', 'meta', 'content', 'link'] as $prefix) { foreach (['x', 'y', 'scale', 'rotate', 'opacity'] as $prop) { $key = "{$prefix}_parallax_{$prop}"; $start = implode( ',', array_map('trim', explode(',', Arr::get($node->props, "{$key}_start", ''))), ); $end = implode( ',', array_map('trim', explode(',', Arr::get($node->props, "{$key}_end", ''))), ); if ($start !== '' || $end !== '') { $default = in_array($prop, ['scale', 'opacity']) ? 1 : 0; $values = [ $start !== '' ? $start : $default, $default, $end !== '' ? $end : $default, ]; Arr::set($node->props, $key, implode(',', $values)); } Arr::del($node->props, "{$key}_start"); Arr::del($node->props, "{$key}_end"); } } }, '2.3.0-beta.1.1' => function ($node) { /** @var Config $config */ $config = app(Config::class); [$style] = explode(':', $config('~theme.style')); if ($style == 'fjord') { if (Arr::get($node->props, 'overlay_container') === 'default') { $node->props['overlay_container'] = 'large'; } } }, '2.1.0-beta.0.1' => function ($node) { if (Arr::get($node->props, 'overlay_width') === 'xxlarge') { $node->props['overlay_width'] = '2xlarge'; } }, '2.0.0-beta.5.1' => function ($node) { /** @var Config $config */ $config = app(Config::class); [$style] = explode(':', $config('~theme.style')); if (!in_array($style, ['jack-baker', 'morgan-consulting', 'vibe'])) { if (Arr::get($node->props, 'overlay_container') === 'large') { $node->props['overlay_container'] = 'xlarge'; } } if ( in_array($style, [ 'craft', 'district', 'florence', 'makai', 'matthew-taylor', 'pinewood-lake', 'summit', 'tomsen-brody', 'trek', 'vision', 'yard', ]) ) { if (Arr::get($node->props, 'overlay_container') === 'default') { $node->props['overlay_container'] = 'large'; } } }, '1.20.0-beta.1.1' => function ($node) { Arr::updateKeys($node->props, ['maxwidth_align' => 'block_align']); }, '1.20.0-beta.0.1' => function ($node) { if (Arr::get($node->props, 'title_style') === 'heading-hero') { $node->props['title_style'] = 'heading-xlarge'; } if (Arr::get($node->props, 'title_style') === 'heading-primary') { $node->props['title_style'] = 'heading-medium'; } /** @var Config $config */ $config = app(Config::class); [$style] = explode(':', $config('~theme.style')); if ( in_array($style, [ 'craft', 'district', 'jack-backer', 'tomsen-brody', 'vision', 'florence', 'max', 'nioh-studio', 'sonic', 'summit', 'trek', ]) ) { if ( Arr::get($node->props, 'title_style') === 'h1' || (empty($node->props['title_style']) && Arr::get($node->props, 'title_element') === 'h1') ) { $node->props['title_style'] = 'heading-small'; } } if (in_array($style, ['florence', 'max', 'nioh-studio', 'sonic', 'summit', 'trek'])) { if (Arr::get($node->props, 'title_style') === 'h2') { $node->props['title_style'] = Arr::get($node->props, 'title_element') === 'h1' ? '' : 'h1'; } elseif ( empty($node->props['title_style']) && Arr::get($node->props, 'title_element') === 'h2' ) { $node->props['title_style'] = 'h1'; } } if (in_array($style, ['fuse', 'horizon', 'joline', 'juno', 'lilian', 'vibe', 'yard'])) { if (Arr::get($node->props, 'title_style') === 'heading-medium') { $node->props['title_style'] = 'heading-small'; } } if ($style == 'copper-hill') { if (Arr::get($node->props, 'title_style') === 'heading-medium') { $node->props['title_style'] = Arr::get($node->props, 'title_element') === 'h1' ? '' : 'h1'; } elseif (Arr::get($node->props, 'title_style') === 'h1') { $node->props['title_style'] = Arr::get($node->props, 'title_element') === 'h2' ? '' : 'h2'; } elseif ( empty($node->props['title_style']) && Arr::get($node->props, 'title_element') === 'h1' ) { $node->props['title_style'] = 'h2'; } } if (in_array($style, ['trek', 'fjord'])) { if (Arr::get($node->props, 'title_style') === 'heading-medium') { $node->props['title_style'] = 'heading-large'; } } if (in_array($style, ['juno', 'vibe', 'yard'])) { if (Arr::get($node->props, 'title_style') === 'heading-xlarge') { $node->props['title_style'] = 'heading-medium'; } } if ( in_array($style, [ 'district', 'florence', 'flow', 'nioh-studio', 'summit', 'vision', ]) ) { if (Arr::get($node->props, 'title_style') === 'heading-xlarge') { $node->props['title_style'] = 'heading-large'; } } if ($style == 'lilian') { if (Arr::get($node->props, 'title_style') === 'heading-xlarge') { $node->props['title_style'] = 'heading-2xlarge'; } } }, '1.19.0-beta.0.1' => function ($node) { if (Arr::get($node->props, 'meta_align') === 'top') { $node->props['meta_align'] = 'above-title'; } if (Arr::get($node->props, 'meta_align') === 'bottom') { $node->props['meta_align'] = 'below-title'; } }, '1.18.10.3' => function ($node) { if (Arr::get($node->props, 'meta_align') === 'top') { if (!empty($node->props['meta_margin'])) { $node->props['title_margin'] = $node->props['meta_margin']; } $node->props['meta_margin'] = ''; } }, '1.18.10.1' => function ($node) { Arr::updateKeys($node->props, ['thumbnav_inline_svg' => 'thumbnav_svg_inline']); }, '1.18.0' => function ($node) { if ( !isset($node->props['slideshow_box_decoration']) && Arr::get($node->props, 'slideshow_box_shadow_bottom') === true ) { $node->props['slideshow_box_decoration'] = 'shadow'; } if ( !isset($node->props['meta_color']) && Arr::get($node->props, 'meta_style') === 'muted' ) { $node->props['meta_color'] = 'muted'; $node->props['meta_style'] = ''; } }, ]; elements/slideshow/templates/template-slidenav.php 0000644 00000004635 15175623007 0016524 0 ustar 00 <?php $slidenav = $this->el('a', [ 'class' => [ 'el-slidenav', 'uk-slidenav-large {@slidenav_large}', ], 'href' => '#', // WordPress Preview reloads if `href` is empty ]); $attrs_slidenav_next = [ 'uk-slidenav-next' => true, 'uk-slideshow-item' => 'next', ]; $attrs_slidenav_previous = [ 'uk-slidenav-previous' => true, 'uk-slideshow-item' => 'previous', ]; $slidenav_container = $this->el('div', [ 'class' => [ 'uk-visible@{slidenav_breakpoint}', 'uk-hidden-hover uk-hidden-touch {@slidenav_hover}', // Initial text color 'uk-{text_color} {@!slidenav: outside}', ], 'uk-inverse' => true, ]); if (in_array($props['slidenav'], ['default', 'outside'])) { $slidenav_container->attr([ 'class' => [ 'uk-position-{slidenav_margin}', ], ]); $attrs_slidenav_container_next = [ 'class' => [ 'uk-position-center-right {@slidenav: default}', 'uk-position-center-right-out {@slidenav: outside}', ], 'uk-toggle' => [ 'cls: uk-position-center-right-out uk-position-center-right; mode: media; media: @{slidenav_outside_breakpoint} {@slidenav: outside}', ], ]; $attrs_slidenav_container_previous = [ 'class' => [ 'uk-position-center-left {@slidenav: default}', 'uk-position-center-left-out {@slidenav: outside}', ], 'uk-toggle' => [ 'cls: uk-position-center-left-out uk-position-center-left; mode: media; media: @{slidenav_outside_breakpoint} {@slidenav: outside}', ], ]; } else { $slidenav_container->attr([ 'class' => [ 'uk-slidenav-container uk-position-{slidenav} [uk-position-{slidenav_margin}]', ], ]); } ?> <?php if (!in_array($props['slidenav'], ['default', 'outside'])) : ?> <?= $slidenav_container($props) ?> <?= $slidenav($props, $attrs_slidenav_previous, '') ?> <?= $slidenav($props, $attrs_slidenav_next, '') ?> <?= $slidenav_container->end() ?> <?php else : ?> <?= $slidenav_container($props, $attrs_slidenav_container_previous) ?> <?= $slidenav($props, $attrs_slidenav_previous, '') ?> <?= $slidenav_container->end() ?> <?= $slidenav_container($props, $attrs_slidenav_container_next) ?> <?= $slidenav($props, $attrs_slidenav_next, '') ?> <?= $slidenav_container->end() ?> <?php endif ?>