Permalink
Browse files

Markup and CSS support for fixing iPhone display

Conflicts:

	public/css/showoff.css
	views/index.erb
  • Loading branch information...
1 parent 84ff1ee commit bbf65e6a847648844cec7b21f756227a31407752 @schacon schacon committed Apr 5, 2010
Showing with 86 additions and 4 deletions.
  1. +33 −0 public/css/onepage.css
  2. +49 −0 public/css/showoff.css
  3. +3 −2 views/index.erb
  4. +1 −2 views/onepage.erb
View
33 public/css/onepage.css
@@ -9,3 +9,36 @@
border: 1px solid #333;
page-break-after: always
}
+
+/* iPhone */
+/* Portrait */
+@media screen and (max-width: 320px)
+{
+ .preso {
+ margin: 10px;
+ padding: 0;
+ width: 320px;
+ min-height: 480px;
+ margin-left:auto;
+ margin-right:auto;
+/* overflow:hidden;*/
+ border: 1px solid #333;
+ page-break-after: always
+ }
+}
+/* Landscape */
+@media screen and (min-width: 321px)
+{
+ .preso {
+ margin: 10px;
+ padding: 0;
+ width: 480px;
+ min-height: 320px;
+ margin-left:auto;
+ margin-right:auto;
+/* overflow:hidden;*/
+ border: 1px solid #333;
+ page-break-after: always
+ }
+}
+
View
49 public/css/showoff.css
@@ -20,6 +20,55 @@ body {
margin-right:auto;
}
+/* iPhone */
+/* Portrait */
+@media screen and (max-width: 320px)
+{
+ #preso {
+ margin: 0;
+ padding: 0;
+ width: 320px;
+ max-height: 356px;
+ margin-left:auto;
+ margin-right:auto;
+/* overflow:hidden;*/
+ }
+ #footer {
+ background: #eee;
+ margin: 0;
+ padding: 2px;
+ width: 320px;
+ height: 20px;
+ margin-left:auto;
+ margin-right:auto;
+ }
+}
+/* Landscape */
+@media screen and (max-width: 480px)
+{
+ #preso {
+ margin: 0;
+ padding: 0;
+/* min-height: 320px;*/
+ width: 480px;
+ margin-left:auto;
+ margin-right:auto;
+ }
+ #footer {
+ background: #eee;
+ margin: 0;
+ padding: 2px;
+ width: 480px;
+ height: 20px;
+ margin-left:auto;
+ margin-right:auto;
+ }
+}
+
+.slide {
+ border: 1px solid #fff;
+}
+
.center img {
display:block;
margin-left:auto;
View
5 views/index.erb
@@ -4,7 +4,6 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-
<title>Presentation</title>
<link rel="stylesheet" href="<%= @asset_path %>/css/reset.css" type="text/css"/>
@@ -14,10 +13,12 @@
<script type="text/javascript" src="<%= @asset_path %>/js/jquery.cycle.all.js"></script>
<script type="text/javascript" src="<%= @asset_path %>/js/jquery-print.js"></script>
<script type="text/javascript" src="<%= @asset_path %>/js/jquery.batchImageLoad.js"></script>
+
+ <script type="text/javascript" src="<%= @asset_path %>/js/jquery.doubletap-0.1.js"></script>
+
<script type="text/javascript" src="<%= @asset_path %>/js/jquery.uuid.js"></script>
<script type="text/javascript" src="<%= @asset_path %>/js/jquery.cookie.js"></script>
<script type="text/javascript" src="<%= @asset_path %>/js/jquery.ws-0.3pre.js"></script>
- <script type="text/javascript" src="<%= @asset_path %>/js/jquery.doubletap-0.1.js"></script>
<script type="text/javascript" src="<%= @asset_path %>/js/fg.menu.js"></script>
<script type="text/javascript" src="<%= @asset_path %>/js/showoff.js"></script>
View
3 views/onepage.erb
@@ -4,7 +4,6 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-
<title>Presentation</title>
<% if @no_js %>
@@ -18,7 +17,7 @@
<% end %>
<% if !@no_js %>
- <%= inline_js(['jquery-1.4.min.js', 'jquery-print.js', 'showoff.js', 'onepage.js', 'sh_main.min.js'], 'public/js') %>
+ <%= inline_js(['jquery-1.4.min.js', 'jquery.jswipe.js', 'jquery-print.js', 'showoff.js', 'onepage.js', 'sh_main.min.js'], 'public/js') %>
<script type="text/javascript">
$(document).ready(function() {
setupOnePage()

0 comments on commit bbf65e6

Please sign in to comment.