Skip to content

Instantly share code, notes, and snippets.

@getify
Created July 20, 2010 03:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save getify/482494 to your computer and use it in GitHub Desktop.
Save getify/482494 to your computer and use it in GitHub Desktop.
{$: "#main" | action=data.user.logged_in?"#logout":"#login" }
Hello, {$= data.name $}
{$= @action $}
{$}
{$: "#login" }
<a href="/login/">login</a>
{$}
{$: "#logout" }
<a href="/logout/">logout</a>
{$}
@unscriptable
Copy link

cujo.js equivalent (in-browser):

file: myApp.view.LoginPanel.html

${display.greeting} {$display.loginAction}

logout version extends login version (inheritance defined in myApp.view.LogoutPanel.js:

file: myApp.view.LogoutPanel.html

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