Sinful engine in the wild

August 20th 2011 by Guillaume Malette

A few months ago I wrote about Sinful. I wrote it back in june as a templating DSL for VIPtrainers. It has a basic CMS that allows personal trainers to build their own site. The themes are created by designers and they need to be able to customize some of the elements on the page. I haven’t given any update (or gotten any sleep for that matter), so here it is.

Evolution

Since the original post, the engine itself hasn’t changed much other than bug fixes, and helper methods were added to provide support for different elements such as:

  • Main menu
  • Sub menu
  • Page title
  • Login menu
  • Content elements
  • Links

We’ve chosen not to support if statements, although it wouldn’t be so much work if we ever need it in the future.

In the wild

We’ve given the Sinful engine distributed in a Theme Kit. Here’s what the final layout looks like after being transformed to HAML:

/ Login Box
#login-wrap.minimized
  .close
  = login
/ Header
#header-wrap
  = header
  = main_menu :selected => :span
/ Main Content Wrapper
#content-wrap
  #content
    / Main Content
    #main-content
      = page_title
      = content :for => :a
    / Sidebar
    #sidebar
      %ul#side-links
        %li.home
          = link :for => :home
        %li.contact
          = link :for => :contact
        %li.blog
          = link :for => :blog
      = content :for => :b
/ Footer
#footer-wrap
  = menu :selected => :span
  = footer :color => :dark

That’s it. And here’s what this will look like in the wild:

Feedback

Unfortunately, I haven’t had any feedback from the designers yet, and the only comments received were from Thomas, our designer. While he says he’s enjoying it, he helped design it so it’s expected.

I guess I will have to make an update when the feedback comes in. Stay tuned :).

blog comments powered by Disqus