diff --git a/README.md b/README.md index 82dc327..ee556cb 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Apaxy may be basic, but it gives you a great deal of creative freedom when styli * Make it pop with Javascript or jQuery. * Add welcome messages, download instructions or copyright notices. * Add custom mime type icons (requires editing the `.htaccess` file) +* Use custom error pages. _Sadly, visual style is all you can work with. It's not possible to alter the generated table structure of the listing directory with Apaxy._ diff --git a/apaxy/htaccess.txt b/apaxy/htaccess.txt index eba6998..dcd1fe7 100644 --- a/apaxy/htaccess.txt +++ b/apaxy/htaccess.txt @@ -88,7 +88,17 @@ DefaultIcon /{FOLDERNAME}/theme/icons/default.png # # THEME FILES # - HeaderName /{FOLDERNAME}/theme/header.html ReadmeName /{FOLDERNAME}/theme/footer.html IndexStyleSheet "/{FOLDERNAME}/theme/style.css" + +# +# ERROR PAGES +# + +ErrorDocument 400 http://%{HTTP_HOST}/{FOLDERNAME}/theme/400.html +ErrorDocument 403 http://%{HTTP_HOST}/{FOLDERNAME}/theme/403.html +ErrorDocument 404 http://%{HTTP_HOST}/{FOLDERNAME}/theme/404.html +ErrorDocument 408 http://%{HTTP_HOST}/{FOLDERNAME}/theme/408.html +ErrorDocument 500 http://%{HTTP_HOST}/{FOLDERNAME}/theme/500.html +ErrorDocument 502 http://%{HTTP_HOST}/{FOLDERNAME}/theme/502.html \ No newline at end of file diff --git a/apaxy/theme/400.html b/apaxy/theme/400.html new file mode 100644 index 0000000..1a9d357 --- /dev/null +++ b/apaxy/theme/400.html @@ -0,0 +1,20 @@ + + + + + + Error 403 + + + + + + +
+

Error.

+
400 +
+

Sorry, I don't understand what you want me to do.

+
+ + diff --git a/apaxy/theme/403.html b/apaxy/theme/403.html new file mode 100644 index 0000000..b4651c3 --- /dev/null +++ b/apaxy/theme/403.html @@ -0,0 +1,20 @@ + + + + + + Error 403 + + + + + + +
+

Error.

+
403 +
+

You aren't allowed to be here.

+
+ + diff --git a/apaxy/theme/404.html b/apaxy/theme/404.html new file mode 100644 index 0000000..fed3840 --- /dev/null +++ b/apaxy/theme/404.html @@ -0,0 +1,20 @@ + + + + + + Error 404 + + + + + + +
+

Error.

+
404 +
+

I can't find what you are looking for...

+
+ + diff --git a/apaxy/theme/408.html b/apaxy/theme/408.html new file mode 100644 index 0000000..2accee4 --- /dev/null +++ b/apaxy/theme/408.html @@ -0,0 +1,20 @@ + + + + + + Error 403 + + + + + + +
+

Error.

+
408 +
+

I refuse to wait any longer.

+
+ + diff --git a/apaxy/theme/500.html b/apaxy/theme/500.html new file mode 100644 index 0000000..58ca9e2 --- /dev/null +++ b/apaxy/theme/500.html @@ -0,0 +1,20 @@ + + + + + + Error 500 + + + + + + +
+

Error.

+
500 +
+

I don't know what to do. This isn't your fault.

+
+ + diff --git a/apaxy/theme/502.html b/apaxy/theme/502.html new file mode 100644 index 0000000..cc53833 --- /dev/null +++ b/apaxy/theme/502.html @@ -0,0 +1,20 @@ + + + + + + Error 403 + + + + + + +
+

Error.

+
502 +
+

I received some invalid information from my master.

+
+ + diff --git a/apaxy/theme/style.css b/apaxy/theme/style.css index 5ab3113..cc0426c 100644 --- a/apaxy/theme/style.css +++ b/apaxy/theme/style.css @@ -165,3 +165,75 @@ tr.parent a[href^="/"] { .indexcollastmod { display: none; } .wrapper { max-width: 100%; } } + +/*------------------------------------*\ + Error pages +/*------------------------------------*/ +/* Animation */ +@-webkit-keyframes fadeDown { + 0% { + opacity: 0; + -webkit-transform: translateY(-20px); + } + 100% { + opacity: 1; + -webkit-transform: translateY(0); + } +} + +@-moz-keyframes fadeDown { + 0% { + opacity: 0; + -moz-transform: translateY(-20px); + } + 100% { + opacity: 1; + -moz-transform: translateY(0); + } +} + +@-ms-keyframes fadeDown { + 0% { + opacity: 0; + -ms-transform: translateY(-20px); + } + 100% { + opacity: 1; + -ms-transform: translateY(0); + } +} + +@-o-keyframes fadeDown { + 0% { + opacity: 0; + -o-transform: translateY(-20px); + } + 100% { + opacity: 1; + -o-transform: translateY(0); + } +} + +@keyframes fadeDown { + 0% { + opacity: 0; + transform: translateY(-20px); + } + 100% { + opacity: 1; + transform: translateY(0); + } +} + +.fadeDown { + -webkit-animation:fadeDown 1s ease; + -moz-animation:fadeDown 1s ease; + -ms-animation:fadeDown 1s ease; + -o-animation:fadeDown 1s ease; + animation:fadeDown 1s ease; +} + +/* Error code display */ +.errorCode { + font-size: 80px; +}