Skip to content

Instantly share code, notes, and snippets.

@andrewrk
Created September 9, 2012 20:49
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 andrewrk/3687197 to your computer and use it in GitHub Desktop.
Save andrewrk/3687197 to your computer and use it in GitHub Desktop.
# read this code in javascript:
# http://satyr.github.com/cup/#c:MainRouter%20=%20ReactiveRouter.extend%20do%0A%20%20routes:%0A%20%20%20%20'':%20'index'%0A%20%20%20%20'create':%20'create'%0A%20%20index:%20!-%3E%20@goto%20%5Cindex%0A%20%20create:%20!-%3E%20@goto%20%5Ccreate%0A%0Aexport%20Router%20=%20new%20MainRouter%0A%0AMeteor.startup%20!-%3E%20Backbone.history.start%20pushState:%20true%0A
MainRouter = ReactiveRouter.extend do
routes:
'': 'index'
'create': 'create'
index: !-> @goto \index
create: !-> @goto \create
export Router = new MainRouter
Meteor.startup !-> Backbone.history.start pushState: true
<head>
<title>Solid Composer</title>
</head>
<body>
{{> page}}
</body>
<template name="page">
<div class="navbar">
<div class="navbar-inner">
<a class="brand" href="/">Solid Composer</a>
<ul class="nav">
<li>
<a href="/create">Create a Competition</a>
</li>
</ul>
{{> loginButtons}}
</div>
</div>
{{{render currentPage}}}
</template>
<template name="index">
<h1>Competitions</h1>
<h2>Ongoing</h2>
<h2>Past</h2>
</template>
<template name="create">
hi
</template>
# Meteor packages used by this project, one per line.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.
autopublish
coco
accounts-ui
accounts-google
accounts-facebook
accounts-passwords
bootstrap.less
router
backbone
{
"meteor": {
"branch": "auth"
},
"packages": {
"coco": {},
"bootstrap.less": {},
"router": {}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment