feat: view page layout (wip) + footer component + fixes

This commit is contained in:
Nicolas Giard
2018-08-05 23:03:46 -04:00
parent 47dcc90fb7
commit 5620419d05
11 changed files with 139 additions and 50 deletions

View File

@@ -1,5 +1,8 @@
const express = require('express')
const router = express.Router()
const path = require('path')
/* global WIKI */
/**
* Create/Edit document
@@ -25,8 +28,17 @@ router.get(['/p', '/p/*'], (req, res, next) => {
/**
* View document
*/
router.get('/*', (req, res, next) => {
router.get('/', (req, res, next) => {
res.render('main/welcome')
})
/**
* View document
*/
router.get('/*', (req, res, next) => {
res.render(path.join(WIKI.ROOTPATH, 'themes/default/views/page'), {
basedir: path.join(WIKI.SERVERPATH, 'views')
})
})
module.exports = router