Skip to content

Commit 8534277

Browse files
committed
clean code
1 parent 5f86323 commit 8534277

5 files changed

Lines changed: 6 additions & 11 deletions

File tree

models/controllers/default.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ exports.install = function(framework) {
55
function json_homepage() {
66
var self = this;
77
var user = self.model('user');
8-
self.json(user);
8+
self.json(user, true);
99
}

navigation-sitemap/views/homepage.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</head>
1515
<body>
1616

17-
@{template('sitemap', sitemap)}
17+
@{template('sitemap', sitemap())}
1818

1919
</body>
2020
</html>
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11

22
console.log('Set up redirecting of host ...');
33

4-
// Params:
5-
// oldHost
6-
// newHost
7-
// copyPath?
8-
// permament redirect?
9-
framework.redirect('http://127.0.0.1:8004', 'http://localhost:8004', true, false);
4+
// Documentation: http://docs.totaljs.com/Framework/#framework.redirect
5+
framework.redirect('http://127.0.0.1:8000', 'http://localhost:8000', true, false);

static-version/controllers/default.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ exports.install = function(framework) {
44

55
function view_homepage() {
66
var self = this;
7-
self.repository.title = 'Welcome';
87
self.view('homepage');
98
}

static-version/views/_layout.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title>@{repository.title}</title>
4+
@{meta}
55
<meta charset="utf-8" />
66
<meta http-equiv="X-UA-Compatible" content="IE=10" />
77
<meta name="format-detection" content="telephone=no"/>
88
<meta name="viewport" content="width=1024, user-scalable=yes" />
99
<meta name="robots" content="all,follow" />
10-
<link type="text/css" rel="Stylesheet" href="@{routeCSS('style.css')}" />
10+
@{css('style.css')}
1111
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
1212
</head>
1313
<body>

0 commit comments

Comments
 (0)