SlideShare ist ein Scribd-Unternehmen logo
1 von 90
Downloaden Sie, um offline zu lesen
this talk is aimed at those
 who already know their
    way around Drupal
I'm a themer
I want to get rid of themers
I may need to explain myself
who does what
in the Drupal world
developer              themer

        site builder            designer
developer
site builder
custom theme
themer

         designer
the theme system is…
       complex
a front-end developer
who has been forced
to learn PHP in order
     to cope with
  the theme system
themer

         designer
themer

         designer
driesnote™
“Are Drupal's custom
  content types and views
   popular because they
 eliminate the developer?
I think the answer is 'yes'.”
I don't think we can
get rid of developers
developer              themer

        site builder            designer
here's how to get rid
  of your themer
designer
your designer writes
 HTML, CSS and JS
your designer writes
fantastic HTML, CSS and JS
understands content and
writes semantic markup
writes re-usable CSS
using a preprocessor
keeps the front-end lean,
efficient and responsive
they use whatever technique
   is best for the project
BUZZWORD
BINGO!
semantic markup
   SMACSS / OOCSS
     preprocessor
asynchronous javascript
 content out approach
Preprocessors                       Static page generators             Static image prototyping
Sass — CSS preprocessing            Hammer for Mac http://             InvisionApp — very slick —
Less — similar to Sass              hammerformac.com/                  http://invisionapp.com/
Stylus — a good but less popular    Middleman — a bit more complex     Shipment — nice dropbox
preprocessor                        — requires command line http://    integration — http://
Susy/Singularity/ZenGrids/          middlemanapp.com/                  blog.shipmentapp.com/
GridSet — grid system               CodeKit — http://incident57.com/   Browsers
generators                          codekit/index.php                  Chrome — Supports Sass in the
Compass — add-on functionality      Mixture.io http://mixture.io/      web inspector — needs sass
for Sass like vertical rhythm,      Serve — Riby gem https://          debugging turned on
sprites, css3 etc                   github.com/gummesson/serve         Canary — Same as above but
Bourbon — Similar to Compass        Testing                            also supports source maps
much to their dismay                Live Reload                        Safari — can use the desktop
Toolkit — A few nice extras to      Guard — command line tool,         web inspector on the remote
have — https://github.com/          faster than live-reload            iphone/ipad site
Snugug/toolkit                      Adobe Edge Inspect — http://       Browser Extentions
CSS Frameworks                      html.adobe.com/edge/inspect/       Web Inspector — needs sass
SMACSS — styleguide/                Mixture.io — http://mixture.io/    debugging turned on and
framework for developing css        Virtual Box with Windows XP and    experimental mode
that is both modular and scalable   snapshots with IE6, IE7, IE8       Speed Tracer
OOCSS — object orientaed CSS        Lots of devices                    YSlow
— more strict than smacss           Typography                         Adobe edge Inspect
Styleguide generation               typecast — http://typecast.com/    Live Reload
KSS — uses comments in files to     — can preview fast                 Visual design and layout
generate a styleguide — http://     Colour                             Fireworks — for working out
warpspire.com/posts/kss/            Kuler — https://kuler.adobe.com/   Photoshop — mainly for image
Typecast — quick way to             Colour Lovers — http://            manipulation
generate styles for type            www.colourlovers.com/              InDesign — some very useful
Clarify — http://www.clarify.io     Color Scheme Designer — http://    tools for wireframes
Style-Sites — https://github.com/   colorschemedesigner.com/           Illustrator — creating SVG files
snugug/style-sites                  http://color.hailpixel.com/        and illustrations
                                                                       UXPin — http://uxpin.com/
designs a system
hands HTML, CSS and JS
 over to the site builder
CSS and JS go
into the theme

HTML is used as
a markup guide
the developer sets one or
     two things up*

     *can be done in advance
developer
required code
a theme
base theme?
<div id="page-wrapper"><div id="page">

    <div id="header"><div class="section clearfix">

      <?php if ($logo): ?>
        <a href="<?php print $front_page; ?>" title="<?php
print t('Home'); ?>" rel="home" id="logo">
          <img src="<?php print $logo; ?>" alt="<?php print
t('Home'); ?>" />
        </a>
      <?php endif; ?>

      <?php if ($site_name || $site_slogan): ?>
        <div id="name-and-slogan">
          <?php if ($site_name): ?>
            <?php if ($title): ?>
              <div id="site-name"><strong>
                <a href="<?php print $front_page; ?>" title="<?
<?php
print $content;
<div id="<?php print $block_html_id; ?>" class="<?php print
$classes; ?>"<?php print $attributes; ?>>
  <?php print render($title_prefix); ?>
<?php if ($block->subject): ?>
  <h2<?php print $title_attributes; ?>><?php print $block-
>subject ?></h2>
<?php endif;?>
  <?php print render($title_suffix); ?>

  <div class="content"<?php print $content_attributes; ?>>
    <?php print $content ?>
  </div>
</div>
<?php
print $content;
a layout or two
/**
  * Implements hook_ctools_plugin_api().
  */
function ce_panels_ctools_plugin_api($module, $api) {
   if ($module == 'panels' && $api == 'styles') {
     return array('version' => 2.0);
   }
   if ($module == 'page_manager' && $api == 'pages_default') {
     return array('version' => 1);
   }
   if ($module == "panels_mini" && $api == "panels_default") {
     return array("version" => "1");
   }
}

/**
  * Implements hook_ctools_plugin_directory()
  */
function ce_panels_ctools_plugin_directory($module, $plugin) {
   if ($module == 'page_manager' || $module == 'panels' || $module == 'ctools') {
     return $plugin;
   }
}
<?php
/**
 * @file
 * Layout definition for Code Enigma one column layout.
 */

/**
 * Panel layout definition.
 */
$plugin = array(
  'title'    => t('Code Enigma One Column'),
  'category' => t('Code Enigma'),
  'icon'     => 'ce_one_column.png',
  'theme'    => 'ce_one_column',
  'regions' => array(
    'content'         => t('Content'),
  ),
);
<?php
/**
 * @file
 * Layout template for Code Enigma one column layout.
 *
 * Regions:
 * - content
 */

if (isset($content['content'])) {
  print $content['content'];
}
a method for turning of all
   supplied CSS and JS
site builder
required modules
display suite
 semantic views
      panels
panels everywhere
 semantic panels*

 *using a forked version atm
<img width="120" height="289" alt="Aliquam bene"
 src="/files/my_image.jpg" />
<div class="field field-name-field-image field-type-image
field-label-hidden">
  <div class="field-items">
    <div resource="/files/my_image.jpg" rel="og:image
     rdfs:seeAlso" class="field-item even">
         <img width="120" height="289" alt="Aliquam bene"
          src="/files/my_image.jpg" typeof="foaf:Image">
    </div>
  </div>
</div>
site builder
designer
some rules
never write a .tpl.php
never write a .tpl.php
unless you really have to
start by outputting no
     markup at all
add markup via the UI
think carefully about where
  you add your wrappers
why is this good?
give designers freedom
make things easy for
   site builders
makes adding markup
     consistent
avoids the temptation to do
  things in the theme you
        shouldn't do
do we actually do this?
no
we keep the themer
questions
exit

James Panton
  @mcjim

Weitere ähnliche Inhalte

Was ist angesagt?

Modern Front-End Development
Modern Front-End DevelopmentModern Front-End Development
Modern Front-End Developmentmwrather
 
WordPress Theme Structure
WordPress Theme StructureWordPress Theme Structure
WordPress Theme Structurekeithdevon
 
Joomla!Day 2013 Nürnberg; Vortrag von Johannes Hock
Joomla!Day 2013 Nürnberg; Vortrag von Johannes HockJoomla!Day 2013 Nürnberg; Vortrag von Johannes Hock
Joomla!Day 2013 Nürnberg; Vortrag von Johannes HockadhocgraFX
 
Front End Development - Beyond Javascript (Robin Cannon)
Front End Development - Beyond Javascript (Robin Cannon)Front End Development - Beyond Javascript (Robin Cannon)
Front End Development - Beyond Javascript (Robin Cannon)Future Insights
 
