Created
August 13, 2014 17:44
-
-
Save atran/d4ee982e0d68b0edb059 to your computer and use it in GitHub Desktop.
Please rotate.
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
$('body').bind 'orientationchange', (e) -> | |
orientation = if Math.abs(window.orientation) is 90 then 'landscape' else 'portrait' | |
$('body').removeClass('portrait landscape') | |
.addClass(orientation) | |
.trigger('turn', orientation: orientation) |
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
body.landscape::after { | |
position: absolute; | |
left: 0; | |
right: 0; | |
top: 0; | |
bottom: 0; | |
padding: 15%; | |
content: "Portrait only mode supported"; | |
text-align: center; | |
font-size: 16px; | |
background: rgba(255, 255, 255, 0.9); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment