diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2018-08-03 01:50:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-03 01:50:40 +0300 |
commit | 59e6f48c9d9112b7335e078f05d405264b46f0c5 (patch) | |
tree | cbcb5321106b3f198dae79e0a7341c1337e1a75f /plugins/CoreHome/templates | |
parent | 1fb40acdc12307d33ba3c550b60b9c0e46721a8d (diff) |
Allow emails to be themed. (#13223)
* Allow emails to be themed.
* Tweaks + remove manual test code.
* Add brandNameLong to event & color links in email header.
* update test files
Diffstat (limited to 'plugins/CoreHome/templates')
-rw-r--r-- | plugins/CoreHome/templates/ReportRenderer/_htmlReportBody.twig | 6 | ||||
-rw-r--r-- | plugins/CoreHome/templates/ReportRenderer/_htmlReportHeader.twig | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/plugins/CoreHome/templates/ReportRenderer/_htmlReportBody.twig b/plugins/CoreHome/templates/ReportRenderer/_htmlReportBody.twig index 87364415df..90333c7ba5 100644 --- a/plugins/CoreHome/templates/ReportRenderer/_htmlReportBody.twig +++ b/plugins/CoreHome/templates/ReportRenderer/_htmlReportBody.twig @@ -28,7 +28,7 @@ {% if displayTable %} <table style="border-collapse:collapse; border:1px solid rgb(231,231,231); padding:5px;"> - <thead style="background-color: rgb({{tableBgColor}});"> + <thead style="background-color: {{tableBgColor}};"> {% for columnId, columnName in reportColumns %} <th style="{{ styleTableHeader }}{% if columnId == 'label' %}{% else %} text-align:right;{% endif %}"> {{ columnName }} @@ -36,7 +36,7 @@ {% endfor %} </thead> <tbody> - {% set cycleValues=['background-color: rgb('~tableBgColor~')',''] %} + {% set cycleValues=['background-color: '~tableBgColor,''] %} {% set cycleIndex=1 %} {% for rowId,row in reportRows %} {% set rowMetrics=row.columns %} @@ -59,7 +59,7 @@ {% endif %} {% if rowMetadata.url is defined %} - <a style="color: rgb({{ reportTextColor }});" href='{% if rowMetadata.url|slice(0,4) not in ['http','ftp:'] %}http://{% endif %}{{ rowMetadata.url }}'> + <a style="color: {{ reportTextColor }};" href='{% if rowMetadata.url|slice(0,4) not in ['http','ftp:'] %}http://{% endif %}{{ rowMetadata.url }}'> {% endif %} {{ rowMetrics[columnId] | raw }}{# labels are escaped by SafeDecodeLabel filter in core/API/Response.php #} {% if rowMetadata.url is defined %} diff --git a/plugins/CoreHome/templates/ReportRenderer/_htmlReportHeader.twig b/plugins/CoreHome/templates/ReportRenderer/_htmlReportHeader.twig index 2aeeaa26c7..65ef49e806 100644 --- a/plugins/CoreHome/templates/ReportRenderer/_htmlReportHeader.twig +++ b/plugins/CoreHome/templates/ReportRenderer/_htmlReportHeader.twig @@ -1,4 +1,4 @@ -{% set fontStyle = "color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif; "%} +{% set fontStyle %}color:{{ themeColorText }};font-family:{{ themeFontFamilyBase }};{% endset %} {% set styleParagraph = 'font-size:15px;line-height:24px;margin:0 0 16px;' %} <html style="background-color:#edecec"> @@ -13,19 +13,19 @@ <a name="reportTop"></a> - <table style="width:100%; background-color:#37474f; padding:10px 0; margin: 0 0 25px 0; height:64px;"> + <table style="width:100%; background-color: {{ themeColorHeaderBackground }}; color: {{ themeColorHeaderText }}; padding:10px 0; margin: 0 0 25px 0; height:64px;"> <tr> <td> - <a style="font-size:16px;padding:0 15px;color:#ffffff;height: 22px;display: inline-block;vertical-align: inherit;" rel="noreferrer noopener" target="_blank" href="{{ piwikUrl }}" style="lineheight:17px"> + <a style="{{ fontStyle }}; font-size:16px;padding:0 15px;color: {{ themeColorHeaderText }};height: 22px;display: inline-block;vertical-align: inherit;" rel="noreferrer noopener" target="_blank" href="{{ piwikUrl }}" style="lineheight:17px"> {% if isCustomLogo and logoHeader %} <img src="{{ logoHeader }}" height="20px" width="auto" /> {% else %} - <img src="{{ piwikUrl }}/plugins/Morpheus/images/logo-email.png" height="20px" width="auto" alt="Matomo, {{ 'General_OpenSourceWebAnalytics'|translate }}" /> + <img src="{{ piwikUrl }}/plugins/Morpheus/images/logo-email.png" height="20px" width="auto" alt="{{ brandNameLong }}" /> {% endif %} </a> </td> <td align="right"> - <a style="font-size:16px; padding:0 15px; color:#ffffff" title="{{'Dashboard_TopLinkTooltip'|translate(websiteName)}}" target="_blank" href="{{ piwikUrl }}{{ linkTo({'module': 'CoreHome', 'action': 'index', 'idSite': idSite, 'period': period, 'date': date, 'token_auth': null, 'method': null, 'idReport': null, 'outputType': null, 'format': null})|raw }}"> + <a style="{{ fontStyle }}; font-size:16px; padding:0 15px; color: {{ themeColorHeaderText }}" title="{{'Dashboard_TopLinkTooltip'|translate(websiteName)}}" target="_blank" href="{{ piwikUrl }}{{ linkTo({'module': 'CoreHome', 'action': 'index', 'idSite': idSite, 'period': period, 'date': date, 'token_auth': null, 'method': null, 'idReport': null, 'outputType': null, 'format': null})|raw }}"> {{ 'Dashboard_Dashboard'|translate }} </a> </td> @@ -61,7 +61,7 @@ <ul> {% for metadata in reportMetadata %} <li> - <a href="#{{ metadata.uniqueId }}" style="text-decoration:none; color: rgb({{ reportTextColor }});"> + <a href="#{{ metadata.uniqueId }}" style="text-decoration:none; color: {{ reportTextColor }};"> {{ metadata.name }} </a> </li> |