SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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?
 

Andere mochten auch

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
 

Andere mochten auch (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)
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Kürzlich hochgeladen (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

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