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: Tricks to Make Your WordPress Site Look Like a Native App

Responsive websites. Toolbox
Responsive websites. ToolboxResponsive websites. Toolbox
Responsive websites. ToolboxWojtek Zając
 
Skill Session - Web Multi Device
Skill Session - Web Multi DeviceSkill Session - Web Multi Device
Skill Session - Web Multi Devicefilirom1
 
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
 
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: Tricks to Make Your WordPress Site Look Like a Native App (20)

Responsive websites. Toolbox
Responsive websites. ToolboxResponsive websites. Toolbox
Responsive websites. Toolbox
 
Skill Session - Web Multi Device
Skill Session - Web Multi DeviceSkill Session - Web Multi Device
Skill Session - Web Multi Device
 
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...
 
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

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Dernier (20)

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

Eye Candy for Your iPhone: Tricks to Make Your WordPress Site Look Like a Native App

  • 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