# nginx-fancy-pages

A modern drop in replacement for default Apache index/error pages. This is
an nginx-compatible version of [apache-fancy-pages](https://github.com/kristuff/apache-fancy-pages),
with details kept largely the same. 

```
  ___                  ___
 | __|_ _ _ _  __ _  _| _ \__ _ __ _ ___ ___
 | _/ _` | ' \/ _| || |  _/ _` / _` / -_|_-<
 |_|\__,_|_||_\__|\_, |_| \__,_\__, \___/__/
                  |__/         |___/
 
```

![preview_auto-index-ondesktop](https://git.kjao.me/kjao/nginx-fancy-pages/raw/commit/0c895cecb8f6be0c25848f203b2813341c769981/screenshots/auto-index-desktop-light-dark.png)
![preview_auto-index-on-mobile](https://git.kjao.me/kjao/nginx-fancy-pages/raw/commit/0c895cecb8f6be0c25848f203b2813341c769981/screenshots/auto-index-mobile-dark-light.png)
![preview_error-401](https://git.kjao.me/kjao/nginx-fancy-pages/raw/commit/0c895cecb8f6be0c25848f203b2813341c769981/screenshots/401_dark.png)

## Features
- Responsive design
- Breadcrumb navigation
- Search/Filter results
- Light/Dark theme based on user prefered color scheme  
- Replacement for default error pages: 401, 403, 404, 500

## Requirements
- The NGINX [Fancyindex](https://github.com/aperezdc/ngx-fancyindex) module is compiled with nginx.

## Limitations
- On mobile, column headers are hidden so sorting is implicitly disabled.

## Install

1. Copy content in `nginx.conf` into your nginx website config.
2. Move the `fancy-pages` folder to the same folder level as your serving location. For example,
if your location directive is `/mydatabase`, the theme should be located `/fancy-pages`.
3. Restart or reload nginx.

## Options
It's possible to 'titleize' the current path, which removes underscores and capitalizes
words properly. This is disabled by default, but can be enabled in `js/script.js`.
