How nodebb loads pages?
-
Hi there,
This question is not about a feature request or a problem report.
I'm a new developer to nodejs and I would like to know how nodejs load the pages. When I click on a topic, I see a white opacity layer which overlay the screen. This mechanism is really well implemented, seems like all the new content is injected in the current page. Could someone tell me if that is just an animation loading delay or there is a particular mechanism that handle this?Thanks
-
It's a little difficult to explain, but at a high level, we're a single page app, which means when you click on an anchor, we request the JSON for the new page, render the html on the user browser, empty everything in
#content
, and inject it into#content
. The overlay is a transition that makes this process a little smoother.We use a templating engine called Benchpress to render templates on both server and client-side.