SlideShare a Scribd company logo
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.

                             - Jeremy Keith, Developer, Author, Speaker




                                Responsive Widget Design
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
- Image Source TheeDesign.com




                             Responsive Widget Design
Saturday, September 15, 12
- Image Source Gaslight Creative




                             Responsive Widget Design
Saturday, September 15, 12
Responsive Web Design Is Evolving




                             Responsive Widget Design
Saturday, September 15, 12
Responsive Web Design
                                 Adaptive Web Design

                              Progressive Enhancement

                                      Mobile First

                                  Structured Content

                                  Conditional Loading



                             Responsive Widget Design
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?
                 Google - About 26,400,000 results




                             Responsive Widget Design
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
                  1.         Contact the developer
                  2.         Modify the widget yourself
                  3.         Clone the plugin
                  4.         Install the Widget CSS Classes plugin
                  5.         Add functions for custom classes to
                             your functions.php




                               Responsive Widget Design
Saturday, September 15, 12
Making Widgets Responsive




                              Responsive Widget Design
Saturday, September 15, 12
Redesigning The Approach
         Mobile First - Widgets are inherently small.
         Design flexibly starting small (phone) and use
         media queries for the larger viewports (Desktop).




                              Responsive Widget Design
Saturday, September 15, 12
Redesigning The Approach
             Think Liquid - As elements get bigger, increase
             their size and usability. Stay proportional. There
             are no rules it just has to make sense.




                              Responsive Widget Design
Saturday, September 15, 12
Elements That Will Change
             1.         Titles - Scale larger or smaller
             2.         Paragraphs - Scale margin and padding
             3.         Images - Will need to scale or crop
             4.         Form labels - Will need to scale and wrap
             5.         Form Inputs - Scale and increase padding
             6.         Button Size - Scale and increase font size




                              Responsive Widget Design
Saturday, September 15, 12
Generated Widget Markup
                                           (Text Widget)
                        <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>                         * All generated widget ID’s and
                                                      Classes are different. Firebug
                        </div>
                                                      and Developer Tools are good
                                                      to use for this.


                                Responsive Widget Design
Saturday, September 15, 12
Adding Markup To A Widget
                                       (Functions.php)
 register_sidebar(
                                                        * The whole idea here is to
 !       array(                                         get control. Edit or add
 !       !       'id' => 'primary',                     markup as needed.
 !       !       '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>'
 !       )
 );


                              Responsive Widget Design
Saturday, September 15, 12
Real World Example
                                         (Default)


                                       • No width on outermost container
                                       • Logos floated left and right
                                       • Form elements floated left & right
                                       • Percentage width on form elements
                                       • Buttons centered




                             Responsive Widget Design
Saturday, September 15, 12
Real World Example
                             (@media only screen and (min-width: 301px)
                                      and (max-width: 500px))


                                           • 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




                               Responsive Widget Design
Saturday, September 15, 12
Real World Example
                             ( @media only screen and (min-width: 501px)
                                      and (max-width: 590px) )

                                                         • Less logo padding on
                                                          right & left
                                                         • Increased font and
                                                          padding on form
                                                         • 50/30 percentage width
                                                          on form
                                                         • Increased font and
                                                          padding on buttons




                               Responsive Widget Design
Saturday, September 15, 12
Using Responsive Widgets
                                   In Your Theme




                              Responsive Widget Design
Saturday, September 15, 12
Widgets Are Awesome!
             •      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




                             Responsive Widget Design
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
         •      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




                             Responsive Widget Design
Saturday, September 15, 12
Real World Example
                              ( TheIronBeam.com - Defining Areas )




                             Responsive Widget Design
Saturday, September 15, 12
Setting Up Your Flexbox CSS
                                           (Step 1)

    @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;                   * Creating the box around the
                                                  outermost parent container.
           box-orient:vertical;
           -moz-box-orient:vertical;
           -webkit-box-orient:vertical;
       }



                               Responsive Widget Design
Saturday, September 15, 12
Setting Up Your Flexbox CSS
                                              (Step 2)

                .menu-main-nav-container, #content, #secondary {
                     box-ordinal-group: 1;
                     -moz-box-ordinal-group: 1;
                     -webkit-box-ordinal-group: 1;
                 }                                   * Assign all containers inside
                                                     that you would like to order
                                                     to group 1.




                               Responsive Widget Design
Saturday, September 15, 12
Setting Up Your Flexbox CSS
                                            (Step 3)
       #secondary {
            box-ordinal-group: 4;
            -moz-box-ordinal-group: 4;
            -webkit-box-ordinal-group: 4;      * Order your internal
        }                                      containers as you would like
         .menu-main-nav-container {            them to appear.
            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;
        }

                               Responsive Widget Design
Saturday, September 15, 12
Real World Example
                             ( TheIronBeam.com - Ordered With Flexbox )




                               Responsive Widget Design
Saturday, September 15, 12
Content Stacking Information
         Trent Walton

                 http://trentwalton.com/2011/07/14/content-choreography/

         Jordan Moore

   http://www.jordanm.co.uk/post/21863299677/building-with-content-
                            choreography




                               Responsive Widget Design
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

More Related Content

PDF
How not-to-get-noticed4368
PDF
Seminar: Become a Reliable Web Programmer
PDF
How Not To Get Noticed
PDF
CSS Lessons Learned the Hard Way (Generate Conf)
PDF
WCSD 2015: Milestones and Delivery. Tough Conversations and Scope Creep
DOC
Exerccios resolvidos 2
PPT
Massa atômica, massa molecular, mol
PDF
05 Mobile CSS
How not-to-get-noticed4368
Seminar: Become a Reliable Web Programmer
How Not To Get Noticed
CSS Lessons Learned the Hard Way (Generate Conf)
WCSD 2015: Milestones and Delivery. Tough Conversations and Scope Creep
Exerccios resolvidos 2
Massa atômica, massa molecular, mol
05 Mobile CSS

Similar to Responsive widget-design-with-word press (20)

PDF
Measuring Web Performance - HighEdWeb Edition
PPTX
Responsive Design from problem to production
PDF
Startup Institute NYC: Styling
PPTX
RESPONSIVE_WEB_DESIGNRESPONSIVE_WEB_DESIGN
PDF
Embracing Uncertainty: Learning to Think Responsively
PDF
Going Mobile First With Drupal
PDF
How to Project-Manage and Implement a Responsive Website
PPTX
Responsive design and retina displays
PPSX
Responsive web design
PDF
Responsive Web Design &amp; Workflow
PDF
Fewd week7 slides
PDF
Design responsively
PPT
Responsive Design Lessons
PPTX
Lavacon 2014 responsive design in your hat
PPTX
VS Code and Modern Development Environment Preview
PDF
Web Development for UX Designers
PDF
Responsive Web Design: Clever Tips and Techniques
KEY
Responsive Web Design
PPT
Mobile Monday Presentation: Responsive Web Design
PDF
Responsive web design
Measuring Web Performance - HighEdWeb Edition
Responsive Design from problem to production
Startup Institute NYC: Styling
RESPONSIVE_WEB_DESIGNRESPONSIVE_WEB_DESIGN
Embracing Uncertainty: Learning to Think Responsively
Going Mobile First With Drupal
How to Project-Manage and Implement a Responsive Website
Responsive design and retina displays
Responsive web design
Responsive Web Design &amp; Workflow
Fewd week7 slides
Design responsively
Responsive Design Lessons
Lavacon 2014 responsive design in your hat
VS Code and Modern Development Environment Preview
Web Development for UX Designers
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design
Mobile Monday Presentation: Responsive Web Design
Responsive web design
Ad

Recently uploaded (20)

PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
August Patch Tuesday
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Hybrid model detection and classification of lung cancer
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Mushroom cultivation and it's methods.pdf
PPTX
A Presentation on Touch Screen Technology
PDF
Encapsulation theory and applications.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
DP Operators-handbook-extract for the Mautical Institute
PPTX
1. Introduction to Computer Programming.pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
Tartificialntelligence_presentation.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
cloud_computing_Infrastucture_as_cloud_p
August Patch Tuesday
Heart disease approach using modified random forest and particle swarm optimi...
Hindi spoken digit analysis for native and non-native speakers
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Hybrid model detection and classification of lung cancer
SOPHOS-XG Firewall Administrator PPT.pptx
Univ-Connecticut-ChatGPT-Presentaion.pdf
Mushroom cultivation and it's methods.pdf
A Presentation on Touch Screen Technology
Encapsulation theory and applications.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Web App vs Mobile App What Should You Build First.pdf
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
1 - Historical Antecedents, Social Consideration.pdf
DP Operators-handbook-extract for the Mautical Institute
1. Introduction to Computer Programming.pptx
NewMind AI Weekly Chronicles - August'25-Week II
Tartificialntelligence_presentation.pptx
Ad

