diff options
| author | Greg Roach <fisharebest@gmail.com> | 2013-11-17 17:43:49 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2013-11-17 17:43:49 +0000 |
| commit | ea8a5fd36fa5dbda4c7edfc66e0772a85b9cc629 (patch) | |
| tree | c3e4223f5a50e9e65bd0d8def6b79af5f484417d /themes/colors | |
| parent | e62cd613a57115004402e0266cb83681e4044e0d (diff) | |
| download | webtrees-ea8a5fd36fa5dbda4c7edfc66e0772a85b9cc629.tar.gz webtrees-ea8a5fd36fa5dbda4c7edfc66e0772a85b9cc629.tar.bz2 webtrees-ea8a5fd36fa5dbda4c7edfc66e0772a85b9cc629.zip | |
Browser sniffing is bad. Move to themes, for those that need it
Diffstat (limited to 'themes/colors')
| -rw-r--r-- | themes/colors/header.php | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/themes/colors/header.php b/themes/colors/header.php index c4e1bbc245..171f7b6020 100644 --- a/themes/colors/header.php +++ b/themes/colors/header.php @@ -49,30 +49,25 @@ echo '<html ', WT_I18N::html_markup(), '>', '<head>', '<meta charset="UTF-8">', + '<meta http-equiv="X-UA-Compatible" content="IE=edge">', '<title>', WT_Filter::escapeHtml($title), '</title>', header_links($META_DESCRIPTION, $META_ROBOTS, $META_GENERATOR, $LINK_CANONICAL), '<link rel="icon" href="', WT_CSS_URL, 'favicon.png" type="image/png">', '<link rel="stylesheet" href="', WT_THEME_URL, 'jquery-ui-1.10.3/jquery-ui-1.10.3.custom.css" type="text/css">', '<link rel="stylesheet" href="', WT_CSS_URL, 'css/colors.css" type="text/css">', - '<link rel="stylesheet" href="', WT_CSS_URL, 'css/', $subColor, '.css" type="text/css" media="all">'; + '<link rel="stylesheet" href="', WT_CSS_URL, 'css/', $subColor, '.css" type="text/css">'; if (stristr($_SERVER['HTTP_USER_AGENT'], 'iPad')) { echo '<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.8, maximum-scale=2.0" />'; - $BROWSERTYPE = 'ipad'; -} - -switch ($BROWSERTYPE) { -case 'msie': - echo '<link type="text/css" rel="stylesheet" href="', WT_CSS_URL, $BROWSERTYPE, '.css">'; - break; -case 'ipad': - echo '<link type="text/css" rel="stylesheet" href="', WT_CSS_URL, $BROWSERTYPE, '.css">'; - break; + echo '<link type="text/css" rel="stylesheet" href="', WT_CSS_URL, 'ipad.css">'; +} elseif (stristr($_SERVER['HTTP_USER_AGENT'], 'MSIE') || stristr($_SERVER['HTTP_USER_AGENT'], 'Trident')) { + // This is needed for all versions of IE, so we cannot use conditional comments. + echo '<link type="text/css" rel="stylesheet" href="', WT_CSS_URL, 'msie.css">'; } // Additional css files required (Only if Lightbox installed) if (WT_USE_LIGHTBOX) { - echo '<link rel="stylesheet" type="text/css" href="', WT_STATIC_URL, WT_MODULES_DIR, 'lightbox/css/album_page.css" media="screen">'; + echo '<link rel="stylesheet" type="text/css" href="', WT_STATIC_URL, WT_MODULES_DIR, 'lightbox/css/album_page.css" media="screen">'; } echo |
