Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

committing source code

  • Loading branch information...
commit 3842e50a961b84729765fbe41157d9ac43cf4ad2 1 parent ed69772
Peter Schmalfeldt authored
1  README
... ...
@@ -0,0 +1 @@
  1
+see js/iphone.js for main source file and index.html for sample implementation.
0  css/index.html
No changes.
28  css/style.css
... ...
@@ -0,0 +1,28 @@
  1
+body {
  2
+    margin: 0;
  3
+	background: url('http://www.manifestinteractive.com/iphone/screen/images/landing.jpg') no-repeat top left #FFFFFF;
  4
+}
  5
+body[orient="landscape"] {
  6
+    margin: 0;
  7
+    background: url('http://www.manifestinteractive.com/iphone/screen/images/landscape.jpg') no-repeat top left #FFFFFF;
  8
+    -webkit-text-size-adjust: none;
  9
+	height:268px;
  10
+	width:480px;
  11
+	overflow:hidden;
  12
+}
  13
+body[orient="portrait"] {
  14
+	margin: 0;
  15
+	background: url('http://www.manifestinteractive.com/iphone/screen/images/portrait.jpg') no-repeat top left #FFFFFF;
  16
+    -webkit-text-size-adjust: none;
  17
+	height:417px;
  18
+	width:320px;
  19
+	overflow:hidden;
  20
+}
  21
+body[orient="upsidedown"] {
  22
+    margin: 0;
  23
+    background: url('http://www.manifestinteractive.com/iphone/screen/images/upsidedown.jpg') no-repeat top left #FFFFFF;
  24
+    -webkit-text-size-adjust: none;
  25
+	height:268px;
  26
+	width:480px;
  27
+	overflow:hidden;
  28
+}
0  images/index.html
No changes.
BIN  images/landing.jpg
BIN  images/landscape.jpg
BIN  images/portrait.jpg
BIN  images/upsidedown.jpg
34  index.html
... ...
@@ -0,0 +1,34 @@
  1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2
+         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3
+<html xmlns="http://www.w3.org/1999/xhtml">
  4
+<head>
  5
+    <title>iPhone Orientation Checker</title>
  6
+    
  7
+    <!-- //////////////////////////////////////////////////////////////////////////////////////////////
  8
+         __  __             _  __          _      ___       _                      _   _
  9
+        |  \/  | __ _ _ __ (_)/ _| ___ ___| |_   |_ _|_ __ | |_ ___ _ __ __ _  ___| |_(_)_   _____
  10
+        | |\/| |/ _` | '_ \| | |_ / _ Y __| __|   | || '_ \| __/ _ \ '__/ _` |/ __| __| \ \ / / _ \
  11
+        | |  | | (_| | | | | |  _|  __|__ \ |_    | || | | | ||  __/ | | (_| | (__| |_| |\ V /  __/
  12
+        |_|  |_|\__,_|_| |_|_|_|  \___|___/\__|  |___|_| |_|\__\___|_|  \__,_|\___|\__|_| \_/ \___|
  13
+        
  14
+    Please feel free to learn what you wish from our source code :)
  15
+    
  16
+     ////////////////////////////////////////////////////////////////////////////////////////////// -->
  17
+	 
  18
+    <meta name="viewport" content="width=480; initial-scale=1.0; minimum-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
  19
+    <style type="text/css" media="screen, projection">
  20
+    	@import "css/style.css";
  21
+    </style>
  22
+    <link rel="shortcut icon" href="http://www.manifestinteractive.com/favicon.ico" type="image/x-icon" />
  23
+    <script type="application/x-javascript" src="js/iphone.js"></script>
  24
+    <script type="text/javascript" language="javascript" src="http://www.manifestinteractive.com/mint/?js"></script>
  25
+
  26
+</head>
  27
+<body onorientationchange="setTimeout(scrollTo,0,0,1);">
  28
+	<script src="http://www.google-analytics.com/urchin.js" type="text/javascript" language="javascript"></script>
  29
+    <script type="text/javascript" language="javascript">
  30
+		_uacct = "UA-513035-4";
  31
+		urchinTracker();
  32
+    </script>
  33
+</body>
  34
+</html>
0  js/index.html
No changes.
51  js/iphone.js
... ...
@@ -0,0 +1,51 @@
  1
+/*
  2
+#################################################################################
  3
+## Copyright (C) 2007 by Manifest Interactive                                  ##
  4
+## http://www.ManifestInteractive.com                                          ##
  5
+## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##
  6
+##                                                                             ##
  7
+## THIS SOFTWARE IS PROVIDED BY MANIFEST INTERACTIVE 'AS IS' AND ANY           ##
  8
+## EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE         ##
  9
+## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR          ##
  10
+## PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL MANIFEST INTERACTIVE BE          ##
  11
+## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR         ##
  12
+## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF        ##
  13
+## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR             ##
  14
+## BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,       ##
  15
+## WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE        ##
  16
+## OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,           ##
  17
+## EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.                          ##
  18
+## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##
  19
+## Author of file: Peter Russell Schmalfeldt                                   ##
  20
+#################################################################################
  21
+*/
  22
+(function(){
  23
+	var orient=null;
  24
+	var currentRotation=null;
  25
+	
  26
+	addEventListener("load",function(event){
  27
+		setInterval(checkOrientAndLocation,300);
  28
+		setTimeout(scrollTo,0,0,1);
  29
+	},false);
  30
+			
  31
+	function setOrientation(){
  32
+		switch(window.orientation){
  33
+			case 0:
  34
+				orient = 'portrait';
  35
+				break;
  36
+			case 90:
  37
+				orient = 'landscape';
  38
+				break;
  39
+			case -90:
  40
+				orient = 'upsidedown';
  41
+				break;
  42
+		}
  43
+		currentRotation = orient;
  44
+		document.body.setAttribute("orient",orient);
  45
+	}
  46
+	function checkOrientAndLocation(){
  47
+		if(currentRotation != window.orientation){
  48
+			setOrientation();
  49
+		}
  50
+	}
  51
+})();
55  license.txt
... ...
@@ -0,0 +1,55 @@
  1
+Copyright (c) 2008 - 2010, Manifest Interactive, LLC. All rights 
  2
+reserved. 
  3
+
  4
+This license is a legal agreement between you and Manifest Interactive, 
  5
+LLC. for the use of Manifest Interactive Software (the "Software"). By 
  6
+obtaining the Software you agree to comply with the terms and conditions 
  7
+of this license. 
  8
+
  9
+PERMITTED USE You are permitted to use, copy, modify, and distribute the 
  10
+Software and its documentation, with or without modification, for any 
  11
+purpose, provided that the following conditions are met: 
  12
+
  13
+1. A copy of this license agreement must be included with the 
  14
+distribution. 
  15
+
  16
+2. Redistributions of source code must retain the above copyright notice 
  17
+in all source code files. 
  18
+
  19
+3. Redistributions in binary form must reproduce the above copyright 
  20
+notice in the documentation and/or other materials provided with the 
  21
+distribution. 
  22
+
  23
+4. Any files that have been modified must carry notices stating the 
  24
+nature of the change and the names of those who changed them. 
  25
+
  26
+5. Products derived from the Software must include an acknowledgment 
  27
+that they are derived from Manifest Interactive in their documentation 
  28
+and/or other materials provided with the distribution. 
  29
+
  30
+6. Products derived from the Software may not be called "Manifest 
  31
+Interactive", nor may "Manifest Interactive" appear in their name, 
  32
+without prior written permission from Manifest Interactive, LLC. 
  33
+
  34
+INDEMNITY You agree to indemnify and hold harmless the authors of the 
  35
+Software and any contributors for any direct, indirect, incidental, or 
  36
+consequential third-party claims, actions or suits, as well as any 
  37
+related expenses, liabilities, damages, settlements or fees arising from 
  38
+your use or misuse of the Software, or a violation of any terms of this 
  39
+license. 
  40
+
  41
+DISCLAIMER OF WARRANTY THE SOFTWARE IS PROVIDED "AS IS", WITHOUT 
  42
+WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED 
  43
+TO, WARRANTIES OF QUALITY, PERFORMANCE, NON-INFRINGEMENT, 
  44
+MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. 
  45
+
  46
+LIMITATIONS OF LIABILITY YOU ASSUME ALL RISK ASSOCIATED WITH THE 
  47
+INSTALLATION AND USE OF THE SOFTWARE. IN NO EVENT SHALL THE AUTHORS OR 
  48
+COPYRIGHT HOLDERS OF THE SOFTWARE BE LIABLE FOR CLAIMS, DAMAGES OR OTHER 
  49
+LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE. 
  50
+LICENSE HOLDERS ARE SOLELY RESPONSIBLE FOR DETERMINING THE 
  51
+APPROPRIATENESS OF USE AND ASSUME ALL RISKS ASSOCIATED WITH ITS USE, 
  52
+INCLUDING BUT NOT LIMITED TO THE RISKS OF PROGRAM ERRORS, DAMAGE TO 
  53
+EQUIPMENT, LOSS OF DATA OR SOFTWARE PROGRAMS, OR UNAVAILABILITY OR 
  54
+INTERRUPTION OF OPERATIONS. 
  55
+

0 notes on commit 3842e50

Please sign in to comment.
Something went wrong with that request. Please try again.