Responsive widget-design-with-word press

  • 1. Responsive Widget Design: With WordPress Saturday, September 15, 12
  • 2. 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. - Jeremy Keith, Developer, Author, Speaker Responsive Widget Design Saturday, September 15, 12
  • 3. • Responsive Web Design Update • Creating Responsive Widgets • Using Responsive Widgets in your theme Responsive Widget Design Saturday, September 15, 12
  • 4. What is Responsive Web Design? Responsive Widget Design Saturday, September 15, 12
  • 5. 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
  • 6. - Image Source TheeDesign.com Responsive Widget Design Saturday, September 15, 12
  • 7. - Image Source Gaslight Creative Responsive Widget Design Saturday, September 15, 12
  • 8. Responsive Web Design Is Evolving Responsive Widget Design Saturday, September 15, 12
  • 9. Responsive Web Design Adaptive Web Design Progressive Enhancement Mobile First Structured Content Conditional Loading Responsive Widget Design Saturday, September 15, 12
  • 10. 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
  • 11. Creating Responsive WordPress Widgets Responsive Widget Design Saturday, September 15, 12
  • 12. What is a Widget? Responsive Widget Design Saturday, September 15, 12
  • 13. 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
  • 14. How to create a WordPress Widget? Google - About 26,400,000 results Responsive Widget Design Saturday, September 15, 12
  • 15. There’s bad code in my widget! Responsive Widget Design Saturday, September 15, 12
  • 16. 5 ways to fix bad widget code 1. Contact the developer 2. Modify the widget yourself 3. Clone the plugin 4. Install the Widget CSS Classes plugin 5. Add functions for custom classes to your functions.php Responsive Widget Design Saturday, September 15, 12
  • 17. Making Widgets Responsive Responsive Widget Design Saturday, September 15, 12
  • 18. Redesigning The Approach Mobile First - Widgets are inherently small. Design flexibly starting small (phone) and use media queries for the larger viewports (Desktop). Responsive Widget Design Saturday, September 15, 12
  • 19. Redesigning The Approach Think Liquid - As elements get bigger, increase their size and usability. Stay proportional. There are no rules it just has to make sense. Responsive Widget Design Saturday, September 15, 12
  • 20. Elements That Will Change 1. Titles - Scale larger or smaller 2. Paragraphs - Scale margin and padding 3. Images - Will need to scale or crop 4. Form labels - Will need to scale and wrap 5. Form Inputs - Scale and increase padding 6. Button Size - Scale and increase font size Responsive Widget Design Saturday, September 15, 12
  • 21. Generated Widget Markup (Text Widget) <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> * All generated widget ID’s and Classes are different. Firebug </div> and Developer Tools are good to use for this. Responsive Widget Design Saturday, September 15, 12
  • 22. Adding Markup To A Widget (Functions.php) register_sidebar( * The whole idea here is to ! array( get control. Edit or add ! ! 'id' => 'primary', markup as needed. ! ! '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>' ! ) ); Responsive Widget Design Saturday, September 15, 12
  • 23. Real World Example (Default) • No width on outermost container • Logos floated left and right • Form elements floated left & right • Percentage width on form elements • Buttons centered Responsive Widget Design Saturday, September 15, 12
  • 24. Real World Example (@media only screen and (min-width: 301px) and (max-width: 500px)) • 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 Responsive Widget Design Saturday, September 15, 12
  • 25. Real World Example ( @media only screen and (min-width: 501px) and (max-width: 590px) ) • Less logo padding on right & left • Increased font and padding on form • 50/30 percentage width on form • Increased font and padding on buttons Responsive Widget Design Saturday, September 15, 12
  • 26. Using Responsive Widgets In Your Theme Responsive Widget Design Saturday, September 15, 12
  • 27. Widgets Are Awesome! • 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 Responsive Widget Design Saturday, September 15, 12
  • 28. Widgets Can Go Anywhere Responsive Widget Design Saturday, September 15, 12
  • 29. Widgets Responsive Flow Responsive Widget Design Saturday, September 15, 12
  • 30. Responsive Flow Issues Responsive Widget Design Saturday, September 15, 12
  • 31. Content Structure, Content Choreography, Content Stacking Responsive Widget Design Saturday, September 15, 12
  • 32. 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
  • 33. Rearranging Content With Flexbox • 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 Responsive Widget Design Saturday, September 15, 12
  • 34. Real World Example ( TheIronBeam.com - Defining Areas ) Responsive Widget Design Saturday, September 15, 12
  • 35. Setting Up Your Flexbox CSS (Step 1) @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; * Creating the box around the outermost parent container. box-orient:vertical; -moz-box-orient:vertical; -webkit-box-orient:vertical; } Responsive Widget Design Saturday, September 15, 12
  • 36. Setting Up Your Flexbox CSS (Step 2) .menu-main-nav-container, #content, #secondary { box-ordinal-group: 1; -moz-box-ordinal-group: 1; -webkit-box-ordinal-group: 1; } * Assign all containers inside that you would like to order to group 1. Responsive Widget Design Saturday, September 15, 12
  • 37. Setting Up Your Flexbox CSS (Step 3) #secondary { box-ordinal-group: 4; -moz-box-ordinal-group: 4; -webkit-box-ordinal-group: 4; * Order your internal } containers as you would like .menu-main-nav-container { them to appear. 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; } Responsive Widget Design Saturday, September 15, 12
  • 38. Real World Example ( TheIronBeam.com - Ordered With Flexbox ) Responsive Widget Design Saturday, September 15, 12
  • 39. Content Stacking Information Trent Walton http://trentwalton.com/2011/07/14/content-choreography/ Jordan Moore http://www.jordanm.co.uk/post/21863299677/building-with-content- choreography Responsive Widget Design Saturday, September 15, 12
  • 40. Questions? Responsive Widget Design Saturday, September 15, 12
  • 41. 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