SlideShare une entreprise Scribd logo
1  sur  25
Eye Candy for Your iPhone

 Tricks to make your WordPress site look
      more like a native iPhone app



Brian Shim
brian@brianshim.com
Slides at brianshim.com
Things we can fix in Safari Mobile
•    Change status bar color from
     gray to black
•    Hide browser address bar
•    Scale the window properly
•    Hide bottom nav bar
     (if user saves to home screen)
•    Custom home screen icon
•    Custom splash screen
Why do these things?


•   They look cool.
•   To get more pixels for your site.
•   Clients want them.
•   And…
Mobile Usage is Exploding
Mobile Users > Desktop Users in 2014
How Users Access Twitter
       More Use the Mobile Site than iOS




http://blog.twitter.com/2010/09/evolving-ecosystem.html
(September 2010)
Hiding the Mobile Safari Address Bar

Add this Javascript to the bottom of
  your page:
<script type = "text/javascript">
// Hide the address bar
window.addEventListener("DOMContentLoaded"
   ,function() {
       window.scrollTo(0, 1);
});
</script>

Note: I use “DOMContentLoaded” rather than “load”,
   because “DOM” works faster and doesn’t wait for
   images to be loaded before getting rid of the task bar.



For more info check out: http://davidwalsh.name/hide-address-bar
Add the code to your theme footer..
Notes
• Provides extra sixty pixels of height for your site!
• Number One Mistake: Web page must be taller
  than the browser window for this to work!
• During page load, address bar will slide down
  momentarily and then slide back up – can cause
  sea-sickness if you have a lot of page loads.
• Address bar is still accessible if the user swipes
  down on the page
• Should work for Android (but I have not tested)
Scaling the Browser Window

Add this meta tag to the <head> section of your page:

<meta name="viewport" content="width=device-
  width; initial-scale=1.0;" />

• Play with the “initial-scale” value until your site looks the
  best. Higher numbers zoom in. Lower numbers zoom
  out.
• For more info, check out:
  http://developer.apple.com/library/safari/#documentation/appleapplications
Add the code to your theme
     <head> section..
Here are the results with
       these two changes:
Original    New (scale=0.5)   Or this! (scale=1.0)
This is NOT a replacement for a
truly responsive mobile design!

 But, it’s better than nothing,
   and it took five minutes!

         So, why not?
Now let’s create a custom icon..




Icon created by               Custom icon
iOS (blah)
How to create a custom home
screen icon for iPhone/iPod Touch
• Create a 57 x 57 pixel PNG file (square corners)
• WordPress plugin: “Blog Icons”
Manual Method: add a meta tag to <head>
• <link rel="apple-touch-icon"
  href="images/iOS_button.png" />
Or
• <link rel="apple-touch-icon-precomposed"
  href="images/iOS_button.png" />
• “precomposed” means no gloss effect
• More info (including Retina support) at   http://
  mathiasbynens.be/notes/touch-icons
It’s all about enhancing the user
            experience..




                         Ugly!
Custom Splash Screen
• Create a 320 x 460 pixel PNG file
• WordPress plugin: “Blog Icons”
• Note, the splash screen will only appear if the
  user has saved the site to the home screen!
• If you don’t create this, the last visited page of
  your site will flash briefly during startup.. UGLY!
Manual Methods:
• Add this to the <head> section:
  <link rel="apple-touch-startup-image"
  href="your_file.png" />
Now for something more advanced…

Permanently eliminating both toolbars from
Mobile Safari! (aka “Full Screen Mode”)
                           Full Screen Mode
Full-Screen Mode
• To get rid of both toolbars permanently:
  <meta name="apple-mobile-web-app-capable"
  content="yes" />

• To make top status bar black (looks better than gray):
  <meta name="apple-mobile-web-app-status-bar-style"
  content="black" />

• Caveat: These only work if user has saved your site to
  their home screen!

• More info at:
  http://developer.apple.com/library/safari/#documentation/appleapplic
Why is this “advanced”?

Problem #1:
  There is no “back” button. Your site is now
  completely responsible for navigation.

Solution:
 Can solve this with JavaScript or plug-in;
 left as exercise to the user.
Why is this “advanced”?

Problem #2:
  If the user clicks on any links, the browser
  will drop out of “full screen mode” back
  into normal mode.

Solution:
 All intra-site links must be hijacked by
 JavaScript to stay in “full screen mode”.
Solution to Second Issue:
       Use jQuery to Hijack Intra-Site Links
<script type = "text/javascript">
// This is needed to avoid the animation when going to new links
   in iOS
jQuery(document).ready(function() {
   jQuery('a').each(function() {
           jQuery(this).click(function() {
                     var url = jQuery(this).attr('href');
                     // don't change links that go off-site
                     var myRegEx = /lifetricks3/;               Your URL here
                     if (url.search(myRegEx)>=0)
                              {
                              location = url;
                              return false;
                              }
           });
   });
});
</script>
Note: this script assumes your WordPress theme is using jQuery!
The Finished WordPress Site
     Old           New
Again, not a substitute for a real mobile or
responsive theme..

But, can be used in addition to a mobile or
responsive theme. Some don’t do all of
these tricks.

Or, as an easy bonus to improve the
appearance of your desktop theme
if you are not able to use a responsive
theme for some reason.
For more info, check out “Building iPhone Apps with HTML, CSS, and
Javascript” by Jonathan Stark
Example That Mimics a Native App
    Using These Techniques




  It is almost indistinguishable from a native app!
                 http://rustyfrank.com
Eye Candy for Your iPhone

  Tricks to make your WordPress site look more
             like a native iPhone app
                     8/10/2012



Brian Shim
brian@brianshim.com
Slides at brianshim.com

Contenu connexe

Tendances

Introduction to Flex Hero for Mobile Devices
Introduction to Flex Hero for Mobile DevicesIntroduction to Flex Hero for Mobile Devices
Introduction to Flex Hero for Mobile DevicesRyan Stewart
 
Progressive Web Apps - Techdays Finland
Progressive Web Apps - Techdays FinlandProgressive Web Apps - Techdays Finland
Progressive Web Apps - Techdays FinlandChristian Heilmann
 
Publishing A University Magazine in Cascade Server CMS by Marcello prattico
Publishing A University Magazine in Cascade Server CMS by Marcello prattico Publishing A University Magazine in Cascade Server CMS by Marcello prattico
Publishing A University Magazine in Cascade Server CMS by Marcello prattico hannonhill
 
Pinned Sites in Internet Explorer 9
Pinned Sites in Internet Explorer 9Pinned Sites in Internet Explorer 9
Pinned Sites in Internet Explorer 9Abram John Limpin
 
John Overall at Word Camp Victoria 2011
John Overall at Word Camp Victoria 2011John Overall at Word Camp Victoria 2011
John Overall at Word Camp Victoria 2011John Overall
 
Fragmented Web Design
Fragmented Web DesignFragmented Web Design
Fragmented Web DesignMatthias Lau
 
Building Hybrid Apps with Ember
Building Hybrid Apps with EmberBuilding Hybrid Apps with Ember
Building Hybrid Apps with Emberjakecraige
 
Blog tips
Blog tipsBlog tips
Blog tipsgiri529
 
Introduction to Xamarin.Forms
Introduction to Xamarin.FormsIntroduction to Xamarin.Forms
Introduction to Xamarin.FormsJames Montemagno
 
Creating a Website with WordPress.org
Creating a Website with WordPress.orgCreating a Website with WordPress.org
Creating a Website with WordPress.orgEileen Lonergan
 
Creating a self hosted wordpress website from scratch
Creating a self hosted wordpress website from scratchCreating a self hosted wordpress website from scratch
Creating a self hosted wordpress website from scratchNeil Kearney
 
Creating your own Blog Network with SCE
Creating your own Blog Network with SCECreating your own Blog Network with SCE
Creating your own Blog Network with SCEBiz4Sale
 
Build Facebook Connect enabled applications with Google Apps Engine
Build Facebook Connect enabled applications with Google Apps EngineBuild Facebook Connect enabled applications with Google Apps Engine
Build Facebook Connect enabled applications with Google Apps EngineWeb2 Ireland
 
WordPress & User Experience - WordCamp London
WordPress & User Experience - WordCamp LondonWordPress & User Experience - WordCamp London
WordPress & User Experience - WordCamp LondonSara Cannon
 
