feat: themes foundation + editors load improvements

This commit is contained in:
Nicolas Giard
2018-08-09 00:07:15 -04:00
parent 5620419d05
commit 2f26d731fc
30 changed files with 396 additions and 298 deletions

View File

@@ -1,13 +1,10 @@
const express = require('express')
const router = express.Router()
const path = require('path')
/* global WIKI */
/**
* Create/Edit document
*/
router.get('/e/*', (req, res, next) => {
router.get(['/e', '/e/*'], (req, res, next) => {
res.render('main/editor')
})
@@ -36,9 +33,7 @@ router.get('/', (req, res, next) => {
* View document
*/
router.get('/*', (req, res, next) => {
res.render(path.join(WIKI.ROOTPATH, 'themes/default/views/page'), {
basedir: path.join(WIKI.SERVERPATH, 'views')
})
res.render('main/page')
})
module.exports = router