2
0
Fork 0

renamed include folder to thtml (templated-html)

This commit is contained in:
Willem 2015-03-09 20:13:03 +01:00
parent cc4952ac7c
commit d31beb5f74
10 changed files with 9 additions and 9 deletions

View file

@ -90,9 +90,9 @@ function buildAssets(server,callbackDone) {
function renderTemplate() { function renderTemplate() {
return function (req, res) { return function (req, res) {
if (req.params.sub) { if (req.params.sub) {
res.render('include/' + req.params.page + '/' + req.params.sub); res.render('thtml/' + req.params.page + '/' + req.params.sub);
} else { } else {
res.render('include/' + req.params.page); res.render('thtml/' + req.params.page);
} }
}; };
} }
@ -126,8 +126,8 @@ buildAssets(server,function(err) {
server.use('/static/module/bootstrap',express.static(path.join(__dirname,'node_modules/bootstrap/dist'))); server.use('/static/module/bootstrap',express.static(path.join(__dirname,'node_modules/bootstrap/dist')));
server.use('/static/module/flot',express.static(path.join(__dirname,'node_modules/flot'))); server.use('/static/module/flot',express.static(path.join(__dirname,'node_modules/flot')));
server.get('/example-ui/include/:page', renderTemplate()); server.get('/example-ui/thtml/:page', renderTemplate());
server.get('/example-ui/include/:page/:sub', renderTemplate()); server.get('/example-ui/thtml/:page/:sub', renderTemplate());
server.get('/', sendRedirect()); server.get('/', sendRedirect());
server.get('/example-ui', renderPage(server)); server.get('/example-ui', renderPage(server));
server.get('/example-ui/*', renderPage(server)); // must be last; for HTML5 history server.get('/example-ui/*', renderPage(server)); // must be last; for HTML5 history

View file

@ -1,7 +1,7 @@
pageRouteInit.push(function ($routeProvider, $locationProvider) { pageRouteInit.push(function ($routeProvider, $locationProvider) {
$routeProvider.when('/example-ui/bar', { $routeProvider.when('/example-ui/bar', {
templateUrl: '/example-ui/include/bar', templateUrl: '/example-ui/thtml/bar',
controller: PageFoo controller: PageFoo
}); });
}); });

View file

@ -1,7 +1,7 @@
pageRouteInit.push(function ($routeProvider, $locationProvider) { pageRouteInit.push(function ($routeProvider, $locationProvider) {
$routeProvider.when('/example-ui/foo', { $routeProvider.when('/example-ui/foo', {
templateUrl: '/example-ui/include/foo', templateUrl: '/example-ui/thtml/foo',
controller: PageFoo controller: PageFoo
}); });
}); });

View file

@ -1,7 +1,7 @@
pageRouteInit.push(function ($routeProvider, $locationProvider) { pageRouteInit.push(function ($routeProvider, $locationProvider) {
$routeProvider.when('/example-ui', { $routeProvider.when('/example-ui', {
templateUrl: '/example-ui/include/index', templateUrl: '/example-ui/thtml/index',
controller: PageIndex controller: PageIndex
}); });
}); });

View file

@ -11,11 +11,11 @@ html(lang='en',ng-app='exampleUI')
link(rel='stylesheet' href='#{cssFile}') link(rel='stylesheet' href='#{cssFile}')
body body
div(id='wrapper') div(id='wrapper')
div(ng-include='\'/example-ui/include/layout/header\'') div(ng-include='\'/example-ui/thtml/layout/header\'')
div(id='page-wrapper') div(id='page-wrapper')
div(id='container-fluid') div(id='container-fluid')
div(ng-view) div(ng-view)
div(ng-include='\'/example-ui/include/layout/footer\'') div(ng-include='\'/example-ui/thtml/layout/footer\'')
each jsFile in includeJsFiles each jsFile in includeJsFiles
script(src='#{jsFile}') script(src='#{jsFile}')