SlideShare ist ein Scribd-Unternehmen logo
1 von 47
Downloaden Sie, um offline zu lesen
WordCamp Ottawa 2014
Build a Responsive WordPress Theme with
ZURBs Foundation 5 Framework.
Before we can code responsively,
we must understand the fundamentals.
Originally from WordCamp Montreal 2013
What the heck is
responsive web design?
Originally from WordCamp Montreal 2013
A website or app that responds to the
device that accesses it and delivers the
appropriate output for it.
Originally from WordCamp Montreal 2013
No pinch and zoom!
Originally from WordCamp Montreal 2013
One Site
to Rule
Them ALL!
Cheesy movie reference :)
Originally from WordCamp Montreal 2013
Why build responsively?
Originally from WordCamp Montreal 2013
“Day by day, the number of devices,
platforms, and browsers that need to
work with your site grows. Responsive
web design represents a fundamental
shift in how we’ll build websites for the
decade to come.”
- Jeffrey Veen
Jeffrey Veen is the author of "The Art and Science of Web Design"
Originally from WordCamp Montreal 2013
Some basic stats ...
because I’m a marketing guy :)
Originally from WordCamp Montreal 2013
1 in every 5 people in the
world own a smartphone, and
1 in every 17 own a tablet
Updated from WordCamp Montreal 2013
28% of Internet
usage comes from a
mobile phone
Updated from WordCamp Montreal 2013
20% of Google
searches are being
performed on a
mobile device
Updated from WordCamp Montreal 2013
61% of people have
a better opinion of
brands when they
offer a good mobile
experience
Updated from WordCamp Montreal 2013
28.85% of all emails
are opened on mobile
phones, and 10.16%
are opened on tablets.
Updated from WordCamp Montreal 2013
Over $300 billion
mobile transactions
were made in 2013
This number is expected to
grow by a 100% for 2014
Updated from WordCamp Montreal 2013
We must build responsively,
the web depends on it!
Originally from WordCamp Montreal 2013
The basics of responsive web design
Originally from WordCamp Montreal 2013
Before you wireframe, design, or code ...
Think mobile first!
Originally from WordCamp Montreal 2013
consider ...
1
2
3
4
5
Originally from WordCamp Montreal 2013
here are a few media queries we target ...
Originally from WordCamp Montreal 2013
! ! /* iphone 3-4 (320 x 480) */
! ! @media only screen and (min-device-width:320px) and (max-device-width:
480px) and (orientation:portrait) {
! ! }
! ! @media only screen and (min-device-width:320px) and (max-device-width:
480px) and (orientation:landscape) {
! ! }
! ! /* iphone 5 (320 x 568) */
! ! @media only screen and (min-device-width:320px) and (max-device-width:
568px) and (orientation:portrait) {
! ! }!!
! ! @media only screen and (min-device-width:320px) and (max-device-width:
568px) and (orientation:landscape) {
! ! }
! ! /* ipad (768 x 1024) */
! ! @media only screen and (min-device-width:768px) and (max-device-width:
1024px) and (orientation:portrait) {
! ! } */
Use a responsive framework
We use Foundation 5 by ZURB
Originally from WordCamp Montreal 2013
Why we chose Foundation
★ Designed for Mobile First!
★ Small, medium, and large 12-column grid
★ Rapid prototyping
★ Mobile visibility elements
★ Mobile navigation - toggle or off-canvas
★ Font icon library
★ Powerful jQuery and Zepto libraries
★ Foundation is developed in Sass
★ Most importantly an existing WP theme
Updated from WordCamp Montreal 2013
It’s all about the grids!
Updated from WordCamp Montreal 2013
What you need to consider in the design phase
Image sizing
Stacking & Re-ordering of columns
Mobile Navigation
Originally from WordCamp Montreal 2013
Design for mobile navigation
Toggle menu Off-canvas menuvs.
Originally from WordCamp Montreal 2013
Responsive Navigation: Optimizing for
Touch Across Devices
Adapting
Common Patterns
Read: Responsive Navigation: Optimizing for Touch Across Devices by Luke WroblewskiOriginally from WordCamp Montreal 2013
Now that we covered the basics,
let’s look at the code ...
Originally from WordCamp Montreal 2013
But, you can download everything in the
framework in simple, vanilla CSS and JS
http://foundation.zurb.com/develop/download.html
We do it in Sass
http://foundation.zurb.com/docs/sass.html
What you need to get started
★ Git
★ Ruby 1.9+
★ NodeJS
★ Bower
★ Compass
It’s easier than it looks
Step by step instructions
If it ain’t broke don’t fix it!
Get Reverie by ThemeFortress
You could build a WP Foundation theme from scratch but ...
Easy to hack
Most stable Foundation
WP theme
Child Starter Theme
Updated from WordCamp Montreal 2013
Of course there are other options
★ FoundationPress - http://foundationpress.olefredrik.com/
★ WP-Foundation - http://320press.com/wp-foundation/
★ JointsWP - http://jointswp.com/
★ Reactor - http://awtheme.com/
★ ZurbPress - http://zurbpress.wpprofs.com/
to name a few ...
Starting a new project is as simple as
foundation new project_name
or get the reverie-child theme
https://github.com/milohuang/reverie-child
Child theme architecture
★ CSS directory - compiled SCSS files
★ SCSS directory
★ config.rb - required for compass to compile project
★ style.css - to register child theme in WordPress
the rest is up to you
Getting setup
/*
Theme Name: Theme Name
Description: Child theme for the Reverie
Author: Brendan & Brendan Inc.
Template: reverie-master
*/
/* This is the CSS file loaded by WordPress in backend,
* it will not be loaded in the frontend.
* Go to the css/ folder and find style.css,
* this is the CSS file loaded by WordPress in frontend.
* Using Sass/Scss? Find the style.scss under scss/ folder.
* http://themefortress.com/reverie */
style.css
1
Getting setup
//
// FOUNDATION SETTINGS
//
// This is the default html and body font-size for the base rem value.
// $rem-base: 16px;
// Allows the use of rem-calc() or lower-bound() in your settings
@import "foundation/functions";
// Grid
// $include-html-grid-classes: $include-html-classes;
$row-width: rem-calc(1140);
$column-gutter: rem-calc(30);
_settings.scss
2
Load functions
Customize Foundation
first few lines ...
Getting setup - optional
// FONT-STACK //
$main-font: 'OpenSans';
// LINK COLORS //
$normal : #282828;
$hover : #111111;
$active : #cccccc;
$visited: #aaaaaa;
$focus: #222222;
architecture.scss
3
Set global variables Custom mixins
// FONT SMOOTHING MIXIN //
@mixin font-smoothing($value: on) {
! @if $value == on {
! ! -webkit-font-smoothing: antialiased;
! ! -moz-osx-font-smoothing: grayscale;
! }
! @else {
! ! -webkit-font-smoothing: subpixel-antialiased;
! ! -moz-osx-font-smoothing: auto;
! }
}
.menu {
@include font-smoothing(on);
}
Then we include it like this
Foundation 5 Markup
<?php get_header(); ?>
<!-- Row for main content area -->
! <div class="small-12 large-8 columns" id="content" role="main">
! ! <?php /* Start loop */ ?>
! <?php while (have_posts()) : the_post(); ?>
! ! <article <?php post_class() ?> id="post-<?php the_ID(); ?>">
! ! ! <header>
! ! ! ! <h1 class="entry-title"><?php the_title(); ?></h1>
! ! ! ! <?php reverie_entry_meta(); ?>
! ! ! </header>
! ! ! <div class="entry-content">
! ! ! ! <?php the_content(); ?>
! ! ! </div>
! ! </article>
! <?php endwhile; // End the loop ?>
! </div>
! <?php get_sidebar(); ?>!
<?php get_footer(); ?>
page.php Grid classes
Foundation 5 Markup
$recent_posts = new WP_Query( $args );
if ( $recent_posts ) { ?>
<div class="row full-row">
<?php while ( $recent_posts->have_posts() ) : $recent_posts->the_post();
$post_id = get_the_ID();
if ( get_the_post_thumbnail( $post_id ) ) { ?>
<div class="large-4 columns text-center pad-row">
<a class="fade" href="<?php the_permalink(); ?>">
! <?php the_post_thumbnail( 'masonry-thumbnail' ); ?>
<div class="row">
! <div class="large-12 columns tags-box">
! ! <p class="thumb-title"><?php the_title(); ?></p>
! ! <p class="thumb-tag"><?php the_tags(); ?></p>
! </div>
</div>
</a>
</div>
functions.php - a snippet using masonry
Call Foundation classes from anywhere
Credit @isotrope
Some Examples
Some Examples
Some Examples
Some Examples
If you’re in Montreal in May come check out ...
http://www.thebrendans.com/events-workshops/
Want to join the team?
Check our internship program
http://www.thebrendans.com/internships/
Want to join the team?
Check our internship program
Thank You!
www.TheBrendans.com
www.KeepMarketingFun.com
@TheBrendans
www.facebook.com/thebrendans
@digibomb

Weitere ähnliche Inhalte

Andere mochten auch

Migrate, Grow, and Cultivate your Community
Migrate, Grow, and Cultivate your CommunityMigrate, Grow, and Cultivate your Community
Migrate, Grow, and Cultivate your CommunityBrendan Sera-Shriar
 
Leveraging trade associations
Leveraging trade associationsLeveraging trade associations
Leveraging trade associationsSmartBrief
 
How SADI & SHARE help restore the Scientific Method to in silico science
How SADI & SHARE help restore the Scientific Method to in silico scienceHow SADI & SHARE help restore the Scientific Method to in silico science
How SADI & SHARE help restore the Scientific Method to in silico scienceMark Wilkinson
 
The Apache Way olamy
The Apache Way olamyThe Apache Way olamy
The Apache Way olamyOlivier Lamy
 
Test King Virtual Test--Network+
Test King Virtual Test--Network+ Test King Virtual Test--Network+
Test King Virtual Test--Network+ kappi98a
 
It’s a WIN, WIN: ‘WordPress On Windows’
It’s a WIN, WIN: ‘WordPress On Windows’It’s a WIN, WIN: ‘WordPress On Windows’
It’s a WIN, WIN: ‘WordPress On Windows’Brendan Sera-Shriar
 
Using Semantics to personalize medical research
Using Semantics to personalize medical researchUsing Semantics to personalize medical research
Using Semantics to personalize medical researchMark Wilkinson
 
Portfolio PlusAnimations 2009 ENG
Portfolio PlusAnimations 2009 ENGPortfolio PlusAnimations 2009 ENG
Portfolio PlusAnimations 2009 ENGrogiervanmeeuwen
 
Grupo de carlos
Grupo de carlosGrupo de carlos
Grupo de carlossenasoft
 
Opleiden in de School in Rotterdam
Opleiden in de School in RotterdamOpleiden in de School in Rotterdam
Opleiden in de School in RotterdamLuc Sluijsmans
 
Design Studio
Design StudioDesign Studio
Design Studiomilarepa1
 
The Evolution of Live Preview Environment Design
The Evolution of Live Preview Environment DesignThe Evolution of Live Preview Environment Design
The Evolution of Live Preview Environment DesignBrendan Sera-Shriar
 
1ra clase cómo optimizar la busqueda en google
1ra clase cómo optimizar la busqueda en google1ra clase cómo optimizar la busqueda en google
1ra clase cómo optimizar la busqueda en googlePaola Padilla
 

Andere mochten auch (17)

Analyze Your Modules
Analyze Your ModulesAnalyze Your Modules
Analyze Your Modules
 
Migrate, Grow, and Cultivate your Community
Migrate, Grow, and Cultivate your CommunityMigrate, Grow, and Cultivate your Community
Migrate, Grow, and Cultivate your Community
 
Leveraging trade associations
Leveraging trade associationsLeveraging trade associations
Leveraging trade associations
 
How SADI & SHARE help restore the Scientific Method to in silico science
How SADI & SHARE help restore the Scientific Method to in silico scienceHow SADI & SHARE help restore the Scientific Method to in silico science
How SADI & SHARE help restore the Scientific Method to in silico science
 
The Apache Way olamy
The Apache Way olamyThe Apache Way olamy
The Apache Way olamy
 
Test King Virtual Test--Network+
Test King Virtual Test--Network+ Test King Virtual Test--Network+
Test King Virtual Test--Network+
 
Gene Search
Gene SearchGene Search
Gene Search
 
Red5 - PHUG Workshops
Red5 - PHUG WorkshopsRed5 - PHUG Workshops
Red5 - PHUG Workshops
 
SADI CSHALS 2013
SADI CSHALS 2013SADI CSHALS 2013
SADI CSHALS 2013
 
It’s a WIN, WIN: ‘WordPress On Windows’
It’s a WIN, WIN: ‘WordPress On Windows’It’s a WIN, WIN: ‘WordPress On Windows’
It’s a WIN, WIN: ‘WordPress On Windows’
 
Using Semantics to personalize medical research
Using Semantics to personalize medical researchUsing Semantics to personalize medical research
Using Semantics to personalize medical research
 
Portfolio PlusAnimations 2009 ENG
Portfolio PlusAnimations 2009 ENGPortfolio PlusAnimations 2009 ENG
Portfolio PlusAnimations 2009 ENG
 
Grupo de carlos
Grupo de carlosGrupo de carlos
Grupo de carlos
 
Opleiden in de School in Rotterdam
Opleiden in de School in RotterdamOpleiden in de School in Rotterdam
Opleiden in de School in Rotterdam
 
Design Studio
Design StudioDesign Studio
Design Studio
 
The Evolution of Live Preview Environment Design
The Evolution of Live Preview Environment DesignThe Evolution of Live Preview Environment Design
The Evolution of Live Preview Environment Design
 
1ra clase cómo optimizar la busqueda en google
1ra clase cómo optimizar la busqueda en google1ra clase cómo optimizar la busqueda en google
1ra clase cómo optimizar la busqueda en google
 

Mehr von Brendan Sera-Shriar

How to A/B Test with WordPress: Conversions Aren’t Just for Landing Pages
How to A/B Test with WordPress: Conversions Aren’t Just for Landing PagesHow to A/B Test with WordPress: Conversions Aren’t Just for Landing Pages
How to A/B Test with WordPress: Conversions Aren’t Just for Landing PagesBrendan Sera-Shriar
 
SEO Is Dead. Long Live SEO - SEO Camp Montreal 2013
SEO Is Dead. Long Live SEO - SEO Camp Montreal 2013SEO Is Dead. Long Live SEO - SEO Camp Montreal 2013
SEO Is Dead. Long Live SEO - SEO Camp Montreal 2013Brendan Sera-Shriar
 
Building a Mega Community with PressWork
Building a Mega Community with PressWorkBuilding a Mega Community with PressWork
Building a Mega Community with PressWorkBrendan Sera-Shriar
 
Building a community around your blog v3
Building a community around your blog v3Building a community around your blog v3
Building a community around your blog v3Brendan Sera-Shriar
 
Building a Community Around your Blog 2 - Let the Comments be your Content!
Building a Community Around your Blog 2 - Let the Comments be your Content!Building a Community Around your Blog 2 - Let the Comments be your Content!
Building a Community Around your Blog 2 - Let the Comments be your Content!Brendan Sera-Shriar
 
Building a Community Around your Blog
Building a Community Around your BlogBuilding a Community Around your Blog
Building a Community Around your BlogBrendan Sera-Shriar
 
An Introduction to Vanilla Forums - FSOSS 2010
An Introduction to Vanilla Forums - FSOSS 2010An Introduction to Vanilla Forums - FSOSS 2010
An Introduction to Vanilla Forums - FSOSS 2010Brendan Sera-Shriar
 
WordPress Development Confoo 2010
WordPress Development Confoo 2010WordPress Development Confoo 2010
WordPress Development Confoo 2010Brendan Sera-Shriar
 
Wordpress To Go Democamp Mtl2009
Wordpress To Go Democamp Mtl2009Wordpress To Go Democamp Mtl2009
Wordpress To Go Democamp Mtl2009Brendan Sera-Shriar
 
Make Web, Not War - Open Source Microsoft Event
Make Web, Not War - Open Source Microsoft EventMake Web, Not War - Open Source Microsoft Event
Make Web, Not War - Open Source Microsoft EventBrendan Sera-Shriar
 
WordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute WorkshopWordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute WorkshopBrendan Sera-Shriar
 
WordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute WorkshopWordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute WorkshopBrendan Sera-Shriar
 
WordPress 2.5 Overview - Rich Media Institute
WordPress 2.5 Overview - Rich Media InstituteWordPress 2.5 Overview - Rich Media Institute
WordPress 2.5 Overview - Rich Media InstituteBrendan Sera-Shriar
 
Making the Most of Plug-ins - WordCamp Toronto 2008
Making the Most of Plug-ins - WordCamp Toronto 2008Making the Most of Plug-ins - WordCamp Toronto 2008
Making the Most of Plug-ins - WordCamp Toronto 2008Brendan Sera-Shriar
 

Mehr von Brendan Sera-Shriar (17)

How to A/B Test with WordPress: Conversions Aren’t Just for Landing Pages
How to A/B Test with WordPress: Conversions Aren’t Just for Landing PagesHow to A/B Test with WordPress: Conversions Aren’t Just for Landing Pages
How to A/B Test with WordPress: Conversions Aren’t Just for Landing Pages
 
SEO Is Dead. Long Live SEO - SEO Camp Montreal 2013
SEO Is Dead. Long Live SEO - SEO Camp Montreal 2013SEO Is Dead. Long Live SEO - SEO Camp Montreal 2013
SEO Is Dead. Long Live SEO - SEO Camp Montreal 2013
 
Building a Mega Community with PressWork
Building a Mega Community with PressWorkBuilding a Mega Community with PressWork
Building a Mega Community with PressWork
 
Building a community around your blog v3
Building a community around your blog v3Building a community around your blog v3
Building a community around your blog v3
 
Building a Community Around your Blog 2 - Let the Comments be your Content!
Building a Community Around your Blog 2 - Let the Comments be your Content!Building a Community Around your Blog 2 - Let the Comments be your Content!
Building a Community Around your Blog 2 - Let the Comments be your Content!
 
Building a Community Around your Blog
Building a Community Around your BlogBuilding a Community Around your Blog
Building a Community Around your Blog
 
An Introduction to Vanilla Forums - FSOSS 2010
An Introduction to Vanilla Forums - FSOSS 2010An Introduction to Vanilla Forums - FSOSS 2010
An Introduction to Vanilla Forums - FSOSS 2010
 
Adding Vanilla to WordPress
Adding Vanilla to WordPressAdding Vanilla to WordPress
Adding Vanilla to WordPress
 
WordPress Development Confoo 2010
WordPress Development Confoo 2010WordPress Development Confoo 2010
WordPress Development Confoo 2010
 
Wordpress To Go Democamp Mtl2009
Wordpress To Go Democamp Mtl2009Wordpress To Go Democamp Mtl2009
Wordpress To Go Democamp Mtl2009
 
Make Web, Not War - Open Source Microsoft Event
Make Web, Not War - Open Source Microsoft EventMake Web, Not War - Open Source Microsoft Event
Make Web, Not War - Open Source Microsoft Event
 
WordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute WorkshopWordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute Workshop
 
WordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute WorkshopWordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute Workshop
 
WordPress 2.5 Overview - Rich Media Institute
WordPress 2.5 Overview - Rich Media InstituteWordPress 2.5 Overview - Rich Media Institute
WordPress 2.5 Overview - Rich Media Institute
 
Making the Most of Plug-ins - WordCamp Toronto 2008
Making the Most of Plug-ins - WordCamp Toronto 2008Making the Most of Plug-ins - WordCamp Toronto 2008
Making the Most of Plug-ins - WordCamp Toronto 2008
 
Open Source Design - FSOSS 2008
Open Source Design - FSOSS 2008Open Source Design - FSOSS 2008
Open Source Design - FSOSS 2008
 
PHUG - Open Source Culture
PHUG - Open Source CulturePHUG - Open Source Culture
PHUG - Open Source Culture
 

Kürzlich hochgeladen

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
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
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
 
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
 
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
 
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
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
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
 
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
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
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
 

Kürzlich hochgeladen (20)

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
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
 
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
 
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
 
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
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
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
 
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
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 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
 

Build a Responsive Theme in WordPress with ZURBs Foundation 5 Framework

  • 1. WordCamp Ottawa 2014 Build a Responsive WordPress Theme with ZURBs Foundation 5 Framework.
  • 2. Before we can code responsively, we must understand the fundamentals. Originally from WordCamp Montreal 2013
  • 3. What the heck is responsive web design? Originally from WordCamp Montreal 2013
  • 4. A website or app that responds to the device that accesses it and delivers the appropriate output for it. Originally from WordCamp Montreal 2013
  • 5. No pinch and zoom! Originally from WordCamp Montreal 2013
  • 6. One Site to Rule Them ALL! Cheesy movie reference :) Originally from WordCamp Montreal 2013
  • 7. Why build responsively? Originally from WordCamp Montreal 2013
  • 8. “Day by day, the number of devices, platforms, and browsers that need to work with your site grows. Responsive web design represents a fundamental shift in how we’ll build websites for the decade to come.” - Jeffrey Veen Jeffrey Veen is the author of "The Art and Science of Web Design" Originally from WordCamp Montreal 2013
  • 9. Some basic stats ... because I’m a marketing guy :) Originally from WordCamp Montreal 2013
  • 10. 1 in every 5 people in the world own a smartphone, and 1 in every 17 own a tablet Updated from WordCamp Montreal 2013
  • 11. 28% of Internet usage comes from a mobile phone Updated from WordCamp Montreal 2013
  • 12. 20% of Google searches are being performed on a mobile device Updated from WordCamp Montreal 2013
  • 13. 61% of people have a better opinion of brands when they offer a good mobile experience Updated from WordCamp Montreal 2013
  • 14. 28.85% of all emails are opened on mobile phones, and 10.16% are opened on tablets. Updated from WordCamp Montreal 2013
  • 15. Over $300 billion mobile transactions were made in 2013 This number is expected to grow by a 100% for 2014 Updated from WordCamp Montreal 2013
  • 16. We must build responsively, the web depends on it! Originally from WordCamp Montreal 2013
  • 17. The basics of responsive web design Originally from WordCamp Montreal 2013
  • 18. Before you wireframe, design, or code ... Think mobile first! Originally from WordCamp Montreal 2013
  • 19. consider ... 1 2 3 4 5 Originally from WordCamp Montreal 2013
  • 20. here are a few media queries we target ... Originally from WordCamp Montreal 2013 ! ! /* iphone 3-4 (320 x 480) */ ! ! @media only screen and (min-device-width:320px) and (max-device-width: 480px) and (orientation:portrait) { ! ! } ! ! @media only screen and (min-device-width:320px) and (max-device-width: 480px) and (orientation:landscape) { ! ! } ! ! /* iphone 5 (320 x 568) */ ! ! @media only screen and (min-device-width:320px) and (max-device-width: 568px) and (orientation:portrait) { ! ! }!! ! ! @media only screen and (min-device-width:320px) and (max-device-width: 568px) and (orientation:landscape) { ! ! } ! ! /* ipad (768 x 1024) */ ! ! @media only screen and (min-device-width:768px) and (max-device-width: 1024px) and (orientation:portrait) { ! ! } */
  • 21. Use a responsive framework We use Foundation 5 by ZURB Originally from WordCamp Montreal 2013
  • 22. Why we chose Foundation ★ Designed for Mobile First! ★ Small, medium, and large 12-column grid ★ Rapid prototyping ★ Mobile visibility elements ★ Mobile navigation - toggle or off-canvas ★ Font icon library ★ Powerful jQuery and Zepto libraries ★ Foundation is developed in Sass ★ Most importantly an existing WP theme Updated from WordCamp Montreal 2013
  • 23. It’s all about the grids! Updated from WordCamp Montreal 2013
  • 24. What you need to consider in the design phase Image sizing Stacking & Re-ordering of columns Mobile Navigation Originally from WordCamp Montreal 2013
  • 25. Design for mobile navigation Toggle menu Off-canvas menuvs. Originally from WordCamp Montreal 2013
  • 26. Responsive Navigation: Optimizing for Touch Across Devices Adapting Common Patterns Read: Responsive Navigation: Optimizing for Touch Across Devices by Luke WroblewskiOriginally from WordCamp Montreal 2013
  • 27. Now that we covered the basics, let’s look at the code ... Originally from WordCamp Montreal 2013
  • 28. But, you can download everything in the framework in simple, vanilla CSS and JS http://foundation.zurb.com/develop/download.html We do it in Sass
  • 29. http://foundation.zurb.com/docs/sass.html What you need to get started ★ Git ★ Ruby 1.9+ ★ NodeJS ★ Bower ★ Compass It’s easier than it looks Step by step instructions
  • 30. If it ain’t broke don’t fix it! Get Reverie by ThemeFortress You could build a WP Foundation theme from scratch but ...
  • 31. Easy to hack Most stable Foundation WP theme Child Starter Theme Updated from WordCamp Montreal 2013
  • 32. Of course there are other options ★ FoundationPress - http://foundationpress.olefredrik.com/ ★ WP-Foundation - http://320press.com/wp-foundation/ ★ JointsWP - http://jointswp.com/ ★ Reactor - http://awtheme.com/ ★ ZurbPress - http://zurbpress.wpprofs.com/ to name a few ...
  • 33. Starting a new project is as simple as foundation new project_name or get the reverie-child theme https://github.com/milohuang/reverie-child
  • 34. Child theme architecture ★ CSS directory - compiled SCSS files ★ SCSS directory ★ config.rb - required for compass to compile project ★ style.css - to register child theme in WordPress the rest is up to you
  • 35. Getting setup /* Theme Name: Theme Name Description: Child theme for the Reverie Author: Brendan & Brendan Inc. Template: reverie-master */ /* This is the CSS file loaded by WordPress in backend, * it will not be loaded in the frontend. * Go to the css/ folder and find style.css, * this is the CSS file loaded by WordPress in frontend. * Using Sass/Scss? Find the style.scss under scss/ folder. * http://themefortress.com/reverie */ style.css 1
  • 36. Getting setup // // FOUNDATION SETTINGS // // This is the default html and body font-size for the base rem value. // $rem-base: 16px; // Allows the use of rem-calc() or lower-bound() in your settings @import "foundation/functions"; // Grid // $include-html-grid-classes: $include-html-classes; $row-width: rem-calc(1140); $column-gutter: rem-calc(30); _settings.scss 2 Load functions Customize Foundation first few lines ...
  • 37. Getting setup - optional // FONT-STACK // $main-font: 'OpenSans'; // LINK COLORS // $normal : #282828; $hover : #111111; $active : #cccccc; $visited: #aaaaaa; $focus: #222222; architecture.scss 3 Set global variables Custom mixins // FONT SMOOTHING MIXIN // @mixin font-smoothing($value: on) { ! @if $value == on { ! ! -webkit-font-smoothing: antialiased; ! ! -moz-osx-font-smoothing: grayscale; ! } ! @else { ! ! -webkit-font-smoothing: subpixel-antialiased; ! ! -moz-osx-font-smoothing: auto; ! } } .menu { @include font-smoothing(on); } Then we include it like this
  • 38. Foundation 5 Markup <?php get_header(); ?> <!-- Row for main content area --> ! <div class="small-12 large-8 columns" id="content" role="main"> ! ! <?php /* Start loop */ ?> ! <?php while (have_posts()) : the_post(); ?> ! ! <article <?php post_class() ?> id="post-<?php the_ID(); ?>"> ! ! ! <header> ! ! ! ! <h1 class="entry-title"><?php the_title(); ?></h1> ! ! ! ! <?php reverie_entry_meta(); ?> ! ! ! </header> ! ! ! <div class="entry-content"> ! ! ! ! <?php the_content(); ?> ! ! ! </div> ! ! </article> ! <?php endwhile; // End the loop ?> ! </div> ! <?php get_sidebar(); ?>! <?php get_footer(); ?> page.php Grid classes
  • 39. Foundation 5 Markup $recent_posts = new WP_Query( $args ); if ( $recent_posts ) { ?> <div class="row full-row"> <?php while ( $recent_posts->have_posts() ) : $recent_posts->the_post(); $post_id = get_the_ID(); if ( get_the_post_thumbnail( $post_id ) ) { ?> <div class="large-4 columns text-center pad-row"> <a class="fade" href="<?php the_permalink(); ?>"> ! <?php the_post_thumbnail( 'masonry-thumbnail' ); ?> <div class="row"> ! <div class="large-12 columns tags-box"> ! ! <p class="thumb-title"><?php the_title(); ?></p> ! ! <p class="thumb-tag"><?php the_tags(); ?></p> ! </div> </div> </a> </div> functions.php - a snippet using masonry Call Foundation classes from anywhere Credit @isotrope
  • 44. If you’re in Montreal in May come check out ... http://www.thebrendans.com/events-workshops/
  • 45. Want to join the team? Check our internship program
  • 46. http://www.thebrendans.com/internships/ Want to join the team? Check our internship program