avoinministerio/avoinministerio — pull request #299 by darkcoin (2012-12-11 22:16:15+00:00)
Title: home, and idea tour guides

with dummy sample steps

My prefered style is blocking the assets pipeline and using standard imports with simple sharing sass variables

Important! I don't like place where
```ruby
= yield :head
```
where put in the application.html.haml

classic sample application layout

```haml
%head
// meta title other stuff here
= stylesheets_include_tag 'application'
= yield :head_css # after application css
= javascript_include_tag 'application'
= yield :head_js # after application.js
%body
= yield
```
or in more complex projects

```haml
%head
= yield :head_before_css # may be loaded before application
= stylesheets_include_tag 'application'
= yield :head_css # or after
= yield :head_before_js
= javascript_include_tag 'application'
= yield :head_js
%body
= yield
```

In general the sollutions for the code FIX or LEAVE, here I left sass/js as is :)

At work I use many yields

```erb

<%= content_for?(:title) ? (yield :title) : 'Homepage' %>

<%= yield :meta_refresh %>
<%= yield :meta_search %>
<%= yield :meta_desc %>
<%= yield :meta %>
<%= stylesheet_link_tag "application", :media => "screen" %>
<%- if current_admin_user %>
<%= stylesheet_link_tag "admin_panel", :media => "screen" %>
<% end %>
<%= stylesheet_link_tag "print", :media => "print" %>
<%= yield :head_css %>
<%= javascript_include_tag "application" %>
<%= yield :head_js %>
<%= yield :head # for inline scripts %>
...
```
here I can load meta tags for google from the database and do few more tricks :)

yield doesn't hurt it helps :)

Extra ticket should been provided for split looooong scss files to small pieces for better readability

![home_1](https://f.cloud.github.com/assets/2933585/6844/9c637eb2-43d9-11e2-9505-b1722ad5e7d8.png)
![home_2](https://f.cloud.github.com/assets/2933585/6845/a1f85ad2-43d9-11e2-850a-06035ddb88ed.png)
![idea_1](https://f.cloud.github.com/assets/2933585/6847/a77cbc8c-43d9-11e2-8e34-03c9981cfe7a.png)
![idea_2](https://f.cloud.github.com/assets/2933585/6848/abdec61c-43d9-11e2-90c1-fa13a2039893.png)