separated notebook rendering into notebook.js