Skip to content

Commit

Permalink
Important update for v.1.4 - fix for the media-queries
Browse files Browse the repository at this point in the history
  • Loading branch information
dziudek committed Sep 29, 2012
1 parent ce846ec commit 44ef1e8
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions MeetGavernWP/layouts/responsive_css.php
Expand Up @@ -13,10 +13,6 @@
// disable direct access to the file
defined('GAVERN_WP') or die('Access denied');

$iPod = stripos($_SERVER['HTTP_USER_AGENT'],"iPod");
$iPhone = stripos($_SERVER['HTTP_USER_AGENT'],"iPhone");
$iPad = stripos($_SERVER['HTTP_USER_AGENT'],"iPad");

?>

<style type="text/css">
Expand All @@ -33,16 +29,6 @@
<?php endif; ?>
</style>

<?php if($iPod || $iPhone || $iPad) : ?>
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/tablet.css" media="screen and (max-width: <?php echo get_option($tpl->name . '_tablet_width', '800'); ?>px), only screen and (max-device-width: <?php echo get_option($tpl->name . '_tablet_width', '800'); ?>px)" />
<?php else : ?>
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/tablet.css" media="screen and (max-width: <?php echo get_option($tpl->name . '_tablet_width', '800'); ?>px), only screen and (max-device-width: <?php echo get_option($tpl->name . '_tablet_width', '800'); ?>px) and (-moz-max-device-pixel-ratio: 1.5), only screen and (max-device-width: <?php echo get_option($tpl->name . '_tablet_width', '800'); ?>px) and (-o-max-device-pixel-ratio: 1.5/1), only screen and (max-device-width: <?php echo get_option($tpl->name . '_tablet_width', '800'); ?>px) and (-webkit-max-device-pixel-ratio: 1.5), only screen and (max-device-width: <?php echo get_option($tpl->name . '_tablet_width', '800'); ?>px) and (max-device-pixel-ratio: 1.5), only screen and (max-device-width: <?php echo get_option($tpl->name . '_tablet_width', '800'); ?>px) and (-moz-min-device-pixel-ratio: 2), only screen and (max-device-width: <?php echo get_option($tpl->name . '_tablet_width', '800'); ?>px) and (-o-min-device-pixel-ratio: 2/1), only screen and (max-device-width: <?php echo get_option($tpl->name . '_tablet_width', '800'); ?>px) and (-webkit-min-device-pixel-ratio: 2),only screen and (max-device-width: <?php echo 2* get_option($tpl->name . '_tablet_width', '800'); ?>px) and (min-device-pixel-ratio: 2)" />
<?php endif; ?>
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/tablet.css" media="(max-width: <?php echo get_option($tpl->name . '_tablet_width', '800'); ?>px)" />

<?php if($iPod || $iPhone || $iPad) : ?>
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/mobile.css" media="screen and (max-width: <?php echo get_option($tpl->name . '_mobile_width', '800'); ?>px), only screen and (max-device-width: <?php echo get_option($tpl->name . '_mobile_width', '800'); ?>px)" />
<?php else : ?>
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/mobile.css" media="screen and (max-width: <?php echo get_option($tpl->name . '_mobile_width', '800'); ?>px), only screen and (max-device-width: <?php echo get_option($tpl->name . '_mobile_width', '800'); ?>px) and (-moz-max-device-pixel-ratio: 1.5), only screen and (max-device-width: <?php echo get_option($tpl->name . '_mobile_width', '800'); ?>px) and (-o-max-device-pixel-ratio: 1.5/1), only screen and (max-device-width: <?php echo get_option($tpl->name . '_mobile_width', '800'); ?>px) and (-webkit-max-device-pixel-ratio: 1.5), only screen and (max-device-width: <?php echo get_option($tpl->name . '_mobile_width', '800'); ?>px) and (max-device-pixel-ratio: 1.5), only screen and (max-device-width: <?php echo get_option($tpl->name . '_mobile_width', '800'); ?>px) and (-moz-min-device-pixel-ratio: 2), only screen and (max-device-width: <?php echo get_option($tpl->name . '_mobile_width', '800'); ?>px) and (-o-min-device-pixel-ratio: 2/1), only screen and (max-device-width: <?php echo get_option($tpl->name . '_mobile_width', '800'); ?>px) and (-webkit-min-device-pixel-ratio: 2),only screen and (max-device-width: <?php echo 2* get_option($tpl->name . '_mobile_width', '800'); ?>px) and (min-device-pixel-ratio: 2)" />
<?php
endif;
// EOF
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/mobile.css" media="(max-width: <?php echo get_option($tpl->name . '_mobile_width', '800'); ?>px)" />

0 comments on commit 44ef1e8

Please sign in to comment.