Setting up a blog with WordPress.com Jan 2014 Class
Setting up a blog with WordPress.com Jan 2014 ClassSetting up a blog with WordPress.com Jan 2014 Class
Setting up a blog with WordPress.com Jan 2014 ClassEileen Lonergan
 
Setting up a Blog with WordPress.com
Setting up a Blog with WordPress.comSetting up a Blog with WordPress.com
Setting up a Blog with WordPress.comEileen Lonergan
 
How to report a bug?
How to report a bug?How to report a bug?
How to report a bug?Pagepro
 

Tendances (20)

Introduction to Flex Hero for Mobile Devices
Introduction to Flex Hero for Mobile DevicesIntroduction to Flex Hero for Mobile Devices
Introduction to Flex Hero for Mobile Devices
 
Progressive Web Apps - Techdays Finland
Progressive Web Apps - Techdays FinlandProgressive Web Apps - Techdays Finland
Progressive Web Apps - Techdays Finland
 
Publishing A University Magazine in Cascade Server CMS by Marcello prattico
Publishing A University Magazine in Cascade Server CMS by Marcello prattico Publishing A University Magazine in Cascade Server CMS by Marcello prattico
Publishing A University Magazine in Cascade Server CMS by Marcello prattico
 
Pinned Sites in Internet Explorer 9
Pinned Sites in Internet Explorer 9Pinned Sites in Internet Explorer 9
Pinned Sites in Internet Explorer 9
 
John Overall at Word Camp Victoria 2011
John Overall at Word Camp Victoria 2011John Overall at Word Camp Victoria 2011
John Overall at Word Camp Victoria 2011
 
Fragmented Web Design
Fragmented Web DesignFragmented Web Design
Fragmented Web Design
 
9 word press 2c
9   word press 2c9   word press 2c
9 word press 2c
 
Coffee script
Coffee scriptCoffee script
Coffee script
 
Building Hybrid Apps with Ember
Building Hybrid Apps with EmberBuilding Hybrid Apps with Ember
Building Hybrid Apps with Ember
 
Blog tips
Blog tipsBlog tips
Blog tips
 
Introduction to Xamarin.Forms
Introduction to Xamarin.FormsIntroduction to Xamarin.Forms
Introduction to Xamarin.Forms
 
Creating a Website with WordPress.org
Creating a Website with WordPress.orgCreating a Website with WordPress.org
Creating a Website with WordPress.org
 
Creating a self hosted wordpress website from scratch
Creating a self hosted wordpress website from scratchCreating a self hosted wordpress website from scratch
Creating a self hosted wordpress website from scratch
 
Creating your own Blog Network with SCE
Creating your own Blog Network with SCECreating your own Blog Network with SCE
Creating your own Blog Network with SCE
 
Build Facebook Connect enabled applications with Google Apps Engine
Build Facebook Connect enabled applications with Google Apps EngineBuild Facebook Connect enabled applications with Google Apps Engine
Build Facebook Connect enabled applications with Google Apps Engine
 
WordPress & User Experience - WordCamp London
WordPress & User Experience - WordCamp LondonWordPress & User Experience - WordCamp London
WordPress & User Experience - WordCamp London
 
Setting up a blog with WordPress.com Jan 2014 Class
Setting up a blog with WordPress.com Jan 2014 ClassSetting up a blog with WordPress.com Jan 2014 Class
Setting up a blog with WordPress.com Jan 2014 Class
 
Adobe & HTML5
Adobe & HTML5Adobe & HTML5
Adobe & HTML5
 
Setting up a Blog with WordPress.com
Setting up a Blog with WordPress.comSetting up a Blog with WordPress.com
Setting up a Blog with WordPress.com
 
How to report a bug?
How to report a bug?How to report a bug?
How to report a bug?
 

En vedette

Psych ch12-personalityassessments
Psych ch12-personalityassessmentsPsych ch12-personalityassessments
Psych ch12-personalityassessmentsjmclaugh813
 
Weaving Your Marketing Loose Ends into a Tight Plan
Weaving Your Marketing Loose Ends into a Tight PlanWeaving Your Marketing Loose Ends into a Tight Plan
Weaving Your Marketing Loose Ends into a Tight PlanKivi Leroux Miller
 
