a c a cont ontent ent fir first appr st approach t ach to
play

A "c A "cont ontent ent-fir -first" appr st" - PowerPoint PPT Presentation

A "c A "cont ontent ent-fir -first" appr st" approach t ach to o designing r designing responsiv esponsive Drup e Drupal al lay layouts using T outs using Twitt witter Bootstr er Bootstrap ap Megan Miller &


  1. A "c A "cont ontent ent-fir -first" appr st" approach t ach to o designing r designing responsiv esponsive Drup e Drupal al lay layouts using T outs using Twitt witter Bootstr er Bootstrap ap Megan Miller & Brian Young Stanford University BAD Camp 2012 — November 4, 2012

  2. Brian Young Megan Miller Web Designer & Developer Web Designer Documentation, Design, & Development Stanford Web Services Stanford University Stanford University @auracreations @meganerinmiller brianyoung@stanford.edu meganem@stanford.edu

  3. Back in the day...

  4. But now... an explosion of devices! Source: http://mobiforge.com/developing/story/device-diversity and http://jquerymobile.com

  5. Device diversity We can't predict the device of the future . How can we know what size of device we are designing for?

  6. "Mobile" Trends 35% of American adults own a smartphone 25% of smartphone users say they only use their phone to browse the web Source: Pew Internet & American Life Project – http://www.pewinternet.org/Reports/2011/Smartphones.aspx

  7. In an ideal world... A custom experience for every device.

  8. We go responsive. same content reused for each screen size Sparkbox website at di ff erent browser sizes (from http://mediaqueri.es)

  9. A typical department at Stanford Small sta ff & limited resources

  10. Centralized Tools and Resources

  11. We want to make it easy.

  12. What is Responsive Web Design? (RWD)

  13. "Responsive" A design that responds to the size of the browser or device. Let's take a look at an example… Microso f website at di ff erent browser sizes (from http://mediaqueri.es)

  14. "Design" We mostly mean layout when referring to "design" in RWD.

  15. A single code base Creating one website , and displaying it in di ff erent ways. Atlanta Ballet website at di ff erent browser sizes (from http://mediaqueri.es)

  16. Embrace Flexibility RWD is a philosophy and a practice . By embracing the inherent flexibility of the web, we can design for the future.

  17. How do you implement Responsive Web Design?

  18. Flexible Grid-Based Layout Flexible Images and Media Media Queries

  19. Flexible Grid Express your layout proportionally . 25% 50% 25% Be flexible — not pixel-perfect.

  20. Flexible Media Flexible containers constrain proportions of images and media by using width:100%; ¡ image fills width of container

  21. Media Queries Detect your device screen width , then load di ff erent styles. @media ¡screen ¡and ¡(max-­‑width: ¡ 480px ) ¡{ ¡ .mything ¡{ ¡ width:100%; ¡ } ¡ } ¡ @media ¡screen ¡and ¡(max-­‑width: ¡ 1200px ) ¡{ ¡ .mything ¡{ ¡ width:30%; ¡ } ¡ } ¡

  22. Flexible Grid-Based Layout Flexible Images and Media Media Queries

  23. What should you consider when designing responsive websites?

  24. Responsive Layouts Are about preserving content hierarchy and legibility .

  25. Content Hierarchy What content is most important ? Give it emphasis through size and order .

  26. Preserve Content Hierarchy On small devices, what shows up first ?

  27. Legibility Legibility of text , but also "legibility" of micro-layouts .

  28. Preserve legibility Don't let things get too squished or stretched ! normal squished

  29. Preserve legibility A good solution: normal image on top

  30. Preserve legibility An even better solution... Build a responsive theme that never requires a drastic size adjustment of micro-layouts. ~ same size on desktop size... mobile!

  31. Preserve legibility The holy grail? ~ same size on desktop size... mobile!

  32. "Content First" Considering preservation of content hierarchy and legibility as a top priority.

  33. Back to Stanford...

  34. We started with content We developed a " layout library " — sets of common layouts that we needed to support.

  35. Homepage layouts

  36. Landing page layouts

  37. Subpage layouts

  38. Articulating responsive behavior We created a set of responsive flow wireframes .

  39. One and two sidebars

  40. No sidebars

  41. Content area blocks

  42. This is complicated! Can we find a way to support all this sophisticated behavior in a theme? Can we make it easy to implement for site builders and content creators?

  43. Where do we start? Use an existing Drupal theme? • Zen 5 • Omega • AdaptiveTheme Build o ff of a responsive framework? • Twitter Bootstrap • Zurb • Skeleton

  44. What we were looking for: • Preserving content hierarchy and legibility • Easy to implement • Scalability and flexibility of layout options • Support for complex layouts • Consideration for Drupal core features and common layout implementation strategies • Consideration of Stanford community context and technologies

  45. Build off Twitter Bootstrap We decided to build our own theme o ff of Twitter Bootstrap , which would provide us with base styles and basic responsive behaviors . twitter.github.com/bootstrap

  46. Default styles + responsive behavior Drupal Theme Base code that provides • Styles and UI elements • “Starter” responsive behavior

  47. Why Twitter Bootstrap?

  48. and also: Open source o Apache License v2.0 o Documentation licensed under CC BY 3.0 Community engagement o Git: 39,000 stars and 9,000 forks Handles fixed and fluid layouts o 12-column grid system o Grid can be nested - infinite grid

  49. Introducing Open Framework

  50. Open Framework A new responsive Drupal theme based on Twitter Bootstrap.

  51. Open Framework Sophisticated Easy to use

  52. Sophisticated responsive behaviors Open Framework provides support for two conflicting responsive patterns: • Row preference • Column preference

  53. Row Preference Row preference forces elements to bump other elements down when the screen gets smaller. We call these " flow " regions .

  54. Column Preference Column preference forces elements to stack side-by-side in columns. We call these " stacked " regions .

  55. A combination approach Through a combination of stacked and flow region behaviors, we can create complex layouts that respond well at every breakpoint.

  56. New responsive regions New set of responsive regions that support " flow " and " stacked " behavior. Content placed in specific block regions will respond based on that region’s pre-defined behavior .

  57. Drupal-specific styles support Open Framework takes the basics of Twitter Bootstrap and adds in Drupal-friendly , semantic styles. Some examples: ¡ ¡ ¡.more-­‑link ¡ ¡ ¡ ¡.descriptor ¡ ¡ ¡ ¡.border-­‑simple ¡

  58. Support for common micro-layouts We have developed a set of styles and implementation strategies for common micro- layouts we refer to as " postcard " layouts.

  59. Support for common micro-layouts We have developed a set of styles and implementation strategies for common micro- layouts we refer to as " postcard " layouts. <div ¡class="postcard-­‑left"> ¡ ¡<div>left</div> ¡ ¡<div>right</div> ¡ </div> ¡

  60. .po .post stcar ard-right d-right .postcard-left .po .post stcar ard-le d-le f -wr -wrap ap .po .post stcar ard-right d-right-wr -wrap ap

  61. A truly Drupal style guide Open Framework has a sortable style guide .

  62. Responsive order overlay Responsive order overlay toggle that shows how content hierarchy will be handled on small screens.

  63. Let's take a look... http://openframework.stanford.edu

  64. Site Building with Open Framework

  65. Open Framework at Stanford Open Framework provides the foundation for theme development at Stanford.

  66. Stanford Framework Stanford Framework is a subtheme of Open Framework, providing branding and default styles for units at Stanford to use or subtheme.

  67. OFW styled with CSS Injector

  68. Modules that play nice • Block Class • Views • BEAN • Context • CSS Injector

  69. First blocks, then the world! Region behaviors can be applied to panels regions, display suite layout regions, or even hand- coded regions.

  70. Using Open Framework Download version 7.x-2.x on github github.com/SU-SWS/open_framework Visit the Open Framework website at openframework.stanford.edu If you want to participate , contact us to join the contribution team on Github.

  71. Places to learn more about RWD: • “Responsive Web Design” by Ethan Marcotte (a book apart) http://www.abookapart.com/products/responsive-web-design • LukeW — Multidevice Layout Patterns http://www.lukew.com and http://www.lukew.com/ ff /entry.asp?1514 • Je ff rey Zeldman — Content First http://www.zeldman.com/category/content-first/ • A List Apart — Responsive Web Design http://www.alistapart.com/articles/responsive-web-design/ • Ben Callahan — Responsive Retrofitting http://bencallahan.com/ and https://github.com/bencallahan/rwd-retrofitting

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend