Skip to content

Instantly share code, notes, and snippets.

@toolmantim
Created May 26, 2009 04:26
Show Gist options
  • Select an option

  • Save toolmantim/117891 to your computer and use it in GitHub Desktop.

Select an option

Save toolmantim/117891 to your computer and use it in GitHub Desktop.
#header
.state{:title => "Not Logged in"}
%a{:href => "#"} Login
or
%a{:href => "#"} Register
.state{:title => "Logged in"}
Welcome Tim!
.state{:title => "Admin"}
%a{:href => "#"} Admin
%a{:href => "#"} Logout
%h3 Comments
.state{:title => "Comments open"}
%form
%textarea
%input{:type => "submit"}
.state{:title => "Comments not open"}
%p Sorry, comments are closed for this article.
:javascript
$.states.default(["Not Logged in", "Comments open"]);
/ / redirects to /#not-logged-in,comments-open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment