diff --git a/layouts/404.html b/layouts/404.html index 412c16f7dc1c..67da75bf409a 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -2,46 +2,169 @@ {{ end }} {{ define "main" }} -
-

404

-

- There might be a mistake in the URL or you might've clicked a link to - content that no longer exists. If you think it's the latter, please file - an issue in our issue tracker on GitHub. +

+ +
+ + + +
+ +

Page not found

+ +

+ There might be a mistake in the URL or you might've clicked a broken link. + Use the navigation, or try the following suggestions from Gordon. + If you followed a link from a Docker product, consider filing an issue.

- - Create a new issue - - -
- 404 page not found - -
-
- - -
+ }, + + titleFromUrl(url) { + try { + return new URL(url).pathname + .split('/').filter(Boolean) + .map(s => s.replace(/-/g, ' ').replace(/\b\w/g, c => c.toUpperCase())) + .join(' / '); + } catch { + return url; + } + }, + + }; + } + + const issueLink = document.querySelector('#newissue'); + if (issueLink) { + const url = new URL('{{ site.Params.repo }}/issues/new'); + url.searchParams.set('title', '[404]: ' + window.location.pathname); + let body = 'I found a broken link: ' + window.location.href; + if (document.referrer) body += '\nI arrived via: ' + document.referrer; + url.searchParams.set('body', body); + url.searchParams.set('template', 'broken_link.yml'); + url.searchParams.set('target', window.location.href); + url.searchParams.set('location', document.referrer); + url.searchParams.set('labels', 'status/triage'); + issueLink.href = url.toString(); + } + {{ end }} diff --git a/static/assets/images/404-docs.png b/static/assets/images/404-docs.png deleted file mode 100644 index 8343579b9d56..000000000000 Binary files a/static/assets/images/404-docs.png and /dev/null differ