SlideShare una empresa de Scribd logo
1 de 108
BUILDING RESPONSIVE
    DRUPAL SITES
Drupal Consulting, Development, and Training
      evolvingweb.ca | 514-844-4930

                Suzanne Kennedy, Co-founder
                @suzanne_kennedy
• Mobile   First

• Responsive       Design

• Building   a Responsive Drupal Theme

• Designing   Responsive Elements

• Tools   & Resources

• Outstanding      Challenges
WHAT IS MOBILE FIRST?


• Design
       your website for the mobile experience
 (phones, tablets, and everything in between)
• Allow the mobile experience to impact the
 overall design
WHAT IS RESPONSIVE
    DESIGN?
RESPONSIVE DESIGN

• Create
       a single site and design framework that adapts to any
 browser size

• Tweak the design at different browser sizes to improve the
 experience

• Usually   easier than building separate experiences for different
 devices
http://mattkersley.com/responsive/
RESPONSIVE DESIGN
               PROCESS
1. Create a Flexible Width website

2. Set limits for large screens if needed

3. Figure out how content fits best at different widths

4. Add breakpoints to accommodate different widths

5. Deal with tricky elements like tables, grids, images, iframes,
   etc.
WHAT WORKS ON MOBILE?


• Make   links big enough to touch

• Show   the most important information

• Show   only the most important information

• Make   the menu easily accessible
DESIGN APPROACHES


• Prototype   rather than make mockups

• No   pixel-perfect design

• Allow   the design for mobile to impact the design for desktop
HOW TO BUILD A
RESPONSIVE DRUPAL THEME?
MEDIA QUERIES
MEDIA QUERY COMPONENTS

• Media Type   (i.e. screen or print)

• Media   Feature (i.e. max-width, min-width)
TARGETING LARGE SCREENS
              Use the min-width media feature

<link rel="stylesheet" type="text/css"
media="screen and (min-width: 960px)" href="/style.css" />

@media screen and (min-width: 960px) {
         left-column {
              float: left;
              width: 60%;
     }
}
TARGETING SMALL SCREENS
              Use the max-width media feature

<link rel="stylesheet" type="text/css"
media="screen and (max-width: 480px)" href="/style.css" />

@media screen and (min-width: 480px) {
         .panels-pane {
              float: none;
     }
}
DEVICE ORIENTATION
orientation: landscape   orientation: portrait
OTHER MEDIA FEATURES
• min-device-width

• max-device-width

• resolution

• color

• aspect-ratio 
IN YOUR DRUPAL THEME

Inline in your CSS files:
@media screen and (min-width: 960px) {
         left-column {
              float: left;
              width: 60%;
     }
}
IN YOUR DRUPAL THEME
In your .info file:
stylesheets[screen and (min-width: 960px)][] = css/screen-
min-960.css
stylesheets[screen and (max-width: 480px)][] = css/screen-
max-480.css
stylesheets[screen and (max-width: 240px)][] = css/screen-
max-240.css

stylesheets[screen and (min-width: 480px) and (max-width:
760px)][] = css/screen-480-760.css
BROWSER ISSUES
ANDROID DEVICES
You need to set the viewport meta tag to make media
          queries work on android devices.
<?php
   $meta_viewport = array(
      '#type' => 'html_tag',
      '#tag' => 'meta',
      '#attributes' => array(
        'name' => 'viewport',
        'content' => 'width=device-width'
      )
   );
   drupal_add_html_head($meta_viewport, 'viewport');
?>
INTERNET EXPLORER

                 Versions 6-8 don’t support media queries



In your .info file:
stylesheets-conditional[lt IE 9][all][] = ie-960.css
DESIGNING RESPONSIVE
      WEBSITES
LAYOUT
http://www.lukew.com/ff/entry.asp?1514
evolvingweb.ca
owltastic.com
palentir.net
palentir.net
foodsense.is
workatplay.com
workatplay.com
barackobama.com
HORIZONTAL MENUS
VERTICAL MENUS
smashingmagazine.com
workatplay.com
IMAGES
img {
        max-width: 100%;
}
ADAPTIVE IMAGE MODULE
Add an ‘Adaptive effect’ to your image styles to
  resize images based on device detection

       drupal.org/project/adaptive_image
ADVERTISING!
bostonglobe.com
smashingmagazine.com
smashingmagazine.com
FORMS
Form elements
 are too wide
input,
select {
  max-width: 100%;
}
jquerymobile.com
drupal.org/project/jquerymobile
TABLES
Avoid using
tables for grids
TABULAR DATA
Tabular Data
Tabular Data
denver2012.drupal.org
OTHER IDEAS

• Use   Google Charts to show a pie chart instead of a table

• Provide   a CSV download of the data
PANELS
palentir.net
palentir.net
CSS TO ADJUST PANEL
SEARCH
drupalsun.com
drupalsun.com
drupalsun.com
BANNERS
happycoghosting.com
happycoghosting.com
foodsense.is
foodsense.is
IFRAMES
iframe {
  max-width: 100%;
}
DECORATIVE ELEMENTS
css-tricks.com
css-tricks.com
CRAFTING YOUR CSS
CSS 3: FONT-FACE

@font-face {
    font-family: Futura;
    src: url("../fonts/Futura-Book.otf");
  }

h2 {
       font-family: Futura;
}
CSS3: BORDER-RADIUS
         www.css3.info

  #example {
    -moz-border-radius: 15px;
    border-radius: 15px;
  }
OTHER CSS ADVICE

• Avoid absolute
 positioning

• Avoid setting absolute
 heights and widths 
TOOLS AND RESOURCES
DRUPAL THEMES & MODULES
RESPONSIVE THEMES
• Omega Theme

• Adaptive Theme

• Square    Grid

• Twitter   Bootstrap

• Others...
DRUPAL MODULES
http://drupal.org/project/adaptive_image

 http://drupal.org/project/touch_icons

 http://drupal.org/project/jquerymobile

 http://drupal.org/project/mobile_tools
ARTICLES

• Evolving Web: http://evolvingweb.ca/story/responsive-theming-
 how-apply-responsive-design-techniques-drupal-theme

• Responsive Tables: http://css-tricks.com/responsive-data-tables/

•A List Apart: http://www.alistapart.com/articles/responsive-
 web-design/

• Responsive   Layouts http://www.lukew.com/ff/entry.asp?1514
OTHER RESOURCES

• Media
      Features: http://www.w3.org/TR/css3-mediaqueries/
 #media1

• Drupal    Base Themes: http://groups.drupal.org/node/175234

• Testing
        your responsive design: http://mattkersley.com/
 responsive

•A List Apart Book: http://www.abookapart.com/products/
 responsive-web-design
VIDEOS FROM DRUPALCON
•   Mobile First: http://denver2012.drupal.org/keynote/luke-wroblewski

•   Responsive Theming + Omega Theme: http://denver2012.drupal.org/
    program/sessions/creating-responsive-and-mobile-first-drupal-themes

•   UX Design: http://denver2012.drupal.org/program/sessions/ux-design-
    every-screen

•   Responsive Techniques: http://denver2012.drupal.org/program/sessions/
    rethinking-responsive-building-techniques-drupal

•   Responsive Design: http://denver2012.drupal.org/program/sessions/
    responsive-web-design-past-present-and-future
CHALLENGES
canada.gc.ca
TRAINING PROGRAM
We offer public and private Drupal training sessions.
              evolvingweb.ca/training
THANK YOU!

Más contenido relacionado

La actualidad más candente

Web Development For Company Proposal Template PowerPoint Presentation Slides
Web Development For Company Proposal Template PowerPoint Presentation SlidesWeb Development For Company Proposal Template PowerPoint Presentation Slides
Web Development For Company Proposal Template PowerPoint Presentation Slides
SlideTeam
 

La actualidad más candente (20)

Seo content writing
Seo content writingSeo content writing
Seo content writing
 
Free presentation template for web design projects
Free presentation template for web design projectsFree presentation template for web design projects
Free presentation template for web design projects
 
Web Development with HTML5, CSS3 & JavaScript
Web Development with HTML5, CSS3 & JavaScriptWeb Development with HTML5, CSS3 & JavaScript
Web Development with HTML5, CSS3 & JavaScript
 
Website Redesign Proposal PowerPoint Presentation Slides
Website Redesign Proposal PowerPoint Presentation SlidesWebsite Redesign Proposal PowerPoint Presentation Slides
Website Redesign Proposal PowerPoint Presentation Slides
 
