diff --git a/README.md b/README.md index bc60969..715309c 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,9 @@ A demo server using Flask is also available in [flask_demo.py](examples/flask_de ``` JavaScript params = { "title": "Catastrophic infrastructure failure", + "more_information": { + "for": "no information", + }, "browser_status": { "status": "error", "status_text": "Out of Memory", @@ -151,6 +154,7 @@ params = { "hidden": false, "text": "cloudflare.com", "link": "https://www.cloudflare.com/", + "for": "more information", }, // Configuration for the Browser/Cloudflare/Host status diff --git a/cloudflare_error_page/templates/error.html b/cloudflare_error_page/templates/error.html index 96661ef..22953ec 100644 --- a/cloudflare_error_page/templates/error.html +++ b/cloudflare_error_page/templates/error.html @@ -29,7 +29,7 @@ {% set more_info = params.more_information or {} %} {% if not more_info.hidden or false %}{# default: shown #}
- Visit {{more_info.text or 'cloudflare.com'}} for more information. + Visit {{more_info.text or 'cloudflare.com'}} for {{more_info.for or 'more information'}}.
{% endif %}
{{ params.time }}
diff --git a/editor/resources/index.html b/editor/resources/index.html index d301e38..b48e1c1 100644 --- a/editor/resources/index.html +++ b/editor/resources/index.html @@ -64,6 +64,7 @@ "more_information": { "hidden": false, "text": "cloudflare.com", + "for": "more information", }, "browser_status": { "status": "ok", @@ -97,6 +98,9 @@ "catastrophic": { "title": "Catastrophic infrastructure failure", "error_code": '500', + "more_information": { + "for": "no information", + }, "browser_status": { "status": "error", "status_text": "Out of Memory" @@ -215,6 +219,7 @@ $('more_hidden').checked = !!(cfg.more_information && cfg.more_information.hidden); $('more_text').value = cfg.more_information?.text ?? ''; $('more_link').value = cfg.more_information?.link ?? ''; + $('more_for').value = cfg.more_information?.for ?? ''; $('browser_status').value = cfg.browser_status?.status ?? 'ok'; $('browser_location').value = cfg.browser_status?.location ?? ''; @@ -250,7 +255,8 @@ more_information: { hidden: !!$('more_hidden').checked, text: $('more_text').value, - link: $('more_link').value + link: $('more_link').value, + for: $('more_for').value }, browser_status: { status: $('browser_status').value, @@ -738,31 +744,33 @@ -
-
Visit ... for more information
- -
-
- -
- - -
+
+
+ Visit ... +
+ +
+
-
- -
- -
+
+ +
+
+
-
- -
- -
+
+ +
+ +
+
+ +
+ +
+
diff --git a/editor/resources/template.ejs b/editor/resources/template.ejs index cef9ad4..84f0f30 100644 --- a/editor/resources/template.ejs +++ b/editor/resources/template.ejs @@ -31,7 +31,7 @@ let html_title_output = params.html_title || (error_code + ': ' + title); <% let more_info = params.more_information || {}; %> <% if (!more_info.hidden) { %>
- Visit <%= more_info.text || 'cloudflare.com' %> for more information. + Visit <%= more_info.text || 'cloudflare.com' %> for <%= more_info.for || "more information" %>.
<% } %>
<%= params.time %>
diff --git a/examples/catastrophic.json b/examples/catastrophic.json index cba89a4..3261939 100644 --- a/examples/catastrophic.json +++ b/examples/catastrophic.json @@ -1,5 +1,8 @@ { "title": "Catastrophic infrastructure failure", + "more_information": { + "for": "no information" + }, "browser_status": { "status": "error", "status_text": "Out of Memory"