get responsive in 30 minutes (wordcamp sofia)

24
Get Responsive in 30 minutes. Nikolay Ninarski (Ninio) Shtrak! Ltd. (Штрак!.. да, ш&т). initLab html5, wp, drupal, mobile

Upload: nickolay-ninarski

Post on 14-Jan-2015

2.310 views

Category:

Technology


1 download

DESCRIPTION

A presentation I made on WordCamp Sofia 2012. It's about how to make your WordPress theme responsive by Breaking and Fixing it.

TRANSCRIPT

Page 1: Get responsive in 30 minutes (WordCamp Sofia)

Get Responsive in 30 minutes.

Nikolay Ninarski (Ninio) Shtrak! Ltd. (Штрак!.. да, ш&т).

initLab html5, wp, drupal, mobile

Page 2: Get responsive in 30 minutes (WordCamp Sofia)

Me?

• Developer

• WordPress fan

• I like Drupal also

• I and 2 friends founded a catering company that is doing WP and Drupal.

• Long story.

• Labber at initLab (hackerspaces FTW)

Page 3: Get responsive in 30 minutes (WordCamp Sofia)

Why Mobile

Page 4: Get responsive in 30 minutes (WordCamp Sofia)

Warning! Pie Chart ahead!

Copyright kayakeverywhere, flickr.com

Page 5: Get responsive in 30 minutes (WordCamp Sofia)

x2/year

88%

12%

Desktop vs Mobile (09.2012)

Desktop Mobile

93%

7%

Desktop vs Mobile (09.2011)

Desktop Mobile

Data from StatCounter

Page 6: Get responsive in 30 minutes (WordCamp Sofia)

How to go mobile?

Page 7: Get responsive in 30 minutes (WordCamp Sofia)

Mobile Site Approaches

• Separate mobile website

• Responsive design

• Hybrid

Page 8: Get responsive in 30 minutes (WordCamp Sofia)

Separate mobile version

• Detect the browser on server side

• Redirect and serve simpler design

+ Less load on the device

+ Tailor-made website

‒ More work

Page 9: Get responsive in 30 minutes (WordCamp Sofia)

Responsive design

• Make CSS with media queries to show/hide stuff

(*media query = a point from which the design will change.. Usually at specific width)

• Use js if needed to make more complex changes

+ Quick (in simple cases)

− Slower load/performance (desktop inheritance)

Page 10: Get responsive in 30 minutes (WordCamp Sofia)

Responsive approaches

• Mobile first – if we do it from scratch.

– Start from the mobile version and enhance iteratively up to the desktop

• Break/fix approach – In cases you have an existing non-responsive website.

– Make the screen smaller and check when the design will break. Fix. Continue.

Page 11: Get responsive in 30 minutes (WordCamp Sofia)

Check out our weapons

Page 12: Get responsive in 30 minutes (WordCamp Sofia)

Break/fix approach

Tools:

• Chrome Web Dev Tools

• Make something smaller

• Make something bigger

• Make something fluid

• Hide something

• Convert something (possibly with js)

Page 13: Get responsive in 30 minutes (WordCamp Sofia)

Step 1

Break Something Copyright LinderRox, flickr.com

Page 14: Get responsive in 30 minutes (WordCamp Sofia)

Step 1

Identify your break point (the point where it breaks)

Page 15: Get responsive in 30 minutes (WordCamp Sofia)

Step 2

Find the problematic bastard

Copyright COLECCION CAMARAS DE COLORES, flickr.com

Page 16: Get responsive in 30 minutes (WordCamp Sofia)

Step 2

Find out what is breaking the page

Page 17: Get responsive in 30 minutes (WordCamp Sofia)

Step 3

Fix it

Page 18: Get responsive in 30 minutes (WordCamp Sofia)

Step 3

Fix it

• Make the things fluid on it (%)

• Change size

• Hide/show

• …

Page 19: Get responsive in 30 minutes (WordCamp Sofia)

Step 4

Go To Step 1

(loop-loop)

Page 20: Get responsive in 30 minutes (WordCamp Sofia)

Step Last

Add <meta name="viewport" content="width=device-width, initial-scale=1.0">

to the head

Page 21: Get responsive in 30 minutes (WordCamp Sofia)

Hacker’s tip

Merge breakpoints so you don’t write that much

Page 22: Get responsive in 30 minutes (WordCamp Sofia)

Break/fix comments

• Good solution for existing websites

• Not that much thinking involved

• Kind of agile

• Looks kind of natural

Page 24: Get responsive in 30 minutes (WordCamp Sofia)

Thanks!

M: [email protected]

Blog: http://shtrak.eu/ninio

Twitter: @ninarski

Shtrak!: http://shtrak.eu/it