SlideShare una empresa de Scribd logo
1 de 16
Descargar para leer sin conexión
ROCKIN' 
RESPONSIVE CONTENT
with Panels Layouts!
Created by: Matt Glaman / @nmdmatt

WiFi info is SSID: FTC­Student Password: SuccessIsForMe.
Content & Responsive Design
Responsive design is an approach that aims to provide 
an optimal user experience across all devices.
●

Mobile first strategy

●

Flush out page structure as device width increases

●

Layout and design fit across all devices

Responsive design does not always mean Responsive Content.
●

Responsive design does not always consider context of use.

●

Focus often put on theme appearance versus content 
distribution.
Defining Your Content
Static Content

Dynamic content

●

Branding data

●

Main content

●

Main menu

●

Sidebars

●

User menus

●

Specialty menus

●

Footer links

●

User specific

●

Copyright
Harnessing Panels
•

•

•

Use panels for 
dynamic content
Utilize custom panel 
layouts for unique 
experiences
Greater control of 
content and its 
placement
The Layout Builder

­ WYSIWYG Editor ­
 ­ Easily build layouts on the fly ­ 
 ­ Shows the full power of layouts ­ 
Making Content Awesome
But not for all devices
•

•

•

Layout builder isn't 
responsive
Uses hard set 
percentage points
Control to build 
layout, but not 
control of responsive 
display.
Solution: Custom Panel Layouts
•

•

•

•

Full control of layout 
structure.
Ability to define column 
widths
Implementation of 
breakpoints
Control of how the 
content reacts per 
breakpoints.
Creating a Panels Layout
•

Created in theme or module

•

Uses four files
•

•

•

Include file

•

•

Template file

•

•

CSS file

Icon file

Initiated through CTools plugin API
Include file contains the plugin 
array, and any template 
functions.
template_preprocess_name() 
allows for template manipulation.

Note: Review the layouts folder within 
the Panels module for examples
Layout Configuration Example
// Plugin definition
$plugin = array(
'title' => t('Hero, 4 columns'),
'icon' => 'hero_four_columns.png',
'category' => 'Responsive Layouts',
'theme' => 'hero_four_columns',
'css' => 'hero-four-columns.css',
'regions' => array(
'hero' => t('Hero'),
'column_one' => t('Column 1'),
'column_two' => t('Column 2'),
'column_three' => t('Column 3'),
'column_four' => t('Column 4'),
),
);

What's going on here?
●

Defines the title

●

Icon location

●

Category

●

The theme used

●

CSS file name

●

Array of regions

Drupal.org Documentation
https://drupal.org/node/495654
hook_template_preprocess().
Utilize template hook to 
add CSS classes to 
regions

Provides means of 
handling missing dynamic 
content

// Sets the Panel layout classes.
$variables['attributes_array']['class'][] = 'panel-display';
$variables['attributes_array']['class'][] = 'panel-display—hero-four-column';
foreach($variables['content'] as $name => $item) {
$variables['region_attributes_array'][$name]['class'][] = 'panel-region';
$variables...['class'][] = 'panel-region--'.drupal_clean_css_identifier($name);
}
Layout Template Example
•

•

•

•

<div<?php print $attributes ?>>
<div<?php print drupal_attributes($wrapper_attributes_array)?>>
<?php foreach(array_intersect_key($content, $layout['regions']) as $name =>
$item): ?>
<?php if (!empty($item)): ?>
<div<?php print drupal_attributes($region_attributes_array[$name])?>>

•

<?php print $item ?>

•

</div>

•

•

•

•

<?php endif; ?>
<?php endforeach; ?>
</div>
Letting Panels Know About the Layout
Themes ­ .info file
; Plugins
plugins[panels][layouts] = panels/layouts

Modules ­ .module file
/**
* Implementation of hook_ctools_plugin_directory()
*/
function mymodule_ctools_plugin_directory($module, $plugin) {
if ($owner == 'panels') {
return "panels/$plugin";
}
}
Responsive and Sass­y
•

Singularity is a flexible, and simple, grid 
framework for handling responsive structure.
 

•

Breakpoint for controlling your making 
breakpoints simple.

•

Compass to bring it all together. Plan ahead for 
config.rb management.
Singularity & Breakpoint
●

●

●

●

Singularity grids are defined 
simply as variables.
Allows you to define 
number of grids at different 
min­width
Breakpoint allows you to 
target your media queries
Inside breakpoints items 
can be assigned grid 
widths.

// Singularity grid configuration
$grids: 4;
$grids: add-grid(12 at $tab);
$gutters: 1/3;

// Breakpoint & grid implementation
@include breakpoint($tab, true) {
.panel-display {
.panels-regions__two {
@include layout(4) {
.panels-region {
@include float-span(2);
}
}
}
}
Resources & Links
Creating a custom Panels layout
https://drupal.org/node/495654

Singularity documentation
https://github.com/Team­Sass/Singularity/wiki

Responsive Panels layout referenced in slides
https://github.com/mglaman/responsive_panels_layouts

Radix, responsive Panels layouts module
https://drupal.org/project/radix_layouts

Más contenido relacionado

Destacado

Object oriented concepts
Object oriented conceptsObject oriented concepts
Object oriented concepts
christradus
 
Slope pp
Slope ppSlope pp
Slope pp
wong1kg
 

Destacado (18)

Tracnghiemnlkt
TracnghiemnlktTracnghiemnlkt
Tracnghiemnlkt
 
Making It: Modern Music
Making It: Modern MusicMaking It: Modern Music
Making It: Modern Music
 
Learning Commons Update
Learning Commons UpdateLearning Commons Update
Learning Commons Update
 
Hooks Historic Drugstore Preservation
Hooks Historic Drugstore Preservation Hooks Historic Drugstore Preservation
Hooks Historic Drugstore Preservation
 
Carpet Weave & Fabric Product Terms- JenniferHein
Carpet Weave & Fabric Product Terms-  JenniferHeinCarpet Weave & Fabric Product Terms-  JenniferHein
Carpet Weave & Fabric Product Terms- JenniferHein
 
2014 Iroquois County Historic Society Mid term plans
 2014 Iroquois County Historic Society Mid term plans 2014 Iroquois County Historic Society Mid term plans
2014 Iroquois County Historic Society Mid term plans
 
Welcome to Drupal 262
Welcome to Drupal 262Welcome to Drupal 262
Welcome to Drupal 262
 
Bang candoi ketoan
Bang candoi ketoanBang candoi ketoan
Bang candoi ketoan
 
Textile Introduction : Production, Contents, Weave- JenniferHein
Textile Introduction : Production, Contents, Weave-  JenniferHeinTextile Introduction : Production, Contents, Weave-  JenniferHein
Textile Introduction : Production, Contents, Weave- JenniferHein
 
在地經濟 x 社區設計讀書會1 Take Back the Economy
在地經濟 x 社區設計讀書會1 Take Back the Economy在地經濟 x 社區設計讀書會1 Take Back the Economy
在地經濟 x 社區設計讀書會1 Take Back the Economy
 
Object oriented concepts
Object oriented conceptsObject oriented concepts
Object oriented concepts
 
Museum Review- 1920's Pacifc Islands Collection at Cincinnati Museum Center -...
Museum Review- 1920's Pacifc Islands Collection at Cincinnati Museum Center -...Museum Review- 1920's Pacifc Islands Collection at Cincinnati Museum Center -...
Museum Review- 1920's Pacifc Islands Collection at Cincinnati Museum Center -...
 
Air France
Air FranceAir France
Air France
 
20150423 第二屆跨科際短講系列競賽第一次籌備會議會議紀錄
20150423 第二屆跨科際短講系列競賽第一次籌備會議會議紀錄20150423 第二屆跨科際短講系列競賽第一次籌備會議會議紀錄
20150423 第二屆跨科際短講系列競賽第一次籌備會議會議紀錄
 
Chennai best interiors
Chennai best interiorsChennai best interiors
Chennai best interiors
 
Slope pp
Slope ppSlope pp
Slope pp
 
Belajar Tenses English Inggris
Belajar Tenses English InggrisBelajar Tenses English Inggris
Belajar Tenses English Inggris
 
Presentation visa screening system
Presentation visa screening systemPresentation visa screening system
Presentation visa screening system
 

Similar a Rockin Responsive Content with Panels Layouts

Responsive WebDesign Testing Using Galen
Responsive WebDesign Testing Using GalenResponsive WebDesign Testing Using Galen
Responsive WebDesign Testing Using Galen
vodQA
 
Responsive WebDesign Testing Using Galen
Responsive WebDesign Testing Using GalenResponsive WebDesign Testing Using Galen
Responsive WebDesign Testing Using Galen
vodQA
 

Similar a Rockin Responsive Content with Panels Layouts (20)

Design Like a Pro: Building Mobile-Responsive HMIs in Ignition Perspective
Design Like a Pro: Building Mobile-Responsive HMIs in Ignition PerspectiveDesign Like a Pro: Building Mobile-Responsive HMIs in Ignition Perspective
Design Like a Pro: Building Mobile-Responsive HMIs in Ignition Perspective
 
Responsive WebDesign Testing Using Galen
Responsive WebDesign Testing Using GalenResponsive WebDesign Testing Using Galen
Responsive WebDesign Testing Using Galen
 
Responsive Web Design testing using Galen Framework
Responsive Web Design testing using Galen FrameworkResponsive Web Design testing using Galen Framework
Responsive Web Design testing using Galen Framework
 
Responsive WebDesign Testing Using Galen
Responsive WebDesign Testing Using GalenResponsive WebDesign Testing Using Galen
Responsive WebDesign Testing Using Galen
 
5 ways to make a responsive website faster
5 ways to make a responsive website faster5 ways to make a responsive website faster
5 ways to make a responsive website faster
 
Developing a practical HTML5 magazine workflow
Developing a practical HTML5 magazine workflowDeveloping a practical HTML5 magazine workflow
Developing a practical HTML5 magazine workflow
 
5 Mobile-Responsive Layout Strategies
5 Mobile-Responsive Layout Strategies5 Mobile-Responsive Layout Strategies
5 Mobile-Responsive Layout Strategies
 
Responsive Web Design.pptx
Responsive Web Design.pptxResponsive Web Design.pptx
Responsive Web Design.pptx
 
Sketching in code
Sketching in codeSketching in code
Sketching in code
 
HTML and Responsive Design
HTML and Responsive Design HTML and Responsive Design
HTML and Responsive Design
 
Kevin Whinnery: Best Practices for Cross-Platform Mobile Development
Kevin Whinnery: Best Practices for Cross-Platform Mobile DevelopmentKevin Whinnery: Best Practices for Cross-Platform Mobile Development
Kevin Whinnery: Best Practices for Cross-Platform Mobile Development
 
Overview of Responsive Web Design
Overview of Responsive Web DesignOverview of Responsive Web Design
Overview of Responsive Web Design
 
Responsive web design UDI.pptx
Responsive web design UDI.pptxResponsive web design UDI.pptx
Responsive web design UDI.pptx
 
Design Like a Pro: Basics of Building Mobile-Responsive HMIs
Design Like a Pro: Basics of Building Mobile-Responsive HMIsDesign Like a Pro: Basics of Building Mobile-Responsive HMIs
Design Like a Pro: Basics of Building Mobile-Responsive HMIs
 
Ch 3: Big Concepts
Ch 3: Big ConceptsCh 3: Big Concepts
Ch 3: Big Concepts
 
Responsive Design
Responsive DesignResponsive Design
Responsive Design
 
Design Systems: Enterprise UX Evolution
Design Systems: Enterprise UX EvolutionDesign Systems: Enterprise UX Evolution
Design Systems: Enterprise UX Evolution
 
Mobile Joomla Stragies & Techniques
Mobile Joomla Stragies & TechniquesMobile Joomla Stragies & Techniques
Mobile Joomla Stragies & Techniques
 
Responsive Web Design- Trending
Responsive Web Design- TrendingResponsive Web Design- Trending
Responsive Web Design- Trending
 
SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Último (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

Rockin Responsive Content with Panels Layouts