From 645af373580820dccb59297980327dc53b244f88 Mon Sep 17 00:00:00 2001 From: danielgrippi Date: Tue, 20 Sep 2011 08:52:42 -0700 Subject: [PATCH] more touchup; added placeholder for reaction tabs on post show; added more mobile boilerplate / compatability; apple splash page asset --- app/views/layouts/application.mobile.haml | 33 +++- app/views/people/show.mobile.haml | 10 +- app/views/posts/show.mobile.haml | 3 +- app/views/shared/_footer.mobile.haml | 2 +- app/views/shared/_stream_element.mobile.haml | 50 +++-- config/assets.yml | 7 +- config/locales/diaspora/en.yml | 2 +- public/images/apple-splash.png | Bin 0 -> 17720 bytes public/javascripts/vendor/mbp-helper.js | 171 ++++++++++++++++++ .../vendor/mbp-modernizr-custom.js | 14 ++ public/javascripts/vendor/mbp-respond.min.js | 7 + public/stylesheets/sass/mobile.scss | 77 +++++--- 12 files changed, 319 insertions(+), 57 deletions(-) create mode 100644 public/images/apple-splash.png create mode 100644 public/javascripts/vendor/mbp-helper.js create mode 100644 public/javascripts/vendor/mbp-modernizr-custom.js create mode 100644 public/javascripts/vendor/mbp-respond.min.js diff --git a/app/views/layouts/application.mobile.haml b/app/views/layouts/application.mobile.haml index 667550dd9..26423f0e3 100644 --- a/app/views/layouts/application.mobile.haml +++ b/app/views/layouts/application.mobile.haml @@ -12,13 +12,30 @@ %meta{:name => "author", :content => "Diaspora, Inc."} %meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/ - %meta{:name =>'viewport', :content => "width=device-width, minimum-scale=1, maximum-scale=1"} + / Viewport scale + %meta{:name =>'viewport', :content => "width=device-width, initial-scale=1"} %meta{:name => "HandheldFriendly", :content => "True"} %meta{:name => "MobileOptimized", :content => "320"} + / Force cleartype on WP7 %meta{'http-equiv' => "cleartype", :content => 'on'} + / Home screen icon (sized for retina displays) + %link{:rel => 'apple-touch-icon', :href => '/apple-touch-icon.png'} + / For Nokia devices + %link{:rel => 'shortcut icon', :href => '/apple-touch-icon.png'} + + / iOS mobile web app indicator + /%meta{:name => "apple-mobile-web-app-capable", :content => "yes"} + /%link{:rel => "apple-touch-startup-image", :href => "/images/apple-splash.png"} + + / Stylesheets = include_stylesheets :mobile + %script{:src => "javascripts/vendor/mbp-modernizr-custom.js"} + / Media Queries Polyfill https://github.com/shichuan/mobile-html5-boilerplate/wiki/Media-Queries-Polyfill + :javascript + Modernizr.mq('(min-width:0)') || document.write('