Skip to content

Instantly share code, notes, and snippets.

@hellyeah
Created October 29, 2015 09:39
Show Gist options
  • Save hellyeah/dad866e45e755689e79e to your computer and use it in GitHub Desktop.
Save hellyeah/dad866e45e755689e79e to your computer and use it in GitHub Desktop.
import Romans from "roman-numerals"
let toRoman = Romans.toRoman
console.log(toRoman(5))
let hackathons = [{title: "MHacks", organizer: "Dave Font", img: 'http://mhacks.com/images/mhacksIV.svg'},
{title: "HackDuke", organizer: "Ashley Qian", img: 'http://mhacks.com/images/mhacksIV.svg'},
{title: "HackHolyoke", organizer: "Eva Snyder", img: 'http://mhacks.com/images/mhacksV.svg'},
{title: "Cal Hacks", organizer: "Evadora", img: 'http://mhacks.com/images/mhacksVI.svg'}]
let cover = romanNumeral => `http://mhacks.com/images/mhacks${romanNumeral}.svg`
//hackathons = [{title: 'blah', author:'blahblah'}]
//books = [{title: 'Infinite Jest'}, {title: 'Sing with me'}]
view Main {
@active = 0
<h1>Peruse!</h1>
<h2>What would you like to read?</h2>
// <hackathons repeat={hackathons}>
// <h3>{_.title} by {_.organizer}</h3>
// <img src={cover(toRoman(_index+1))}/>
// </hackathons>
<Info hackathon={hackathons[@active]} />
$img = {
height: 100
}
$h1 = {
color: 'blue',
fontSize: 25
}
$h2 = {
fontSize: 18
}
// $ = {
// color: 'lavender',
// alignItems: 'center',
// justifyContent: 'center'
// }
}
view Info {
<h3>{^hackathon.title}</h3>
<h4>{^hackathon.organizer}</h4>
// <img src={cover(toRoman(_index+1))} />
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment