Code Monkey home page Code Monkey logo

ngindex.io's Introduction

NGINdeX.io is NGINX autoindex redux.

A pretty but simple autoindex for Nginx without the fancy index module. It will read up the content from a NGINX folder and create a pretty HTML5 table to browse it with column sort and filter.

It uses a minimal CSS library and vanilla JavaScript for resources wise performance.

Install

Downlod header.html and footer.html into a folder in your NGINX webserver and copy the nginx.example.conf setup to your NGINX config file.

Usage

It has no configs, except a couple of params that can be passed to the URL.

Color Theme

  • t = theme_name

ie: https://domain.tld/folder?t=maroon

Background image

  • b = Image_URL

ie: https://domain.tld/folder?b=https%3A%2F%2Fimages.unsplash.com%2Fphoto-1569235186275-626cb53b83ce%3Fixlib%3Drb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1352&q=80&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1352&q=80

DateTime Format

  • l = Language_Locale (Defaults to "sv-SE" = "YYYY-MM-DD HH:MM:SS" so it gets right ordered)

ie: https://domain.tld/folder?l=en-US

CSS libraries and themes

It is tested and works with the followings CSS libraries:

* You can uncomment any of then at the top of header.html (<head>).

How it works

  1. The nginx autoindex module delivers the folder content in JSON format (autoindex_format json) with header.html at the beginning and footer.html at the end of the output
  2. The downloaded JSON will end up inside a hidden DIV as text, without any AJAX call (add_header Content-Type text/html)
  3. When the download is done, the JSON is read and parsed by JavaScript
  4. The table with the server folder content is then build and the loading CSS animation is closed

Screenshots

| |

| |

| |

| |

| |

| |



NGINdeX.io is based on





Quote

"People will not look forward to posterity, who never look backward to their ancestors."

โ€• Edmund Burke, Reflections on the Revolution in France

ngindex.io's People

Contributors

ethraza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ngindex.io's Issues

.. folder / link to parent directory

I do find myself missing the .. directory. Even just this much would be enough:

<thead>
...
    <tr>
        <td><span class="material-icons" title="Folder">folder</span><span style="display:none">directory</span></td>
        <td><a href=".." style="font-weight: bold; display: block; width: 100%;">..</a></td>
        <td></td>
        <td></td>
    </tr>
</thead>

Unable to download files in firefox browser.

Excuse me, I have a problem I want to know the solution: in firefox, whenever I want to download any exe file, click the download icon or file name, it will open the file instead of saving it, why?

Scrollbars are not clickable

If height: 100%; is set on the section element, than the scrollbar becomes unclickable, and you can only scroll using the mouse wheel.
This is a very old bug, and affects all major browsers when using 100% height with overflow.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.