Changeset 3b6e04a in Klonkt
- Timestamp:
- 06/19/2026 08:16:57 AM (3 months ago)
- Branches:
- main
- Children:
- 59e522f
- Parents:
- 2900f1d
- Location:
- src
- Files:
-
- 1 added
- 1 edited
-
server.js (modified) (1 diff)
-
views/pages/404.ejs (added)
Legend:
- Unmodified
- Added
- Removed
-
src/server.js
r2900f1d r3b6e04a 397 397 398 398 app.use((req, res) => { 399 res.status(404).send(` 400 <div style="font-family:system-ui;max-width:500px;margin:4rem auto;text-align:center;padding:2rem;"> 401 <h1 style="font-size:5rem;margin:0;color:#c33;">404</h1> 402 <p>Not found</p> 403 <a href="/" style="color:#c2410c;">← Home</a> 404 </div> 405 `); 399 res.status(404); 400 // Nette, mobielvriendelijke 404 via de shell (viewport + nav + huisstijl). 401 // Valt terug op kale HTML als het renderen onverhoopt faalt. 402 try { 403 return renderPage(req, res, 'pages/404', { 404 pageTitle: '404 — niet gevonden', 405 bodyClass: 'on-special on-404', 406 }); 407 } catch (e) { 408 return res.send('<!doctype html><meta name="viewport" content="width=device-width,initial-scale=1"><div style="font-family:system-ui;max-width:500px;margin:4rem auto;text-align:center;padding:2rem"><h1 style="font-size:4rem;margin:0">404</h1><p>Pagina niet gevonden</p><a href="/">← Home</a></div>'); 409 } 406 410 }); 407 411
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)