Skip to content
This repository

home, and idea tour guides #299

Closed
wants to merge 4 commits into from

2 participants

darkcoin naleksi
darkcoin

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

   = yield :head

where put in the application.html.haml

classic sample application layout

  %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

  %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

<!DOCTYPE html>
<html>
  <head>
    <title><%= content_for?(:title) ? (yield :title) : 'Homepage' %></title>
    <%= 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
home_2
idea_1
idea_2

naleksi
Owner

Looks good!

darkcoin

thx ... a bit better than colours on carousel bars ;)

darkcoin

outdated

darkcoin darkcoin closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 4 unique commits by 2 authors.

Dec 04, 2012
darkcoin newest debugger with support for ruby 1.9.3-p327 1734b2f
darkcoin bumping gems 3ce8223
Dec 06, 2012
darkcoin changing factories notation Factory -> FactoryGirl.create; added spec…
…_helper method for temporary use before test suite global fix; seeds.rb fixed
7be9f12
Dec 11, 2012
darkcoin 2 tour guides 9b60fcc
Something went wrong with that request. Please try again.