Web Development and Web Development technologies - Temitayo Fadojutimi
Web Development and Web Development technologies - Temitayo FadojutimiWeb Development and Web Development technologies - Temitayo Fadojutimi
Web Development and Web Development technologies - Temitayo Fadojutimi
 
CSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignCSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive Design
 
Six Steps to Building a Content Strategy
Six Steps to Building a Content StrategySix Steps to Building a Content Strategy
Six Steps to Building a Content Strategy
 
Web design 3
Web design 3Web design 3
Web design 3
 
Website Proposal Powerpoint Presentation Slides
Website Proposal Powerpoint Presentation SlidesWebsite Proposal Powerpoint Presentation Slides
Website Proposal Powerpoint Presentation Slides
 
Content Management System
Content Management SystemContent Management System
Content Management System
 
ADOBE DREAMWEAVER
ADOBE DREAMWEAVERADOBE DREAMWEAVER
ADOBE DREAMWEAVER
 
Web Development Presentation
Web Development PresentationWeb Development Presentation
Web Development Presentation
 
Web design proposal
Web design proposalWeb design proposal
Web design proposal
 
Introduction to WordPress
Introduction to WordPressIntroduction to WordPress
Introduction to WordPress
 
Web Designing Presentation
Web Designing PresentationWeb Designing Presentation
Web Designing Presentation
 
Web Development For Company Proposal Template PowerPoint Presentation Slides
Web Development For Company Proposal Template PowerPoint Presentation SlidesWeb Development For Company Proposal Template PowerPoint Presentation Slides
Web Development For Company Proposal Template PowerPoint Presentation Slides
 
Web engineering
Web engineeringWeb engineering
Web engineering
 
The Ultimate Website Development Roadmap
The Ultimate Website Development RoadmapThe Ultimate Website Development Roadmap
The Ultimate Website Development Roadmap
 
Website Development Proposal PowerPoint Presentation Slides
Website Development Proposal PowerPoint Presentation SlidesWebsite Development Proposal PowerPoint Presentation Slides
Website Development Proposal PowerPoint Presentation Slides
 
Responsive Web Design | Website Designing
Responsive Web Design | Website DesigningResponsive Web Design | Website Designing
Responsive Web Design | Website Designing
 

Similar a Building Responsive Websites with Drupal

Responsive Web Design for Drupal, CMS Expo
Responsive Web Design for Drupal, CMS ExpoResponsive Web Design for Drupal, CMS Expo
Responsive Web Design for Drupal, CMS Expo
Emma Jane Hogbin Westby
 
FITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web DesignFITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web Design
Frédéric Harper
 

Similar a Building Responsive Websites with Drupal (20)

Responsive Design and Drupal Theming
Responsive Design and Drupal ThemingResponsive Design and Drupal Theming
Responsive Design and Drupal Theming
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Responsive Websites
Responsive WebsitesResponsive Websites
Responsive Websites
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013
 
How to Project-Manage and Implement a Responsive Website
How to Project-Manage and Implement a Responsive WebsiteHow to Project-Manage and Implement a Responsive Website
How to Project-Manage and Implement a Responsive Website
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Responsive design
Responsive designResponsive design
Responsive design
 
Web designtrends 5-29-2013
Web designtrends 5-29-2013Web designtrends 5-29-2013
Web designtrends 5-29-2013
 
Let's dig into the Omega Theme!
Let's dig into the Omega Theme!Let's dig into the Omega Theme!
Let's dig into the Omega Theme!
 
Mobile Best Practices
Mobile Best PracticesMobile Best Practices
Mobile Best Practices
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Responsive Design: What is it? How do we do it? How much will it cost?
Responsive Design: What is it? How do we do it? How much will it cost?Responsive Design: What is it? How do we do it? How much will it cost?
Responsive Design: What is it? How do we do it? How much will it cost?
 
Responsive & Responsible Web Design in DNN
Responsive & Responsible Web Design in DNNResponsive & Responsible Web Design in DNN
Responsive & Responsible Web Design in DNN
 
Multi screen HTML5
Multi screen HTML5Multi screen HTML5
Multi screen HTML5
 
Responsive Web Design for Drupal, CMS Expo
Responsive Web Design for Drupal, CMS ExpoResponsive Web Design for Drupal, CMS Expo
Responsive Web Design for Drupal, CMS Expo
 
FITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web DesignFITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web Design
 
Responsive design: techniques and tricks to prepare your websites for the mul...
Responsive design: techniques and tricks to prepare your websites for the mul...Responsive design: techniques and tricks to prepare your websites for the mul...
Responsive design: techniques and tricks to prepare your websites for the mul...
 
WordPress for mobile
WordPress for mobileWordPress for mobile
WordPress for mobile
 

Más de Suzanne Dergacheva

10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-Box10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-Box
Suzanne Dergacheva
 

Más de Suzanne Dergacheva (20)

It's All About the Experience: What I’ve learnt from talking to thousands of ...
It's All About the Experience: What I’ve learnt from talking to thousands of ...It's All About the Experience: What I’ve learnt from talking to thousands of ...
It's All About the Experience: What I’ve learnt from talking to thousands of ...
 
Building a Great User Experience for Content Editors in Drupal 8
Building a Great User Experience for Content Editors in Drupal 8Building a Great User Experience for Content Editors in Drupal 8
Building a Great User Experience for Content Editors in Drupal 8
 
Dipping Your Toe into Drupal 8 Module Development
Dipping Your Toe into Drupal 8 Module DevelopmentDipping Your Toe into Drupal 8 Module Development
Dipping Your Toe into Drupal 8 Module Development
 
Device-Agnostic Content Strategy for Drupal
Device-Agnostic Content Strategy for DrupalDevice-Agnostic Content Strategy for Drupal
Device-Agnostic Content Strategy for Drupal
 
Creating a Reusable Drupal Website for Higher Education - Webinar
Creating a Reusable Drupal Website for Higher Education - WebinarCreating a Reusable Drupal Website for Higher Education - Webinar
Creating a Reusable Drupal Website for Higher Education - Webinar
 
Creating a Reusable Drupal Website for Higher Education - at USG Tech Day
Creating a Reusable Drupal Website for Higher Education - at USG Tech DayCreating a Reusable Drupal Website for Higher Education - at USG Tech Day
Creating a Reusable Drupal Website for Higher Education - at USG Tech Day
 
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon BaltimoreCreating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
 
What is Drupal? And Why is it Useful? Webinar
What is Drupal? And Why is it Useful? WebinarWhat is Drupal? And Why is it Useful? Webinar
What is Drupal? And Why is it Useful? Webinar
 
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon DublinCreating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
 
What is Drupal? An Introduction to Drupal 8
What is Drupal? An Introduction to Drupal 8What is Drupal? An Introduction to Drupal 8
What is Drupal? An Introduction to Drupal 8
 
Using Core Themes in Drupal 8
Using Core Themes in Drupal 8Using Core Themes in Drupal 8
Using Core Themes in Drupal 8
 
Minimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
Minimalist Theming: How to Build a Lean, Mean Drupal 8 ThemeMinimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
Minimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
 
Upgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and GotchasUpgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and Gotchas
 
Migrate for Site Builders from MidCamp 2016
Migrate for Site Builders from MidCamp 2016Migrate for Site Builders from MidCamp 2016
Migrate for Site Builders from MidCamp 2016
 
The Wonderful World of Drupal 8 Multilingual
The Wonderful World of Drupal 8 MultilingualThe Wonderful World of Drupal 8 Multilingual
The Wonderful World of Drupal 8 Multilingual
 
Creating a Drupal Install Profile for a Large Organization
Creating a Drupal Install Profile for a Large OrganizationCreating a Drupal Install Profile for a Large Organization
Creating a Drupal Install Profile for a Large Organization
 
Intro to Drupal Migrate for Site Builders
Intro to Drupal Migrate for Site BuildersIntro to Drupal Migrate for Site Builders
Intro to Drupal Migrate for Site Builders
 
Drupal migrate-june2015
Drupal migrate-june2015Drupal migrate-june2015
Drupal migrate-june2015
 
10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-Box10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-Box
 
Creating Dynamic Landing Pages for Drupal with Panels - Webinar
Creating Dynamic Landing Pages for Drupal with Panels - WebinarCreating Dynamic Landing Pages for Drupal with Panels - Webinar
Creating Dynamic Landing Pages for Drupal with Panels - Webinar
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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...
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Building Responsive Websites with Drupal