Bringing Magic Back – Keep Frontend DRY; sprinkle it with Magic

Bringing Magic Back – Keep Frontend DRY; sprinkle it with Magic

0 0


Keep front end DRY, bring back some Magic.

On Github ChinggizKhan / bringing-magic-back

Bringing Magic Back

Keep Frontend DRY; sprinkle it with Magic

Who am I?

Ian Carrico

What do I do?

Backend of Frontend Developer

What is Magic?

Magic pulls functionality from several top themes to put shared functionality into a reusable module.

  • Aurora
  • Omega 4
  • Zen
  • Mothership

Magic began as a desire for all front end developers to be given the tools to make their site performant, mobile first, and DRY.

What does it DO?


  • Enhancements to CSS Aggregation
  • Exclude CSS files from being included
  • Move JavaScript to the footer
  • Backport of Drupal 8 JavaScript handling
  • Exclude JS files from being included
  • Rebuild Theme Registry on Page Reload
  • Display a Viewport Width indicator
  • Display an indicator with classes applied to the HTML. Useful when used in conjunction with Modernizr
  • Export theme settings

What WILL it do?

Moar thangs.

  • Drush integration
  • Liverelaod integration
  • Automatic .tpl filename output
  • Set "every_page" to TRUE in settings
  • More intelligent CSS/JS removal.

Why should we use it?

In short: Performance

But also, to help development-- to make your theming process easier. To give YOU the tools you need to make your site how YOU want it. Remove the parts of core that are frustrating, ensure your theme is how YOU want it to be.

And to enhance the open-source-ness of Drupal. We want to take the best part of these themes and make them available for everybody.

What about this Aurora theme?

Aurora as a base theme was rebuilt for version 3 to work directly with Magic. It's purpose is to give you the proper HTML5 templates, a few minor tools to help development, and nothing more.

It is what you need, and nothing more™

What about MY theme?

Magic is compatible with ANY theme.

It's purpose is to be reusable, and easily implemented.

Always test your theme-- but most of all if you are doing work in your theme that you think can be reusable--- submit a ticket. This is how we know what people are using, and how we can make it better.

To the Module!

Helpful Links!