BDUG Responsive Web Theming - 7/23/12
BDUG Responsive Web Theming - 7/23/12BDUG Responsive Web Theming - 7/23/12
BDUG Responsive Web Theming - 7/23/12ucbdrupal
 
Cms & wordpress theme development 2011
Cms & wordpress theme development 2011Cms & wordpress theme development 2011
Cms & wordpress theme development 2011Dave Wallace
 
Responsive Websites
Responsive WebsitesResponsive Websites
Responsive WebsitesJoe Seifi
 
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone developmentiPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone developmentEstelle Weyl
 
Front End Tooling and Performance - Codeaholics HK 2015
Front End Tooling and Performance - Codeaholics HK 2015Front End Tooling and Performance - Codeaholics HK 2015
Front End Tooling and Performance - Codeaholics HK 2015Holger Bartel
 
How to Prepare a WordPress Theme for Public Release
How to Prepare a WordPress Theme for Public ReleaseHow to Prepare a WordPress Theme for Public Release
How to Prepare a WordPress Theme for Public ReleaseDavid Yeiser
 
Grok Drupal (7) Theming - 2011 Feb update
Grok Drupal (7) Theming - 2011 Feb updateGrok Drupal (7) Theming - 2011 Feb update
Grok Drupal (7) Theming - 2011 Feb updateLaura Scott
 
Installing And Configuration for your Wordpress blog
Installing And Configuration for your Wordpress blogInstalling And Configuration for your Wordpress blog
Installing And Configuration for your Wordpress blogigorgentry
 
CSS pattern libraries
CSS pattern librariesCSS pattern libraries
CSS pattern librariesRuss Weakley
 
Create SASSY Web Parts - SPSMilan
Create SASSY Web Parts - SPSMilan Create SASSY Web Parts - SPSMilan
Create SASSY Web Parts - SPSMilan Stefan Bauer
 
Using LESS, the CSS Preprocessor: J and Beyond 2013
Using LESS, the CSS Preprocessor: J and Beyond 2013Using LESS, the CSS Preprocessor: J and Beyond 2013
Using LESS, the CSS Preprocessor: J and Beyond 2013Andrea Tarr
 
Introduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentIntroduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentSitdhibong Laokok
 
Firefox extension Development
Firefox extension DevelopmentFirefox extension Development
Firefox extension DevelopmentAbhinav Chittora
 

Was ist angesagt? (20)

Word Press As A Cms
Word Press As A CmsWord Press As A Cms
Word Press As A Cms
 
Modern Front-End Development
Modern Front-End DevelopmentModern Front-End Development
Modern Front-End Development
 
WordPress Theme Structure
WordPress Theme StructureWordPress Theme Structure
WordPress Theme Structure
 
Joomla!Day 2013 Nürnberg; Vortrag von Johannes Hock
Joomla!Day 2013 Nürnberg; Vortrag von Johannes HockJoomla!Day 2013 Nürnberg; Vortrag von Johannes Hock
Joomla!Day 2013 Nürnberg; Vortrag von Johannes Hock
 
Front End Development - Beyond Javascript (Robin Cannon)
Front End Development - Beyond Javascript (Robin Cannon)Front End Development - Beyond Javascript (Robin Cannon)
Front End Development - Beyond Javascript (Robin Cannon)
 
BDUG Responsive Web Theming - 7/23/12
BDUG Responsive Web Theming - 7/23/12BDUG Responsive Web Theming - 7/23/12
BDUG Responsive Web Theming - 7/23/12
 
Cms & wordpress theme development 2011
Cms & wordpress theme development 2011Cms & wordpress theme development 2011
Cms & wordpress theme development 2011
 
Responsive Websites
Responsive WebsitesResponsive Websites
Responsive Websites
 
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone developmentiPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development
 
High-Quality JavaScript
High-Quality JavaScriptHigh-Quality JavaScript
High-Quality JavaScript
 
Lightning fast sass
Lightning fast sassLightning fast sass
Lightning fast sass
 
Front End Tooling and Performance - Codeaholics HK 2015
Front End Tooling and Performance - Codeaholics HK 2015Front End Tooling and Performance - Codeaholics HK 2015
Front End Tooling and Performance - Codeaholics HK 2015
 
How to Prepare a WordPress Theme for Public Release
How to Prepare a WordPress Theme for Public ReleaseHow to Prepare a WordPress Theme for Public Release
How to Prepare a WordPress Theme for Public Release
 
Grok Drupal (7) Theming - 2011 Feb update
Grok Drupal (7) Theming - 2011 Feb updateGrok Drupal (7) Theming - 2011 Feb update
Grok Drupal (7) Theming - 2011 Feb update
 
Installing And Configuration for your Wordpress blog
Installing And Configuration for your Wordpress blogInstalling And Configuration for your Wordpress blog
Installing And Configuration for your Wordpress blog
 
CSS pattern libraries
CSS pattern librariesCSS pattern libraries
CSS pattern libraries
 
Create SASSY Web Parts - SPSMilan
Create SASSY Web Parts - SPSMilan Create SASSY Web Parts - SPSMilan
Create SASSY Web Parts - SPSMilan
 
Using LESS, the CSS Preprocessor: J and Beyond 2013
Using LESS, the CSS Preprocessor: J and Beyond 2013Using LESS, the CSS Preprocessor: J and Beyond 2013
Using LESS, the CSS Preprocessor: J and Beyond 2013
 
Introduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentIntroduction to WordPress Theme Development
Introduction to WordPress Theme Development
 
Firefox extension Development
Firefox extension DevelopmentFirefox extension Development
Firefox extension Development
 

Ähnlich wie Death of a Themer

以Vue開發電子商務網站
架構與眉角
以Vue開發電子商務網站
架構與眉角以Vue開發電子商務網站
架構與眉角
以Vue開發電子商務網站
架構與眉角Mei-yu Chen
 
It's a Mod World - A Practical Guide to Rocking Modernizr
It's a Mod World - A Practical Guide to Rocking ModernizrIt's a Mod World - A Practical Guide to Rocking Modernizr
It's a Mod World - A Practical Guide to Rocking ModernizrMichael Enslow
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Ryan Price
 
Webpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of usWebpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of usStefan Adolf
 
Web Frontend development: tools and good practices to (re)organize the chaos
Web Frontend development: tools and good practices to (re)organize the chaosWeb Frontend development: tools and good practices to (re)organize the chaos
Web Frontend development: tools and good practices to (re)organize the chaosMatteo Papadopoulos
 
Node.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash CourseNode.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash CourseAaron Silverman
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX DesignersAshlimarie
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Sadaaki HIRAI
 
Testable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascriptTestable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascriptTimothy Oxley
 
Keeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and WebpackKeeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and WebpackIgnacio Martín
 
Death of a Themer - Frontend United - 14 April 2013
Death of a Themer - Frontend United - 14 April 2013Death of a Themer - Frontend United - 14 April 2013
Death of a Themer - Frontend United - 14 April 2013Matt Fielding
 
Rapid Templating with Serve
Rapid Templating with ServeRapid Templating with Serve
Rapid Templating with ServeNathan Smith
 
CSS framework By Palash
CSS framework By PalashCSS framework By Palash
CSS framework By PalashPalashBajpai
 
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com RubyConsegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com RubyFabio Akita
 
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style GuidesAdvanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style GuidesAidan Foster
 
Hardboiled Front End Development — Found.ation
Hardboiled Front End Development — Found.ationHardboiled Front End Development — Found.ation
Hardboiled Front End Development — Found.ationSpiros Martzoukos
 

Ähnlich wie Death of a Themer (20)

以Vue開發電子商務網站
架構與眉角
以Vue開發電子商務網站
架構與眉角以Vue開發電子商務網站
架構與眉角
以Vue開發電子商務網站
架構與眉角
 
It's a Mod World - A Practical Guide to Rocking Modernizr
It's a Mod World - A Practical Guide to Rocking ModernizrIt's a Mod World - A Practical Guide to Rocking Modernizr
It's a Mod World - A Practical Guide to Rocking Modernizr
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011
 
Webpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of usWebpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of us
 
Web Frontend development: tools and good practices to (re)organize the chaos
Web Frontend development: tools and good practices to (re)organize the chaosWeb Frontend development: tools and good practices to (re)organize the chaos
Web Frontend development: tools and good practices to (re)organize the chaos
 
Html5 & less css
Html5 & less cssHtml5 & less css
Html5 & less css
 
Node.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash CourseNode.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash Course
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX Designers
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
 
Testable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascriptTestable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascript
 
Keeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and WebpackKeeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and Webpack
 
Using a CSS Framework
Using a CSS FrameworkUsing a CSS Framework
Using a CSS Framework
 
Presentation Tier optimizations
Presentation Tier optimizationsPresentation Tier optimizations
Presentation Tier optimizations
 
Death of a Themer - Frontend United - 14 April 2013
Death of a Themer - Frontend United - 14 April 2013Death of a Themer - Frontend United - 14 April 2013
Death of a Themer - Frontend United - 14 April 2013
 
Rapid Templating with Serve
Rapid Templating with ServeRapid Templating with Serve
Rapid Templating with Serve
 
CSS framework By Palash
CSS framework By PalashCSS framework By Palash
CSS framework By Palash
 
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com RubyConsegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
 
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style GuidesAdvanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
 
Sprockets
SprocketsSprockets
Sprockets
 
Hardboiled Front End Development — Found.ation
Hardboiled Front End Development — Found.ationHardboiled Front End Development — Found.ation
Hardboiled Front End Development — Found.ation
 

Death of a Themer

  • 1. this talk is aimed at those who already know their way around Drupal
  • 3. I want to get rid of themers
  • 4. I may need to explain myself
  • 5. who does what in the Drupal world
  • 6. developer themer site builder designer
  • 10. themer designer
  • 11. the theme system is… complex
  • 12. a front-end developer who has been forced to learn PHP in order to cope with the theme system
  • 13. themer designer
  • 14. themer designer
  • 16.
  • 17. “Are Drupal's custom content types and views popular because they eliminate the developer? I think the answer is 'yes'.”
  • 18. I don't think we can get rid of developers
  • 19. developer themer site builder designer
  • 20.
  • 21. here's how to get rid of your themer
  • 23. your designer writes HTML, CSS and JS
  • 24. your designer writes fantastic HTML, CSS and JS
  • 26. writes re-usable CSS using a preprocessor
  • 27. keeps the front-end lean, efficient and responsive
  • 28. they use whatever technique is best for the project
  • 30. semantic markup SMACSS / OOCSS preprocessor asynchronous javascript content out approach
  • 31. Preprocessors Static page generators Static image prototyping Sass — CSS preprocessing Hammer for Mac http:// InvisionApp — very slick — Less — similar to Sass hammerformac.com/ http://invisionapp.com/ Stylus — a good but less popular Middleman — a bit more complex Shipment — nice dropbox preprocessor — requires command line http:// integration — http:// Susy/Singularity/ZenGrids/ middlemanapp.com/ blog.shipmentapp.com/ GridSet — grid system CodeKit — http://incident57.com/ Browsers generators codekit/index.php Chrome — Supports Sass in the Compass — add-on functionality Mixture.io http://mixture.io/ web inspector — needs sass for Sass like vertical rhythm, Serve — Riby gem https:// debugging turned on sprites, css3 etc github.com/gummesson/serve Canary — Same as above but Bourbon — Similar to Compass Testing also supports source maps much to their dismay Live Reload Safari — can use the desktop Toolkit — A few nice extras to Guard — command line tool, web inspector on the remote have — https://github.com/ faster than live-reload iphone/ipad site Snugug/toolkit Adobe Edge Inspect — http:// Browser Extentions CSS Frameworks html.adobe.com/edge/inspect/ Web Inspector — needs sass SMACSS — styleguide/ Mixture.io — http://mixture.io/ debugging turned on and framework for developing css Virtual Box with Windows XP and experimental mode that is both modular and scalable snapshots with IE6, IE7, IE8 Speed Tracer OOCSS — object orientaed CSS Lots of devices YSlow — more strict than smacss Typography Adobe edge Inspect Styleguide generation typecast — http://typecast.com/ Live Reload KSS — uses comments in files to — can preview fast Visual design and layout generate a styleguide — http:// Colour Fireworks — for working out warpspire.com/posts/kss/ Kuler — https://kuler.adobe.com/ Photoshop — mainly for image Typecast — quick way to Colour Lovers — http:// manipulation generate styles for type www.colourlovers.com/ InDesign — some very useful Clarify — http://www.clarify.io Color Scheme Designer — http:// tools for wireframes Style-Sites — https://github.com/ colorschemedesigner.com/ Illustrator — creating SVG files snugug/style-sites http://color.hailpixel.com/ and illustrations UXPin — http://uxpin.com/
  • 33. hands HTML, CSS and JS over to the site builder
  • 34. CSS and JS go into the theme HTML is used as a markup guide
  • 35. the developer sets one or two things up* *can be done in advance
  • 40.
  • 41. <div id="page-wrapper"><div id="page"> <div id="header"><div class="section clearfix"> <?php if ($logo): ?> <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo"> <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" /> </a> <?php endif; ?> <?php if ($site_name || $site_slogan): ?> <div id="name-and-slogan"> <?php if ($site_name): ?> <?php if ($title): ?> <div id="site-name"><strong> <a href="<?php print $front_page; ?>" title="<?
  • 43. <div id="<?php print $block_html_id; ?>" class="<?php print $classes; ?>"<?php print $attributes; ?>> <?php print render($title_prefix); ?> <?php if ($block->subject): ?> <h2<?php print $title_attributes; ?>><?php print $block- >subject ?></h2> <?php endif;?> <?php print render($title_suffix); ?> <div class="content"<?php print $content_attributes; ?>> <?php print $content ?> </div> </div>
  • 45. a layout or two
  • 46.
  • 47. /** * Implements hook_ctools_plugin_api(). */ function ce_panels_ctools_plugin_api($module, $api) { if ($module == 'panels' && $api == 'styles') { return array('version' => 2.0); } if ($module == 'page_manager' && $api == 'pages_default') { return array('version' => 1); } if ($module == "panels_mini" && $api == "panels_default") { return array("version" => "1"); } } /** * Implements hook_ctools_plugin_directory() */ function ce_panels_ctools_plugin_directory($module, $plugin) { if ($module == 'page_manager' || $module == 'panels' || $module == 'ctools') { return $plugin; } }
  • 48. <?php /** * @file * Layout definition for Code Enigma one column layout. */ /** * Panel layout definition. */ $plugin = array( 'title' => t('Code Enigma One Column'), 'category' => t('Code Enigma'), 'icon' => 'ce_one_column.png', 'theme' => 'ce_one_column', 'regions' => array( 'content' => t('Content'), ), );
  • 49. <?php /** * @file * Layout template for Code Enigma one column layout. * * Regions: * - content */ if (isset($content['content'])) { print $content['content']; }
  • 50. a method for turning of all supplied CSS and JS
  • 53. display suite semantic views panels panels everywhere semantic panels* *using a forked version atm
  • 54.
  • 55.
  • 56.
  • 58. <div class="field field-name-field-image field-type-image field-label-hidden"> <div class="field-items"> <div resource="/files/my_image.jpg" rel="og:image rdfs:seeAlso" class="field-item even"> <img width="120" height="289" alt="Aliquam bene" src="/files/my_image.jpg" typeof="foaf:Image"> </div> </div> </div>
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 65.
  • 66.
  • 67.
  • 69.
  • 70.
  • 71.
  • 72.
  • 74. never write a .tpl.php
  • 75. never write a .tpl.php unless you really have to
  • 76. start by outputting no markup at all
  • 77. add markup via the UI
  • 78. think carefully about where you add your wrappers
  • 79. why is this good?
  • 81. make things easy for site builders
  • 82. makes adding markup consistent
  • 83. avoids the temptation to do things in the theme you shouldn't do
  • 84.
  • 85. do we actually do this?
  • 86. no
  • 87. we keep the themer
  • 88.