Moved Meta Viewport from global head.tpl to diabook's header

I mistakenly added this <meta> tag to the global header, but it
causes problems for other themes, as they have other optimal widths.

I also added a style to diabook which makes the jGrowl messages
appear below the header bar, so you can still click the menu items
without having to close messages first.
This commit is contained in:
Max Weller 2012-05-02 16:59:58 +02:00
parent 6875f54647
commit f0c11cac4a
3 changed files with 9 additions and 1 deletions

View file

@ -6,7 +6,6 @@
<link rel="stylesheet" href="$baseurl/library/jgrowl/jquery.jgrowl.css" type="text/css" media="screen" /> <link rel="stylesheet" href="$baseurl/library/jgrowl/jquery.jgrowl.css" type="text/css" media="screen" />
<link rel="stylesheet" type="text/css" href="$stylesheet" media="all" /> <link rel="stylesheet" type="text/css" href="$stylesheet" media="all" />
<meta name="viewport" content="width=800, initial-scale=1, maximum-scale=3" />
<link rel="shortcut icon" href="$baseurl/images/friendica-32.png" /> <link rel="shortcut icon" href="$baseurl/images/friendica-32.png" />
<link rel="search" <link rel="search"

View file

@ -558,6 +558,7 @@ code {
text-decoration: none; text-decoration: none;
} }
/* popup notifications */ /* popup notifications */
div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ }
div.jGrowl div.notice { div.jGrowl div.notice {
background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center; background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center;
color: #ffffff; color: #ffffff;

View file

@ -26,6 +26,14 @@ $resolution=false;
$resolution = get_pconfig(local_user(), "diabook", "resolution"); $resolution = get_pconfig(local_user(), "diabook", "resolution");
if ($resolution===false) $resolution="normal"; if ($resolution===false) $resolution="normal";
//Add META viewport tag respecting the resolution to header for tablets
if ($resolution=="wide") {
$a->page['htmlhead'] .= '<meta name="viewport" content="width=1200" />';
} else {
$a->page['htmlhead'] .= '<meta name="viewport" content="width=980" />';
}
$color = false; $color = false;
$site_color = get_config("diabook", "color" ); $site_color = get_config("diabook", "color" );
if (local_user()) {$color = get_pconfig(local_user(), "diabook", "color");} if (local_user()) {$color = get_pconfig(local_user(), "diabook", "color");}