Forensic Theming - Drupal Theming Design, UX and Theming Emma Jane Hogbin @emmajanedotnet
-
Upload
truongngoc -
Category
Documents
-
view
221 -
download
0
Transcript of Forensic Theming - Drupal Theming Design, UX and Theming Emma Jane Hogbin @emmajanedotnet
drupal.org participation● emmajane● uid: 1773● First look at the Drupal code base: 2003ish.
I stole the i18n table structure.● First Drupal site “for pay”: 2006ish.● First Drupal socks: 2007.
● First DrupalCon conference: Szeged in 2008.● First Drupal book: 2009.
● First Drupal core patch: 2010.Removed the “welcome” screen.
Workbook Author
www.designtotheme.com
Discount Code: DCLON87488
Valid to the end of August.
This presentation is not about ...● Best practices
● Anything advanced
● Design
● Semantic markup
● Responsive Web design
● Typography
● Grids (maybe a little bit)
● CSS optimization
● CSS preprocessing
● Rick Astley
● PHP
● Hooks
● Inheritance● HTML5● Photoshop● Web systems● Theming APIs● Mobile devices● Unicorns● Sprites● In-the-browser design● Sliding doors● Gradients● IE6
Advanced Theming SessionsDisplay Suite
Tuesday 17:00 - NodeOne Road - Fairfield Room
http://tinyurl.com/dclondon-displaysuite
Theming API
Tuesday 15:45 - NodeOne Road - Fairfield Room
http://tinyurl.com/dclondon-themingapi
Responsive Design
Thursday 11am - Axis 12 Street - Arnhem Gallery
http://tinyurl.com/dclondon-responsivedesign
Agenda
Tools for Forensic Theming● Sweaver● Firebug● Devel Themer
Theming Tools● Sketchbooks● Wireframes● Data models● Grid frameworks
Summary● Questions/Answers● Bonuses
Theme Building● Base themes● Image extraction● MVTs● Forensic styling
● CSS Frameworks
● Base themes
● Layout modules
● Text editors
Forensic Theming
Definition: the art of investigating a Drupal page to find out how that thing got there.
Two Types of Clues
Crime Scene InvestigationWorking with the rendered page:● Available CSS selectors.● Applied CSS styles.
Crime Lab ForensicsWorking with Drupal code files:● Theme templates● Module templates● Hard coded module nonsense
Crime Scene
Working with rendered pages. You can only look at the effects of Drupal on a rendered page.
Identifying CSS SelectorsWith Sweaver
● Common newbie problem: being able to find relevant CSS selectors.
● Sweaver can be used as a pointy-clicky-non-scary CSS class selector.
● Can save/publish minor changes to CSS to live Web sites.
● http://drupal.org/project/sweaver
See How a Selector Will Be Applied
Change CSS propertiesSee the changes
CSS selector to use in your theme
Identifying What's AppliedWith Firebug
● Common newbie problem: trying to identifying what CSS styles are being applied by staring at code.
● Firebug can be used to identify what CSS is actually being applied to a rendered Web page.
● www.getfirebug.com
Risky Live Firebug Demo● http://d7.sandbox/sbe-site3/● Inspect element.● Edit CSS properties.● Edit CSS files.● Cannot publish changes.● www.getfirebug.com
Other Useful Browser Tools● Web Developer Toolbar
http://chrispederick.com/work/web-developer/● IE Web Developer Toolbar
http://tinyurl.com/ie-web-dev-toolbar
Devel / Themer
● The Cadillac of theming tools.● Tells you which tpl.php or theme function is
responsible for that thing displaying over there.● http://drupal.org/project/devel_themer● http://drupal.org/project/devel
Point, Click, Analyse
1. Enable Themer Info2. Click on the thing you want to investigate
3. Analyse the list of functions, templates, variables, etc which control this page element.
Pink sherbert photography http://www.flickr.com/photos/pinksherbet/3372060864/
I want less yucky markup!
Less Yucky Markup● European vs American theming● Inheritance: start with a better base.● Base theme: mothership● Modules: Semantic Views● D6 Modules: Semantic CCK● HTML5 http://drupal.org/project/html5_tools
Want to Learn Grids?
Harass @markboulton and tell him to finish his book.
http://www.fivesimplesteps.com/
Do it.
Right now.
Tweet him.
And tell him if he doesn't finish his book you're going to build exclusively 16-column, grid-based Web sites until his book his published.
Drupal (Layout) Modules● Context http://drupal.org/project/context ● Display Suite http://drupal.org/project/ds ● Panels http://drupal.org/project/panels
Steps to Making a Theme
1. Communicate with your whole team.
2. Plan your data structure.
3.Use wire frames to prove what you're saying about how the site ought to be built.
4.Build the site (ignore the theme).
5.Convert your wire frame to a grid layout.
6.Build out the HTML fragments in the relevant tpl.php files.
7. Apply your theme to the site.
8.Refine as necessary based on the UX.
Domicile● Designed by Betty Biesenthal.● Themed by Emma Jane Hogbin.● Available from http://drupal.org/project/domicile● Described in Drupal: a user's guide
Theme Folder
sites/example.com/themes/theme_name theme_name.info page.tpl.php
Also: sites/all/themes/base_theme
theme_name.info (1 of 2)name = D7SBE - Domicile
description = A three-column design by Design House (www.design-house.ca) and themed by Design to Theme.
screenshot = screenshot.png
core = 7.x
engine = phptemplate
base theme = ninesixty
; Stylesheets.
stylesheets[all][] = styles.css
; To show the 960.gs grid and debug your theme's layout, delete this section.
; You will be able to remove this when http://drupal.org/node/1032486 is rolled out
stylesheets[all][] = debug.css
theme_name.info (2 of 2); Regions
regions[nav_left] = Navigation (left)
regions[feature_middle] = Feature column (middle)
regions[content] = Content column (right)
regions[copyright_footer] = Copyright notice (footer)
; Features
features[] = logo
features[] = name
features[] = favicon
Summary● Plan. Think. Build. Test. Theme. Iterate.● Use relevant Drupal modules to break up content and display it
in relevant locations.● Use Sweaver to isolate selectors for your CSS files.● Use Firebug to diagnose and fix CSS problems.● Use Devel to isolate theme functions and variables.● Correlate the number of tpl and PHP files you edit to the size of
your budget and amount of time you have.
Available September 2011
The practical guide to building sites with Drupal.
Pre-order eBook edition on
and SAVE 45%!
Use Coupon Code
IUGD45 at Step 3 of Checkout
Theming Birds of a Feather Sessions● Advanced Theming
Time slot: 24 August 13:45 – 14:45Room 333 Part 1
● Front End DevelopmentTime slot: 25 August 13:30 – 14:30Room 333 Part 2
● Theming in Drupal 8Time slot: 25 August 14:45 – 15:45Room 333 Part 2
What did you think?Locate this session on the DrupalCon London website:http://london2011.drupal.org/conference/schedule
Click the “Take the survey” link
Discounts'n'stuff45% off Drupal User Guidewww.informit.com Code: IUGD45
45% off Design to Theme workbookswww.designtotheme.com Code: DCLON87488
www.sitebuildingextravaganza.com
Advanced ThemingTime slot: 24 August 13:45 – 14:45Room 333 Part 1
Front End DevelopmentTime slot: 25 August 13:30 – 14:30Room 333 Part 2
Theming in Drupal 8Time slot: 25 August 14:45 – 15:45Room 333 Part 2
BoFs