1
0
قرینه از https://github.com/matomo-org/matomo.git synced 2025-08-21 22:47:43 +00:00
Files
matomo/plugins/CoreHome/templates/_menu.twig
Ben Burgess e9b3ab180d Update notifications and info boxes styles for accessibility (#21077)
* Update notifications, alerts and info boxes to new design

* Updated demo notifications to add multiline example and comment on close button.

* Replace 89 matomo font glyphs with new icons, consolidated icon-info2 usage to icon-info, added source SVG files for new icons

* Bump stalled tests

* built vue files

* Updated Matomo font icons scale, tweak for export icon css, updated reporting actions icon

* Updated UI test screenshots for icon and notification changes

* Updated UI test screenshots after rebase

* Various notification, style and icon improvements

- Temporarily updated submodule references for testing
- Updated the 25 outstanding icons used with core, both with .svg files and updated font files
- icon-done now uses the same thin tick icon as icon-ok
- icon-plus-square and icon-minus-square now have squares again
- New icons icon-add1 and icon-remove have added
- New icons icon-chevron-right and icon-chevron-left have been added
- Updated mobile down menu, dashboard settings, site selector, fieldExandableSelect and reporting menu to use a chevron as before
- The Morpheus UI demo icons section has been tidied to only show the new icon set
- Fixed link colour on marketplace metadata sidebar
- Fixed colour on marketplace plugin tile more link
- Fixed privacy manager opt out non-standard notification
- Increased the size of the warning icon on user permissions menu
- Adjusted help notification background colour
- Reverted three UI tests from a previous commit which were not related to style changes

* Update notifications, alerts and info boxes to new design

* Replace 89 matomo font glyphs with new icons, consolidated icon-info2 usage to icon-info, added source SVG files for new icons

* Bump stalled tests

* Updated Matomo font icons scale, tweak for export icon css, updated reporting actions icon

* Updated UI test screenshots for icon and notification changes

* built vue files

* Bump stalled tests again

* Updated font with scaling tweaks

* Update UI screenshots after font change

* Update plugins/Marketplace/stylesheets/marketplace.less

Co-authored-by: Stefan Giehl <stefan@matomo.org>

* Update plugins/Marketplace/stylesheets/marketplace.less

Co-authored-by: Stefan Giehl <stefan@matomo.org>

* Fix incorrect UI test screenshots for visitor map and profile action tooltip

* Fix missing admin menu platform icon

* Password changed confirmation style updated to standard info box

* Update submodule references

* Update UI test screenshots

* update submodules

* updates expected UI test files

* update submodules

* update submodules

* use correct menu item

* built vue files

* submodule updates

* updates expected UI test files

* improve menu icon

---------

Co-authored-by: bx80 <bx80@users.noreply.github.com>
Co-authored-by: Stefan Giehl <stefan@matomo.org>
Co-authored-by: sgiehl <sgiehl@users.noreply.github.com>
2023-08-16 23:17:57 +02:00

58 خطوط
3.7 KiB
Twig

{% macro menu(menu, anchorlink, cssClass, currentModule, currentAction, collapsible) %}
<div id="secondNavBar" class="{{ cssClass }} z-depth-1">
<ul class="navbar {% if collapsible %}collapsible collapsible-accordion{% endif %} hide-on-med-and-down" aria-label="{{ 'CoreHome_MainNavigation'|translate|e('html_attr') }}" role="menu">
{% for level1,level2 in menu %}
{% set hasSubmenuItem = false %}
{% set hasActive = false %}
{% for name,urlParameters in level2 %}
{% if name|slice(0,1) != '_' %}
{% set hasSubmenuItem = true %}
{% endif %}
{% endfor %}
{% if hasSubmenuItem %}
{% set subMenu %}
<a class="item {% if collapsible %}collapsible-header{% endif %}" tabindex="5">
<span class="menu-icon {{ level2._icon|default('icon-chevron-down') }}"></span>{{ level1|translate }}
<span class="hidden">
{{ 'CoreHome_Menu'|translate }}
</span>
</a>
<ul role="menu" {% if collapsible %}class="collapsible-body"{% endif %}>
{% for name,urlParameters in level2 %}
{% if name|slice(0,1) != '_' %}
{% set isActive = urlParameters._url.module is defined and urlParameters._url.module == currentModule and urlParameters._url.action is defined and urlParameters._url.action == currentAction %}
{% set hasActive = hasActive or isActive %}
<li {% if isActive %}class="active"{% endif %}
role="menuitem"
>
<a class="item" tabindex="5" target="_self"
title="{{ urlParameters._tooltip|default('')|translate|e('html_attr') }}"
{% if urlParameters._onclick is defined and urlParameters._onclick %}
onclick="{{ urlParameters._onclick|e('html_attr') }};return false;"
{% endif %}
{% if urlParameters._url %}
href="index.php?{{ urlParameters._url|urlRewriteWithParameters|slice(1) }}"
{% endif %}>
{% if urlParameters._icon is defined and urlParameters._icon %}<span class="icon {{ urlParameters._icon|e('html_attr') }}" style="margin-right: 5px;"></span>{% endif %}
{{ name|translate|rawSafeDecoded }}
</a>
{% if urlParameters._help %}
<div vue-entry="CoreHome.ShowHelpLink" name="{{ urlParameters._name }}" message="{{ urlParameters._help|e('html_attr') }}"></div>
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>
{% endset %}
<li class="menuTab {% if hasActive %}active{% endif %}" role="menuitem">
{{ subMenu }}
</li>
{% endif %}
{% endfor %}
</ul>
<div vue-entry="CoreHome.MobileLeftMenu" menu="{{ menu|json_encode }}"></div>
</div>
{% endmacro %}