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

Weitere ähnliche Inhalte

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

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

Kürzlich hochgeladen

Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
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
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
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
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 

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

Hinweis der Redaktion

  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"}