SlideShare une entreprise Scribd logo
1  sur  16
CSS and HTML Coding 2013
Mobile Development
Todd Keup
@toddkeup
Las Vegas 2013
@toddkeup
Overview
•
•
•
•
•

Mobile native app versus mobile web
Variations of mobile web development
How to get started
@media query basics
Tips and tricks

@toddkeup
Native app or mobile web?
•
•
•
•
•
•

Considerations
Features and functions
Design, layout, personalization
Budget
SEO
Updates and App store approval
Platforms
@toddkeup
Mobile web design methods
• Responsive Web Design (RWD)
• Adaptive Web Design (AWD)
• Responsive Design + Server Side
Components (RESS)
• Responsible Web Design

@toddkeup
Responsible Web Design
Focus on your user …

… really?

@toddkeup
Resources
• Apps or web for Mobile Development?
http://youtu.be/4f2Zky_YyyQ
• Building Smartphone-Optimized
Websites
http://bit.ly/JXuTPF

@toddkeup
How to get started
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Title</title>
<link rel="stylesheet" type="text/css" media="screen" href="jquery-ui.css">
<script type="text/javascript" charset="utf-8" src="jquery.min.js"></script>
</head>

link cannot have a charset attribute
style cannot have a charset attribute
script if embedded must not have a charset attribute; if external (src attribute
specified) and you choose to include a charset, it must match the Content-Type
metadata (<meta charset="utf-8">

@toddkeup
@media query basics
@import nomalize.css /* reset styles */
/* general settings, overall site layout and design */
body { font:16px Helvetica, Arial, sans-serif; }
.wrapper { width:90%; margin:0 5%;}
/ * media queries (using pixel widths) */
@media only screen and (min-width: 320px)
@media only screen and (min-width: 480px)
@media only screen and (min-width: 768px)
@media only screen and (min-width: 1140px)
@media print {}

@toddkeup

{}
{}
{}
{}
Resources
http://www.initializr.com/

http://html5boilerplate.com/

@toddkeup
Tips and tricks
• Need IE6-IE8 support? Respond.js
https://github.com/scottjehl/Respond
• Stop iOS from thinking all numbers are phone links:
http://bit.ly/wy6ThZ
<meta name="format-detection" content="telephone=no">
<!-- Then use phone links to explicitly create a link. -->
<p>Phone: <a href="tel:1-408-555-5555">1-408-555-5555</a></p>
<!-- Otherwise numbers that look like phone numbers ... -->
<p>Not a phone number: 408-555-5555</p>

@toddkeup
Tips and tricks
Add pizzazz to your telephone links
Before:

After:

a[href^="tel:"]{text-decoration:none;}
a[href^="tel:"]:before {
content:"260E";
margin-right:0.5em;
}

@toddkeup
Tips and tricks
Navigation Menu
<div id="navmain">
<div id="menu-icon></div>
<ul><li><a class="activelink">Home</a>
<ul><li><a href="">Menu Option 1</a></li>
<li><a href="">Menu Option 2</a>
<ul>
#menu-icon {
background: url("/css/menu-icon.png") no-repeat
scroll 10px center rgba(0, 0, 0, 0);
cursor:pointer; display:block; height:20px;
position:absolute; right:0; top:50px; width: 35px;
}
@media only screen and (min-width: 768px) {
#menu-icon {display:none;}
}
/* toggle nav */
$('#navmain').on('click', '#menu-icon', function(){
$('.menucontent ul:first').slideToggle(100);
});

@toddkeup
Tips and tricks
Full Site Version
<div id="view-options"><span id="view-full">View Full Site</span></div>
/* View Mobile/Full Site options */
#view-options span {
background-color: #222222;
border-radius: 8px 8px 8px 8px; padding: 8px 16px;
color: #FFFFFF; display: block; font-size: 16px; font-weight: bold;
}
#view-default {display: none;}
@media only screen and (min-width: 768px) {
/* full viewport new definitions */
span#view-full{display:none;}
span#view-default{display:inline;}
}

