Permalink
Browse files

Scale image to 75% of width for non-mobile devices

  • Loading branch information...
1 parent 6a18121 commit ce53d1513c8d94f9d933c466cd51748be5bea233 @weierophinney committed Oct 19, 2010
Showing with 9 additions and 1 deletion.
  1. +9 −1 mobile-app/application/views/scripts/mobile/image.phtml
@@ -1,7 +1,15 @@
<h2>Scaled Image</h2>
<p>
- <?php echo $this->tinySrc('/images/seascape.jpg') ?>
+<?php
+ if ($this->userAgent()->getBrowserType() != 'mobile') {
+ // Display at 75% width on normal pages
+ echo $this->tinySrc('/images/seascape.jpg', array('width' => 'x75'))
+ } else {
+ // Full supported width on mobile devices
+ echo $this->tinySrc('/images/seascape.jpg');
+ }
+?>
</p>
<?php $this->placeholder('sidebar')->captureStart() ?>

0 comments on commit ce53d15

Please sign in to comment.