diff options
author | Stefan Giehl <stefan@piwik.org> | 2018-08-17 13:27:17 +0300 |
---|---|---|
committer | Matthieu Aubry <mattab@users.noreply.github.com> | 2018-08-17 13:27:17 +0300 |
commit | 4ba679f716d18900c82a3cd1a0d303d72e59b9ff (patch) | |
tree | 1e6aba6e5b339593ae8645b78c65226ba095a3d4 /plugins | |
parent | a7216adb43c8242b64863cb072d861f21ddcfb54 (diff) |
Unify logo usage (#13298)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/CoreHome/templates/_logo.twig | 12 | ||||
-rw-r--r-- | plugins/CoreUpdater/stylesheets/updateLayout.css | 8 | ||||
-rw-r--r-- | plugins/CoreUpdater/templates/layout.twig | 12 | ||||
-rw-r--r-- | plugins/Login/templates/login.twig | 17 | ||||
-rw-r--r-- | plugins/ScheduledReports/templates/unsubscribe.twig | 17 |
5 files changed, 19 insertions, 47 deletions
diff --git a/plugins/CoreHome/templates/_logo.twig b/plugins/CoreHome/templates/_logo.twig index 04965ca030..d787ab9657 100644 --- a/plugins/CoreHome/templates/_logo.twig +++ b/plugins/CoreHome/templates/_logo.twig @@ -1,13 +1,17 @@ -<span id="logo" class="brand-logo"> - <a href="index.php" tabindex="-1" +<span id="logo" class="logo brand-logo {% if centeredLogo is defined and centeredLogo %}center{% endif %}"> + {% if logoLink is not defined or logoLink is not empty %} + <a href="{{ logoLink|default('index.php') }}" tabindex="-1" title="{% if isCustomLogo %}{{ 'General_PoweredBy'|translate }} {% endif %}Matomo # {{ 'General_OpenSourceWebAnalytics'|translate }}" > + {% endif %} {% if hasSVGLogo %} <img src='{{ logoSVG }}?matomo' tabindex="3" alt="{% if isCustomLogo %}{{ 'General_PoweredBy'|translate }} {% endif %}Matomo" class="{% if not isCustomLogo %}default-piwik-logo{% endif %}" /> {% else %} - <img src='{{ logoHeader }}?matomo' alt="{% if isCustomLogo %}{{ 'General_PoweredBy'|translate }} {% endif %}Matomo" /> + <img src='{% if useLargeLogo|default(false) %}{{ logoLarge }}{% else %}{{ logoHeader }}{% endif %}?matomo' alt="{% if isCustomLogo %}{{ 'General_PoweredBy'|translate }} {% endif %}Matomo" /> + {% endif %} + {% if logoLink is not defined or logoLink is not empty %} + </a> {% endif %} -</a> </span> diff --git a/plugins/CoreUpdater/stylesheets/updateLayout.css b/plugins/CoreUpdater/stylesheets/updateLayout.css index 18a6bd519b..040ab3f290 100644 --- a/plugins/CoreUpdater/stylesheets/updateLayout.css +++ b/plugins/CoreUpdater/stylesheets/updateLayout.css @@ -42,4 +42,12 @@ p strong { } strong { font-weight: 700 !important; +} + +#logo { + display: block; +} + +#logo img { + height: 40px; }
\ No newline at end of file diff --git a/plugins/CoreUpdater/templates/layout.twig b/plugins/CoreUpdater/templates/layout.twig index 9322acf373..90968c17d5 100644 --- a/plugins/CoreUpdater/templates/layout.twig +++ b/plugins/CoreUpdater/templates/layout.twig @@ -17,17 +17,7 @@ </head> <body id="simple" ng-app="app"> - -<div class="logo"> - {% if hasSVGLogo %} - <img src='{{ logoSVG }}' tabindex="3" - style="height: 40px;" - alt="{% if isCustomLogo %}{{ 'General_PoweredBy'|translate }} {% endif %}Matomo" - class="{% if not isCustomLogo %}default-piwik-logo{% endif %}" /> - {% else %} - <img src='{{ logoHeader }}' alt="{% if isCustomLogo %}{{ 'General_PoweredBy'|translate }} {% endif %}Matomo" /> - {% endif %} -</div> +{% include "@CoreHome/_logo.twig" with { 'logoLink': false } %} <div class="box"> {% block content %} diff --git a/plugins/Login/templates/login.twig b/plugins/Login/templates/login.twig index e12c8af5db..3ef83e7afa 100644 --- a/plugins/Login/templates/login.twig +++ b/plugins/Login/templates/login.twig @@ -27,22 +27,7 @@ </div> <nav> <div class="nav-wrapper"> - <span id="logo" class="brand-logo center"> - - {% if isCustomLogo == false %} - <a href="https://matomo.org" title="{{ linkTitle }}"> - {% endif %} - {% if hasSVGLogo %} - <img src='{{ logoSVG }}' class="{% if not isCustomLogo %}default-piwik-logo{% endif %}" title="{{ linkTitle }}" alt="Matomo"/> - {% else %} - <img src='{{ logoLarge }}' title="{{ linkTitle }}" alt="Matomo" /> - {% endif %} - - {% if isCustomLogo == false %} - </a> - {% endif %} - - </span> + {% include "@CoreHome/_logo.twig" with { 'logoLink': 'https://matomo.org', 'centeredLogo': true, 'useLargeLogo': true } %} </div> </nav> diff --git a/plugins/ScheduledReports/templates/unsubscribe.twig b/plugins/ScheduledReports/templates/unsubscribe.twig index 3acb56cb1e..d97bb7898b 100644 --- a/plugins/ScheduledReports/templates/unsubscribe.twig +++ b/plugins/ScheduledReports/templates/unsubscribe.twig @@ -19,22 +19,7 @@ </div> <nav> <div class="nav-wrapper"> - <span id="logo" class="brand-logo center"> - - {% if isCustomLogo == false %} - <a href="https://matomo.org" title="{{ linkTitle }}"> - {% endif %} - {% if hasSVGLogo %} - <img src='{{ logoSVG }}' class="{% if not isCustomLogo %}default-piwik-logo{% endif %}" title="{{ linkTitle }}" alt="Matomo"/> - {% else %} - <img src='{{ logoLarge }}' title="{{ linkTitle }}" alt="Matomo" /> - {% endif %} - - {% if isCustomLogo == false %} - </a> - {% endif %} - - </span> + {% include "@CoreHome/_logo.twig" with { 'logoLink': 'https://matomo.org', 'centeredLogo': true, 'useLargeLogo': true } %} </div> </nav> |