Skip to content

Commit

Permalink
refs #3530 overlay help icon linked to piwik.org documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
timo-bes committed Apr 13, 2013
1 parent ee4ba4c commit c13cdd9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
13 changes: 11 additions & 2 deletions plugins/Overlay/templates/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,27 @@ body {
}

body #header {
margin-left: -12px;
margin-left: -6px;
}

body #logo {
margin-top: 5px;
}

body h1 {
a#Overlay_Title {
display: block;
font-size: 15px;
font-weight: normal;
color: #7e7363;
text-decoration: none;
margin: -3px 0 0 0;
padding: 0 0 0 5px;
vertical-align: text-bottom;
}

#Overlay_Title img {
vertical-align: text-bottom;
margin-left: 4px;
}

#Overlay_DateRangeSelection {
Expand Down
5 changes: 4 additions & 1 deletion plugins/Overlay/templates/index.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{include file="CoreHome/templates/header.tpl"}
<h1>{'Overlay_Overlay'|translate|escape:'html'}</h1>
<a id="Overlay_Title" href="http://piwik.org/docs/page-overlay/" target="_blank">

This comment has been minimized.

Copy link
@halfdan

halfdan Apr 14, 2013

Member

Can you make this a class="overlay_title" instead of the id? This way the same style could be re-used on different pages as well.

This comment has been minimized.

Copy link
@timo-bes

timo-bes Apr 14, 2013

Author Member

Why (and where) would you want to reuse this style? It's highly specific to the Overlay sidebar, especially because of the negative top margin that brings it a little closer to the Piwik logo. Also, the name is Overlay_x, so it's not a good idea to use it somewhere else. And we certainly don't need to reuse it in Overlay - there can only be one caption below the logo.

This comment has been minimized.

Copy link
@timo-bes

timo-bes Apr 14, 2013

Author Member

I just remembered that we had a case before, where one plugin reused another plugin's style. When the plugin that provides the style is disabled, the CSS is not added and the other plugin is missing the style.
So it's not a good idea to reuse plugin styles somewhere else. We would have to define a general style in a common stylesheet and use it in Overlay.
But I don't know what we would call such a style becuase it's highly specific to the Overlay sidebar.

{'Overlay_Overlay'|translate|escape:'html'}
<img src="themes/default/images/help.png" alt="Documentation" />
</a>

<div id="Overlay_DateRangeSelection">
<select id="Overlay_DateRangeSelect" name="Overlay_DateRangeSelect">
Expand Down

0 comments on commit c13cdd9

Please sign in to comment.