Limit menu sprite to third-level category icons
Build / Build & Release draft (push) Failing after 0s
PHP tests / PHP Syntax check 5.6 => 8.1 (push) Failing after 9s
PHP tests / PHP-CS-Fixer (push) Failing after 1m6s
PHP tests / PHPStan (1.7.1.2) (push) Failing after 1m15s
PHP tests / PHPStan (1.7.2.5) (push) Failing after 1m16s
PHP tests / PHPStan (1.7.4.4) (push) Has been cancelled
PHP tests / PHPStan (1.7.5.1) (push) Has been cancelled
PHP tests / PHPStan (1.7.6) (push) Has been cancelled
PHP tests / PHPStan (1.7.7) (push) Has been cancelled
PHP tests / PHPStan (1.7.8) (push) Has been cancelled
PHP tests / PHPStan (latest) (push) Has been cancelled
PHP tests / PHPStan (1.7.3.4) (push) Has been cancelled
Build / Build & Release draft (push) Failing after 0s
PHP tests / PHP Syntax check 5.6 => 8.1 (push) Failing after 9s
PHP tests / PHP-CS-Fixer (push) Failing after 1m6s
PHP tests / PHPStan (1.7.1.2) (push) Failing after 1m15s
PHP tests / PHPStan (1.7.2.5) (push) Failing after 1m16s
PHP tests / PHPStan (1.7.4.4) (push) Has been cancelled
PHP tests / PHPStan (1.7.5.1) (push) Has been cancelled
PHP tests / PHPStan (1.7.6) (push) Has been cancelled
PHP tests / PHPStan (1.7.7) (push) Has been cancelled
PHP tests / PHPStan (1.7.8) (push) Has been cancelled
PHP tests / PHPStan (latest) (push) Has been cancelled
PHP tests / PHPStan (1.7.3.4) (push) Has been cancelled
This commit is contained in:
@@ -623,6 +623,19 @@
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.adv-megamenu__mobile-thumb--sprite {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.adv-megamenu__mobile-thumb--sprite .adv-megamenu__icon {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
background-size: auto;
|
||||
}
|
||||
|
||||
.adv-megamenu .adv-megamenu__mobile-link-row a,
|
||||
.adv-megamenu .adv-megamenu__mobile-link-row a:link,
|
||||
.adv-megamenu .adv-megamenu__mobile-link-row a:visited {
|
||||
@@ -738,6 +751,23 @@
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.adv-megamenu__node-card-sprite {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: var(--adv-node-card-image-size);
|
||||
height: var(--adv-node-card-image-size);
|
||||
margin: 0 auto;
|
||||
padding: 0.5rem;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.adv-megamenu__node-card-sprite .adv-megamenu__icon {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
background-size: auto;
|
||||
}
|
||||
|
||||
.adv-megamenu__node-card .card-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -34,7 +34,11 @@
|
||||
{foreach from=$nodes item=treeNode}
|
||||
<div class="col-xl-3 col-lg-3 col-md-4 col-sm-6">
|
||||
<article class="card adv-megamenu__node-card">
|
||||
{if $treeNode.icon_url}
|
||||
{if $treeNode.uses_sprite && $treeNode.icon_class}
|
||||
<div class="adv-megamenu__node-card-sprite">
|
||||
<span class="{$treeNode.icon_class|escape:'htmlall':'UTF-8'}" aria-hidden="true"></span>
|
||||
</div>
|
||||
{elseif $treeNode.icon_url}
|
||||
<img src="{$treeNode.icon_url|escape:'htmlall':'UTF-8'}" class="card-img-top" alt="{$treeNode.title|escape:'htmlall':'UTF-8'}" loading="lazy">
|
||||
{/if}
|
||||
<div class="card-body">
|
||||
@@ -180,8 +184,12 @@
|
||||
{/foreach}
|
||||
{foreach from=$node.children item=child}
|
||||
<li>
|
||||
<div class="adv-megamenu__mobile-link-row{if $depth == 1 && $child.icon_url} adv-megamenu__mobile-link-row--with-image{/if}">
|
||||
{if $depth == 1 && $child.icon_url}
|
||||
<div class="adv-megamenu__mobile-link-row{if $depth == 1 && (($child.uses_sprite && $child.icon_class) || $child.icon_url)} adv-megamenu__mobile-link-row--with-image{/if}">
|
||||
{if $depth == 1 && ($child.uses_sprite && $child.icon_class)}
|
||||
<div class="adv-megamenu__mobile-thumb adv-megamenu__mobile-thumb--sprite">
|
||||
<span class="{$child.icon_class|escape:'htmlall':'UTF-8'}" aria-hidden="true"></span>
|
||||
</div>
|
||||
{elseif $depth == 1 && $child.icon_url}
|
||||
<div class="adv-megamenu__mobile-thumb">
|
||||
<img src="{$child.icon_url|escape:'htmlall':'UTF-8'}" alt="{$child.title|escape:'htmlall':'UTF-8'}" loading="lazy">
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user