sparkartgroup-archive / sparkart.js

Easily interact with Sparkart's APIs via Javascript.
1 stars 0 forks source link

[#wUGwM5GY] Add contest/contests widgets. #45

Closed jameslovejoy closed 11 years ago

jameslovejoy commented 11 years ago

Branch: wUGwM5GY-contests-widget

jameslovejoy commented 11 years ago

@Fauntleroy Can you eyeball this and make sure I haven't done something ridiculous?

pushred commented 11 years ago

Yeah that should be a class on the widget too, it's useful for styling

djiang commented 11 years ago

Didn't look at the code in too much detail, but looks pretty good. Checking out the UI

djiang commented 11 years ago

There might be an issue with the am/pm. I have start/end dates set to 1:00 AM PDT, but it shows 1:00 PM (no time zone).

Also I wasn't able to figure out how to get it to link properly from the contests widget to the individual contests widget.

Home page (route: /)

<h2>Contests</h2>
<div class="sparkart fanclub contests"></div>

Contest page (route: /contest/:id)

<div class="sparkart fanclub contest" data-id="{{parameters.id}}"></div>

The generated links from the contests widget on the homepage point to /:id (does not exist) If I manually navigate to /contest/:id it works.

Timo614 commented 11 years ago

Just left a note for Tim just for future cleanup (if it's even needed) but the rest of the code looks good to me.

jameslovejoy commented 11 years ago

The AM/PM logic was backwards. It's fixed now.

As for links, I followed the markup in the other widgets that use {{../parameters.url}}{{id}} for the link. It looks like it uses everything up to and including the last "/" as url. So, if you're on /contests/, then it will link to /contests/:id. However, if you're on /contests, it will link to /:id.

djiang commented 11 years ago

Ah I see. Thanks James!

djiang commented 11 years ago

:+1: