diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8c495d7..8c131a9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -156,6 +156,7 @@ jobs: # Docs: test -f ./out/lost-in-space/404.html test -f ./out/app-down/404.html test -f ./out/connection/404.html + test -f ./out/matrix/404.html docker-image: name: Build docker image diff --git a/CHANGELOG.md b/CHANGELOG.md index 9736e4f..04eb640 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog][keepachangelog] and this project adheres to [Semantic Versioning][semver]. +## UNRELEASED + +### Added + +- Template `matrix` [#81] + +### Fixed + +- Localization mistakes [#81] + +[#81]:https://github.com/tarampampam/error-pages/pull/81 + ## v2.10.1 ### Fixed diff --git a/README.md b/README.md index 5948572..7c03475 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,7 @@ Transfer/sec: 140.23MB | `lost-in-space` | [![lost-in-space][lost-in-space-screen]][lost-in-space-link] | | `app-down` | [![app-down][app-down-screen]][app-down-link] | | `connection` | [![connection][connection-screen]][connection-link] | +| `matrix` | [![matrix][matrix-screen]][matrix-link] | > Note: `noise` template highly uses the CPU, be careful @@ -147,6 +148,8 @@ Transfer/sec: 140.23MB [app-down-link]:https://tarampampam.github.io/error-pages/app-down/404.html [connection-screen]:https://hsto.org/webt/x4/ah/jb/x4ahjboo4-arm3bxpaash_sflmw.png [connection-link]:https://tarampampam.github.io/error-pages/connection/404.html +[matrix-screen]:https://hsto.org/webt/ng/tf/oi/ngtfoiolvmq6hf15kimcxmhprhk.gif +[matrix-link]:https://tarampampam.github.io/error-pages/matrix/404.html ## 🦾 Contributors diff --git a/error-pages.yml b/error-pages.yml index f249cf5..42e6bd1 100644 --- a/error-pages.yml +++ b/error-pages.yml @@ -14,6 +14,7 @@ templates: - path: ./templates/lost-in-space.html - path: ./templates/app-down.html - path: ./templates/connection.html + - path: ./templates/matrix.html formats: json: diff --git a/l10n/l10n.js b/l10n/l10n.js index bb9391d..23a8234 100644 --- a/l10n/l10n.js +++ b/l10n/l10n.js @@ -31,7 +31,7 @@ Object.defineProperty(window, 'l10n', { ru: 'Доступ к странице запрещён', uk: 'Доступ до сторінки заборонено' }, - 'Not Found': {ru: 'Ресурс не найден', uk: 'Ресурс не знайдено'}, + 'Not Found': {ru: 'Страница не найдена', uk: 'Сторінка не знайдена'}, 'The server can not find the requested page': { ru: 'Сервер не смог найти запрашиваемую страницу', uk: 'Сервер не міг знайти запитану сторінку' diff --git a/templates/matrix.html b/templates/matrix.html new file mode 100644 index 0000000..5c51e55 --- /dev/null +++ b/templates/matrix.html @@ -0,0 +1,279 @@ + + + + + + + + + {{ message }} ({{ code }}) + + + + + + +
+ + +
+

{{ code }}: {{ message }}

+

{{ description }}

+ + {{ if show_details }} +
+
    + {{- if host }}
  • Host: {{ host }}
  • {{ end -}} + {{- if original_uri }}
  • Original URI: {{ original_uri }}
  • {{ end -}} + {{- if forwarded_for }}
  • Forwarded for: {{ forwarded_for }}
  • {{ end -}} + {{- if namespace }}
  • Namespace: {{ namespace }}
  • {{ end -}} + {{- if ingress_name }}
  • Ingress name: {{ ingress_name }}
  • {{ end -}} + {{- if service_name }}
  • Service name: {{ service_name }}
  • {{ end -}} + {{- if service_port }}
  • Service port: {{ service_port }}
  • {{ end -}} + {{- if request_id }}
  • Request ID: {{ request_id }}
  • {{ end -}} +
  • Timestamp: {{ now.Unix }}
  • +
+
+ {{ end }} +
+
+ + + + + + +