uawdijnntqw1x1x1
IP : 216.73.216.84
Hostname : webm003.cluster107.gra.hosting.ovh.net
Kernel : Linux webm003.cluster107.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
OS : Linux
PATH:
/
home
/
opticamezl
/
www
/
newok
/
07d6c
/
.
/
..
/
.
/
cli
/
..
/
components
/
..
/
531c5
/
..
/
tmp
/
..
/
templates.tar
/
/
header-logo.php000064400000004733151666572300007465 0ustar00<?php use Joomla\CMS\Language\Text; // Config $logo = '~theme.logo'; $header = '~theme.header'; $mobile = '~theme.mobile'; // Link $attrs_link = []; $attrs_link['href'] = $config('~theme.site_url'); $attrs_link['aria-label'] = Text::_('TPL_YOOTHEME_BACK_TO_HOME'); $attrs_link['class'][] = $class ?? ''; $attrs_link['class'][] = 'uk-logo'; if ($position == 'logo' && preg_match('/^(horizontal|stacked-center-split-[ab])/', $config("$header.layout"))) { $attrs_link['class'][] = 'uk-navbar-item'; } if ($position == 'logo-mobile') { $attrs_link['class'][] = 'uk-navbar-item'; if ($config("$mobile.header.logo_padding_remove") && $config("$mobile.header.layout") != 'horizontal-center-logo') { $attrs_link['class'][] = 'uk-padding-remove-left'; } } // Function $logo_img = function ($image, $width, $height, array $attrs = []) use ($config, $logo) { $attrs['alt'] = Text::_($config("$logo.text", '')); $attrs['loading'] = ''; if ($this->isImage($image) === 'svg') { return $this->image($image, array_merge($attrs, ['width' => $width, 'height' => $height, 'uk-svg' => $config("$logo.image_svg_inline")])); } return $this->image([$image, 'thumbnail' => [$width, $height], 'srcset' => true], $attrs); }; // Logo $logo_el = ''; if (in_array($position, ['dialog', 'dialog-mobile'])) { if ($config("$logo.image_dialog")) { $logo_el = $logo_img($config("$logo.image_dialog"), $config("$logo.image_dialog_width"), $config("$logo.image_dialog_height")); } } elseif ($position == 'logo-mobile' && $config("$logo.image_mobile")) { $logo_el = $logo_img($config("$logo.image_mobile"), $config("$logo.image_mobile_width"), $config("$logo.image_mobile_height")); // Inverse if ($config("$logo.image_mobile_inverse")) { $logo_el .= $logo_img($config("$logo.image_mobile_inverse"), $config("$logo.image_mobile_width"), $config("$logo.image_mobile_height"), ['class' => ['uk-logo-inverse']]); } } elseif ($config("$logo.image")) { $logo_el = $logo_img($config("$logo.image"), $config("$logo.image_width"), $config("$logo.image_height")); // Inverse if ($config("$logo.image_inverse")) { $logo_el .= $logo_img($config("$logo.image_inverse"), $config("$logo.image_width"), $config("$logo.image_height"), ['class' => ['uk-logo-inverse']]); } } else { $logo_el = Text::_($config("$logo.text", '')); } ?> <?php if ($logo_el) : ?> <a<?= $this->attrs($attrs_link) ?>> <?= $logo_el ?> </a> <?php endif ?> pagination.php000064400000001702151666572300007421 0ustar00<?php use Joomla\CMS\Language\Text; // Config $blog = '~theme.blog'; ?> <?php if ($pagination->pagesTotal > 1) : ?> <?php if ($config("$blog.navigation") == 'pagination') : ?> <?= $pagination->getPagesLinks() ?> <?php elseif ($config("$blog.navigation") == 'previous/next') : ?> <nav class="uk-margin-large"> <ul class="uk-pagination uk-margin-remove-bottom"> <?php if ($prevlink = $pagination->getData()->previous->link) : ?> <li><a href="<?= $prevlink ?>"><span uk-pagination-previous></span> <?= Text::_('JPREV') ?></a></li> <?php endif ?> <?php if ($nextlink = $pagination->getData()->next->link) : ?> <li class="uk-margin-auto-left"><a href="<?= $nextlink ?>"><?= Text::_('JNEXT') ?> <span uk-pagination-next></span></a></li> <?php endif ?> </ul> </nav> <?php endif ?> <?php endif ?> article-search.php000064400000000317151666572300010157 0ustar00<?php // The template for displaying articles on the search page. ?> <article class="uk-article"> <?php if ($title) : ?> <h2><?= $title ?></h2> <?php endif ?> <?= $content ?> </article> article-page.php000064400000005330151666572300007626 0ustar00<?php // The template for displaying uncategorized articles. use Joomla\CMS\Language\Text; use Joomla\CMS\Uri\Uri; ?> <article id="article-<?= $article->id ?>" class="uk-article"<?= $this->attrs(['data-permalink' => $permalink]) ?> typeof="Article" vocab="https://schema.org/"> <meta property="name" content="<?= $this->e($title) ?>"> <meta property="author" typeof="Person" content="<?= $this->e($article->author) ?>"> <meta property="dateModified" content="<?= $this->date($article->modified, 'c') ?>"> <meta property="datePublished" content="<?= $this->date($article->publish_up, 'c') ?>"> <meta class="uk-margin-remove-adjacent" property="articleSection" content="<?= $this->e($article->category_title) ?>"> <?php if ($image) : ?> <div class="uk-margin-large-bottom" property="image" typeof="ImageObject"> <meta property="url" content="<?= Uri::base() . $image->attrs['src'] ?>"> <?php if ($image->link) : ?> <a href="<?= $image->link ?>"><img<?= $this->attrs($image->attrs) ?>></a> <?php else : ?> <img<?= $this->attrs($image->attrs) ?>> <?php endif ?> </div> <?php endif ?> <?php if ($title) : ?> <h1 class="uk-article-title"><?= $title ?></h1> <?php endif ?> <?= $view('~theme/templates/meta', ['meta_style' => 'sentence', 'margin' => '', 'header_align' => false] + $params->toArray()) ?> <?php if ($event) echo $event->afterDisplayTitle ?> <?php if ($event) echo $event->beforeDisplayContent ?> <div class="uk-margin-medium" property="text"><?= $content ?></div> <?php if ($tags) : ?> <p class="uk-margin-medium"><?= Text::sprintf('TPL_YOOTHEME_TAGS', $tags) ?></p> <?php endif ?> <?php if ($readmore) : ?> <p class="uk-margin-medium"> <a class="uk-button uk-button-text" href="<?= $readmore->link ?>"><?= $readmore->text ?></a> </p> <?php endif ?> <?php if ($created || $modified || $hits) : ?> <ul class="uk-list"> <?php if ($created) : ?> <li><?= Text::sprintf('TPL_YOOTHEME_META_DATE_CREATED', $created) ?></li> <?php endif ?> <?php if ($modified) : ?> <li><?= Text::sprintf('TPL_YOOTHEME_META_DATE_MODIFIED', $modified) ?></li> <?php endif ?> <?php if ($hits) : ?> <li><?= Text::sprintf('TPL_YOOTHEME_META_HITS', $hits) ?></li> <?php endif ?> </ul> <?php endif ?> <?php if ($icons) : ?> <ul class="uk-subnav"> <?php foreach ($icons as $icon) : ?> <li><?= $icon ?></li> <?php endforeach ?> </ul> <?php endif ?> <?php if ($pagination) : ?> <?= $pagination ?> <?php endif ?> <?php if ($event) echo $event->afterDisplayContent ?> </article> socials.php000064400000003502151666572300006725 0ustar00<?php $mobile = str_ends_with($position, '-mobile'); $header = '~theme.' . ($mobile ? 'mobile.header' :'header'); $links = (array) $config("{$header}.social_items", []); $list = $this->el('ul', [ 'class' => [ 'uk-grid uk-flex-inline uk-flex-middle uk-flex-nowrap', 'uk-grid-{social_gap}' ], ]); $anchor = $this->el('a', [ 'href' => ['{link}'], 'class' => [ 'uk-preserve-width', $config("{$header}.social_style") ? 'uk-icon-button' : 'uk-icon-link' ], 'rel' => 'noreferrer', 'target' => ['_blank' => $config("{$header}.social_target")], 'aria-label' => ['{link_aria_label}'], ]); ?> <?php if (count($links)) : ?> <?= $list($config($header)) ?> <?php foreach ($links as $link) : // Image if (!empty($link['image'])) { $icon = $this->el('image', [ 'src' => $link['image'], 'alt' => true, 'loading' => false, 'width' => $config("{$header}.social_width") ?: 20, 'height' => $config("{$header}.social_width") ?: 20, 'uk-svg' => $config("{$header}.social_image_svg_inline"), 'thumbnail' => true, ]); // Icon } else { $icon = $this->el('span', [ 'uk-icon' => [ 'icon: {0};' => ($link['icon'] ?? '') ?: $this->e($link['link'] ?? '', 'social'), 'width: {0};' => $config("{$header}.social_width"), 'height: {0};' => $config("{$header}.social_width"), ], ]); } ?> <li><?= $anchor($link, $icon([], '')) ?></li> <?php endforeach ?> <?= $list->end() ?> <?php endif ?> sidebar.php000064400000000634151666572300006704 0ustar00<?php // Config $sidebar = '~theme.main_sidebar'; // Attrs $id = 'tm-sidebar'; $class = ["tm-sidebar uk-width-{$config("$sidebar.width")}@{$config("$sidebar.breakpoint")}"]; if ($config("$sidebar.first")) { $class[] = "uk-flex-first@{$config("$sidebar.breakpoint")}"; } ?> <aside<?= $this->attrs(compact('id', 'class')) ?>> <jdoc:include type="modules" name="sidebar" style="grid-stack" /> </aside> article.php000064400000013723151666572300006721 0ustar00<?php // The template for displaying categorized articles. use Joomla\CMS\Language\Text; use Joomla\CMS\Uri\Uri; use YOOtheme\Str; $attrs_container = []; // Image $attrs_image['class'][] = 'uk-text-center'; $attrs_image['class'][] = $this->margin($params['image_margin']); // Container if ((!isset($columns) || $columns == 1) && $params['content_width'] && ($params['content_width'] != $params['width'])) { $attrs_container['class'][] = "uk-container uk-container-{$params['content_width']}"; } // Title $title_element = !$single ? 'h2' : 'h1'; $attrs_title['property'] = 'headline'; $attrs_title['class'][] = "{$this->margin($params['title_margin'])} uk-margin-remove-bottom"; $attrs_title['class'][] = $params['header_align'] ? 'uk-text-center' : ''; $attrs_title['class'][] = $params['title_style'] ? "uk-{$params['title_style']}" : 'uk-article-title'; // Content $attrs_content['class'][] = $this->margin($params['content_margin']); $attrs_content['class'][] = $params['content_align'] ? 'uk-text-center' : ''; $attrs_content['class'][] = $single && $params['content_dropcap'] ? 'uk-dropcap' : ''; // Tags $attrs_tags['class'][] = $params['header_align'] ? 'uk-text-center' : ''; // Button $attrs_button['class'][] = "uk-button uk-button-{$params['button_style']}"; $attrs_button_container['class'][] = $params['header_align'] ? 'uk-text-center' : ''; $attrs_button_container['class'][] = "uk-margin-{$params['button_margin']}"; // Image template $imagetpl = function ($attr) use ($image, $params) { if (!$image) { return ''; } $width = $params['image_width']; $height = $params['image_height']; $attrs = [ 'loading' => 'lazy', 'alt' => $image->attrs['alt'], 'class' => $image->attrs['class'], ]; if ($this->isImage($image->attrs['src']) == 'svg') { $img = $this->image($image->attrs['src'], compact('width', 'height') + $attrs); } else { $img = $this->image([$image->attrs['src'], 'thumbnail' => [$width, $height], 'srcset' => true], $attrs); } ?> <div<?= $this->attrs($attr) ?> property="image" typeof="ImageObject"> <meta property="url" content="<?= Uri::base() . $image->attrs['src'] ?>"> <?php if ($image->link) : ?> <a href="<?= $image->link ?>"><?= $img ?></a> <?php else : ?> <?= $img ?> <?php endif ?> </div> <?php }; ?> <article id="article-<?= $article->id ?>" class="uk-article"<?= $this->attrs(['data-permalink' => $permalink]) ?> typeof="Article" vocab="https://schema.org/"> <meta property="name" content="<?= $this->e(strip_tags($title ?? '')) ?>"> <meta property="author" typeof="Person" content="<?= $this->e($article->author) ?>"> <meta property="dateModified" content="<?= $this->date($article->modified, 'c') ?>"> <meta property="datePublished" content="<?= $this->date($article->publish_up, 'c') ?>"> <meta class="uk-margin-remove-adjacent" property="articleSection" content="<?= $this->e($article->category_title) ?>"> <?php if ($params['image_align'] == 'top') : ?> <?php $imagetpl($attrs_image) ?> <?php endif ?> <?php if ($attrs_container) : ?> <div<?= $this->attrs($attrs_container) ?>> <?php endif ?> <?php if (!$article->params['info_block_position']) : ?> <?= $view('~theme/templates/meta') ?> <?php endif ?> <?php if ($title) : ?> <<?= $title_element . $this->attrs($attrs_title) ?>> <?= $title ?> </<?= $title_element ?>> <?php endif ?> <?php if ($article->params['info_block_position']) : ?> <?= $view('~theme/templates/meta') ?> <?php endif ?> <?php if ($event) echo $event->afterDisplayTitle ?> <?php if ($params['image_align'] == 'between') : ?> <?php if ($attrs_container) : ?> </div> <?php endif ?> <?php $imagetpl($attrs_image) ?> <?php if ($attrs_container) : ?> <div<?= $this->attrs($attrs_container) ?>> <?php endif ?> <?php endif ?> <?php if ($event) echo $event->beforeDisplayContent ?> <?php if ($content) : ?> <div <?= $this->attrs($attrs_content) ?> property="text"> <?php if (!empty($article->toc)) : ?> <?= $article->toc ?> <?php endif ?> <?php if (is_numeric($params['content_length']) && $params['content_length'] >= 0) : ?> <?= Str::limit(strip_tags($content), $params['content_length'], '...', false) ?> <?php else : ?> <?= $content ?> <?php endif ?> </div> <?php endif ?> <?php if ($tags) : ?> <p<?= $this->attrs($attrs_tags) ?>><?= $tags ?></p> <?php endif ?> <?php if ($readmore) : ?> <p<?= $this->attrs($attrs_button_container) ?>> <a <?= $this->attrs($attrs_button) ?> href="<?= $readmore->link ?>"><?= $readmore->text ?></a> </p> <?php endif ?> <?php if ($created || $modified || $hits) : ?> <ul class="uk-list"> <?php if ($created) : ?> <li><?= Text::sprintf('TPL_YOOTHEME_META_DATE_CREATED', $created) ?></li> <?php endif ?> <?php if ($modified) : ?> <li><?= Text::sprintf('TPL_YOOTHEME_META_DATE_MODIFIED', $modified) ?></li> <?php endif ?> <?php if ($hits) : ?> <li><?= Text::sprintf('TPL_YOOTHEME_META_HITS', $hits) ?></li> <?php endif ?> </ul> <?php endif ?> <?php if ($icons) : ?> <ul class="uk-subnav"> <?php foreach ($icons as $icon) : ?> <li><?= $icon ?></li> <?php endforeach ?> </ul> <?php endif ?> <?php if ($pagination) : ?> <?= $pagination ?> <?php endif ?> <?php if ($event) echo $event->afterDisplayContent ?> <?php if ($attrs_container) : ?> </div> <?php endif ?> </article> module.php000064400000011312151666572300006553 0ustar00<?php // Config $header = str_ends_with($position, '-mobile') ? '~theme.mobile.header' : '~theme.header'; $modules = "~theme.modules.{$module->id}"; $class = []; $badge = []; $title = []; $layout = $config("$header.layout"); // Set type in Joomla dummy module for template preview if (empty($module->type)) { $module->type = ''; } // Raw positions if ($position == 'debug' || ($position == 'navbar-split' && $module->type == 'menu') || (in_array($position, ['logo', 'logo-mobile']) && $module->type == 'logo') || $module->type == 'dialog-toggle' ) { echo $module->content; return; } // Navbar positions if (in_array($position, ['navbar', 'navbar-push', 'navbar-mobile', 'header-mobile']) || (in_array($position, ['header', 'header-split']) && str_starts_with($layout, 'horizontal')) || ($position == 'logo' && preg_match('/^(horizontal|stacked-center-split-[ab])/', $layout)) || $position == 'logo-mobile' ) { // Menu if ($module->type == 'menu' && in_array($config("$modules.menu_type"), ['', 'nav'])) { echo $module->content; return; } // Search if (in_array($module->type, ['search', 'finder']) && !str_starts_with($config("$header.search_layout"), 'input')) { echo $module->content; return; // Else } else { $class[] = 'uk-navbar-item'; if (in_array($module->type, ['search', 'finder']) && !str_starts_with($config("$header.search", ''), 'dialog') && str_starts_with($config("$header.search_layout"), 'input') && preg_match('/^horizontal-(left|center|right)|stacked-left$/', $layout) && $config("$header.search_expand")) { $class[] = 'uk-flex-1'; } } // No style positions } elseif (preg_match('/^(toolbar-(left|right)|logo|header(-split)?|dialog(-mobile)?(-push)?)$/', $position)) { $class[] = 'uk-panel'; // Style positions (Top, Bottom, Sidebar, Builder 1-6) } else { $class[] = $config("$modules.style") ? "uk-card uk-card-body uk-{$config("$modules.style")}" : 'uk-panel'; } // Class if ($cls = $config("$modules.class")) { $class = array_merge($class, (array) $cls); } // Visibility if ($visibility = $config("$modules.visibility")) { $class[] = "uk-visible@{$visibility}"; } // Grid + sidebar positions (and any custom position) if (!preg_match('/^(toolbar-(left|right)|logo(-mobile)?|navbar(-split|-push|-mobile)?|header(-split|-mobile)?|debug)$/', $position)) { // Title? if ($config("$modules.showtitle") && !empty($module->title)) { $title['class'] = []; $title_element = $config("$modules.title_tag", 'h3'); // Style? $title['class'][] = $config("$modules.title_style") ? "uk-{$config("$modules.title_style")}" : ''; $title['class'][] = $config("$modules.style") && !$config("$modules.title_style") ? 'uk-card-title' : ''; // Decoration? $title['class'][] = $config("$modules.title_decoration") ? "uk-heading-{$config("$modules.title_decoration")}" : ''; // Header Class? $title['class'][] = $config("$modules.title_class", ''); } // Text alignment if ($config("$modules.text_align") && $config("$modules.text_align") != 'justify' && $config("$modules.text_align_breakpoint")) { $class[] = "uk-text-{$config("$modules.text_align")}@{$config("$modules.text_align_breakpoint")}"; if ($config("$modules.text_align_fallback")) { $class[] = "uk-text-{$config("$modules.text_align_fallback")}"; } } elseif ($config("$modules.text_align")) { $class[] = "uk-text-{$config("$modules.text_align")}"; } } // List options $list_class = []; if ($config("$modules.is_list")) { $list_class[] = 'tm-child-list'; // List Style? if ($config("$modules.list_style")) { $list_class[] = "tm-child-list-{$config("$modules.list_style")}"; } // Link Style? if ($config("$modules.link_style")) { $list_class[] = "uk-link-{$config("$modules.link_style")}"; } } // Grid positions if (preg_match('/^(top|bottom|builder-\d+)$/', $position)) { // Max Width? if ($config("$modules.maxwidth")) { $class[] = "uk-width-{$config("$modules.maxwidth")}"; // Center? if ($config("$modules.maxwidth_align")) { $class[] = 'uk-margin-auto'; } } } ?> <div<?= $this->attrs(compact('class'), ['class' => $list_class], $module->attrs) ?>> <?php if ($title) : ?> <<?= $title_element ?><?= $this->attrs($title) ?>> <?php if ($config("$modules.title_decoration") == 'line') : ?> <span><?= $module->title ?></span> <?php else: ?> <?= $module->title ?> <?php endif ?> </<?= $title_element ?>> <?php endif ?> <?= $module->content ?> </div> header-dialog.php000064400000004204151666572300007755 0ustar00<?php use Joomla\CMS\Language\Text; // Toggle $attrs_toggle = ['uk-toggle' => true]; if (in_array($position, ['navbar', 'navbar-push', 'header', 'header-push'])) { // Config $header = '~theme.header'; $dialog = '~theme.dialog'; $countModules = $this->countModules('dialog') || str_starts_with($config("$header.search", ''), 'dialog') || str_starts_with($config("$header.social", ''), 'dialog'); $attrs_toggle['href'] ='#tm-dialog'; if (str_starts_with($config("$header.layout"), 'stacked') && in_array($position, ['header', 'header-push'])) { $attrs_toggle['class'][] = 'uk-icon-link'; } else { $attrs_toggle['class'][] = 'uk-navbar-toggle'; } $attrs_toggle['class'][] = str_starts_with($config("$dialog.layout"), 'dropbar') ? 'uk-navbar-toggle-animate' : ''; } elseif (in_array($position, ['navbar-mobile', 'header-mobile'])) { // Config $header = '~theme.mobile.header'; $dialog = '~theme.mobile.dialog'; $countModules = $this->countModules('dialog-mobile') || str_starts_with($config("$header.search", ''), 'dialog') || str_starts_with($config("$header.social", ''), 'dialog'); $attrs_toggle['href'] ='#tm-dialog-mobile'; $attrs_toggle['class'][] = 'uk-navbar-toggle'; $attrs_toggle['class'][] = str_starts_with($config("$dialog.layout"), 'dropbar') ? 'uk-navbar-toggle-animate' : ''; } ?> <?php // Mind that `$this->countModules()` does not count the custom created modules (logo, search, socials) because this file is called from the module/widget listener ?> <?php if ($countModules) : ?> <a<?= $this->attrs($attrs_toggle) ?>> <?php if ($config("$dialog.toggle_text") && explode(':', $config("$dialog.toggle"), 2)[1] == 'end') : ?> <span class="uk-margin-small-right uk-text-middle"><?= Text::_('TPL_YOOTHEME_MENU') ?></span> <?php endif ?> <div uk-navbar-toggle-icon></div> <?php if ($config("$dialog.toggle_text") && explode(':', $config("$dialog.toggle"), 2)[1] == 'start') : ?> <span class="uk-margin-small-left uk-text-middle"><?= Text::_('TPL_YOOTHEME_MENU') ?></span> <?php endif ?> </a> <?php endif ?> section.php000064400000017605151666572300006745 0ustar00<?php // Config $section = "~theme.{$name}"; // Empty ? if (!$this->countModules($name) || !$config($section)) { return; } $class = ["tm-{$name}"]; $style = [ "background-color: {$config("$section.background_color")};" => $config("$section.background_color") && !$config("$section.media_background") && !$config("$section.video") && !$config("$section.style"), ]; $attrs = []; $attrs_overlay = []; $attrs_container = []; $attrs_viewport_height = []; $attrs_image = []; $attrs_video = []; $attrs_section = []; $attrs['tm-header-transparent-noplaceholder'] = $config("$section.header_transparent_noplaceholder"); // Section $class[] = $config("$section.style") ? "uk-section-{$config("$section.style")}" : ''; $class[] = $config("$section.overlap") ? 'uk-section-overlap' : ''; $attrs_section['class'][] = 'uk-section'; // Image if ($config("$section.image")) { $attrs_image = $this->bgImage($config("$section.image"), [ 'width' => $config("$section.image_width"), 'height' => $config("$section.image_height"), 'focal_point' => $config("$section.media_focal_point"), 'loading' => $config("$section.image_loading") ? 'eager' : null, 'size' => $config("$section.image_size"), 'position' => $config("$section.image_position"), 'visibility' => $config("$section.media_visibility"), 'blend_mode' => $config("$section.media_blend_mode"), 'background' => $config("$section.media_background"), 'effect' => $config("$section.image_fixed") ? 'fixed' : false, ]); // Overlay if ($config("$section.media_overlay")) { $class[] = 'uk-position-relative'; $attrs_overlay['style'] = "background-color: {$config("$section.media_overlay")};"; } } // Video if ($config("$section.video") && !$config("$section.image")) { // Settings $style[] = $config("$section.media_background") ? "background-color: {$config("$section.media_background")};" : ''; $attrs_video['class'][] = $config("$section.media_blend_mode") ? "uk-blend-{$config("$section.media_blend_mode")}" : ''; $attrs_video['class'][] = $config("$section.media_visibility") ? "uk-visible@{$config("$section.media_visibility")}" : ''; // Cover $class[] = 'uk-cover-container'; // Overlay $attrs_overlay['style'] = $config("$section.media_overlay") ? "background-color: {$config("$section.media_overlay")};" : ''; // Video $attrs_video['width'] = $config("$section.video_width"); $attrs_video['height'] = $config("$section.video_height"); $attrs_video['uk-cover'] = true; if ($iframe = $this->iframeVideo($config("$section.video"))) { $attrs_video['class'][] = 'uk-disabled'; $attrs_video['src'] = $iframe; $video = "<iframe{$this->attrs($attrs_video)}></iframe>"; } else { $attrs_video['src'] = $config("$section.video"); $attrs_video['controls'] = false; $attrs_video['loop'] = true; $attrs_video['autoplay'] = true; $attrs_video['muted'] = true; $attrs_video['playsinline'] = true; $attrs_video['class'][] = $config("$section.media_focal_point") ? "uk-object-{$config("$section.media_focal_point")}" : ''; $video = "<video{$this->attrs($attrs_video)}></video>"; } } else { $video = ''; } // Text color $class[] = $config("$section.preserve_color") || ($config("$section.text_color") && ($config("$section.image") || $config("$section.video"))) ? 'uk-preserve-color' : ''; if (!$config("$section.style") || $config("$section.image") || $video) { $class[] = $config("$section.text_color") ? "uk-{$config("$section.text_color")}" : ''; } if ($config("$section.header_transparent") && ($config("$section.text_color") != $config("$section.header_transparent_text_color") || !($config("$section.style") || $config("$section.image") || $video))) { $class[] = $config("$section.header_transparent_text_color") ? "uk-inverse-{$config("$section.header_transparent_text_color")}" : ''; } // Padding switch ($config("$section.padding")) { case '': break; case 'none': $attrs_section['class'][] = 'uk-padding-remove-vertical'; break; default: $attrs_section['class'][] = "uk-section-{$config("$section.padding")}"; } if ($config("$section.padding") != 'none') { if ($config("$section.padding_remove_top")) { $attrs_section['class'][] = 'uk-padding-remove-top'; } if ($config("$section.padding_remove_bottom")) { $attrs_section['class'][] = 'uk-padding-remove-bottom'; } } // Height Viewport if ($config("$section.height")) { if ($config("$section.height") == 'page') { $attrs_section['uk-height-viewport'] = 'expand: true'; } else { // Vertical alignment if ($config("$section.vertical_align") && $config("$section.height")) { $attrs_section['class'][] = "uk-flex uk-flex-{$config("$section.vertical_align")}"; $attrs_viewport_height['class'][] = 'uk-width-1-1'; } $offsetTop = $config("$section.height_offset_top"); if ($config("$section.height") == 'viewport' && $config("$section.height_viewport") > 100) { $offsetTop = false; } if ($config("$section.height") == 'viewport' && !$offsetTop) { if (in_array($config("$section.height_viewport"), ['', 100])) { $attrs_section['class'][] = 'uk-height-viewport'; } elseif (in_array($config("$section.height_viewport"), [200, 300, 400])) { $attrs_section['class'][] = 'uk-height-viewport-' . ((int) $config("$section.height_viewport") / 100); } else { $attrs_section['style'] = sprintf('min-height: %dvh;', $config("$section.height_viewport")); } } else { $options = $offsetTop ? ['offset-top: true'] : []; switch ($config("$section.height")) { case 'viewport': if ($config("$section.height_viewport") && $config("$section.height_viewport") < 100) { $options[] = 'offset-bottom: ' . (100 - (int) $config("$section.height_viewport")); } break; case 'section': $options[] = $config("$section.image") ? 'offset-bottom: ! +' : 'offset-bottom: ~ * > [class*="uk-section"]'; break; } $attrs_section['uk-height-viewport'] = implode(';', array_filter($options)); } } } // Container and width switch ($config("$section.width")) { case 'default': $attrs_container['class'][] = 'uk-container'; break; case 'xsmall': case 'small': case 'large': case 'xlarge': case 'expand': $attrs_container['class'][] = "uk-container uk-container-{$config("$section.width")}"; } // Make sure overlay and video is always below content if ($attrs_overlay || $video) { $attrs_container['class'][] = $config("$section.width") ? 'uk-position-relative' : 'uk-position-relative uk-panel'; } ?> <div<?= $this->attrs(compact('class', 'style'), $attrs, !$attrs_image ? $attrs_section : []) ?>> <?php if ($attrs_image) : ?> <div<?= $this->attrs($attrs_image, $attrs_section) ?>> <?php endif ?> <?= $video ?> <?php if ($attrs_overlay) : ?> <div class="uk-position-cover"<?= $this->attrs($attrs_overlay) ?>></div> <?php endif ?> <?php if ($attrs_viewport_height) : ?> <div<?= $this->attrs($attrs_viewport_height) ?>> <?php endif ?> <?php if ($attrs_container) : ?> <div<?= $this->attrs($attrs_container) ?>> <?php endif ?> <?= $view('~theme/templates/position', ['style' => 'grid']) ?> <?php if ($attrs_container) : ?> </div> <?php endif ?> <?php if ($attrs_viewport_height) : ?> </div> <?php endif ?> <?php if ($attrs_image) : ?> </div> <?php endif ?> </div> position.php000064400000007212151666572300007136 0ustar00<?php $items = array_filter($items, fn($item) => !empty(trim($item->content ?? ''))); $render = function ($items, $wrap = null) use ($view, $name) { $output = []; foreach ($items as $index => $item) { $widget = $view('~theme/templates/module', ['index' => $index, 'module' => $item, 'position' => $name]); $output[] = $wrap ? $wrap([], $widget) : $widget; } return implode('', $output); }; // Blank if (empty($style)) { echo $render($items); return; } // Cell if ($style == 'cell') { echo $render($items, $this->el('div')); return; } // Logo and Header Position in Stacked Center layouts if ($style === 'grid-center') { if (count($items) > 1) { $attrs = [ 'class' => ['uk-grid-medium uk-child-width-auto uk-flex-center uk-flex-middle'], 'uk-grid' => true, ]; } else { $attrs = ['class' => ['uk-flex uk-flex-center']]; } echo "<div{$this->attrs($attrs)}>{$render($items, $this->el('div'))}</div>"; return; } // Logo and Header Position in Stacked Center C and Stacked Left layouts if ($style === 'grid-middle') { if (count($items) > 1) { echo "<div{$this->attrs([ 'class' => ['uk-grid-medium uk-child-width-auto uk-flex-middle'], 'uk-grid' => true, ])}>{$render($items, $this->el('div'))}</div>"; return; } echo $render($items); return; } // Section if ($style == 'section') { $section = []; foreach ($items as $item) { if (in_array($item->type ?? '', ['yootheme_builder', 'builderwidget'])) { if ($section) { echo $view('~theme/templates/section', ['name' => $name, 'items' => $section]); $section = []; } echo $item->content; } else { $section[] = $item; } } if ($section) { echo $view('~theme/templates/section', ['name' => $name, 'items' => $section]); } return; } // Grid if (count($items) < 2) { echo $render($items); return; } $grid = $position ?? $config("~theme.{$name}", []); $visibilities = ['xs', 's', 'm', 'l', 'xl']; $visible = 4; // Widgets/Modules $widgets = []; foreach ($items as $index => $item) { $visibility = $config("~theme.modules.{$item->id}.visibility"); $visible = min(array_search($visibility, $visibilities), $visible); $widget = $view('~theme/templates/module', ['index' => $index, 'module' => $item, 'position' => $name]); if (empty($widget)) { continue; } $widgets[] = $this->el( 'div', [ 'class' => [ 'uk-width-{0}@{breakpoint}' => $config("~theme.modules.{$item->id}.width"), 'uk-visible@{0}' => $visibility, ], ], $widget ); } $el = $this->el('div', [ 'class' => [ 'uk-grid', 'uk-grid-small' => $style == 'grid-stack-small', 'uk-child-width-1-1' => str_starts_with($style, 'grid-stack'), 'uk-child-width-expand@{breakpoint}' => !str_starts_with($style, 'grid-stack'), isset($grid['column_gap'], $grid['row_gap']) && $grid['column_gap'] == $grid['row_gap'] ? 'uk-grid-{column_gap}' : '[uk-grid-column-{column_gap}] [uk-grid-row-{row_gap}]', 'uk-grid-divider {@divider} {@!column_gap:collapse} {@!row_gap:collapse}', 'uk-flex-middle {@vertical_align}', 'uk-visible@{0}' => $visible ? $visibilities[$visible] : false, ], 'uk-grid' => count($items) > 1, 'uk-height-match' => ['target: .uk-card {@match}'], ]); ?> <?= $el($grid) ?> <?php foreach ($widgets as $widget) : ?> <?= $widget($grid) ?> <?php endforeach ?> <?= $el->end() ?> header-mobile.php000064400000034533151666572300007775 0ustar00<?php // Config $site = '~theme.site'; $header = '~theme.mobile.header'; $navbar = '~theme.mobile.navbar'; $dialog = '~theme.mobile.dialog'; $mobile = '~theme.mobile'; $navbar_default = '~theme.navbar'; // Options $layout = $config("$header.layout"); // Outside $outside = $config("$site.layout") == 'boxed' && $config("$site.boxed.header_outside"); // Header $attrs = []; $attrs['class'][] = 'tm-header-mobile'; $attrs['class'][] = $config("$mobile.breakpoint") ? "uk-hidden@{$config("$mobile.breakpoint")}" : ''; // Navbar Container $attrs_navbar_container = []; $attrs_navbar_container['class'][] = 'uk-navbar-container'; // Navbar $attrs_navbar = [ 'class' => [ 'uk-navbar', 'uk-navbar-justify' => $layout == 'horizontal-justify', ], 'uk-navbar' => [ 'align' => $config("$navbar_default.dropdown_align"), 'container' => $config("$header.transparent") && $config("$header.blend") ? ($outside ? '.tm-page-container' : '.tm-page') : '.tm-header-mobile', 'boundary' => '.tm-header-mobile .uk-navbar-container', // By default, it would be the navbar component's element 'target-x' => $config("$navbar_default.dropdown_target") ? '.tm-header-mobile .uk-navbar' : null, ], ]; if ($config("$navbar_default.dropbar")) { $attrs_navbar['uk-navbar']['target-y'] = '.tm-header-mobile .uk-navbar-container'; $attrs_navbar['uk-navbar']['dropbar'] = true; $attrs_navbar['uk-navbar']['dropbar-anchor'] = $config("$header.transparent") && $config("$header.blend") ? ($outside ? '.tm-page-container > .tm-page' : '.tm-page > main') : '.tm-header-mobile .uk-navbar-container'; // Has to be after navbar container because it has uk-light/dark $attrs_navbar['uk-navbar']['dropbar-transparent-mode'] = $config("$header.transparent") ? 'behind' : 'remove'; } // Sticky $attrs_sticky = []; if ($sticky = $config("$navbar.sticky")) { if ($config("$header.transparent") && $config("$header.blend")) { $attrs_navbar['uk-navbar']['close-on-scroll'] = true; } else { $attrs_navbar['uk-navbar']['container'] = '.tm-header-mobile > [uk-sticky]'; } $attrs_sticky = array_filter([ 'uk-sticky' => true, 'show-on-up' => $sticky == 2, 'animation' => $sticky == 2 ? 'uk-animation-slide-top' : '', 'cls-active' => 'uk-navbar-sticky', 'sel-target' => '.uk-navbar-container', ]); } $attrs_navbar['uk-navbar'] = json_encode(array_filter($attrs_navbar['uk-navbar'])); // Search Expand $search_expand = ''; if ($config("$header.search") && !str_starts_with($config("$header.search"), 'dialog') && str_starts_with($config("$header.search_layout"), 'input') && preg_match('/^horizontal-(left|center|right)$/', $layout) && $config("$header.search_expand")) { $layout = 'horizontal-justify'; $search_expand = 'uk-flex-1'; } // Transparent if ($config("$header.transparent")) { $attrs_navbar_container['class'][] = 'uk-navbar-transparent'; if ($config("$header.blend")) { $attrs['class'][] = 'uk-blend-difference uk-position-z-index-high'; $attrs_navbar_container['class'][] = 'uk-light'; } else { if ($config("$header.transparent_color_separately")) { $attrs['uk-inverse'] = 'target: .uk-navbar-left, .uk-navbar-center, .uk-navbar-right'; } else { $attrs['uk-inverse'] = 'target: .uk-navbar-container'; } $attrs_navbar_container['class'][] = 'uk-position-relative uk-position-z-index-high'; } } elseif (($config("$site.boxed.header_transparent") && $outside) || $config('header.section.transparent')) { if ($sticky) { $attrs_sticky['cls-inactive'] = 'uk-navbar-transparent'; if ($sticky == 1) { $attrs_sticky['animation'] = 'uk-animation-slide-top'; } } else { $attrs_navbar_container['class'][] = 'uk-navbar-transparent'; } } if ($outside) { if (!$config("$header.transparent") && $config("$site.boxed.header_transparent")) { $attrs['uk-inverse'] = 'target: .uk-navbar-container; sel-active: .uk-navbar-transparent'; if ($sticky) { $attrs_sticky['top'] = '300'; } } } elseif ($config("$header.transparent") || $config('header.section.transparent')) { $attrs['uk-header'] = true; $attrs['class'][] = 'tm-header-overlay'; if (!$config("$header.transparent")) { $attrs['uk-inverse'] = 'target: .uk-navbar-container; sel-active: .uk-navbar-transparent'; if ($sticky) { $attrs_sticky['tm-section-start'] = true; } } } // Width Container $attrs_width_container = []; $attrs_width_container['class'][] = 'uk-container uk-container-expand'; ?> <?php if ($this->countModules('logo-mobile') || $this->countModules('navbar-mobile') || $this->countModules('header-mobile')) :?> <header<?= $this->attrs($attrs) ?>> <?php // Horizontal layouts if (str_starts_with($layout, 'horizontal')) : $attrs_width_container['class'][] = $this->countModules('logo-mobile') && $config("$header.logo_padding_remove") && $layout != 'horizontal-center-logo' ? 'uk-padding-remove-left' : ''; ?> <?php if ($sticky) : ?> <div<?= $this->attrs($attrs_sticky) ?>> <?php endif ?> <div<?= $this->attrs($attrs_navbar_container) ?>> <div<?= $this->attrs($attrs_width_container) ?>> <nav<?= $this->attrs($attrs_navbar) ?>> <?php if (($layout != 'horizontal-center-logo' && $this->countModules('logo-mobile')) || (preg_match('/^horizontal-(left|justify|center-logo)/', $layout) && $this->countModules('navbar-mobile')) || ($layout == 'horizontal-justify' && $this->countModules('header'))) : ?> <div class="uk-navbar-left <?= $search_expand ?>"> <?php if ($layout != 'horizontal-center-logo') : ?> <jdoc:include type="modules" name="logo-mobile" /> <?php endif ?> <?php if (preg_match('/^horizontal-(left|justify|center-logo)/', $layout)) : ?> <jdoc:include type="modules" name="navbar-mobile" /> <?php endif ?> <?php if ($layout == 'horizontal-justify') : ?> <jdoc:include type="modules" name="header-mobile" /> <?php endif ?> </div> <?php endif ?> <?php if (($layout == 'horizontal-center-logo' && $this->countModules('logo-mobile')) || ($layout == 'horizontal-center' && $this->countModules('navbar-mobile'))) : ?> <div class="uk-navbar-center"> <?php if ($layout == 'horizontal-center-logo') : ?> <jdoc:include type="modules" name="logo-mobile" /> <?php endif ?> <?php if ($layout == 'horizontal-center') : ?> <jdoc:include type="modules" name="navbar-mobile" /> <?php endif ?> </div> <?php endif ?> <?php if (($layout != 'horizontal-justify' && $this->countModules('header-mobile')) || ($layout == 'horizontal-right' && $this->countModules('navbar-mobile'))) : ?> <div class="uk-navbar-right"> <?php if ($layout == 'horizontal-right') : ?> <jdoc:include type="modules" name="navbar-mobile" /> <?php endif ?> <?php if ($layout != 'horizontal-justify') : ?> <jdoc:include type="modules" name="header-mobile" /> <?php endif ?> </div> <?php endif ?> </nav> </div> </div> <?php if ($sticky) : ?> </div> <?php endif ?> <?php endif ?> <?php // Dialog $attrs_dialog = []; $attrs_dialog_push = []; if (preg_match('/^(offcanvas|modal|dropbar)-center/', $config("$dialog.layout"))) { $attrs_dialog['class'][] = 'uk-margin-auto-vertical'; } else { $attrs_dialog['class'][] = 'uk-margin-auto-bottom'; } $attrs_dialog_push['class'][] = 'uk-grid-margin'; $attrs_dialog['class'][] = $config("$dialog.text_center") ? 'uk-text-center' : ''; $attrs_dialog_push['class'][] = $config("$dialog.text_center") ? 'uk-text-center' : ''; // Modal $attrs_modal = []; $attrs_modal['class'][] = 'uk-modal-body uk-padding-large uk-margin-auto uk-flex uk-flex-column uk-box-sizing-content'; $attrs_modal['class'][] = $config("$dialog.modal.width") ? 'uk-width-' . $config("$dialog.modal.width") : 'uk-width-auto@s'; $attrs_modal['uk-height-viewport'] = true; $attrs_modal['uk-toggle'] = json_encode(array_filter([ 'cls' => 'uk-padding-large', 'mode' => 'media', 'media' => '@s', ])); // Dropbar if (str_starts_with($config("$dialog.layout"), 'dropbar')) { $attrs_dropbar = []; $attrs_dropbar['class'][] = 'uk-dropbar'; $attrs_dropbar['class'][] = $config("$dialog.dropbar.padding_remove_horizontal") ? 'uk-padding-remove-horizontal' : ''; $attrs_dropbar['class'][] = $config("$dialog.dropbar.padding_remove_vertical") ? 'uk-padding-remove-vertical' : ''; if (!$config("$dialog.dropbar.animation") || $config("$dialog.dropbar.animation") == 'reveal-top') { $attrs_dropbar['class'][] = 'uk-dropbar-top'; } elseif ($config("$dialog.dropbar.animation") == 'slide-left') { $attrs_dropbar['class'][] = 'uk-dropbar-left'; } elseif ($config("$dialog.dropbar.animation") == 'slide-right') { $attrs_dropbar['class'][] = 'uk-dropbar-right'; } $attrs_dropbar['uk-drop'] = [ // Default 'clsDrop' => 'uk-dropbar', 'flip' => 'false', // Has to be a string 'container' => $sticky ? '.tm-header-mobile > [uk-sticky]' : '.tm-header-mobile', 'target-y' => '.tm-header-mobile .uk-navbar-container', // New 'mode' => 'click', 'target-x' => '.tm-header-mobile .uk-navbar-container', 'stretch' => true, 'pos' => $config("$dialog.dropbar.animation") == 'slide-right' ? "bottom-right" : "bottom-left", 'bgScroll' => 'false', // Has to be a string 'animation' => $config("$dialog.dropbar.animation") ?: null, 'animateOut' => true, 'duration' => 300, 'toggle' => 'false', // Has to be a string ]; // Behind navbar if ($config("$header.transparent")) { $attrs_dropbar['uk-drop']['inset'] = true; $attrs_dropbar['class'][] = 'uk-dropbar-inset'; $attrs_dropbar['uk-drop']['pos'] = $config("$dialog.dropbar.animation") == 'slide-right' ? "top-right" : "top-left"; if ($config("$header.blend")) { $attrs_dropbar['uk-drop']['container'] = $outside ? '.tm-page-container' : '.tm-page'; } // Set same z-index as dropnav (high but behind navbar, which is set to high). Needed in two cases: 1. blend and 2. not sticky and outside $attrs_dropbar['style'][] = 'z-index: 980;'; } $attrs_dropbar['uk-drop'] = json_encode(array_filter($attrs_dropbar['uk-drop'])); $attrs_dropbar_content = []; $attrs_dropbar_content['class'][] = 'tm-height-min-1-1 uk-flex uk-flex-column'; } ?> <?php if ($this->countModules('dialog-mobile') || $this->countModules('dialog-mobile-push')) : ?> <?php if (str_starts_with($config("$dialog.layout"), 'offcanvas')) : ?> <div id="tm-dialog-mobile" uk-offcanvas="container: true; overlay: true"<?= $this->attrs($config("$dialog.offcanvas") ?: []) ?>> <div class="uk-offcanvas-bar uk-flex uk-flex-column"> <?php if ($config("$dialog.close")) : ?> <button class="uk-offcanvas-close uk-close-large" type="button" uk-close uk-toggle="cls: uk-close-large; mode: media; media: @s"></button> <?php endif ?> <?php if (($this->countModules('dialog-mobile'))) : ?> <div<?= $this->attrs($attrs_dialog) ?>> <jdoc:include type="modules" name="dialog-mobile" style="grid-stack" /> </div> <?php endif ?> <?php if ($this->countModules('dialog-mobile-push')) : ?> <div<?= $this->attrs($attrs_dialog_push) ?>> <jdoc:include type="modules" name="dialog-mobile-push" style="grid-stack" /> </div> <?php endif ?> </div> </div> <?php endif ?> <?php if (str_starts_with($config("$dialog.layout"), 'modal')) : ?> <div id="tm-dialog-mobile" class="uk-modal uk-modal-full" uk-modal> <div class="uk-modal-dialog uk-flex"> <?php if ($config("$dialog.close")) : ?> <button class="uk-modal-close-full uk-close-large" type="button" uk-close uk-toggle="cls: uk-modal-close-full uk-close-large uk-modal-close-default; mode: media; media: @s"></button> <?php endif ?> <div<?= $this->attrs($attrs_modal) ?>> <?php if (($this->countModules('dialog-mobile'))) : ?> <div<?= $this->attrs($attrs_dialog) ?>> <jdoc:include type="modules" name="dialog-mobile" style="grid-stack" /> </div> <?php endif ?> <?php if ($this->countModules('dialog-mobile-push')) : ?> <div<?= $this->attrs($attrs_dialog_push) ?>> <jdoc:include type="modules" name="dialog-mobile-push" style="grid-stack" /> </div> <?php endif ?> </div> </div> </div> <?php endif ?> <?php if (str_starts_with($config("$dialog.layout"), 'dropbar')) : ?> <div id="tm-dialog-mobile"<?= $this->attrs($attrs_dropbar) ?>> <div<?= $this->attrs($attrs_dropbar_content) ?>> <?php if ($config("$header.transparent")) : ?> <div uk-height-placeholder=".tm-header-mobile .uk-navbar-container"></div> <?php endif ?> <?php if (($this->countModules('dialog-mobile'))) : ?> <div<?= $this->attrs($attrs_dialog) ?>> <jdoc:include type="modules" name="dialog-mobile" style="grid-stack" /> </div> <?php endif ?> <?php if ($this->countModules('dialog-mobile-push')) : ?> <div<?= $this->attrs($attrs_dialog_push) ?>> <jdoc:include type="modules" name="dialog-mobile-push" style="grid-stack" /> </div> <?php endif ?> </div> </div> <?php endif ?> <?php endif ?> </header> <?php endif ?> breadcrumbs.php000064400000003635151666572300007570 0ustar00<?php use Joomla\CMS\Language\Text; use YOOtheme\Metadata; use function YOOtheme\app; $el = $this->el('nav', [ 'class' => 'uk-margin-medium-bottom', 'aria-label' => Text::_('TPL_YOOTHEME_BREADCRUMB'), ]); $list = $this->el('ul', ['class' => ['uk-breadcrumb']]); $li = $this->el('li'); $span = $this->el('span'); $position = 1; // Structured data as JSON $data = [ '@context' => 'https://schema.org', '@type' => 'BreadcrumbList', 'itemListElement' => [] ]; if (!empty($schemaorgId)) { $data['@id'] = $schemaorgId; } foreach ($items as $key => $item) { if (!empty($item->link)) { $data['itemListElement'][] = [ '@type' => 'ListItem', 'position' => $position++, 'item' => [ '@type' => 'WebPage', '@id' => $item->link, 'name' => $item->name, ], ]; } elseif ($key === array_key_last($items)) { $data['itemListElement'][] = [ '@type' => 'ListItem', 'position' => $position++, 'item' => [ 'name' => $item->name, ], ]; } } app(Metadata::class)->set( 'script:schemaorg-breadcrumb', json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), ['type' => 'application/ld+json'] ); ?> <?php if ($items) : ?> <?= $el() ?> <?= $list() ?> <?php foreach ($items as $key => $item) : ?> <?php if (!empty($item->link)) : ?> <?= $li() ?> <a href="<?= $item->link ?>"><?= $span([], $item->name) ?></a> <?php elseif ($key !== array_key_last($items)) : ?> <li class="uk-disabled"> <span><?= $item->name ?></span> <?php else : ?> <?= $li() ?> <?= $span([], ['aria-current' => 'page'], $item->name) ?> <?php endif ?> <?= $li->end() ?> <?php endforeach ?> <?= $list->end() ?> <?= $el->end() ?> <?php endif ?> search.php000064400000036006151666572300006542 0ustar00<?php namespace YOOtheme; use YOOtheme\Builder\Templates\TemplateHelper; $search = &$fields[0]; $search_layout = false; $search_icon = []; // Search $attrs['class'] = array_merge(['uk-search'], (array) ($attrs['class'] ?? null)); // Search Input $search['type'] = 'search'; $search['class'][] = 'uk-search-input'; $site = '~theme.site'; $header = str_ends_with($position, '-mobile') ? '~theme.mobile.header' : '~theme.header'; $navbar = '~theme.navbar'; $liveSearch = false; // Apply header settings if (preg_match('/^(logo|navbar|header|dialog)/', $position)) { // Search Icon if ($config("$header.search_icon")) { $search_icon['uk-search-icon'] = true; if ($config("$header.search_icon") == 'right') { $search_icon['class'] = 'uk-search-icon-flip'; $search_icon['tag'] = 'button'; } } } if (preg_match('/^(logo|navbar|header)/', $position)) { // Config $layout = $config("$header.layout"); $search_layout = $config("$header.search_layout"); $navbar_position = in_array($position, ['navbar', 'navbar-split', 'navbar-push', 'navbar-mobile', 'header-mobile']) || (in_array($position, ['header', 'header-split']) && str_starts_with($layout, 'horizontal')) || ($position == 'logo' && preg_match('/^(horizontal|stacked-center-split-[ab])/', $layout)) || $position == 'logo-mobile'; // Expand input width || Search Toggle if ((str_starts_with($search_layout, 'input') && preg_match('/^horizontal-(left|center|right|justify)|stacked-(left|justify)$/', $layout) && $config("$header.search_expand")) || !str_starts_with($search_layout, 'input')) { $attrs['class'][] = 'uk-width-1-1'; } // Search Input $search['autofocus'] = !str_starts_with($search_layout, 'input'); // Search Results $template = app(TemplateHelper::class)->match([ 'type' => '_search', 'query' => ['lang' => $language ?? ''], ]); if ($template) { $liveSearch = true; $liveSearchOutput = $this->builder( $template['layout'] ?? [], ['prefix' => "template-{$template['id']}", 'template' => $template['type'], 'search' => ['searchword' => $search['value'] ?? '']], ); $id = "{$attrs['id']}-search-results"; $search['uk-search'] = json_encode([ 'target' => "#{$id}", 'mode' => !str_starts_with($search_layout, 'input') ? $search_layout : false, 'preventSubmit' => (bool) $config("$header.search_prevent_submit"), ]); $attrs_livesearch = ['class' => ['uk-margin uk-hidden-empty']]; app(Metadata::class)->set('script:theme-search', ['src' => '~theme/js/theme-search.js', 'defer' => true]); } if (!str_starts_with($search_layout, 'input')) { $toggle = [ 'class' => [($navbar_position ? 'uk-navbar-toggle' : 'uk-search-toggle uk-display-block')], 'id' => $navbar_position && !empty($tag['id']) ? $tag['id'] : null, 'href' => in_array($search_layout, ['dropbar', 'modal']) ? "#{$attrs['id']}-search" : true, ]; if ($search_layout == 'modal' && $config("$header.search_modal.width") == 'full') { $attrs['class'][] = 'uk-search-large'; } else { $attrs['class'][] = 'uk-search-medium'; } } else { $attrs['class'][] = 'uk-search-navbar'; } // Dropdown if (($search_layout == 'input-dropdown' && $liveSearch) || $search_layout == 'dropdown') { // From `navbar.php` $attrs_dropdown = [ 'class' => [($navbar_position ? 'uk-drop uk-navbar-dropdown' : 'uk-drop uk-dropdown')], ]; if ($config("$header.search_dropdown.size")) { $attrs_dropdown['class'][] = $navbar_position ? ($config("$navbar.dropbar") ? 'uk-navbar-dropdown-dropbar-large' : 'uk-navbar-dropdown-large') : 'uk-dropdown-large'; } $attrs_dropdown['class'][] = $config("$navbar.dropbar") && $config("$header.transparent") ? 'uk-dropbar-inset' : ''; $stretch = $config("$header.search_dropdown.stretch"); $align = $config("$header.search_dropdown.align") ?: $config("$navbar.dropdown_align"); $dropdown = [ 'mode' => 'click', 'toggle' => $search_layout == 'input-dropdown' ? 'false' : false, 'pos' => "bottom-{$align}", 'stretch' => $stretch ? 'x' : null, 'boundary' => $stretch ? (str_ends_with($position, '-mobile') ? '.tm-header-mobile' : '.tm-header') . " .uk-{$stretch}" : null, ]; if (!$stretch) { $attrs_dropdown['style'][] = $config("$header.search_dropdown.width") ? "width: {$config("$header.search_dropdown.width")}px;" : 'width: 400px;'; } if ($config("$header.search_dropdown.padding_remove_horizontal")) { if ($config("$navbar.dropbar")) { $attrs_dropdown['style'][] = '--uk-position-viewport-offset: 0;'; } else { $attrs_dropdown['class'][] = 'uk-padding-remove-horizontal'; } } if ($config("$header.search_dropdown.padding_remove_vertical")) { $attrs_dropdown['class'][] = 'uk-padding-remove-vertical'; } if ($navbar_position) { $dropdown += $attrs_dropdown; } else { // From `header.php` $outside = $config('~theme.site.layout') == 'boxed' && $config('~theme.site.boxed.header_outside'); $dropdown = $attrs_dropdown + [ 'uk-dropdown' => $dropdown + [ 'container' => $config("$header.transparent") && $config("$header.blend") ? ($outside ? '.tm-page-container' : '.tm-page') : '.tm-header', 'flip' => 'false', 'close-on-scroll' => true, ], ]; $dropdown['uk-dropdown'] = json_encode(array_filter($dropdown['uk-dropdown'])); } // Dropbar } elseif (($search_layout == 'input-dropbar' && $liveSearch) || $search_layout == 'dropbar') { $header_cls = str_ends_with($position, '-mobile') ? '.tm-header-mobile' : '.tm-header'; // From `header.php` $outside = $config("$site.layout") == 'boxed' && $config("$site.boxed.header_outside"); $attrs_dropbar = []; $attrs_dropbar['id'] = "{$attrs['id']}-search"; $attrs_dropbar['class'][] = str_ends_with($position, '-mobile') ? 'uk-dropbar' : 'uk-dropbar uk-dropbar-large'; $attrs_dropbar['class'][] = $config("$header.search_dropbar.padding_remove_horizontal") ? 'uk-padding-remove-horizontal' : ''; $attrs_dropbar['class'][] = $config("$header.search_dropbar.padding_remove_vertical") ? 'uk-padding-remove-vertical' : ''; if (!$config("$header.search_dropbar.animation") || $config("$header.search_dropbar.animation") == 'reveal-top') { $attrs_dropbar['class'][] = 'uk-dropbar-top'; } elseif ($config("$header.search_dropbar.animation") == 'slide-left') { $attrs_dropbar['class'][] = 'uk-dropbar-left'; $attrs_dropbar['class'][] = $config("$header.search_dropbar.width") ? "uk-width-{$config("$header.search_dropbar.width")}" : ''; } elseif ($config("$header.search_dropbar.animation") == 'slide-right') { $attrs_dropbar['class'][] = 'uk-dropbar-right'; $attrs_dropbar['class'][] = $config("$header.search_dropbar.width") ? "uk-width-{$config("$header.search_dropbar.width")}" : ''; } // If no navbar present $container = str_starts_with($layout, 'stacked') && !$this->countModules('navbar') ? '.tm-headerbar' : '.uk-navbar-container'; $attrs_dropbar['uk-drop'] = [ // Default 'clsDrop' => 'uk-dropbar', 'flip' => 'false', // Has to be a string 'container' => $config("$navbar.sticky") ? "{$header_cls} > [uk-sticky]" : $header_cls, 'target-y' => "{$header_cls} {$container}", // New 'toggle' => $search_layout == 'input-dropbar' ? 'false' : false, 'mode' => 'click', 'target-x' => "{$header_cls} {$container}", 'boundary-x' => $config("$site.layout") == 'boxed' && !$config("$site.boxed.header_outside") ? "{$header_cls} {$container}" : null, 'stretch' => in_array($config("$header.search_dropbar.animation"), ['slide-left', 'slide-right']) && $config("$header.search_dropbar.width") ? 'y' : true, 'pos' => $config("$header.search_dropbar.animation") == 'slide-right' ? 'bottom-right' : 'bottom-left', 'bgScroll' => 'false', // Has to be a string 'animation' => $config("$header.search_dropbar.animation") ?: null, 'animateOut' => true, 'duration' => 300, ]; // Behind navbar if ($config("$header.transparent")) { $attrs_dropbar['uk-drop']['inset'] = true; $attrs_dropbar['class'][] = 'uk-dropbar-inset'; $attrs_dropbar['uk-drop']['pos'] = $config("$header.search_dropbar.animation") == 'slide-right' ? 'top-right' : 'top-left'; if ($config("$header.blend")) { $attrs_dropbar['uk-drop']['container'] = $outside ? '.tm-page-container' : '.tm-page'; } // Set same z-index as dropnav (high but behind navbar, which is set to high). Needed in two cases: 1. blend and 2. not sticky and outside $attrs_dropbar['style'][] = 'z-index: 980;'; } $attrs_dropbar['uk-drop'] = json_encode(array_filter($attrs_dropbar['uk-drop'])); $attrs_dropbar_content = []; $attrs_dropbar_content['class'][] = 'tm-height-min-1-1 uk-flex uk-flex-column'; $attrs_dropbar_content['class'][] = $config("$header.search_dropbar.content_width") ? "uk-{$config("$header.search_dropbar.content_width")} uk-margin-auto" : ''; $attrs_dropbar_content['class'][] = $config("$header.search_dropbar.content_width") == 'container' ? 'uk-padding-remove-horizontal' : ''; // Modal } elseif ($search_layout == 'modal') { $modal = [ 'uk-modal' => true, 'id' => "{$attrs['id']}-search", 'class' => [ 'uk-modal', 'uk-modal-container' => $config("$header.search_modal.width") == 'container', 'uk-modal-full' => $config("$header.search_modal.width") == 'full', ], ]; $modal_dialog = [ 'class' => [ 'uk-modal-dialog uk-modal-body', 'uk-width-1-1' => $config("$header.search_modal.width") == 'expand', 'uk-padding-large' => $config("$header.search_modal.width") == 'full', 'uk-flex uk-flex-center uk-flex-middle' => $config("$header.search_modal.width") == 'full' && !$liveSearch, ], 'uk-height-viewport' => $config("$header.search_modal.width") == 'full', 'uk-toggle' => $config("$header.search_modal.width") == 'full' ? 'cls: uk-padding-large; mode: media; media: @s' : null, ]; $modal_close = []; if ($config("$header.search_modal.close") || $config("$header.search_modal.width") == 'full') { $modal_close = [ 'uk-close' => true, 'class' => [ 'uk-modal-close-default uk-close-large uk-modal-close-outside' => $config("$header.search_modal.width") != 'full', 'uk-modal-close-full uk-close-large' => $config("$header.search_modal.width") == 'full', ], 'uk-toggle' => [ 'mode' => 'media', 'media' =>'@s', 'cls' => $config("$header.search_modal.width") == 'full' ? 'uk-modal-close-full uk-close-large uk-modal-close-default' : 'uk-close-large uk-modal-close-outside', ] ]; $modal_close['uk-toggle'] = json_encode(array_filter($modal_close['uk-toggle'])); } } } else { // Search $attrs['class'][] = 'uk-search-default'; // Sidebar layouts if (preg_match('/^(sidebar|dialog(-mobile)?(-push)?)$/', $position)) { $attrs['class'][] = 'uk-width-1-1'; } // Search Icon $search_icon['uk-search-icon'] = true; } if ($search_icon) { $search_icon += ['tag' => 'span']; if ($search_icon['tag'] == 'button') { $search_icon['type'] = 'submit'; $fields[] = $search_icon; } else { array_unshift($fields, $search_icon); } } ?> <?php if ($search_layout == 'dropdown') : ?> <a<?= $this->attrs($toggle) ?> uk-search-icon></a> <div<?= $this->attrs($dropdown) ?>> <?= $this->form($fields, $attrs) ?> <?php if ($liveSearch) : ?> <div <?= $this->attrs($attrs_livesearch + ['id' => $id]) ?>><?= $liveSearchOutput ?></div> <?php endif ?> </div> <?php elseif ($search_layout == 'dropbar') : ?> <a<?= $this->attrs($toggle) ?> uk-search-icon></a> <div<?= $this->attrs($attrs_dropbar) ?>> <div<?= $this->attrs($attrs_dropbar_content) ?>> <?php if ($config("$header.transparent")) : ?> <div uk-height-placeholder="<?= $header_cls ?> .uk-navbar-container"></div> <?php endif ?> <?= $this->form($fields, $attrs) ?> <?php if ($liveSearch) : ?> <div <?= $this->attrs($attrs_livesearch + ['id' => $id]) ?>><?= $liveSearchOutput ?></div> <?php endif ?> </div> </div> <?php elseif ($search_layout == 'modal') : ?> <a<?= $this->attrs($toggle) ?> uk-search-icon uk-toggle></a> <div<?= $this->attrs($modal) ?>> <div<?= $this->attrs($modal_dialog) ?>> <?php if ($modal_close) : ?> <button type="button"<?= $this->attrs($modal_close) ?>></button> <?php endif ?> <?php if ($config("$header.search_modal.width") == 'full') : ?> <div> <?php endif ?> <?= $this->form($fields, $attrs) ?> <?php if ($liveSearch) : ?> <div<?= $this->attrs($attrs_livesearch + ['id' => $id]) ?>><?= $liveSearchOutput ?></div> <?php endif ?> <?php if ($config("$header.search_modal.width") == 'full') : ?> </div> <?php endif ?> </div> </div> <?php else : ?> <?= $this->form($fields, $attrs) ?> <?php if ($liveSearch) : ?> <?php if ($search_layout == 'input-dropdown') : ?> <div <?= $this->attrs($dropdown + ['id' => $id]) ?>><?= $liveSearchOutput ?></div> <?php elseif ($search_layout == 'input-dropbar') : ?> <div<?= $this->attrs($attrs_dropbar) ?>> <div<?= $this->attrs($attrs_dropbar_content) ?>> <?php if ($config("$header.transparent")) : ?> <div uk-height-placeholder="<?= $header_cls ?> .uk-navbar-container"></div> <?php endif ?> <div <?= $this->attrs(['id' => $id]) ?>><?= $liveSearchOutput ?></div> </div> </div> <?php endif ?> <?php endif ?> <?php endif ?> meta.php000064400000004770151666572300006226 0ustar00<?php use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; use Joomla\Component\Content\Site\Helper\RouteHelper; $author = $published = $category = ''; // Author if ($params['show_author']) { $author = $article->created_by_alias ?: $article->author; if ($params['link_author'] && !empty($article->contact_link)) { $author = HTMLHelper::_('link', $article->contact_link, $author); } } // Publish date if ($params['show_publish_date']) { $published = HTMLHelper::_('date', $article->publish_up ?? '', Text::_('DATE_FORMAT_LC3')); $published = '<time datetime="' . HTMLHelper::_('date', $article->publish_up ?? '', 'c') . "\">{$published}</time>"; } // Category if ($params['show_category']) { $category = $article->category_title; if ($params['link_category'] && $article->catid) { $category = HTMLHelper::_('link', Route::_(RouteHelper::getCategoryRoute($article->catid)), $category); } } if ($published || $author || $category) { $attrs_meta['class'][] = "{$this->margin($params['meta_margin'])} uk-margin-remove-bottom"; switch ($params['meta_style']) { case 'list': $parts = array_filter([ $published ?: '', $author ? "<span>{$author}</span>" : '', $category ?: '', ]); $attrs_meta['class'][] = 'uk-subnav uk-subnav-divider'; $attrs_meta['class'][] = $params['header_align'] ? 'uk-flex-center' : ''; ?> <ul<?= $this->attrs($attrs_meta) ?>> <?php foreach ($parts as $part) : ?> <li><?= $part ?></li> <?php endforeach ?> </ul> <?php break; default: // sentence $attrs_meta['class'][] = 'uk-article-meta'; $attrs_meta['class'][] = $params['header_align'] ? 'uk-text-center' : ''; ?> <p<?= $this->attrs($attrs_meta) ?>> <?php if ($author && $published) { Text::printf('TPL_YOOTHEME_META_AUTHOR_DATE', $author, $published); } elseif ($author) { Text::printf('TPL_YOOTHEME_META_AUTHOR', $author); } elseif ($published) { Text::printf('TPL_YOOTHEME_META_DATE', $published); } ?> <?= $category ? Text::sprintf('TPL_YOOTHEME_META_CATEGORY', $category) : '' ?> </p> <?php } } cookie.php000064400000006041151666572300006542 0ustar00<?php use Joomla\CMS\Language\Text; // Config $cookie = '~theme.cookie'; ?> <?php if ($config("$cookie.type") === 'bar') : ?> <div class="tm-cookie-banner uk-section uk-section-xsmall uk-section-<?= $config("$cookie.bar_style") ?><?= $config("$cookie.bar_position") === 'bottom' ? ' uk-position-bottom uk-position-fixed' : ' uk-position-relative' ?>"> <div class="uk-container uk-container-expand uk-text-center"> <?= Text::_($config("$cookie.message"))?> <?php if ($config("$cookie.button_consent_style") === 'icon') : ?> <button type="button" class="js-accept uk-close uk-position-center-right uk-position-medium" data-uk-close data-uk-toggle="target: !.uk-section; animation: true"></button> <?php else : ?> <button type="button" class="js-accept uk-button uk-button-<?= $config("$cookie.button_consent_style") ?> uk-margin-small-left" data-uk-toggle="target: !.uk-section; animation: true"><?= Text::_($config("$cookie.button_consent_text"))?></button> <?php endif ?> <?php if ($config("$cookie.mode") === 'consent') : ?> <button type="button" class="js-reject uk-button uk-button-<?= $config("$cookie.button_reject_style") ?> uk-margin-small-left" data-uk-toggle="target: !.uk-section; animation: true"><?= Text::_($config("$cookie.button_reject_text"))?></button> <?php endif ?> </div> </div> <?php else : ?> <div class="tm-cookie-banner uk-notification uk-notification-<?= $config("$cookie.notification_position") ?>"> <div class="uk-notification-message<?= $config("$cookie.notification_style") ? " uk-notification-message-{$config("$cookie.notification_style")}" : ''?> uk-panel"> <?= Text::_($config("$cookie.message"))?> <?php if ($config("$cookie.button_consent_style") === 'icon') : ?> <button type="button" class="js-accept uk-notification-close uk-close" data-uk-close data-uk-toggle="target: !.uk-notification; animation: uk-animation-fade"></button> <?php endif ?> <?php if ($config("$cookie.button_consent_style") !== 'icon' || $config("$cookie.mode") === 'consent') : ?> <p class="uk-margin-small-top"> <?php if ($config("$cookie.button_consent_style") !== 'icon') : ?> <button type="button" class="js-accept uk-button uk-button-<?= $config("$cookie.button_consent_style") ?>" data-uk-toggle="target: !.uk-notification; animation: uk-animation-fade"><?= Text::_($config("$cookie.button_consent_text"))?></button> <?php endif ?> <?php if ($config("$cookie.mode") === 'consent') : ?> <button type="button" class="js-reject uk-button uk-button-<?= $config("$cookie.button_reject_style") ?> uk-margin-small-left" data-uk-toggle="target: !.uk-notification; animation: uk-animation-fade"><?= Text::_($config("$cookie.button_reject_text"))?></button> <?php endif ?> </p> <?php endif ?> </div> </div> <?php endif ?> menu/subnav.php000064400000012525151666572300007537 0ustar00<?php use YOOtheme\Arr; foreach ($items as $item) { // Config $navbar = '~theme.navbar'; $menuposition = '~menu'; $menuitem = "~theme.menu.items.{$item->id}"; // Children $children = !empty($item->children) || !empty($item->builder); $indention = str_pad("\n", $level + 1, "\t"); // List item $attrs = ['class' => [$item->class ?? '']]; if ($item->active) { $attrs['class'][] = 'uk-active'; } // Title $title = $item->title; // Subtitle if ($title && $subtitle = $config("$menuitem.subtitle")) { $title = "{$title}<div class=\"tm-subtitle\">{$subtitle}</div>"; } // Image $image = $view('~theme/templates/menu/image', ['item' => $item]); if ($image && $config("$menuitem.image_only")) { $title = ''; } // Title Suffix, e.g. cart quantity if ($suffix = $config("$menuitem.title-suffix")) { $title .= " {$suffix}"; } // Markup if ($title && $subtitle && $image) { $title = "<div class=\"uk-grid uk-grid-small" . ($level >= 1 && ($config("$menuposition.image_align") == 'center') ? ' uk-flex-middle' : '') . "\"><div class=\"uk-width-auto\">{$image}</div><div class=\"uk-width-expand\">{$title}</div></div>"; } elseif ($title && $subtitle) { $title = "<div>{$title}</div>"; } elseif ($image) { $title = "{$image} {$title}"; } // Header if ($item->type === 'heading') { if (!$children && $level == 1) { continue; } if ($level > 1 && $item->divider && !$children) { $title = ''; $attrs['class'][] = 'uk-nav-divider'; } elseif ($children) { $link = ['role' => 'button']; if (!empty($item->anchor_css)) { $link['class'][] = $item->anchor_css; } $title = "<a{$this->attrs($link)}>{$title}</a>"; } else { $attrs['class'][] = 'uk-nav-header'; } // Link } else { $link = []; if (isset($item->url)) { $link['href'] = $item->url; if ($level > 1 && str_contains((string) $item->url, '#')) { $link['uk-scroll'] = true; } } if (!empty($item->target)) { $link['target'] = $item->target; } if (!empty($item->anchor_title)) { $link['title'] = $item->anchor_title; } if (!empty($item->anchor_rel)) { $link['rel'] = $item->anchor_rel; } if (!empty($item->anchor_css)) { $link['class'][] = $item->anchor_css; } $title = "<a{$this->attrs($link)}>{$title}</a>"; } if ($children) { $attrs['class'][] = 'uk-parent'; if ($level == 1) { $attrs_children = [ 'class' => ['uk-dropdown'], // Use `hover` instead of `hover, click` so dropdown can't be closed on click if in hover mode 'mode' => $item->type === 'heading' ? ($config("$navbar.dropdown_click") ? 'click' : 'hover') : false, 'pos' => $config("$menuitem.dropdown.align") ? "bottom-{$config("$menuitem.dropdown.align")}" : false, ]; $attrs_children['style'] = $config("$menuitem.dropdown.width") ? "width: {$config("$menuitem.dropdown.width")}px;" : ''; $attrs_children['class'][] = $config("$menuitem.dropdown.size") ? 'uk-dropdown-large' : ''; if (isset($item->builder)) { if (!$config("$menuitem.dropdown.width")) { $attrs_children['style'] = 'width: 400px'; } if ($config("$menuitem.dropdown.padding_remove_horizontal")) { $attrs_children['class'][] = 'uk-padding-remove-horizontal'; } if ($config("$menuitem.dropdown.padding_remove_vertical")) { $attrs_children['class'][] = 'uk-padding-remove-vertical'; } $children = "{$indention}<div{$this->attrs($attrs_children)}>{$item->builder}</div>"; } else { $columns = Arr::columns($item->children, $config("$menuitem.dropdown.columns", 1)); $columnsCount = count($columns); $wrapper = [ 'class' => [ 'uk-drop-grid', "uk-child-width-1-{$columnsCount}", ], 'uk-grid' => true, ]; $nav_style = $config("$menuitem.dropdown.nav_style") == 'secondary' ? 'uk-nav-secondary' : 'uk-dropdown-nav'; $columnsStr = ''; foreach ($columns as $column) { $columnsStr .= "<div><ul class=\"uk-nav {$nav_style}\">\n{$this->self(['items' => $column, 'level' => $level + 1])}</ul></div>"; } $children = "{$indention}<div{$this->attrs($attrs_children)}><div{$this->attrs($wrapper)}>{$columnsStr}</div></div>"; } } else { $attrs_children = []; if ($level == 2) { $attrs_children['class'][] = 'uk-nav-sub'; } $children = "{$indention}<ul{$this->attrs($attrs_children)}>\n{$this->self(['items' => $item->children, 'level' => $level + 1])}</ul>"; } } echo "{$indention}<li{$this->attrs($attrs)}>{$title}{$children}</li>"; } menu/iconnav.php000064400000012423151666572300007673 0ustar00<?php use YOOtheme\Arr; foreach ($items as $item) { // Config $navbar = '~theme.navbar'; $menuposition = '~menu'; $menuitem = "~theme.menu.items.{$item->id}"; // Children $children = !empty($item->children) || !empty($item->builder); $indention = str_pad("\n", $level + 1, "\t"); // List item $attrs = ['class' => [$item->class ?? '']]; if ($item->active) { $attrs['class'][] = 'uk-active'; } // Title $title = $item->title; // Subtitle if ($title && $subtitle = $config("$menuitem.subtitle")) { $title = "{$title}<div class=\"tm-subtitle\">{$subtitle}</div>"; } // Image $image = $view('~theme/templates/menu/image', ['item' => $item]); if ($image && ($level === 1 || $config("$menuitem.image_only"))) { $title = ''; } // Title Suffix, e.g. cart quantity if ($suffix = $config("$menuitem.title-suffix")) { $title .= " {$suffix}"; } // Markup if ($title && $subtitle && $image) { $title = "<div class=\"uk-grid uk-grid-small uk-flex-middle\"><div class=\"uk-width-auto\">{$image}</div><div class=\"uk-width-expand\">{$title}</div></div>"; } elseif ($title && $subtitle) { $title = "<div>{$title}</div>"; } elseif ($image) { $title = "{$image} {$title}"; } // Heading if ($item->type === 'heading') { if (!$children && $level == 1) { continue; } if ($level > 1 && $item->divider && !$children) { $title = ''; $attrs['class'][] = 'uk-nav-divider'; } elseif ($children) { $link = ['role' => 'button']; if (!empty($item->anchor_css)) { $link['class'][] = $item->anchor_css; } $title = "<a{$this->attrs($link)}>{$title}</a>"; } else { $attrs['class'][] = 'uk-nav-header'; } // Link } else { $link = []; if (isset($item->url)) { $link['href'] = $item->url; if ($level > 1 && str_contains((string) $item->url, '#')) { $link['uk-scroll'] = true; } } if (!empty($item->target)) { $link['target'] = $item->target; } if (!empty($item->anchor_title)) { $link['title'] = $item->anchor_title; } if (!empty($item->anchor_rel)) { $link['rel'] = $item->anchor_rel; } if (!empty($item->anchor_css)) { $link['class'][] = $item->anchor_css; } $title = "<a{$this->attrs($link)}>{$title}</a>"; } if ($children) { $attrs['class'][] = 'uk-parent'; if ($level == 1) { $attrs_children = [ 'class' => ['uk-dropdown'], // Use `hover` instead of `hover, click` so dropdown can't be closed on click if in hover mode 'mode' => $item->type === 'heading' ? ($config("$navbar.dropdown_click") ? 'click' : 'hover') : false, 'pos' => $config("$menuitem.dropdown.align") ? "bottom-{$config("$menuitem.dropdown.align")}" : false, ]; $attrs_children['style'] = $config("$menuitem.dropdown.width") ? "width: {$config("$menuitem.dropdown.width")}px;" : ''; $attrs_children['class'][] = $config("$menuitem.dropdown.size") ? 'uk-dropdown-large' : ''; if (isset($item->builder)) { if (!$config("$menuitem.dropdown.width")) { $attrs_children['style'] = 'width: 400px'; } if ($config("$menuitem.dropdown.padding_remove_horizontal")) { $attrs_children['class'][] = 'uk-padding-remove-horizontal'; } if ($config("$menuitem.dropdown.padding_remove_vertical")) { $attrs_children['class'][] = 'uk-padding-remove-vertical'; } $children = "{$indention}<div{$this->attrs($attrs_children)}>{$item->builder}</div>"; } else { $columns = Arr::columns($item->children, $config("$menuitem.dropdown.columns", 1)); $columnsCount = count($columns); $wrapper = [ 'class' => [ 'uk-drop-grid', "uk-child-width-1-{$columnsCount}", ], 'uk-grid' => true, ]; $nav_style = $config("$menuitem.dropdown.nav_style") == 'secondary' ? 'uk-nav-secondary' : 'uk-dropdown-nav'; $columnsStr = ''; foreach ($columns as $column) { $columnsStr .= "<div><ul class=\"uk-nav {$nav_style}\">\n{$this->self(['items' => $column, 'level' => $level + 1])}</ul></div>"; } $children = "{$indention}<div{$this->attrs($attrs_children)}><div{$this->attrs($wrapper)}>{$columnsStr}</div></div>"; } } else { $attrs_children = []; if ($level == 2) { $attrs_children['class'][] = 'uk-nav-sub'; } $children = "{$indention}<ul{$this->attrs($attrs_children)}>\n{$this->self(['items' => $item->children, 'level' => $level + 1])}</ul>"; } } echo "{$indention}<li{$this->attrs($attrs)}>{$title}{$children}</li>"; } menu/image.php000064400000002364151666572300007323 0ustar00<?php // Config $menuposition = '~menu'; $menuitem = "~theme.menu.items.{$item->id}"; $icon = $config("$menuitem.icon"); $image = $config("$menuitem.image"); if ($image && preg_match('/^[a-z_-]+$/i', $image)) { $icon = $image; $image = ''; } if ($icon) { echo $this->el('span', [ 'class' => [ 'uk-margin-small-right' => $config("$menuposition.image_margin") && !$config("$menuitem.image_only") && !$config("$menuitem.subtitle"), $config("$menuitem.image_classes", ''), ], 'uk-icon' => [ 'icon: {0};' => $icon, 'width: {0};' => $config("$menuposition.icon_width"), ], ])([], ''); } elseif ($image) { echo $this->el('image', [ 'class' => [ 'uk-margin-small-right' => $config("$menuposition.image_margin") && !$config("$menuitem.image_only") && !$config("$menuitem.subtitle"), $config("$menuitem.image_classes", ''), ], 'src' => $image, 'alt' => true, 'width' => $config("$menuposition.image_width"), 'height' => $config("$menuposition.image_height"), 'uk-svg' => (bool) $config("$menuposition.image_svg_inline"), 'thumbnail' => true, 'loading' => '', ])(); } menu/navbar.php000064400000016206151666572300007512 0ustar00<?php use YOOtheme\Arr; foreach ($items as $item) { // Config $menuposition = '~menu'; $navbar = '~theme.navbar'; $header = $config("{$menuposition}.position") == 'navbar' ? '~theme.header' : '~theme.mobile.header'; $menuitem = "~theme.menu.items.{$item->id}"; // Children $children = !empty($item->children) || !empty($item->builder); $indention = str_pad("\n", $level + 1, "\t"); // List item $attrs = ['class' => [$item->class ?? '']]; if ($item->active) { $attrs['class'][] = 'uk-active'; } // Title $title = $item->title; // Parent Icon if ($children && $config("$navbar.parent_icon")) { $title .= ' <span uk-navbar-parent-icon></span>'; } // Subtitle if ($title && $subtitle = $config("$menuitem.subtitle")) { $title = "{$title}<div class=\"" . ($level == 1 ? 'uk-navbar-subtitle' : 'uk-nav-subtitle') . "\">{$subtitle}</div>"; } // Image $image = $view('~theme/templates/menu/image', ['item' => $item]); if ($image && $config("$menuitem.image_only")) { $title = ''; } // Title Suffix, e.g. cart quantity if ($suffix = $config("$menuitem.title-suffix")) { $title .= " {$suffix}"; } // Markup if ($title && $subtitle && $image) { $title = "<div class=\"uk-grid uk-grid-small" . ($level >= 1 && ($config("$menuposition.image_align") == 'center') ? ' uk-flex-middle' : '') . "\"><div class=\"uk-width-auto\">{$image}</div><div class=\"uk-width-expand\">{$title}</div></div>"; } elseif ($title && $subtitle) { $title = "<div>{$title}</div>"; } elseif ($image) { $title = "{$image} {$title}"; } // Heading if ($item->type === 'heading') { if (!$children && $level == 1) { continue; } if ($level > 1 && $item->divider && !$children) { $title = ''; $attrs['class'][] = 'uk-nav-divider'; } elseif ($children) { $link = ['role' => 'button']; if (!empty($item->anchor_css)) { $link['class'][] = $item->anchor_css; } $title = "<a{$this->attrs($link)}>{$title}</a>"; } else { $attrs['class'][] = 'uk-nav-header'; } // Link } else { $link = []; if (isset($item->url)) { $link['href'] = $item->url; if ($level > 1 && str_contains((string) $item->url, '#')) { $link['uk-scroll'] = true; } } if (!empty($item->target)) { $link['target'] = $item->target; } if (!empty($item->anchor_title)) { $link['title'] = $item->anchor_title; } if (!empty($item->anchor_rel)) { $link['rel'] = $item->anchor_rel; } if (!empty($item->anchor_css)) { $link['class'][] = $item->anchor_css; } if ($image) { $link['class'][] = 'uk-preserve-width'; } $title = "<a{$this->attrs($link)}>{$title}</a>"; } if ($children) { $attrs['class'][] = 'uk-parent'; if ($level == 1) { $attrs_children = [ 'class' => ['uk-drop uk-navbar-dropdown'], ]; if ($config("$menuitem.dropdown.size")) { $attrs_children['class'][] = !$config("$navbar.dropbar") ? 'uk-navbar-dropdown-large' : ''; $attrs_children['class'][] = $config("$navbar.dropbar") ? 'uk-navbar-dropdown-dropbar-large' : ''; } $attrs_children['class'][] = $config("$navbar.dropbar") && $config("$header.transparent") ? 'uk-dropbar-inset' : ''; // Use `hover` instead of `hover, click` so dropdown can't be closed on click if in hover mode $mode = $item->type === 'heading' ? ($config("$navbar.dropdown_click") ? 'click' : 'hover') : false; $stretch = $config("$menuitem.dropdown.stretch"); if ($mode || $config("$menuitem.dropdown.align") || $stretch || $config("$menuitem.dropdown.size")) { $align = $config("$menuitem.dropdown.align") ?: $config("$navbar.dropdown_align"); $attrs_children += [ 'mode' => $mode, 'pos' => "bottom-{$align}", 'stretch' => $stretch ? 'x' : null, 'boundary' => $stretch ? (in_array($config("{$menuposition}.position"), ['navbar', 'navbar-split']) ? '.tm-header' : '.tm-header-mobile') . " .uk-{$stretch}" : null, ]; } if (!$stretch) { $attrs_children['style'][] = $config("$menuitem.dropdown.width") ? "width: {$config("$menuitem.dropdown.width")}px;" : ''; } if (isset($item->builder)) { if (!$stretch && !$config("$menuitem.dropdown.width")) { $attrs_children['style'][] = 'width: 400px;'; } if ($config("$menuitem.dropdown.padding_remove_horizontal")) { if ($config("$navbar.dropbar")) { $attrs_children['style'][] = '--uk-position-viewport-offset: 0;'; } else { $attrs_children['class'][] = 'uk-padding-remove-horizontal'; } } if ($config("$menuitem.dropdown.padding_remove_vertical")) { $attrs_children['class'][] = 'uk-padding-remove-vertical'; } $children = "{$indention}<div{$this->attrs($attrs_children)}>{$item->builder}</div>"; } else { $columns = Arr::columns($item->children, $config("$menuitem.dropdown.columns", 1)); $columnsCount = count($columns); if ($columnsCount > 1 && !$stretch) { $attrs_children['class'][] = "uk-navbar-dropdown-width-{$columnsCount}"; } $nav_style = $config("$menuitem.dropdown.nav_style") == 'secondary' ? 'uk-nav-secondary' : 'uk-navbar-dropdown-nav'; $columnsStr = ''; foreach ($columns as $column) { $columnsStr .= "<div><ul class=\"uk-nav {$nav_style}\">\n{$this->self(['items' => $column, 'level' => $level + 1])}</ul></div>"; } if ($columnsCount > 1) { $wrapper = [ 'class' => [ 'uk-drop-grid', "uk-child-width-1-{$columnsCount}", ], 'uk-grid' => true, ]; $columnsStr = "<div{$this->attrs($wrapper)}>{$columnsStr}</div>"; } $children = "{$indention}<div{$this->attrs($attrs_children)}>{$columnsStr}</div>"; } } else { $attrs_children = []; if ($level == 2) { $attrs_children['class'][] = 'uk-nav-sub'; } $children = "{$indention}<ul{$this->attrs($attrs_children)}>\n{$this->self(['items' => $item->children, 'level' => $level + 1])}</ul>"; } } echo "{$indention}<li{$this->attrs($attrs)}>{$title}{$children}</li>"; } menu/nav.php000064400000006363151666572300007030 0ustar00<?php $hasActiveChild = function ($item) use (&$hasActiveChild) { foreach ($item->children ?? [] as $child) { if ($child->active || $hasActiveChild($child)) { return true; } } return false; }; foreach ($items as $item) { // Config $menuposition = '~menu'; $menuitem = "~theme.menu.items.{$item->id}"; // Children $children = !empty($item->children); $indention = str_pad("\n", $level + 1, "\t"); // List item $attrs = ['class' => [$item->class ?? '']]; if ($item->active) { $attrs['class'][] = 'uk-active'; } // Title $title = $item->title; // Parent Icon if ($children && $level == 1 && $config('~menu.accordion')) { $title .= ' <span uk-nav-parent-icon></span>'; } // Subtitle if ($title && $subtitle = $config("$menuitem.subtitle")) { $title = "{$title}<div class=\"uk-nav-subtitle\">{$subtitle}</div>"; } // Image $image = $view('~theme/templates/menu/image', ['item' => $item]); if ($image && $config("$menuitem.image_only")) { $title = ''; } // Title Suffix, e.g. cart quantity if ($suffix = $config("$menuitem.title-suffix")) { $title .= " {$suffix}"; } // Markup if ($title && $subtitle && $image) { $title = "<div class=\"uk-grid uk-grid-small" . ($level >= 1 && ($config("$menuposition.image_align") == 'center') ? ' uk-flex-middle' : '') . "\"><div class=\"uk-width-auto\">{$image}</div><div class=\"uk-width-expand\">{$title}</div></div>"; } elseif ($title && $subtitle) { $title = "<div>{$title}</div>"; } elseif ($image) { $title = "{$image} {$title}"; } // Heading if ($item->type === 'heading') { // Divider if ($item->divider && !$children) { $title = ''; $attrs['class'][] = 'uk-nav-divider'; } elseif ($config('~menu.accordion') && $children) { $title = "<a href>{$title}</a>"; if ($level === 1) { $attrs['class'][] = 'js-accordion'; if ($hasActiveChild($item)) { $attrs['class'][] = 'uk-open'; } } } else { $attrs['class'][] = 'uk-nav-header'; } // Link } else { $link = []; if (isset($item->url)) { $link['href'] = $item->url; } if (!empty($item->target)) { $link['target'] = $item->target; } if (!empty($item->anchor_title)) { $link['title'] = $item->anchor_title; } if (!empty($item->anchor_rel)) { $link['rel'] = $item->anchor_rel; } if (!empty($item->anchor_css)) { $link['class'][] = $item->anchor_css; } $title = "<a{$this->attrs($link)}>{$title}</a>"; } if ($children) { $attrs['class'][] = 'uk-parent'; $attrs_children = ['class' => []]; if ($level == 1) { $attrs_children['class'][] = 'uk-nav-sub'; } $children = "{$indention}<ul{$this->attrs($attrs_children)}>\n{$this->self(['items' => $item->children, 'level' => $level + 1])}</ul>"; } echo "{$indention}<li{$this->attrs($attrs)}>{$title}{$children}</li>"; } menu/menu.php000064400000012024151666572300007177 0ustar00<?php // Config use YOOtheme\Builder; use function YOOtheme\app; $mobile = '~theme.mobile'; $header = '~theme.header'; $dialog = '~theme.dialog'; $navbar = '~theme.navbar'; // Menu ID $attrs['id'] = $config('~menu.tag_id'); $hasHeaderParent = fn($items) => array_any($items, fn($item) => $item->type == 'heading' && !empty($item->children) && isset($item->url) && ($item->url === '#' || $item->url === '') ); // Set `nav` menu_type to default in header positions if ($config('~menu.type') == 'nav' && preg_match('/^(toolbar-(left|right)|logo(-mobile)?|navbar(-split|-push|-mobile)?|header(-split|-mobile)?)$/', $config('~menu.position', ''))) { $config->set('~menu.type', ''); } if (in_array($config('~menu.type'), ['iconnav', 'subnav', 'nav'])) { $type = $config('~menu.type'); // Default on Navbar } elseif (in_array($config('~menu.position'), ['navbar', 'navbar-split', 'navbar-push', 'navbar-mobile'])) { $type = 'navbar'; if (in_array($config('~menu.position'), ['navbar', 'navbar-split', 'navbar-push']) && in_array($config("$header.layout"), ['stacked-center-split-a', 'stacked-center-split-b'])) { $isSplitMenu = true; // Split Auto $index = $config("$header.split_index") ?: ceil(count($items) / 2); if ($config('~menu.position') == 'navbar-split') { $items = array_slice($items, 0, $index); } else { $items = array_slice($items, $index); } } // Default on Header } elseif (in_array($config('~menu.position'), ['header', 'header-split', 'header-mobile'])) { if (in_array($config('~menu.position'), ['header', 'header-split']) && str_starts_with($config("$header.layout"), 'stacked')) { $type = 'subnav'; // Render in navbar } else { $type = 'navbar'; } // Default on Toolbar and Logo } elseif (in_array($config('~menu.position'), ['toolbar-left', 'toolbar-right', 'logo', 'logo-mobile'])) { $type = 'subnav'; // Default on Dialog } elseif (in_array($config('~menu.position'), ['dialog', 'dialog-push', 'dialog-mobile', 'dialog-mobile-push'])) { $type = 'nav'; // Default on Sidebar, Top, Bottom, Builder 1-6 } else { $type = 'nav'; } // Navbar if ($type == 'navbar') { $attrs['class'][] = 'uk-navbar-nav'; } // Subav if ($type == 'subnav') { $attrs['class'][] = 'uk-subnav'; $attrs['class'][] = $config('~menu.divider') ? 'uk-subnav-divider' : ''; } // Iconnav if ($type == 'iconnav') { $attrs['class'][] = 'uk-iconnav'; } // Nav if ($type == 'nav') { $attrs['class'][] = 'uk-nav'; $attrs['class'][] = "uk-nav-{$config('~menu.style')}"; $attrs['class'][] = $config('~menu.style') == 'primary' ? "uk-nav-{$config('~menu.size')}" : ''; $attrs['class'][] = $config('~menu.divider') ? 'uk-nav-divider' : ''; // Accordion menu if ($hasHeaderParent($items)) { $config->set('~menu.accordion', true); $attrs['class'][] = 'uk-nav-accordion'; $attrs['uk-nav'] = 'targets: > .js-accordion'; } } // Dialog Center if ((in_array($config('~menu.position'), ['dialog', 'dialog-push']) && $config("$dialog.text_center")) || (in_array($config('~menu.position'), ['dialog-mobile', 'dialog-mobile-push']) && $config("$mobile.dialog.text_center"))) { if (in_array($type, ['subnav', 'iconnav'])) { $attrs['class'][] = 'uk-flex-center'; } elseif ($type == 'nav') { $attrs['class'][] = 'uk-nav-center'; } } // Builder if ($type !== 'nav') { // Store menu config in case builder renders a menu module/widget $menuConfig = $config('~menu'); $builder = app(Builder::class); foreach ($items as $item) { if ($content = $config("~theme.menu.items.{$item->id}.content")) { if ($config($recursionKey = "builderRecursion{$item->id}")) { continue; } $config->set($recursionKey, true); $item->builder = $builder->render( json_encode($content), ['prefix' => "menu-item-{$item->id}"] ) ?: null; $config->del($recursionKey); } } $menuConfig = $config->set('~menu', $menuConfig); } // Dropnav if (in_array($type, ['subnav', 'iconnav'])) { $dropnav_attrs = [ 'boundary' => 'false', // Has to be a string 'container' => $config("$navbar.sticky") && in_array($config('~menu.position'), ['navbar', 'navbar-split']) ? '.tm-header > [uk-sticky]' : 'body', ]; $attrs['uk-dropnav'] = json_encode(array_filter($dropnav_attrs)); } // Scrollspy nav if (array_any($items, fn($item) => str_contains((string) $item->url, '#')) && (empty($isSplitMenu) || $config('~menu.position') == 'navbar-split')) { $attrs['uk-scrollspy-nav'] = 'closest: li; scroll: true;'; if ($type !== 'nav') { $attrs['uk-scrollspy-nav'] .= ' target: ' . (!empty($isSplitMenu) ? '!.uk-navbar-center .uk-navbar-nav ' : '') . '> * > a[href];'; } } ?> <ul<?= $this->attrs($attrs) ?>> <?= $view("~theme/templates/menu/{$type}", ['items' => $items, 'level' => 1]) ?> </ul> toolbar.php000064400000005032151666572300006732 0ustar00<?php // Config $site = '~theme.site'; $header = '~theme.header'; $mobile = '~theme.mobile'; $outside = $config("$site.layout") == 'boxed' && $config("$site.boxed.header_outside"); $outside_transparent = $config("$site.toolbar_transparent") && $config("$site.boxed.header_transparent"); $attrs_toolbar = []; $attrs_toolbar['class'][] = 'tm-toolbar'; if ($config("$site.toolbar_transparent")) { if ($config("$header.transparent") || $config('header.section.transparent') || ($outside && $config("$site.boxed.header_transparent"))) { $attrs_toolbar['uk-inverse'] = true; } } else { $attrs_toolbar['class'][] = 'tm-toolbar-default'; } $attrs_toolbar['class'][] = "uk-visible@{$config("$mobile.breakpoint")}"; // Width Container $attrs_width_container = []; $attrs_width_container['class'][] = 'uk-container uk-flex uk-flex-middle'; if ($outside) { $attrs_width_container['class'][] = $config("$site.toolbar_width") == 'expand' ? 'uk-container-expand' : 'tm-page-width'; } else { $attrs_width_container['class'][] = $config("$site.toolbar_width") != 'default' ? "uk-container-{$config("$site.toolbar_width")}" : ''; } $attrs_width_container['class'][] = $config("$site.toolbar_center") ? 'uk-flex-center' : ''; ?> <?php if ($this->countModules('toolbar-left') || $this->countModules('toolbar-right')) : ?> <div<?= $this->attrs($attrs_toolbar) ?>> <div<?= $this->attrs($attrs_width_container) ?>> <?php if ($this->countModules('toolbar-left') || ($config("$site.toolbar_center") && $this->countModules('toolbar-right'))) : ?> <div> <div class="uk-grid-medium uk-child-width-auto uk-flex-middle" uk-grid="margin: uk-margin-small-top"> <?php if ($this->countModules('toolbar-left')) : ?> <jdoc:include type="modules" name="toolbar-left" style="cell" /> <?php endif ?> <?php if ($config("$site.toolbar_center") && $this->countModules('toolbar-right')) : ?> <jdoc:include type="modules" name="toolbar-right" style="cell" /> <?php endif ?> </div> </div> <?php endif ?> <?php if (!$config("$site.toolbar_center") && $this->countModules('toolbar-right')) : ?> <div class="uk-margin-auto-left"> <div class="uk-grid-medium uk-child-width-auto uk-flex-middle" uk-grid="margin: uk-margin-small-top"> <jdoc:include type="modules" name="toolbar-right" style="cell" /> </div> </div> <?php endif ?> </div> </div> <?php endif ?> header.php000064400000062020151666572300006520 0ustar00<?php // Config $site = '~theme.site'; $header = '~theme.header'; $navbar = '~theme.navbar'; $dialog = '~theme.dialog'; $mobile = '~theme.mobile'; // Options $layout = $config("$header.layout"); // Outside $outside = $config("$site.layout") == 'boxed' && $config("$site.boxed.header_outside"); // Header $attrs = []; $attrs['class'][] = 'tm-header'; $attrs['class'][] = $config("$mobile.breakpoint") ? "uk-visible@{$config("$mobile.breakpoint")}" : ''; // Navbar Container $attrs_navbar_container = []; $attrs_navbar_container['class'][] = 'uk-navbar-container'; $attrs_navbar_container['class'][] = $config("$navbar.style") ? "uk-navbar-{$config("$navbar.style")}" : ''; // Navbar $attrs_navbar = [ 'class' => [ 'uk-navbar', 'uk-navbar-justify' => in_array($layout, ['horizontal-justify', 'stacked-justify']), ], 'uk-navbar' => [ 'align' => $config("$navbar.dropdown_align"), 'container' => $config("$header.transparent") && $config("$header.blend") ? ($outside ? '.tm-page-container' : '.tm-page') : '.tm-header', 'boundary' => '.tm-header .uk-navbar-container', // By default, it would be the navbar component's element 'target-x' => $config("$navbar.dropdown_target") ? '.tm-header .uk-navbar' : null, ], ]; if ($config("$navbar.dropbar")) { $attrs_navbar['uk-navbar']['target-y'] = '.tm-header .uk-navbar-container'; $attrs_navbar['uk-navbar']['dropbar'] = true; $attrs_navbar['uk-navbar']['dropbar-anchor'] = $config("$header.transparent") && $config("$header.blend") ? ($outside ? '.tm-page-container > .tm-page' : '.tm-page > main') : '.tm-header .uk-navbar-container'; // Has to be after navbar container because it has uk-light/dark $attrs_navbar['uk-navbar']['dropbar-transparent-mode'] = $config("$header.transparent") ? 'behind' : 'remove'; } // Sticky $attrs_sticky = []; if ($sticky = $config("$navbar.sticky")) { if ($config("$header.transparent") && $config("$header.blend")) { $attrs_navbar['uk-navbar']['close-on-scroll'] = true; } else { $attrs_navbar['uk-navbar']['container'] = '.tm-header > [uk-sticky]'; } $attrs_sticky = array_filter([ 'uk-sticky' => true, 'media' => $config("$mobile.breakpoint") ? "@{$config("$mobile.breakpoint")}" : false, 'show-on-up' => $sticky == 2, 'animation' => $sticky == 2 ? 'uk-animation-slide-top' : '', 'cls-active' => 'uk-navbar-sticky', 'sel-target' => '.uk-navbar-container', ]); } $attrs_navbar['uk-navbar'] = json_encode(array_filter($attrs_navbar['uk-navbar'])); // Search Expand $search_expand = ''; if ($config("$header.search") && !str_starts_with($config("$header.search"), 'dialog') && str_starts_with($config("$header.search_layout"), 'input') && (preg_match('/^horizontal-(left|center|right)|stacked-left$/', $layout) || ($layout == 'stacked-justify' && preg_match('/^(header|logo)/', $config("$header.search")))) && $config("$header.search_expand")) { if (preg_match('/^horizontal-(left|center|right)$/', $layout)) { $layout = 'horizontal-justify'; } elseif ($layout == 'stacked-left' && str_starts_with($config("$header.search"), 'navbar') ) { $layout = 'stacked-justify'; } $search_expand = true; } // Transparent $attrs_headerbar = []; if ($config("$header.transparent")) { $attrs_navbar_container['class'][] = 'uk-navbar-transparent'; if ($config("$header.blend")) { $attrs['class'][] = 'uk-blend-difference uk-position-z-index-high'; $attrs_navbar_container['class'][] = 'uk-light'; } else { if ($config("$header.transparent_color_separately")) { $attrs['uk-inverse'] = 'target: .uk-navbar-left, .uk-navbar-center, .uk-navbar-right, .tm-headerbar'; } else { $attrs['uk-inverse'] = 'target: .uk-navbar-container, .tm-headerbar'; } $attrs_navbar_container['class'][] = 'uk-position-relative uk-position-z-index-high'; } } elseif (($config("$site.boxed.header_transparent") && $outside) || $config('header.section.transparent')) { if ($sticky) { $attrs_sticky['cls-inactive'] = 'uk-navbar-transparent'; if ($sticky == 1) { $attrs_sticky['animation'] = 'uk-animation-slide-top'; } } else { $attrs_navbar_container['class'][] = 'uk-navbar-transparent'; } } else { $attrs_headerbar['class'][] = 'tm-headerbar-default'; } if ($outside) { if (!$config("$header.transparent") && $config("$site.boxed.header_transparent")) { $attrs['uk-inverse'] = 'target: .uk-navbar-container, .tm-headerbar; sel-active: .uk-navbar-transparent, .tm-headerbar'; if ($sticky) { $attrs_sticky['top'] = '300'; } } } elseif ($config("$header.transparent") || $config('header.section.transparent')) { $attrs['uk-header'] = true; $attrs['class'][] = 'tm-header-overlay'; if (!$config("$header.transparent")) { $attrs['uk-inverse'] = 'target: .uk-navbar-container, .tm-headerbar; sel-active: .uk-navbar-transparent, .tm-headerbar'; if ($sticky) { $attrs_sticky['tm-section-start'] = true; } } } // Width Container $attrs_width_container = []; $attrs_width_container['class'][] = 'uk-container'; if ($outside) { $attrs_width_container['class'][] = $config("$header.width") == 'expand' ? 'uk-container-expand' : 'tm-page-width'; } else { $attrs_width_container['class'][] = $config("$header.width") != 'default' ? "uk-container-{$config("$header.width")}" : ''; } $hasHeader = array_filter([ 'logo', 'header', 'header-split', 'navbar', 'navbar-push', 'navbar-split', ], fn($position) => $this->countModules($position)); $toolbar = trim($view('~theme/templates/toolbar')); ?> <?php if ($config("$mobile.breakpoint")) : ?> <?= $view('~theme/templates/header-mobile') ?> <?php endif ?> <?php if (!$config("$site.toolbar_transparent")) : ?> <?= $toolbar ?> <?php endif ?> <?php if ($hasHeader || $config("$site.toolbar_transparent") && $toolbar) : ?> <header<?= $this->attrs($attrs) ?>> <?php if ($config("$site.toolbar_transparent")) : ?> <?= $toolbar ?> <?php endif ?> <?php if ($hasHeader) : // Horizontal layouts if (str_starts_with($layout, 'horizontal')) : $attrs_width_container['class'][] = $this->countModules('logo') && $config("$header.logo_padding_remove") && $config("$header.width") == 'expand' && $layout != 'horizontal-center-logo' ? 'uk-padding-remove-left' : ''; ?> <?php if ($sticky) : ?> <div<?= $this->attrs($attrs_sticky) ?>> <?php endif ?> <div<?= $this->attrs($attrs_navbar_container) ?>> <div<?= $this->attrs($attrs_width_container) ?>> <nav<?= $this->attrs($attrs_navbar) ?>> <?php if (($layout != 'horizontal-center-logo' && $this->countModules('logo')) || (preg_match('/^horizontal-(left|justify|center-logo)/', $layout) && $this->countModules('navbar')) || ($layout == 'horizontal-justify' && $this->countModules('header'))) : ?> <div class="uk-navbar-left <?= $search_expand ? 'uk-flex-1' : '' ?>"> <?php if ($layout != 'horizontal-center-logo') : ?> <jdoc:include type="modules" name="logo" /> <?php endif ?> <?php if (preg_match('/^horizontal-(left|justify|center-logo)/', $layout)) : ?> <jdoc:include type="modules" name="navbar" /> <?php endif ?> <?php if ($layout == 'horizontal-justify') : ?> <jdoc:include type="modules" name="header" /> <?php endif ?> </div> <?php endif ?> <?php if (($layout == 'horizontal-center-logo' && $this->countModules('logo')) || ($layout == 'horizontal-center' && $this->countModules('navbar'))) : ?> <div class="uk-navbar-center"> <?php if ($layout == 'horizontal-center-logo') : ?> <jdoc:include type="modules" name="logo" /> <?php endif ?> <?php if ($layout == 'horizontal-center') : ?> <jdoc:include type="modules" name="navbar" /> <?php endif ?> </div> <?php endif ?> <?php if (($layout != 'horizontal-justify' && $this->countModules('header')) || ($layout == 'horizontal-right' && $this->countModules('navbar'))) : ?> <div class="uk-navbar-right"> <?php if ($layout == 'horizontal-right') : ?> <jdoc:include type="modules" name="navbar" /> <?php endif ?> <?php if ($layout != 'horizontal-justify') : ?> <jdoc:include type="modules" name="header" /> <?php endif ?> </div> <?php endif ?> </nav> </div> </div> <?php if ($sticky) : ?> </div> <?php endif ?> <?php endif ?> <?php // Stacked Center layouts if (preg_match('/^stacked-center-(split-)?[ab]/', $layout)) : ?> <?php if ((in_array($layout, ['stacked-center-a', 'stacked-center-b']) && $this->countModules('logo')) || $layout == 'stacked-center-a' && $this->countModules('header')) : ?> <div<?= $this->attrs($attrs_headerbar, ['class' => 'tm-headerbar tm-headerbar-top']) ?>> <div<?= $this->attrs($attrs_width_container) ?>> <?php if ($this->countModules('logo')) : ?> <jdoc:include type="modules" name="logo" style="grid-center" /> <?php endif ?> <?php if ($layout == 'stacked-center-a' && $this->countModules('header')) : ?> <div class="tm-headerbar-stacked uk-grid-medium uk-child-width-auto uk-flex-center uk-flex-middle" uk-grid> <jdoc:include type="modules" name="header" style="cell" /> </div> <?php endif ?> </div> </div> <?php endif ?> <?php if ($this->countModules('navbar') || $this->countModules('navbar-split') || (str_starts_with($layout, 'stacked-center-split') && $this->countModules('logo'))) : ?> <?php if ($sticky) : ?> <div<?= $this->attrs($attrs_sticky) ?>> <?php endif ?> <div<?= $this->attrs($attrs_navbar_container) ?>> <div<?= $this->attrs($attrs_width_container) ?>> <nav<?= $this->attrs($attrs_navbar) ?>> <?php if ($layout == 'stacked-center-split-b' && $this->countModules('navbar-split')) : ?> <div class="uk-navbar-left"> <jdoc:include type="modules" name="navbar-split" /> </div> <?php endif ?> <div class="uk-navbar-center"> <?php if ($layout == 'stacked-center-split-a') : ?> <?php if ($this->countModules('navbar-split')) : ?> <div class="uk-navbar-center-left uk-preserve-width"> <jdoc:include type="modules" name="navbar-split" /> </div> <?php endif ?> <jdoc:include type="modules" name="logo" /> <?php if ($this->countModules('navbar')) : ?> <div class="uk-navbar-center-right uk-preserve-width"> <jdoc:include type="modules" name="navbar" /> </div> <?php endif ?> <?php elseif ($layout == 'stacked-center-split-b') : ?> <jdoc:include type="modules" name="logo" /> <?php else : ?> <jdoc:include type="modules" name="navbar" /> <?php endif ?> </div> <?php if ($layout == 'stacked-center-split-b' && $this->countModules('navbar')) : ?> <div class="uk-navbar-right"> <jdoc:include type="modules" name="navbar" /> </div> <?php endif ?> </nav> </div> </div> <?php if ($sticky) : ?> </div> <?php endif ?> <?php endif ?> <?php if (in_array($layout, ['stacked-center-b', 'stacked-center-split-a', 'stacked-center-split-b']) && $this->countModules('header')) : ?> <div<?= $this->attrs($attrs_headerbar, ['class' => 'tm-headerbar tm-headerbar-bottom']) ?>> <div<?= $this->attrs($attrs_width_container) ?>> <jdoc:include type="modules" name="header" style="grid-center" /> </div> </div> <?php endif ?> <?php endif ?> <?php // Stacked Center C layout if ($layout == 'stacked-center-c') : ?> <?php if ($this->countModules('logo') || $this->countModules('header') || $this->countModules('header-split')) : ?> <div<?= $this->attrs($attrs_headerbar, ['class' => 'tm-headerbar tm-headerbar-top']) ?>> <div<?= $this->attrs($attrs_width_container) ?>> <div class="uk-position-relative uk-flex uk-flex-center uk-flex-middle"> <?php if ($this->countModules('header')) : ?> <div class="uk-position-center-left uk-position-z-index-high"> <jdoc:include type="modules" name="header" style="grid-middle" /> </div> <?php endif ?> <?php if ($this->countModules('logo')) : ?> <jdoc:include type="modules" name="logo" style="grid-middle" /> <?php endif ?> <?php if ($this->countModules('header-split')) : ?> <div class="uk-position-center-right uk-position-z-index-high"> <jdoc:include type="modules" name="header-split" style="grid-middle" /> </div> <?php endif ?> </div> </div> </div> <?php endif ?> <?php if ($this->countModules('navbar')) : ?> <?php if ($sticky) : ?> <div<?= $this->attrs($attrs_sticky) ?>> <?php endif ?> <div<?= $this->attrs($attrs_navbar_container) ?>> <div<?= $this->attrs($attrs_width_container) ?>> <nav<?= $this->attrs($attrs_navbar) ?>> <div class="uk-navbar-center"> <jdoc:include type="modules" name="navbar" /> </div> </nav> </div> </div> <?php if ($sticky) : ?> </div> <?php endif ?> <?php endif ?> <?php endif ?> <?php // Stacked Left layout if (preg_match('/^stacked-(left|justify)/', $layout)) : $attrs_navbar['class'][] = 'uk-flex-auto'; ?> <?php if ($this->countModules('logo') || $this->countModules('header')) : ?> <div<?= $this->attrs($attrs_headerbar, ['class' => 'tm-headerbar tm-headerbar-top']) ?>> <div<?= $this->attrs($attrs_width_container) ?>> <?php if ($this->countModules('header')) : ?> <div class="uk-grid uk-grid-medium uk-child-width-auto uk-flex-middle"> <div class="<?= $search_expand && str_starts_with($config("$header.search", ''), 'logo') ? 'uk-flex-1 tm-header-search-expand' : '' ?>"> <?php endif ?> <?php if ($this->countModules('logo')) : ?> <jdoc:include type="modules" name="logo" style="grid-middle" /> <?php endif ?> <?php if ($this->countModules('header')) : ?> </div> <div class="<?= $search_expand && str_starts_with($config("$header.search", ''), 'header') ? 'uk-flex-1 tm-header-search-expand' : 'uk-margin-auto-left' ?>"> <jdoc:include type="modules" name="header" style="grid-middle" /> </div> </div> <?php endif ?> </div> </div> <?php endif ?> <?php if ($this->countModules('navbar') || $this->countModules('navbar-push')) : ?> <?php if ($sticky) : ?> <div<?= $this->attrs($attrs_sticky) ?>> <?php endif ?> <div<?= $this->attrs($attrs_navbar_container) ?>> <div<?= $this->attrs($attrs_width_container) ?>> <nav<?= $this->attrs($attrs_navbar) ?>> <?php if ($this->countModules('navbar') || ($layout == 'stacked-justify' && $this->countModules('navbar-push'))) : ?> <div class="uk-navbar-left <?= $search_expand ? 'uk-flex-1' : '' ?>"> <?php if ($this->countModules('navbar')) : ?> <jdoc:include type="modules" name="navbar" /> <?php endif ?> <?php if ($layout == 'stacked-justify' && $this->countModules('navbar-push')) : ?> <jdoc:include type="modules" name="navbar-push" /> <?php endif ?> </div> <?php endif ?> <?php if (($layout != 'stacked-justify' && $this->countModules('navbar-push'))) : ?> <div class="uk-navbar-right"> <jdoc:include type="modules" name="navbar-push" /> </div> <?php endif ?> </nav> </div> </div> <?php if ($sticky) : ?> </div> <?php endif ?> <?php endif ?> <?php endif ?> <?php // Dialog $attrs_dialog = []; $attrs_dialog_push = []; if (preg_match('/^(offcanvas|modal|dropbar)-center/', $config("$dialog.layout"))) { $attrs_dialog['class'][] = 'uk-margin-auto-vertical'; } else { $attrs_dialog['class'][] = 'uk-margin-auto-bottom'; // Expand height so rows in builder modules can take the full height. Only if one module on dialog position. $attrs_dialog['class'][] = !$this->countModules('dialog-push') ? 'tm-height-expand' : ''; } $attrs_dialog_push['class'][] = 'uk-grid-margin'; $attrs_dialog['class'][] = $config("$dialog.text_center") ? 'uk-text-center' : ''; $attrs_dialog_push['class'][] = $config("$dialog.text_center") ? 'uk-text-center' : ''; // Modal $attrs_modal = []; $attrs_modal['class'][] = 'uk-modal-body uk-padding-large uk-margin-auto uk-flex uk-flex-column uk-box-sizing-content'; $attrs_modal['class'][] = $config("$dialog.modal.width") ? 'uk-width-' . $config("$dialog.modal.width") : 'uk-width-auto@s'; $attrs_modal['uk-height-viewport'] = true; $attrs_modal['uk-toggle'] = json_encode(array_filter([ 'cls' => 'uk-padding-large', 'mode' => 'media', 'media' => '@s', ])); // Dropbar if (str_starts_with($config("$dialog.layout"), 'dropbar')) { $attrs_dropbar = []; $attrs_dropbar['class'][] = 'uk-dropbar uk-dropbar-large'; $attrs_dropbar['class'][] = $config("$dialog.dropbar.padding_remove_horizontal") ? 'uk-padding-remove-horizontal' : ''; $attrs_dropbar['class'][] = $config("$dialog.dropbar.padding_remove_vertical") ? 'uk-padding-remove-vertical' : ''; if (!$config("$dialog.dropbar.animation") || $config("$dialog.dropbar.animation") == 'reveal-top') { $attrs_dropbar['class'][] = 'uk-dropbar-top'; } elseif ($config("$dialog.dropbar.animation") == 'slide-left') { $attrs_dropbar['class'][] = 'uk-dropbar-left'; $attrs_dropbar['class'][] = $config("$dialog.dropbar.width") ? "uk-width-{$config("$dialog.dropbar.width")}" : ''; } elseif ($config("$dialog.dropbar.animation") == 'slide-right') { $attrs_dropbar['class'][] = 'uk-dropbar-right'; $attrs_dropbar['class'][] = $config("$dialog.dropbar.width") ? "uk-width-{$config("$dialog.dropbar.width")}" : ''; } // If no navbar present $container = str_starts_with($layout, 'stacked') && !$this->countModules('navbar') ? '.tm-headerbar' : '.uk-navbar-container'; $attrs_dropbar['uk-drop'] = [ // Default 'clsDrop' => 'uk-dropbar', 'flip' => 'false', // Has to be a string 'container' => $sticky ? '.tm-header > [uk-sticky]' : '.tm-header', 'target-y' => ".tm-header {$container}", // New 'mode' => 'click', 'target-x' => ".tm-header {$container}", 'boundary-x' => $config("$site.layout") == 'boxed' && !$config("$site.boxed.header_outside") ? ".tm-header {$container}" : null, 'stretch' => in_array($config("$dialog.dropbar.animation"), ['slide-left', 'slide-right']) && $config("$dialog.dropbar.width") ? 'y' : true, 'pos' => $config("$dialog.dropbar.animation") == 'slide-right' ? "bottom-right" : "bottom-left", 'bgScroll' => 'false', // Has to be a string 'animation' => $config("$dialog.dropbar.animation") ?: null, 'animateOut' => true, 'duration' => 300, 'toggle' => 'false', // Has to be a string ]; // Behind navbar if ($config("$header.transparent")) { $attrs_dropbar['uk-drop']['inset'] = true; $attrs_dropbar['class'][] = 'uk-dropbar-inset'; $attrs_dropbar['uk-drop']['pos'] = $config("$dialog.dropbar.animation") == 'slide-right' ? "top-right" : "top-left"; if ($config("$header.blend")) { $attrs_dropbar['uk-drop']['container'] = $outside ? '.tm-page-container' : '.tm-page'; } // Set same z-index as dropnav (high but behind navbar, which is set to high). Needed in two cases: 1. blend and 2. not sticky and outside $attrs_dropbar['style'][] = 'z-index: 980;'; } $attrs_dropbar['uk-drop'] = json_encode(array_filter($attrs_dropbar['uk-drop'])); $attrs_dropbar_content = []; $attrs_dropbar_content['class'][] = 'tm-height-min-1-1 uk-flex uk-flex-column'; $attrs_dropbar_content['class'][] = $config("$dialog.dropbar.content_width") ? 'uk-' . $config("$dialog.dropbar.content_width") . ' uk-margin-auto' : ''; $attrs_dropbar_content['class'][] = $config("$dialog.dropbar.content_width") == 'container' ? 'uk-padding-remove-horizontal' : ''; } ?> <?php if ($this->countModules('dialog') || $this->countModules('dialog-push')) : ?> <?php if (str_starts_with($config("$dialog.layout"), 'offcanvas')) : ?> <div id="tm-dialog" uk-offcanvas="container: true"<?= $this->attrs($config("$dialog.offcanvas") ?: []) ?>> <div class="uk-offcanvas-bar uk-flex uk-flex-column"> <button class="uk-offcanvas-close uk-close-large" type="button" uk-close uk-toggle="cls: uk-close-large; mode: media; media: @s"></button> <?php if (($this->countModules('dialog'))) : ?> <div<?= $this->attrs($attrs_dialog) ?>> <jdoc:include type="modules" name="dialog" style="grid-stack" /> </div> <?php endif ?> <?php if ($this->countModules('dialog-push')) : ?> <div<?= $this->attrs($attrs_dialog_push) ?>> <jdoc:include type="modules" name="dialog-push" style="grid-stack" /> </div> <?php endif ?> </div> </div> <?php endif ?> <?php if (str_starts_with($config("$dialog.layout"), 'modal')) : ?> <div id="tm-dialog" class="uk-modal uk-modal-full" uk-modal> <div class="uk-modal-dialog uk-flex"> <button class="uk-modal-close-full uk-close-large" type="button" uk-close uk-toggle="cls: uk-close-large; mode: media; media: @s"></button> <div<?= $this->attrs($attrs_modal) ?>> <?php if (($this->countModules('dialog'))) : ?> <div<?= $this->attrs($attrs_dialog) ?>> <jdoc:include type="modules" name="dialog" style="grid-stack" /> </div> <?php endif ?> <?php if ($this->countModules('dialog-push')) : ?> <div<?= $this->attrs($attrs_dialog_push) ?>> <jdoc:include type="modules" name="dialog-push" style="grid-stack" /> </div> <?php endif ?> </div> </div> </div> <?php endif ?> <?php if (str_starts_with($config("$dialog.layout"), 'dropbar')) : ?> <div id="tm-dialog"<?= $this->attrs($attrs_dropbar) ?>> <div<?= $this->attrs($attrs_dropbar_content) ?>> <?php if ($config("$header.transparent")) : ?> <div uk-height-placeholder=".tm-header .uk-navbar-container"></div> <?php endif ?> <?php if (($this->countModules('dialog'))) : ?> <div<?= $this->attrs($attrs_dialog) ?>> <jdoc:include type="modules" name="dialog" style="grid-stack" /> </div> <?php endif ?> <?php if ($this->countModules('dialog-push')) : ?> <div<?= $this->attrs($attrs_dialog_push) ?>> <jdoc:include type="modules" name="dialog-push" style="grid-stack" /> </div> <?php endif ?> </div> </div> <?php endif ?> <?php endif ?> <?php endif ?> </header> <?php endif ?>
/home/opticamezl/www/newok/07d6c/./.././cli/../components/../531c5/../tmp/../templates.tar