• Save
Building an Initial Custom Theme
Upcoming SlideShare
Loading in...5
×
 

Building an Initial Custom Theme

on

  • 718 views

Presented at San Diego Drupal Camp 2010

Presented at San Diego Drupal Camp 2010

Statistics

Views

Total Views
718
Views on SlideShare
718
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Building an Initial Custom Theme Building an Initial Custom Theme Presentation Transcript

  • Creating an Initial Custom Theme in Drupal by Troy Shields www.troyshields.com 1
  • Assumptions • You understand how to: • Set up a Drupal site • Write HTML/CSS 2
  • The Situation What I Wish I Knew • You’re a “Themer” • You’re working with a team of Explain my experience and “what I wish I knew” developers • You’re working in tandem • You need to get base styles & your regions in place for your developers 3
  • Understanding the Files • sites/all/themes/yourthemename • .info file • logo.png, screenshot.png • stylesheets & tpls Go over what’s in INFO file: Name Regions CSS 4
  • Creating the Template Bad HTML and CSS are not Drupal’s fault. If it doesn’t work outside of Drupal, it won’t work inside of Drupal. • Create a static template & test in browsers you support page-front/homepage is last because it’s a • page.tpl.php should be the most conglomeration of the rest of the site. Use as few page tpls as possible common page if nothing is in the • Simple “if” statements for sidebars sidebar, it won’t show up. use body class to style columns appropriately • Site Building: build what you know 5
  • A Theory of CSS • Understand Floating & Positioning. Holy Grail • Absolutely position elements in headers with static heights. There are no mysteries here • Columns need floats and widths, but rarely elements inside of them • Use negative margins sparingly. This is often used as a band-aid on a gunshot wound 6
  • Wrap Up think: generic enough to contribute or use for another site. • Build stuff you know. Columns, header, footer. • Stuff you don’t know. Theming that relies on specific id’s and classes output by Drupal modules. This is stuff with id’s and classes you don’t know because they haven’t been built. 7
  • The End. Thanks. 8