Skip to content

Instantly share code, notes, and snippets.

@supaspoida
Created October 6, 2011 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save supaspoida/1268043 to your computer and use it in GitHub Desktop.
Save supaspoida/1268043 to your computer and use it in GitHub Desktop.
Navigation "DSL"
%ul{class: navigation.current_selector}
- navigation.items.each do |item|
%li{class: item.selector}= link_to item.text, item
$selectors: <%= Navigation.selectors %>
@each $selector in $selectors
ul.#{$selector}
li.#{$selector}
+active_state
@rbxbx
Copy link

rbxbx commented Oct 6, 2011

Fancy!

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