View
4.002
Download
0
Category
Preview:
DESCRIPTION
Responsive Widget Design With WordPress is about how to make your widgets more compatible with responsive themes.
Citation preview
Responsive Widget Design: With WordPress
Saturday, September 15, 12
This is a really exciting time for web design. The increasing diversity of devices is throwing into sharp relief just how complacent and wrong-headed our traditional fixed-width bloated desktop-centric approach has been.
Responsive Widget Design
- Jeremy Keith, Developer, Author, Speaker
Saturday, September 15, 12
• Responsive Web Design Update
• Creating Responsive Widgets
• Using Responsive Widgets in your theme
Responsive Widget Design
Saturday, September 15, 12
What is Responsive Web Design?
Responsive Widget Design
Saturday, September 15, 12
Responsive Web Design is a combination of fluid grids and images with media queries to change layout based on the size of a device viewport.
- Luke Wroblewski, Mobile First
Responsive Widget Design
Saturday, September 15, 12
Responsive Widget Design
- Image Source TheeDesign.com
Saturday, September 15, 12
Responsive Widget Design
- Image Source Gaslight Creative
Saturday, September 15, 12
Responsive Web Design Is Evolving
Responsive Widget Design
Saturday, September 15, 12
Responsive Web Design
Responsive Widget Design
Adaptive Web Design
Progressive Enhancement
Mobile First
Structured Content
Conditional Loading
Saturday, September 15, 12
We are in a period of transition and still figuring things out. So expect to be learning and iterating a lot. That's both exciting and daunting.
- Luke Wroblewski, Mobile First
Responsive Widget Design
Saturday, September 15, 12
Creating Responsive WordPress Widgets
Responsive Widget Design
Saturday, September 15, 12
What is a Widget?
Responsive Widget Design
Saturday, September 15, 12
WordPress Widgets are WordPress Plugins that add visitor visual and interactivity options and features, such as sidebar widgets for post categories, tag clouds, navigation, search, etc.
- WordPress Codex
Responsive Widget Design
Saturday, September 15, 12
How to create a WordPress Widget?
Responsive Widget Design
Google - About 26,400,000 results
Saturday, September 15, 12
There’s bad code in my widget!
Responsive Widget Design
Saturday, September 15, 12
5 ways to fix bad widget code
Responsive Widget Design
1. Contact the developer2. Modify the widget yourself3. Clone the plugin4. Install the Widget CSS Classes plugin5. Add functions for custom classes to
your functions.php
Saturday, September 15, 12
Making Widgets Responsive
Responsive Widget Design
Saturday, September 15, 12
Redesigning The Approach
Responsive Widget Design
Mobile First - Widgets are inherently small. Design flexibly starting small (phone) and use media queries for the larger viewports (Desktop).
Saturday, September 15, 12
Redesigning The Approach
Responsive Widget Design
Think Liquid - As elements get bigger, increase their size and usability. Stay proportional. There are no rules it just has to make sense.
Saturday, September 15, 12
Elements That Will Change
Responsive Widget Design
1. Titles - Scale larger or smaller2. Paragraphs - Scale margin and padding3. Images - Will need to scale or crop4. Form labels - Will need to scale and wrap5. Form Inputs - Scale and increase padding6. Button Size - Scale and increase font size
Saturday, September 15, 12
Generated Widget Markup
Responsive Widget Design
<div id="primary" class="sidebar"><ul>! <li id="text-1" class="widget widget_text"> !<h3 class="widgettitle">Widget Title</h3>! ! <div class="textwidget">Text widget area.</div>! </li></ul></div>
* All generated widget ID’s and Classes are different. Firebug and Developer Tools are good to use for this.
(Text Widget)
Saturday, September 15, 12
Adding Markup To A Widget
Responsive Widget Design
! register_sidebar(! ! array(! ! ! 'id' => 'primary',! ! ! 'name' => __( 'Primary' ),! ! ! 'description' => __( 'A short description of the sidebar.' ),! ! ! 'before_widget' => '<here><div id="%1$s" class="widget %2$s"><here>',! ! ! 'after_widget' => '<here></div><here>',! ! ! 'before_title' => '<here><h3 class="widget-title"><here>',! ! ! 'after_title' => '<here></h3><here>'! ! )! );
(Functions.php)
* The whole idea here is to get control. Edit or add markup as needed.
Saturday, September 15, 12
Real World Example
Responsive Widget Design
• No width on outermost container• Logos floated left and right• Form elements floated left & right• Percentage width on form elements• Buttons centered
(Default)
Saturday, September 15, 12
Real World Example
Responsive Widget Design
• Min/Max widths stop rotation hiccup• More logo padding on right & left• Increased font and padding on form• 60/20 percentage width on form• Increased font and padding on buttons
(@media only screen and (min-width: 301px) and (max-width: 500px))
Saturday, September 15, 12
Real World Example
Responsive Widget Design
• Less logo padding on right & left
• Increased font and padding on form
• 50/30 percentage width on form
• Increased font and padding on buttons
( @media only screen and (min-width: 501px) and (max-width: 590px) )
Saturday, September 15, 12
Using Responsive Widgets In Your Theme
Responsive Widget Design
Saturday, September 15, 12
Widgets Are Awesome!
Responsive Widget Design
• Extremely powerful and flexible• Display menus, video, text, images, etc. • Place anywhere in your theme• Easy to use and update by clients• Great way to focus editing to certain areas
Saturday, September 15, 12
Widgets Can Go Anywhere
Responsive Widget Design
Saturday, September 15, 12
Widgets Responsive Flow
Responsive Widget Design
Saturday, September 15, 12
Responsive Flow Issues
Responsive Widget Design
Saturday, September 15, 12
Content Structure, Content Choreography, Content Stacking
Responsive Widget Design
Saturday, September 15, 12
The concept of permanently placing content on a web page for a single browsing width or resolution is becoming a thing of the past.
- Trent Walton, TrentWalton.com
Responsive Widget Design
Saturday, September 15, 12
Rearranging Content With Flexbox
Responsive Widget Design
• CSS Property - flexible box layout module• box-ordinal-group property reorder elements • Supported by all current mobile browsers• No need to hide content in one column view• Degrades back to original source order
Saturday, September 15, 12
Real World Example
Responsive Widget Design
( TheIronBeam.com - Defining Areas )
Saturday, September 15, 12
Setting Up Your Flexbox CSS
Responsive Widget Design
@media only screen and (min-width: 320px) and (max-width: 479px) {/* Content Choreography starts here */ .site-content { display:box; display:-moz-box; display:-webkit-box; box-orient:vertical; -moz-box-orient:vertical; -webkit-box-orient:vertical; }
(Step 1)
* Creating the box around the outermost parent container.
Saturday, September 15, 12
Setting Up Your Flexbox CSS
Responsive Widget Design
.menu-main-nav-container, #content, #secondary { box-ordinal-group: 1; -moz-box-ordinal-group: 1; -webkit-box-ordinal-group: 1; }
(Step 2)
* Assign all containers inside that you would like to order to group 1.
Saturday, September 15, 12
Setting Up Your Flexbox CSS
Responsive Widget Design
#secondary { box-ordinal-group: 4; -moz-box-ordinal-group: 4; -webkit-box-ordinal-group: 4; } .menu-main-nav-container { box-ordinal-group: 2; -moz-box-ordinal-group: 2; -webkit-box-ordinal-group: 2; } #content { box-ordinal-group: 3; -moz-box-ordinal-group: 3; -webkit-box-ordinal-group: 3; }
(Step 3)
* Order your internal containers as you would like them to appear.
Saturday, September 15, 12
Real World Example
Responsive Widget Design
( TheIronBeam.com - Ordered With Flexbox )
Saturday, September 15, 12
Content Stacking Information
Responsive Widget Design
http://trentwalton.com/2011/07/14/content-choreography/
http://www.jordanm.co.uk/post/21863299677/building-with-content-choreography
Trent Walton
Jordan Moore
Saturday, September 15, 12
Questions?
Responsive Widget Design
Saturday, September 15, 12
Thank you!• Slides at www.CrowdedSites.com• For any questions feel free to contact me!• Wes@CrowdedSites.com
Responsive Widget Design
Saturday, September 15, 12
Recommended