Unwrapping Tumblr for PR Writers at Marquette University
Unwrapping Tumblr for PR Writers at Marquette UniversityUnwrapping Tumblr for PR Writers at Marquette University
Unwrapping Tumblr for PR Writers at Marquette UniversityMykl Novak
 
Unwrapping Tumblr for Writers (Advertising & PR at Marquette University)
Unwrapping Tumblr for Writers (Advertising & PR at Marquette University)Unwrapping Tumblr for Writers (Advertising & PR at Marquette University)
Unwrapping Tumblr for Writers (Advertising & PR at Marquette University)Mykl Novak
 

En vedette (6)

Psych ch12-personalityassessments
Psych ch12-personalityassessmentsPsych ch12-personalityassessments
Psych ch12-personalityassessments
 
Referências
ReferênciasReferências
Referências
 
Cuantoelefante frase
Cuantoelefante fraseCuantoelefante frase
Cuantoelefante frase
 
Weaving Your Marketing Loose Ends into a Tight Plan
Weaving Your Marketing Loose Ends into a Tight PlanWeaving Your Marketing Loose Ends into a Tight Plan
Weaving Your Marketing Loose Ends into a Tight Plan
 
Unwrapping Tumblr for PR Writers at Marquette University
Unwrapping Tumblr for PR Writers at Marquette UniversityUnwrapping Tumblr for PR Writers at Marquette University
Unwrapping Tumblr for PR Writers at Marquette University
 
Unwrapping Tumblr for Writers (Advertising & PR at Marquette University)
Unwrapping Tumblr for Writers (Advertising & PR at Marquette University)Unwrapping Tumblr for Writers (Advertising & PR at Marquette University)
Unwrapping Tumblr for Writers (Advertising & PR at Marquette University)
 

Similaire à Eye candy for your iPhone

Responsive websites. Toolbox
Responsive websites. ToolboxResponsive websites. Toolbox
Responsive websites. ToolboxWojtek Zając
 
Responsive web design & mobile web development - a technical and business app...
Responsive web design & mobile web development - a technical and business app...Responsive web design & mobile web development - a technical and business app...
Responsive web design & mobile web development - a technical and business app...Atos_Worldline
 
Skill Session - Web Multi Device
Skill Session - Web Multi DeviceSkill Session - Web Multi Device
Skill Session - Web Multi Devicefilirom1
 
Dreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDee Sadler
 
Fake it 'til you make it
Fake it 'til you make itFake it 'til you make it
Fake it 'til you make itJonathan Snook
 
Building WebApp with HTML5
Building WebApp with HTML5Building WebApp with HTML5
Building WebApp with HTML5Tien Tran Le Duy
 
Responsive Web Design: Tips and Tricks
Responsive Web Design: Tips and TricksResponsive Web Design: Tips and Tricks
Responsive Web Design: Tips and TricksGautam Krishnan
 
Cordova: Making Native Mobile Apps With Your Web Skills
Cordova: Making Native Mobile Apps With Your Web SkillsCordova: Making Native Mobile Apps With Your Web Skills
Cordova: Making Native Mobile Apps With Your Web SkillsClay Ewing
 
Cm i padwebdev_lunch_learn
Cm i padwebdev_lunch_learnCm i padwebdev_lunch_learn
Cm i padwebdev_lunch_learnCritical Mass
 
Aucd ppt
Aucd pptAucd ppt
Aucd ppticidemo
 
Ios7 - The good the bad & the changes
Ios7 - The good the bad & the changesIos7 - The good the bad & the changes
Ios7 - The good the bad & the changesChrissy Welsh
 
Multi screen HTML5
Multi screen HTML5Multi screen HTML5
Multi screen HTML5Ron Reiter
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX DesignersAshlimarie
 
From Idea to App (or “How we roll at Small Town Heroes”)
From Idea to App (or “How we roll at Small Town Heroes”)From Idea to App (or “How we roll at Small Town Heroes”)
From Idea to App (or “How we roll at Small Town Heroes”)Bramus Van Damme
 
Phonegap - An Introduction
Phonegap - An IntroductionPhonegap - An Introduction
Phonegap - An IntroductionTyler Johnston
 
Progressive Web App Challenges
Progressive Web App ChallengesProgressive Web App Challenges
Progressive Web App ChallengesJason Grigsby
 
Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...IT Event
 
Html5 and beyond the next generation of mobile web applications - Touch Tou...
Html5 and beyond   the next generation of mobile web applications - Touch Tou...Html5 and beyond   the next generation of mobile web applications - Touch Tou...
Html5 and beyond the next generation of mobile web applications - Touch Tou...RIA RUI Society
 
Web Apps and more
Web Apps and moreWeb Apps and more
Web Apps and moreYan Shi
 

Similaire à Eye candy for your iPhone (20)

Responsive websites. Toolbox
Responsive websites. ToolboxResponsive websites. Toolbox
Responsive websites. Toolbox
 
Responsive web design & mobile web development - a technical and business app...
Responsive web design & mobile web development - a technical and business app...Responsive web design & mobile web development - a technical and business app...
Responsive web design & mobile web development - a technical and business app...
 
Skill Session - Web Multi Device
Skill Session - Web Multi DeviceSkill Session - Web Multi Device
Skill Session - Web Multi Device
 
Dreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile design
 
Fake it 'til you make it
Fake it 'til you make itFake it 'til you make it
Fake it 'til you make it
 
Building WebApp with HTML5
Building WebApp with HTML5Building WebApp with HTML5
Building WebApp with HTML5
 
Responsive Web Design: Tips and Tricks
Responsive Web Design: Tips and TricksResponsive Web Design: Tips and Tricks
Responsive Web Design: Tips and Tricks
 
Cordova: Making Native Mobile Apps With Your Web Skills
Cordova: Making Native Mobile Apps With Your Web SkillsCordova: Making Native Mobile Apps With Your Web Skills
Cordova: Making Native Mobile Apps With Your Web Skills
 
Cm i padwebdev_lunch_learn
Cm i padwebdev_lunch_learnCm i padwebdev_lunch_learn
Cm i padwebdev_lunch_learn
 
Aucd ppt
Aucd pptAucd ppt
Aucd ppt
 
Ios7 - The good the bad & the changes
Ios7 - The good the bad & the changesIos7 - The good the bad & the changes
Ios7 - The good the bad & the changes
 
Multi screen HTML5
Multi screen HTML5Multi screen HTML5
Multi screen HTML5
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX Designers
 
From Idea to App (or “How we roll at Small Town Heroes”)
From Idea to App (or “How we roll at Small Town Heroes”)From Idea to App (or “How we roll at Small Town Heroes”)
From Idea to App (or “How we roll at Small Town Heroes”)
 
Responsive design
Responsive designResponsive design
Responsive design
 
Phonegap - An Introduction
Phonegap - An IntroductionPhonegap - An Introduction
Phonegap - An Introduction
 
Progressive Web App Challenges
Progressive Web App ChallengesProgressive Web App Challenges
Progressive Web App Challenges
 
Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...
 
Html5 and beyond the next generation of mobile web applications - Touch Tou...
Html5 and beyond   the next generation of mobile web applications - Touch Tou...Html5 and beyond   the next generation of mobile web applications - Touch Tou...
Html5 and beyond the next generation of mobile web applications - Touch Tou...
 
Web Apps and more
Web Apps and moreWeb Apps and more
Web Apps and more
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 

