From 38df58d5fae8c0bb278eb5513bf6dd3e1091ee83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Kuna?= <1282324+codecalm@users.noreply.github.com> Date: Fri, 28 Aug 2026 20:15:49 +0200 Subject: [PATCH] Add illustrations to the docs 404 and preview 500 error pages (#2913) --- .changeset/docs-404-illustration-search.md | 5 +++ .changeset/preview-500-illustration.md | 5 +++ docs/pages/404.astro | 45 +++++++++++++++------- shared/data/errors.json | 1 + shared/data/free-illustrations.json | 2 +- 5 files changed, 43 insertions(+), 15 deletions(-) create mode 100644 .changeset/docs-404-illustration-search.md create mode 100644 .changeset/preview-500-illustration.md diff --git a/.changeset/docs-404-illustration-search.md b/.changeset/docs-404-illustration-search.md new file mode 100644 index 000000000..2182ef1a9 --- /dev/null +++ b/.changeset/docs-404-illustration-search.md @@ -0,0 +1,5 @@ +--- +"@tabler/docs": patch +--- + +Added the `not-found` illustration and a search button to the docs 404 page. diff --git a/.changeset/preview-500-illustration.md b/.changeset/preview-500-illustration.md new file mode 100644 index 000000000..8ad3b3c7c --- /dev/null +++ b/.changeset/preview-500-illustration.md @@ -0,0 +1,5 @@ +--- +"@tabler/preview": patch +--- + +Added the `500` illustration to the preview 500 error page. diff --git a/docs/pages/404.astro b/docs/pages/404.astro index a5bc33ff3..ad2c4c467 100644 --- a/docs/pages/404.astro +++ b/docs/pages/404.astro @@ -3,23 +3,40 @@ // routes every unmatched URL to /404.html with a 404 status. // Excluded from sitemap.xml.ts and absent from docs.json on purpose. import DocsLayout from '@layouts/DocsLayout.astro' -import DocsCard from '@components/DocsCard.astro' - -const sections = [ - { title: 'UI Components', href: '/ui', icon: 'paint', description: 'Free and open source web application UI kit based on Bootstrap' }, - { title: 'Plugins', href: '/ui/plugins', icon: 'plug', description: 'Free and open source plugins for Tabler UI components' }, - { title: 'Icons', href: '/icons', icon: 'ghost', description: 'Pixel-perfect icons for web design and development' }, - { title: 'Illustrations', href: '/illustrations', icon: 'brand-figma', description: 'Customizable SVG illustrations for your web project' }, - { title: 'Email Templates', href: '/emails', icon: 'mail', description: 'Responsive email templates ready to use in your marketing campaigns' }, -] +import Illustration from '@ui/Illustration.astro' +import Icon from '@ui/Icon.astro' --- -

Check the address for typos, use the search at the top of the page, or start from one of the sections below.

+ -
-
- {sections.map((section) => )} -
+

The link may be broken, or the page may have been moved. Try searching the documentation or go back to the homepage.

+ +
+ + + Back to homepage + +
+ + diff --git a/shared/data/errors.json b/shared/data/errors.json index 9f7e30e7a..a1f705e65 100644 --- a/shared/data/errors.json +++ b/shared/data/errors.json @@ -17,6 +17,7 @@ "description": "We are sorry but the page you are looking for was not found" }, "500": { + "illustration": "500.svg", "title": 500, "description": "We are sorry but our server encountered an internal error" }, diff --git a/shared/data/free-illustrations.json b/shared/data/free-illustrations.json index bcbf63f6a..22df8f07a 100644 --- a/shared/data/free-illustrations.json +++ b/shared/data/free-illustrations.json @@ -1 +1 @@ -{"light":{"not-found":" ","computer-fix":" ","boy-with-key":" ","boy-girl":" "},"dark":{"not-found":" ","computer-fix":" ","boy-with-key":" ","boy-girl":" "},"autodark":{"not-found":" ","computer-fix":" ","boy-with-key":" ","boy-girl":" "}} \ No newline at end of file +{"light":{"not-found":" ","computer-fix":" ","boy-with-key":" ","boy-girl":" ","500":""},"dark":{"not-found":" ","computer-fix":" ","boy-with-key":" ","boy-girl":" ","500":""},"autodark":{"not-found":" ","computer-fix":" ","boy-with-key":" ","boy-girl":" ","500":""}} \ No newline at end of file