Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/2.17.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
anqaka committed Mar 30, 2021
2 parents 35a252e + 5144bf9 commit 1c49d5c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ All notable changes to this project will be documented in this file.


## [Released]
## [2.17.0] - 2021-03-30
### Added
- images in snowdog menu desktop template (#70218), compatible with `snowdog/module-menu` version `2.14.0`

## [2.16.0] - 2021-03-24
### Updated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
$categoryUrl = $block->getCategoryUrl($nodeId);
$categoryUrl = $categoryUrl ?: '#';
$dataAttribute = '';

$imageUrl = $block->getImageUrl();
$imageAltText = $block->getImageAltText();

$classLink = $block->getIsRoot() ? $class . '__link' : $class . '__inner-link';
$title = $block->getTitle();
Expand All @@ -25,3 +26,12 @@
>
<?= $block->escapeHtml($title) ?>
</a>

<?php if($imageUrl): ?>
<img
src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAABCAQAAABN/Pf1AAAAC0lEQVR42mNkwAIAACoAAgu1Hc4AAAAASUVORK5CYII="
data-src="<?= $block->escapeUrl($imageUrl); ?>"
alt="<?= $block->escapeHtmlAttr($imageAltText); ?>"
class="image lazyload"
/>
<?php endif; ?>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
$class = $block->getMenuClass();
$classLink = $block->getIsRoot() ? $class . '__link' : $class . '__inner-link';
$title = $block->getTitle();
$imageUrl = $block->getImageUrl();
$imageAltText = $block->getImageAltText();
if ($block->getId()) {
$attributes[] = 'data-menu="menu-' . $block->getId() . '"';
}
Expand All @@ -20,3 +22,11 @@
>
<?= $block->escapeHtml($title) ?>
</a>
<?php if ($imageUrl): ?>
<img
src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAABCAQAAABN/Pf1AAAAC0lEQVR42mNkwAIAACoAAgu1Hc4AAAAASUVORK5CYII="
data-src="<?= $block->escapeUrl($imageUrl); ?>"
alt="<?= $block->escapeHtmlAttr($imageAltText); ?>"
class="image lazyload"
/>
<?php endif; ?>

1 comment on commit 1c49d5c

@vercel
Copy link

@vercel vercel bot commented on 1c49d5c Mar 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.