diff --git a/src/main/resources/static/images/page-loading-dark.png b/src/main/resources/static/images/page-loading-dark.png new file mode 100644 index 0000000..9b0e1fc Binary files /dev/null and b/src/main/resources/static/images/page-loading-dark.png differ diff --git a/src/main/resources/static/images/page-loading-light.png b/src/main/resources/static/images/page-loading-light.png new file mode 100644 index 0000000..2e75128 Binary files /dev/null and b/src/main/resources/static/images/page-loading-light.png differ diff --git a/src/main/resources/static/js/natural_js/natural.config.js b/src/main/resources/static/js/natural_js/natural.config.js index fef00b1..a1d532e 100644 --- a/src/main/resources/static/js/natural_js/natural.config.js +++ b/src/main/resources/static/js/natural_js/natural.config.js @@ -103,7 +103,14 @@ beforeSend : function(request, xhr, settings) { // Display page loading image. if(request.options.dataType === "html" && request.options.target !== null && request.options.append === false) { - request.options.target.html('
'); + var html = '
'; + if(window.matchMedia && window.matchMedia("(prefers-color-scheme:dark)").matches) { + html += ''; + } else { + html += ''; + } + html += '
'; + request.options.target.html(html); } }, /**