Skip to content

Commit

Permalink
Add 404 pages (#691)
Browse files Browse the repository at this point in the history
  • Loading branch information
xbpcb authored Oct 7, 2024
1 parent 97f421b commit a2b2a75
Show file tree
Hide file tree
Showing 24 changed files with 311 additions and 43 deletions.
14 changes: 14 additions & 0 deletions src/assets/img/404/404.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/assets/img/globalping/404.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/assets/js/app-globalping.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const cGlobalpingIntegrations = require('../../views/pages/globalping/integratio
const cGlobalpingAbout = require('../../views/pages/globalping/about-us.html');
const cGlobalpingSponsors = require('../../views/pages/globalping/sponsors.html');
const cGlobalpingCredits = require('../../views/pages/globalping/credits.html');
const cGlobalpingError = require('../../views/pages/globalping/_404.html');
const { getGlobalpingUser } = require('./utils/http');

Ractive.DEBUG = location.hostname === 'localhost';
Expand All @@ -37,6 +38,7 @@ app.router.addRoute('/integrations', cGlobalpingIntegrations);
app.router.addRoute('/about-us', cGlobalpingAbout);
app.router.addRoute('/sponsors', cGlobalpingSponsors);
app.router.addRoute('/credits', cGlobalpingCredits);
app.router.addRoute('/(.*)', cGlobalpingError);

app.router.replaceQueryParam = function (name, newValue) {
history.replaceState(history.state, null, location.href.replace(new RegExp(`${name}=[^&]+|$`), `${name}=${encodeURIComponent(newValue)}`));
Expand Down
Loading

0 comments on commit a2b2a75

Please sign in to comment.