class='content'> <p> I am a paragraph. </p> <p>You can embed markdown in HAML, because HAML isn't great at body text.</p> </div> </body> Tuesday, October 12, 2010
ul#groceries +no-bullets %body#index #headers #page-header my groceries #files-header link to groceries.csv #description-header i need these to eat! #content %ul#groceries %li turkey cutlets %li captain crunch %li 12 green peppers %li Brooklyn Local 1 Tuesday, October 12, 2010
in HTML • Do text formatting in CSS • Don’t mess up the Blueprint styles • Marginally better than tables • Compass: • Express structure as classes in HTML • Do layout and formatting in CSS • Mix in Compass styles where needed • Great way to build stable layouts Tuesday, October 12, 2010
(e) -> return if e.target.tagName.toLowerCase() is 'a' if this isnt (current_nav and current_nav[0]) close_menus() current_nav = $(this) current_nav.addClass 'active' false Tuesday, October 12, 2010
there are no guarantees that the syntax won't change between versions. http://jashkenas.github.com/coffee-script/ emphasis added Tuesday, October 12, 2010
there are no guarantees that the syntax won't change between versions. http://jashkenas.github.com/coffee-script/ emphasis added Tuesday, October 12, 2010
HAML_OUTPUT = HAMLS.map{ |f| f.sub(/^pages/, 'output').sub(/\.haml$/, '') } HAMLS.zip(HAML_OUTPUT) do |p| input, output = p file output => [input, 'output'] do sh 'haml', input, output end end Tuesday, October 12, 2010
2. Reference stylesheets/your_stylesheet.css (even if it’s SASS) in appropriate HTML files Creating a new stylesheet %link(rel='stylesheet' type='text/css' href='stylesheets/screen.css') Tuesday, October 12, 2010
2. Reference javascripts/your_script.js (even if it’s CoffeeScript) in appropriate HTML files Creating a new script %script(type='text/javascript' src='javascripts/example.js') Tuesday, October 12, 2010