@toddkeup
Tips and tricks
Full Site Version
/**
* Mobile "Show Full Site" feature using HTML5 Web Storage
* http://dev.w3.org/html5/webstorage/
*/
(function(){
// default width value for full site viewport
var widthFull
= 768;
// localStorage value already set?
try {
localStorage.showFullSite = localStorage.showFullSite == 'undefined'
? 'true'
: localStorage.showFullSite
;
} catch (e) {
// no polyfill necessary at this time; if needed:
// https://developer.mozilla.org/en-US/docs/DOM/Storage OR
// https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browserPolyfills
}

@toddkeup
Tips and tricks
Full Site Version
var showFullSite = function(){
$('meta[name="viewport"]').attr('content','width='+widthFull);
if(!$('#view-options #view-default').length){
$('#view-options').append('<span id="view-default">View Mobile</span>');
}
localStorage.showFullSite = 'false'; // don't show full site button
};
var showDeviceWidth = function(){
$('meta[name="viewport"]').attr('content','width=device-width');
localStorage.showFullSite = 'true'; // show full site button
};
// User already selected view full site? Change the viewport
if(Modernizr.localstorage){
if(localStorage.showFullSite == 'false'){
showFullSite();
}
}
$('#view-full').on('click', function(){showFullSite();});
$('#view-options').on('click', '#view-default', function(){
showDeviceWidth();
});
})();

@toddkeup
Thank You
Todd Keup
todd@magnifisites.com
@toddkeup
@toddkeup

Contenu connexe

Similaire à CSS and HTML Coding Today - Pubcon Las Vegas 2013

JSP Web Technology Application on Road Transport Services
JSP Web Technology Application on Road Transport ServicesJSP Web Technology Application on Road Transport Services
JSP Web Technology Application on Road Transport ServicesMujeeb Rehman
 
Website Optimization -SEO - Step By Step
Website Optimization -SEO - Step By StepWebsite Optimization -SEO - Step By Step
Website Optimization -SEO - Step By StepMia Lee
 
Build It and They Will Come: SharePoint 2013 User Adoption
Build It and They Will Come:  SharePoint 2013 User AdoptionBuild It and They Will Come:  SharePoint 2013 User Adoption
Build It and They Will Come: SharePoint 2013 User AdoptionStacy Deere
 
HTML CSS Best Practices
HTML CSS Best PracticesHTML CSS Best Practices
HTML CSS Best Practiceshoctudau
 
Week 12 - Search Engine Optimization
Week 12 -  Search Engine OptimizationWeek 12 -  Search Engine Optimization
Week 12 - Search Engine Optimizationhenri_makembe
 
Take Your Markup to 11
Take Your Markup to 11Take Your Markup to 11
Take Your Markup to 11Emily Lewis
 
Polytechnic speaker deck oluwadamilare
Polytechnic speaker deck oluwadamilarePolytechnic speaker deck oluwadamilare
Polytechnic speaker deck oluwadamilareOluwadamilare Ibrahim
 
Polytechnic speaker deck oluwadamilare
Polytechnic speaker deck oluwadamilarePolytechnic speaker deck oluwadamilare
Polytechnic speaker deck oluwadamilareOluwadamilare Ibrahim
 
Mobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery MobileMobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery MobileTerry Ryan
 
CiL O8: Digital Convervgence & People Apps
CiL O8: Digital Convervgence & People AppsCiL O8: Digital Convervgence & People Apps
CiL O8: Digital Convervgence & People AppsBeth Gallaway
 
Using Cool New Frameworks in (Mobile) Domino Apps
Using Cool New Frameworks in (Mobile) Domino AppsUsing Cool New Frameworks in (Mobile) Domino Apps
Using Cool New Frameworks in (Mobile) Domino AppsTeamstudio
 
How We Localize & Mobilize WP Sites - Pubcon 2013
How We Localize & Mobilize WP Sites - Pubcon 2013How We Localize & Mobilize WP Sites - Pubcon 2013
How We Localize & Mobilize WP Sites - Pubcon 2013Search Commander, Inc.
 
Progressively Enhancing WordPress Themes
Progressively Enhancing WordPress ThemesProgressively Enhancing WordPress Themes
Progressively Enhancing WordPress ThemesDigitally
 
Mobile Application Development
Mobile Application DevelopmentMobile Application Development
Mobile Application Developmentsonichinmay
 
Future of Search Engine Factors, AMP, On-Page Key to Success
Future of Search Engine Factors, AMP, On-Page Key to SuccessFuture of Search Engine Factors, AMP, On-Page Key to Success
Future of Search Engine Factors, AMP, On-Page Key to SuccessAnetwork
 
J day la 2011 webmatrix
J day la 2011 webmatrixJ day la 2011 webmatrix
J day la 2011 webmatrixAlice Pang
 
Joomla! Day Los Angeles 2011 WebMatrix
Joomla! Day Los Angeles 2011 WebMatrixJoomla! Day Los Angeles 2011 WebMatrix
Joomla! Day Los Angeles 2011 WebMatrixAlice Pang
 
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012crokitta
 
Html5 Introduction
Html5 IntroductionHtml5 Introduction
Html5 IntroductionPraveen Nair
 

Similaire à CSS and HTML Coding Today - Pubcon Las Vegas 2013 (20)

Adobe & HTML5
Adobe & HTML5Adobe & HTML5
Adobe & HTML5
 
JSP Web Technology Application on Road Transport Services
JSP Web Technology Application on Road Transport ServicesJSP Web Technology Application on Road Transport Services
JSP Web Technology Application on Road Transport Services
 
Website Optimization -SEO - Step By Step
Website Optimization -SEO - Step By StepWebsite Optimization -SEO - Step By Step
Website Optimization -SEO - Step By Step
 
Build It and They Will Come: SharePoint 2013 User Adoption
Build It and They Will Come:  SharePoint 2013 User AdoptionBuild It and They Will Come:  SharePoint 2013 User Adoption
Build It and They Will Come: SharePoint 2013 User Adoption
 
HTML CSS Best Practices
HTML CSS Best PracticesHTML CSS Best Practices
HTML CSS Best Practices
 
Week 12 - Search Engine Optimization
Week 12 -  Search Engine OptimizationWeek 12 -  Search Engine Optimization
Week 12 - Search Engine Optimization
 
Take Your Markup to 11
Take Your Markup to 11Take Your Markup to 11
Take Your Markup to 11
 
Polytechnic speaker deck oluwadamilare
Polytechnic speaker deck oluwadamilarePolytechnic speaker deck oluwadamilare
Polytechnic speaker deck oluwadamilare
 
Polytechnic speaker deck oluwadamilare
Polytechnic speaker deck oluwadamilarePolytechnic speaker deck oluwadamilare
Polytechnic speaker deck oluwadamilare
 
Mobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery MobileMobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery Mobile
 
CiL O8: Digital Convervgence & People Apps
CiL O8: Digital Convervgence & People AppsCiL O8: Digital Convervgence & People Apps
CiL O8: Digital Convervgence & People Apps
 
Using Cool New Frameworks in (Mobile) Domino Apps
Using Cool New Frameworks in (Mobile) Domino AppsUsing Cool New Frameworks in (Mobile) Domino Apps
Using Cool New Frameworks in (Mobile) Domino Apps
 
How We Localize & Mobilize WP Sites - Pubcon 2013
How We Localize & Mobilize WP Sites - Pubcon 2013How We Localize & Mobilize WP Sites - Pubcon 2013
How We Localize & Mobilize WP Sites - Pubcon 2013
 
Progressively Enhancing WordPress Themes
Progressively Enhancing WordPress ThemesProgressively Enhancing WordPress Themes
Progressively Enhancing WordPress Themes
 
Mobile Application Development
Mobile Application DevelopmentMobile Application Development
Mobile Application Development
 
Future of Search Engine Factors, AMP, On-Page Key to Success
Future of Search Engine Factors, AMP, On-Page Key to SuccessFuture of Search Engine Factors, AMP, On-Page Key to Success
Future of Search Engine Factors, AMP, On-Page Key to Success
 
J day la 2011 webmatrix
J day la 2011 webmatrixJ day la 2011 webmatrix
J day la 2011 webmatrix
 
Joomla! Day Los Angeles 2011 WebMatrix
Joomla! Day Los Angeles 2011 WebMatrixJoomla! Day Los Angeles 2011 WebMatrix
Joomla! Day Los Angeles 2011 WebMatrix
 
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
 
Html5 Introduction
Html5 IntroductionHtml5 Introduction
Html5 Introduction
 

Dernier

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
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
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
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 

Dernier (20)

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
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
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
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 

