Hacker News new | past | comments | ask | show | jobs | submit login

It looks like web.d implements the response handler from scratch, so I doubt there's a framework. Maybe a framework will be extracted from this in the future.

It looks like there isn't even a template language -- it seems to build the html using the plain old string concatenation method.

  html.put(
   `<tr class="thread-post-row`, (post.info && post.id==selectedID ? ` thread-post-focused thread-post-selected` : ``), `">`
  `<td>`
    `<div style="padding-left: `, format("%1.1f", OFFSET_INIT + level * offsetIncrement), OFFSET_UNITS, `">`
      `<div class="thread-post-time">`, summarizeTime(post.time, true), `</div>`,
      `<a class="postlink `, (user.isRead(post.rowid) ? "forum-read" : "forum-unread" ), `" href="`, encodeEntities(idToUrl(post.id)), `">`, truncateString(post.author, 20), `</a>`
    `</div>`
    `</td>`
  `</tr>`);



I plan to move to HTML templates in a future version. It shouldn't affect performance.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: