hackerspacesg / hackerspace.sg

Hackerspace.sg 2.0 using Punch
https://hackerspace.sg/
17 stars 25 forks source link

Quick hack on relative time #31

Closed chernjie closed 10 years ago

chernjie commented 10 years ago

Feel free to clean up on hotlinking/javascript stuff.

There are still a couple of minor issues:

  1. timeago.js promises to update the relative time every passing minute, does not appear to be working
  2. not sure if jquery is desirable, if not please suggest alternative.
chernjie commented 10 years ago

Should fix #14

kaihendry commented 10 years ago

Bug in event listing

Future events should be something like: in 5 hours ... not "5 hours ago"

I don't like the Jquery+plugin route. Sucks.

Maybe http://momentjs.com/downloads/moment.min.js is better since it's less code and doesn't seem to require Jquery on first glance.

I'd rather not use a CDN, just have everything hosted on http://hackerspace.sg/ so that if something external fails, we don't fail.

notthetup commented 10 years ago

+1 for moment.. It's awesome!

kaihendry commented 10 years ago

hmmm http://jsperf.com/date-formatting/8

Yes, it looks like it can do relative time.

kaihendry commented 10 years ago

Nice work CJ. My only beef is that https://github.com/chernjie/hackerspace.sg/blob/master/templates/index.mustache#L37 should be using http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-time-element not the abbr tag.

chernjie commented 10 years ago

Yeah was contemplating whether to use abbr or time then decided to be old school. Feel free to change it!