Skip to content

Commit

Permalink
Release v1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
allrude committed Dec 28, 2024
1 parent b7a2c1b commit 01b680a
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

[Unreleased]: https://github.com/Siteation/magento2-storeinfo/compare/1.0.0...main

## 1.2.0 - 2024-12-28

### Added
- Option to change title trough xml arguments
- Option to show title trough xml arguments

## 1.1.0 - 2024-12-28

### Added
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "siteation/magento2-storeinfo-menus",
"version": "1.1.0",
"version": "1.2.0",
"license": "MIT",
"type": "magento2-module",
"description": "Get your store menus with ease",
Expand Down
12 changes: 8 additions & 4 deletions view/frontend/templates/hyva/about.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ $storeMenus = $viewModels->require(StoreInfoMenus::class);

$menu = $storeMenus->getAboutMenu();

$title = $block->getTitle() !== null ? $block->getTitle() : "About";
$title = $block->getTitle() ?: "About";
$showTitle = $block->getShowTitle() !== null ? $block->getShowTitle() : true;

$classList = $block->getClassList() !== null ? $block->getClassList() : 'pr-4 lg:w-1/4 md:w-1/2';
$classListTitle = $block->getClassListTitle() !== null ? $block->getClassListTitle() : 'text-md leading-5 font-semibold tracking-wider uppercase';
$classListMenu = $block->getClassListMenu() !== null ? $block->getClassListMenu() : 'mt-4 space-y-4';
Expand All @@ -36,9 +38,11 @@ if (count($menu) === 0) {
class="<?= $escaper->escapeHtmlAttr($classList) ?>"
aria-label="<?= $escaper->escapeHtml(__('%1 Menu', $title)) ?>"
>
<h2 class="<?= $escaper->escapeHtmlAttr($classListTitle) ?>">
<?= $escaper->escapeHtml($title) ?>
</h2>
<?php if ($showTitle): ?>
<h2 class="<?= $escaper->escapeHtmlAttr($classListTitle) ?>">
<?= $escaper->escapeHtml($title) ?>
</h2>
<?php endif; ?>
<ul class="<?= $escaper->escapeHtmlAttr($classListMenu) ?>">
<?php foreach ($menu as $item): ?>
<li>
Expand Down
12 changes: 8 additions & 4 deletions view/frontend/templates/hyva/legal.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ $storeMenus = $viewModels->require(StoreInfoMenus::class);

$menu = $storeMenus->getLegalMenu();

$title = $block->getTitle() !== null ? $block->getTitle() : "Legal";
$title = $block->getTitle() ?: "Legal";
$showTitle = $block->getShowTitle() !== null ? $block->getShowTitle() : true;

$classList = $block->getClassList() !== null ? $block->getClassList() : 'pr-4 lg:w-1/4 md:w-1/2';
$classListTitle = $block->getClassListTitle() !== null ? $block->getClassListTitle() : 'text-md leading-5 font-semibold tracking-wider uppercase';
$classListMenu = $block->getClassListMenu() !== null ? $block->getClassListMenu() : 'mt-4 space-y-4';
Expand All @@ -36,9 +38,11 @@ if (count($menu) === 0) {
class="<?= $escaper->escapeHtmlAttr($classList) ?>"
aria-label="<?= $escaper->escapeHtml(__('%1 Menu', $title)) ?>"
>
<h2 class="<?= $escaper->escapeHtmlAttr($classListTitle) ?>">
<?= $escaper->escapeHtml($title) ?>
</h2>
<?php if ($showTitle): ?>
<h2 class="<?= $escaper->escapeHtmlAttr($classListTitle) ?>">
<?= $escaper->escapeHtml($title) ?>
</h2>
<?php endif; ?>
<ul class="<?= $escaper->escapeHtmlAttr($classListMenu) ?>">
<?php foreach ($menu as $item): ?>
<li>
Expand Down
12 changes: 8 additions & 4 deletions view/frontend/templates/hyva/services.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ $storeMenus = $viewModels->require(StoreInfoMenus::class);

$menu = $storeMenus->getServicesMenu();

$title = $block->getTitle() !== null ? $block->getTitle() : "Services";
$title = $block->getTitle() ?: "Services";
$showTitle = $block->getShowTitle() !== null ? $block->getShowTitle() : true;

$classList = $block->getClassList() !== null ? $block->getClassList() : 'pr-4 lg:w-1/4 md:w-1/2';
$classListTitle = $block->getClassListTitle() !== null ? $block->getClassListTitle() : 'text-md leading-5 font-semibold tracking-wider uppercase';
$classListMenu = $block->getClassListMenu() !== null ? $block->getClassListMenu() : 'mt-4 space-y-4';
Expand All @@ -36,9 +38,11 @@ if (count($menu) === 0) {
class="<?= $escaper->escapeHtmlAttr($classList) ?>"
aria-label="<?= $escaper->escapeHtml(__('%1 Menu', $title)) ?>"
>
<h2 class="<?= $escaper->escapeHtmlAttr($classListTitle) ?>">
<?= $escaper->escapeHtml($title) ?>
</h2>
<?php if ($showTitle): ?>
<h2 class="<?= $escaper->escapeHtmlAttr($classListTitle) ?>">
<?= $escaper->escapeHtml($title) ?>
</h2>
<?php endif; ?>
<ul class="<?= $escaper->escapeHtmlAttr($classListMenu) ?>">
<?php foreach ($menu as $item): ?>
<li>
Expand Down

0 comments on commit 01b680a

Please sign in to comment.