diff --git a/app.js b/app.js index d587a6a9..20faa35c 100644 --- a/app.js +++ b/app.js @@ -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 diff --git a/views/404.hbs b/views/404.hbs index b328c7aa..ced0e58f 100644 --- a/views/404.hbs +++ b/views/404.hbs @@ -11,18 +11,24 @@ See the License for the specific language governing permissions and limitations under the License. --> +{{#unless contentOnly}} - Gulliver - PWA Directory - File Not Found - {{> head}} - {{> header}} -
File Not Found
-
-
+ {{> header}} +
+
+{{/unless}} +
Page Not Found
+{{#unless contentOnly}} +
+
+
+
{{> footer}} +{{/unless}}