CSS and HTML Coding Today - Pubcon Las Vegas 2013

  • 1. CSS and HTML Coding 2013 Mobile Development Todd Keup @toddkeup Las Vegas 2013 @toddkeup
  • 2. Overview • • • • • Mobile native app versus mobile web Variations of mobile web development How to get started @media query basics Tips and tricks @toddkeup
  • 3. Native app or mobile web? • • • • • • Considerations Features and functions Design, layout, personalization Budget SEO Updates and App store approval Platforms @toddkeup
  • 4. Mobile web design methods • Responsive Web Design (RWD) • Adaptive Web Design (AWD) • Responsive Design + Server Side Components (RESS) • Responsible Web Design @toddkeup
  • 5. Responsible Web Design Focus on your user … … really? @toddkeup
  • 6. Resources • Apps or web for Mobile Development? http://youtu.be/4f2Zky_YyyQ • Building Smartphone-Optimized Websites http://bit.ly/JXuTPF @toddkeup
  • 7. How to get started <!DOCTYPE html> <html lang="en" dir="ltr"> <head> <meta charset="utf-8"> <title>Title</title> <link rel="stylesheet" type="text/css" media="screen" href="jquery-ui.css"> <script type="text/javascript" charset="utf-8" src="jquery.min.js"></script> </head> link cannot have a charset attribute style cannot have a charset attribute script if embedded must not have a charset attribute; if external (src attribute specified) and you choose to include a charset, it must match the Content-Type metadata (<meta charset="utf-8"> @toddkeup
  • 8. @media query basics @import nomalize.css /* reset styles */ /* general settings, overall site layout and design */ body { font:16px Helvetica, Arial, sans-serif; } .wrapper { width:90%; margin:0 5%;} / * media queries (using pixel widths) */ @media only screen and (min-width: 320px) @media only screen and (min-width: 480px) @media only screen and (min-width: 768px) @media only screen and (min-width: 1140px) @media print {} @toddkeup {} {} {} {}
  • 10. Tips and tricks • Need IE6-IE8 support? Respond.js https://github.com/scottjehl/Respond • Stop iOS from thinking all numbers are phone links: http://bit.ly/wy6ThZ <meta name="format-detection" content="telephone=no"> <!-- Then use phone links to explicitly create a link. --> <p>Phone: <a href="tel:1-408-555-5555">1-408-555-5555</a></p> <!-- Otherwise numbers that look like phone numbers ... --> <p>Not a phone number: 408-555-5555</p> @toddkeup
  • 11. Tips and tricks Add pizzazz to your telephone links Before: After: a[href^="tel:"]{text-decoration:none;} a[href^="tel:"]:before { content:"260E"; margin-right:0.5em; } @toddkeup
  • 12. Tips and tricks Navigation Menu <div id="navmain"> <div id="menu-icon></div> <ul><li><a class="activelink">Home</a> <ul><li><a href="">Menu Option 1</a></li> <li><a href="">Menu Option 2</a> <ul> #menu-icon { background: url("/css/menu-icon.png") no-repeat scroll 10px center rgba(0, 0, 0, 0); cursor:pointer; display:block; height:20px; position:absolute; right:0; top:50px; width: 35px; } @media only screen and (min-width: 768px) { #menu-icon {display:none;} } /* toggle nav */ $('#navmain').on('click', '#menu-icon', function(){ $('.menucontent ul:first').slideToggle(100); }); @toddkeup
  • 13. Tips and tricks Full Site Version <div id="view-options"><span id="view-full">View Full Site</span></div> /* View Mobile/Full Site options */ #view-options span { background-color: #222222; border-radius: 8px 8px 8px 8px; padding: 8px 16px; color: #FFFFFF; display: block; font-size: 16px; font-weight: bold; } #view-default {display: none;} @media only screen and (min-width: 768px) { /* full viewport new definitions */ span#view-full{display:none;} span#view-default{display:inline;} } @toddkeup
  • 14. Tips and tricks Full Site Version /** * Mobile "Show Full Site" feature using HTML5 Web Storage * http://dev.w3.org/html5/webstorage/ */ (function(){ // default width value for full site viewport var widthFull = 768; // localStorage value already set? try { localStorage.showFullSite = localStorage.showFullSite == 'undefined' ? 'true' : localStorage.showFullSite ; } catch (e) { // no polyfill necessary at this time; if needed: // https://developer.mozilla.org/en-US/docs/DOM/Storage OR // https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browserPolyfills } @toddkeup
  • 15. Tips and tricks Full Site Version var showFullSite = function(){ $('meta[name="viewport"]').attr('content','width='+widthFull); if(!$('#view-options #view-default').length){ $('#view-options').append('<span id="view-default">View Mobile</span>'); } localStorage.showFullSite = 'false'; // don't show full site button }; var showDeviceWidth = function(){ $('meta[name="viewport"]').attr('content','width=device-width'); localStorage.showFullSite = 'true'; // show full site button }; // User already selected view full site? Change the viewport if(Modernizr.localstorage){ if(localStorage.showFullSite == 'false'){ showFullSite(); } } $('#view-full').on('click', function(){showFullSite();}); $('#view-options').on('click', '#view-default', function(){ showDeviceWidth(); }); })(); @toddkeup

Notes de l'éditeur

  1. {"6":"The first link is about HTML5 versus Android and is presented as an &quot;app development smackdown&quot; by Google Developers. The video is from May 2011 so you can only imagine how much further progress has been achieved.\nThe second link is Google&apos;s advisory to developers: https://developers.google.com/webmasters/smartphone-sites/details\n","12":"Thinking outside the box, literally, on this one. The entire main navigation menu has been exploded to show each option available for selection. Other options here may be to show only the next level of navigation which could be handled in the JavaScript or through a round-trip back to the server which requires bandwidth on your mobile user&apos;s service-provider plan. We did this as a demonstration and the client asked to keep it as is – they liked the concept.\nThe media query tells our larger viewport devices to not show this menu icon. And the JavaScript tells our smaller viewports to use the jQuery slideToggle() method to display or hide the matched elements with a sliding motion. So in this case our menu slides on and off the display when the user touches the menu icon.\n","1":"Good Morning!\nI want to thank Brett Tabke and his organization for all their hard work in putting a conference like this together. Each time I attend I find myself a beneficiary of the knowledge shared at this gathering. Thanks Brett, for the opportunity to not only be here, but to be here once again as a speaker.\nI would also like to thank my friend Jerry West for volunteering to facilitate this session as well as my esteemed panel of peers. But most of all thank you for being here today. I am honored by your presence and the privilege to share what I am able regarding CSS and HTML coding today.\nFor those of you that are familiar with the WebmasterWorld web site and the forums at WebmasterWorld, I am an active member and one of the moderators of the PHP Server Side Scripting Forum. I go by the nickname “coopster” and I want you to know that I would absolutely love the opportunity to make your personal acquaintance today. I am approachable and friendly. Please don&apos;t hesitate to introduce yourself.\n","7":"HTML5 Basic Changes:\nWhat&apos;s different here?\nThe DOCTYPE declaration has been simplified\nThe meta charset element has been simplified\nThe link, style and script elements have charset policies\nWith no other changes, you are delivering HTML5! (NOTE: depends on server set up and response headers; ie application/xhtml+xml)\n","13":"Using HTML5 localStorage to retain user preferences. In this case we demonstrate how we can remember their Full/Mobile site version viewing preferences.\n","8":"Normalize (CSS resets).\nGeneral site settings; develop for mobile first.\nAdd your specialized markup for smartphone portrait mode.\nAdd your specialized markup for smartphone landscape mode.\nAdd your specialized markup for larger viewports like tablets.\nAdd any markup for full size display.\n","3":"The million-dollar question and to this day a topic of heated debate. And mostly by developers, of course. Organizational stakeholders are asking questions such as those listed to determine the best approach for their particular goals. Just remember that HTML5 and CSS3 are blurring the lines of separation. Of key note here is SEO – mobile apps don&apos;t get crawled by search engines. And another mention is platforms. If you can target your users on iOS or Android, fine. But don&apos;t forget the plethora of other mobile operating systems including Windows, Blackberry (RIM), Bada (Samsung), Symbian (Nokia), Firefox OS, Ubuntu, etc. etc. etc. Not to mention hardware-specifics like refrigerators and other appliances!\n","9":"H5BP has a default stylesheet. Initializr.com has a working example and brief tutorial.\n","4":"RESS relies on user-agent detection to render different responses to requests. Let&apos;s focus on the first two for now though as here again we have yet another topic of heated debate and it really comes down to semantics. Some folks claim that the difference between RWD and AWD comes down to delivery – that responsive web design utilizes flexible and fluid grids while adaptive web design relies on predefined screen sizes. I&apos;m not so certain I would agree but hey, to each his own. And if you listen to the guys that coined these terms (RWD and AWD – Ethan Marcotte and Aaron Gustafson), whose books came out at around the same time, by the way, they agree that the two terms are interchangeable and the method describes ultimately what the goal is, Responsible web design.\n","10":"Older browsers cannot handle media queries in CSS3 so you may need a polyfill. Respond.js is a great polyfill.\nAnybody working with Personal Health Information (PHI) or HIPAA related information like social security numbers? Corporate intranets, especially?\nhttps://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/Articles/PhoneLinks.html\n"}