Created
August 31, 2011 23:00
-
-
Save arbales/1184989 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From bfdf78d7d500820f18a00eef24dad0f70d122ba2 Mon Sep 17 00:00:00 2001 | |
From: Austin Bales <austin@manymoon.com> | |
Date: Wed, 31 Aug 2011 15:57:42 -0700 | |
Subject: [PATCH] Fix for landscape on mobile browsers. | |
--- | |
app/assets/stylesheets/pages.css.sass | 7 +++++-- | |
app/views/layouts/pages.html.haml | 3 ++- | |
2 files changed, 7 insertions(+), 3 deletions(-) | |
diff --git a/app/assets/stylesheets/pages.css.sass b/app/assets/stylesheets/pages.css.sass | |
index 1a5f408..46f1ea4 100644 | |
--- a/app/assets/stylesheets/pages.css.sass | |
+++ b/app/assets/stylesheets/pages.css.sass | |
@@ -64,7 +64,7 @@ html.mozilla | |
height: 48px | |
// Mobile | |
-html.lt-480 | |
+html.lt-480, html.w-480 | |
body | |
.login | |
display: none | |
@@ -76,7 +76,7 @@ html.lt-480 | |
padding-top: 160px | |
width: 86% | |
h1 | |
- background: image_url('/pages/do-no-shadow.png') no-repeat center top | |
+ background: image_url('pages/do-no-shadow.png') no-repeat center top | |
margin-left: -10px // Fix wierd quirk. | |
h2 | |
@@ -98,6 +98,9 @@ html.lt-480 | |
label | |
font-size: 14px | |
+html.w-480 | |
+ width: 480px | |
+ | |
body | |
background-color: #111 | |
min-width: 320px | |
diff --git a/app/views/layouts/pages.html.haml b/app/views/layouts/pages.html.haml | |
index 541b618..a683f0b 100644 | |
--- a/app/views/layouts/pages.html.haml | |
+++ b/app/views/layouts/pages.html.haml | |
@@ -26,7 +26,8 @@ | |
%meta{property: 'fb:app_id', content: '187717941294364'} | |
-# Mobile viewport optimized: j.mp/bplateviewport | |
- %meta{ :content => "width=device-width, initial-scale=1.0", :name => "viewport" }/ | |
+ %meta{ :content => "width=device-width, initial-scale=1.0, maximum-scale=1", :name => "viewport" }/ | |
+ | |
%link{rel: "shortcut icon", media: "screen", href: image_path('icons/favicon.png') } | |
%link{rel: "apple-touch-icon-precomposed", media: "screen and (resolution: 132dpi)", href: image_path('icons/ios-icon-72.png') } | |
%link{rel: "apple-touch-icon-precomposed", media: "screen and (resolution: 326dpi)", href: image_path('icons/ios-icon-114.png') } | |
-- | |
1.7.5.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment