Skip to content

Commit

Permalink
Merge branch '403-fix' of https://github.com/andreban/gulliver into a…
Browse files Browse the repository at this point in the history
…ndreban-404-fix
  • Loading branch information
juliantoledo committed Jun 14, 2017
2 parents a2d78b1 + 797b61f commit 73db595
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion app.js
Expand Up @@ -118,7 +118,8 @@ app.use(require('./controllers'));

// If no route has matched, return 404
app.use((req, res) => {
res.status(404).render('404.hbs', {nonce1: req.nonce1, nonce2: req.nonce2});
res.status(404).render('404.hbs',
{nonce1: req.nonce1, nonce2: req.nonce2, contentOnly: req.query.contentOnly || false});
});

// Basic error handler
Expand Down
18 changes: 12 additions & 6 deletions views/404.hbs
Expand Up @@ -11,18 +11,24 @@
See the License for the specific language governing permissions and
limitations under the License. -->

{{#unless contentOnly}}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Gulliver - PWA Directory - File Not Found</title>

{{> head}}
</head>
<body>
{{> header}}
<div class="section-title">File Not Found</div>
<main>
</main>
{{> header}}
<div class="page-holder">
<main class="page">
{{/unless}}
<div class="section-title">Page Not Found</div>
{{#unless contentOnly}}
</main>
<div class='page-loader'>
</div>
</div>
{{> footer}}
</body>
</html>
{{/unless}}

0 comments on commit 73db595

Please sign in to comment.