basic responsive theming - somedutta ghosh

18

Click here to load reader

Upload: drupal-camp-delhi

Post on 15-May-2015

211 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Basic Responsive Theming - Somedutta Ghosh

What is a responsive website?

One whose contents folds, flows, hides or appears as the device and its

orientation changes.

A good responsive website should have

• easy viewing

• easy navigation

• no resizing needed

• NO horizontal scrolling!

Page 2: Basic Responsive Theming - Somedutta Ghosh

Why go responsive?

Why are there so many mobile companies coming up? Because people

are increasingly buying them.

Why responsive? Because ^. And as mobile usage increases, it now

accounts for 10% of worldwide Internet usage.

And by going responsive we make sure our users have a comfortable

and enjoyable experience no matter what device they are on.

Page 3: Basic Responsive Theming - Somedutta Ghosh

Why go responsive?

http://www.bitrebels.com/wp-content/uploads/2011/04/Mobile-Marketing-Avertising-Landscape.jpg

some images from above infographics

Page 4: Basic Responsive Theming - Somedutta Ghosh

Why go responsive?

http://www.bitrebels.com/wp-content/uploads/2011/04/Mobile-Marketing-Avertising-Landscape.jpg

some images from above infographics

Page 5: Basic Responsive Theming - Somedutta Ghosh

Why go responsive?

http://www.bitrebels.com/wp-content/uploads/2011/04/Mobile-Marketing-Avertising-Landscape.jpg

some images from above infographics

Lets have LOOK at what we are talking about! (check out 1 or 2 good

responsive website)

Page 6: Basic Responsive Theming - Somedutta Ghosh

Where to get started? How to approach this?

Graceful Degradation

[image]

- desktop first

or

[image] Progressive Enhancement

- mobile first

Page 7: Basic Responsive Theming - Somedutta Ghosh

Graceful Degradation

Less content - less functionality - develop for desktop -

degrade gracefully - YES!

More content - more functionality - develop for desktop -

ALAS! we don’t have so much space in a smartphone! :O

Page 8: Basic Responsive Theming - Somedutta Ghosh

Progressive enhancement vs Graceful degradation

when? why?

Graceful degradation

• starts with complexity and tries to fix for smaller screens

• content and functionality gets chopped off as we go smaller

• at the end - we have a website that is great on desktop and….well it doesn’t

break on tablets and smartphones

But we can still go for it! With lesser content and basic very few functionality we

can easily have the content move and flow to suit the device.

Page 9: Basic Responsive Theming - Somedutta Ghosh

Progressive Enhancement

Less content - less functionality - develop for mobile - easy

enhancement - got it!

More content - more functionality - we must have this, this … and

this functionalities - develop for mobile - smooth..

move to tablet - give me more!

move to desktop - give me most!

- Enhance progressively - We Want!! ^_^

Page 10: Basic Responsive Theming - Somedutta Ghosh

Progressive enhancement vs Graceful degradation

when? why?

Progressive enhancement

• list out the essential functionalities - for mobile and larger devices

• add features, complex designs, enhancement as screen size grows

• at the end - we have a website that gives the basic functionality in all

devices. And more to look at in larger screens!

Any website - simple or complex - will fit into this approach.

Page 11: Basic Responsive Theming - Somedutta Ghosh

Designing and Theming

The design for different devices must be connected - each

design should flow to the next.

...

Page 12: Basic Responsive Theming - Somedutta Ghosh

Drupal & Responsive Theming

Our options -

1. media queries

2. context

3. panels

4. and of course...responsive base themes like zen, omega, etc.

Page 13: Basic Responsive Theming - Somedutta Ghosh

Media Queries - Brief Intro

The query contains two components:

1. a media type (screen), and

2. a particular media feature (max-device-width) to inspect, followed by the

target value (480px).

eg. @media screen and (max-device-width: 480px) {

.column {

float: none;

}

}

Page 14: Basic Responsive Theming - Somedutta Ghosh

Context

Context module - https://drupal.org/project/context

Specify condition - Add reaction

Page 15: Basic Responsive Theming - Somedutta Ghosh

Panels

Customized layouts for multiple uses - all from ui

Family of modules for panels and panes-

Panels : https://drupal.org/project/panels

Mini Panels : https://drupal.org/project/panels_mini

Panels In-Place Editor : https://drupal.org/project/panels_ipe

Views content panes : https://drupal.org/project/views_content

Custom content panes : https://drupal.org/project/ctools_custom_content

Page 16: Basic Responsive Theming - Somedutta Ghosh

Dos and Don’ts for responsive

• no pixel perfect designing/theming

• everything should be flexible

• on touch devices - links and buttons should have enough space for fingers

• lighter/smaller images for smaller devices

• good for seo - since one site for all devices

• mobile friendly navigation

• know from before the basic functionalities you want

• ...

Page 17: Basic Responsive Theming - Somedutta Ghosh

Testing

• browser plugin examples and demos

• websites examples and demos

• actual devices

Page 18: Basic Responsive Theming - Somedutta Ghosh

Try it out!

• Lets have a demo by creating a simple 2-3 page responsive website

[create a simple demo site - go to development]