Dernier (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Eye candy for your iPhone

  • 1. Eye Candy for Your iPhone Tricks to make your WordPress site look more like a native iPhone app Brian Shim brian@brianshim.com Slides at brianshim.com
  • 2. Things we can fix in Safari Mobile • Change status bar color from gray to black • Hide browser address bar • Scale the window properly • Hide bottom nav bar (if user saves to home screen) • Custom home screen icon • Custom splash screen
  • 3. Why do these things? • They look cool. • To get more pixels for your site. • Clients want them. • And…
  • 4. Mobile Usage is Exploding Mobile Users > Desktop Users in 2014
  • 5. How Users Access Twitter More Use the Mobile Site than iOS http://blog.twitter.com/2010/09/evolving-ecosystem.html (September 2010)
  • 6. Hiding the Mobile Safari Address Bar Add this Javascript to the bottom of your page: <script type = "text/javascript"> // Hide the address bar window.addEventListener("DOMContentLoaded" ,function() { window.scrollTo(0, 1); }); </script> Note: I use “DOMContentLoaded” rather than “load”, because “DOM” works faster and doesn’t wait for images to be loaded before getting rid of the task bar. For more info check out: http://davidwalsh.name/hide-address-bar
  • 7. Add the code to your theme footer..
  • 8. Notes • Provides extra sixty pixels of height for your site! • Number One Mistake: Web page must be taller than the browser window for this to work! • During page load, address bar will slide down momentarily and then slide back up – can cause sea-sickness if you have a lot of page loads. • Address bar is still accessible if the user swipes down on the page • Should work for Android (but I have not tested)
  • 9. Scaling the Browser Window Add this meta tag to the <head> section of your page: <meta name="viewport" content="width=device- width; initial-scale=1.0;" /> • Play with the “initial-scale” value until your site looks the best. Higher numbers zoom in. Lower numbers zoom out. • For more info, check out: http://developer.apple.com/library/safari/#documentation/appleapplications
  • 10. Add the code to your theme <head> section..
  • 11. Here are the results with these two changes: Original New (scale=0.5) Or this! (scale=1.0)
  • 12. This is NOT a replacement for a truly responsive mobile design! But, it’s better than nothing, and it took five minutes! So, why not?
  • 13. Now let’s create a custom icon.. Icon created by Custom icon iOS (blah)
  • 14. How to create a custom home screen icon for iPhone/iPod Touch • Create a 57 x 57 pixel PNG file (square corners) • WordPress plugin: “Blog Icons” Manual Method: add a meta tag to <head> • <link rel="apple-touch-icon" href="images/iOS_button.png" /> Or • <link rel="apple-touch-icon-precomposed" href="images/iOS_button.png" /> • “precomposed” means no gloss effect • More info (including Retina support) at http:// mathiasbynens.be/notes/touch-icons
  • 15. It’s all about enhancing the user experience.. Ugly!
  • 16. Custom Splash Screen • Create a 320 x 460 pixel PNG file • WordPress plugin: “Blog Icons” • Note, the splash screen will only appear if the user has saved the site to the home screen! • If you don’t create this, the last visited page of your site will flash briefly during startup.. UGLY! Manual Methods: • Add this to the <head> section: <link rel="apple-touch-startup-image" href="your_file.png" />
  • 17. Now for something more advanced… Permanently eliminating both toolbars from Mobile Safari! (aka “Full Screen Mode”) Full Screen Mode
  • 18. Full-Screen Mode • To get rid of both toolbars permanently: <meta name="apple-mobile-web-app-capable" content="yes" /> • To make top status bar black (looks better than gray): <meta name="apple-mobile-web-app-status-bar-style" content="black" /> • Caveat: These only work if user has saved your site to their home screen! • More info at: http://developer.apple.com/library/safari/#documentation/appleapplic
  • 19. Why is this “advanced”? Problem #1: There is no “back” button. Your site is now completely responsible for navigation. Solution: Can solve this with JavaScript or plug-in; left as exercise to the user.
  • 20. Why is this “advanced”? Problem #2: If the user clicks on any links, the browser will drop out of “full screen mode” back into normal mode. Solution: All intra-site links must be hijacked by JavaScript to stay in “full screen mode”.
  • 21. Solution to Second Issue: Use jQuery to Hijack Intra-Site Links <script type = "text/javascript"> // This is needed to avoid the animation when going to new links in iOS jQuery(document).ready(function() { jQuery('a').each(function() { jQuery(this).click(function() { var url = jQuery(this).attr('href'); // don't change links that go off-site var myRegEx = /lifetricks3/; Your URL here if (url.search(myRegEx)>=0) { location = url; return false; } }); }); }); </script> Note: this script assumes your WordPress theme is using jQuery!
  • 22. The Finished WordPress Site Old New
  • 23. Again, not a substitute for a real mobile or responsive theme.. But, can be used in addition to a mobile or responsive theme. Some don’t do all of these tricks. Or, as an easy bonus to improve the appearance of your desktop theme if you are not able to use a responsive theme for some reason. For more info, check out “Building iPhone Apps with HTML, CSS, and Javascript” by Jonathan Stark
  • 24. Example That Mimics a Native App Using These Techniques It is almost indistinguishable from a native app! http://rustyfrank.com
  • 25. Eye Candy for Your iPhone Tricks to make your WordPress site look more like a native iPhone app 8/10/2012 Brian Shim brian@brianshim.com Slides at brianshim.com